diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-16 14:07:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-17 12:35:54 +0000 |
commit | 48c15285c52f6554f1aadab6068c076c2139ef89 (patch) | |
tree | 35360eb56a9177528d0de813e20bc5bdc1454a79 /include | |
parent | f4804a6cf1fa2a1941f43829a9801638bd456e2c (diff) |
implement loading docking windows from .ui format
Change-Id: I90375232aefbe40412614ca0f30ba467cf393f2e
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/dockwin.hxx | 4 | ||||
-rw-r--r-- | include/vcl/dockwin.hxx | 34 | ||||
-rw-r--r-- | include/vcl/layout.hxx | 3 | ||||
-rw-r--r-- | include/vcl/syswin.hxx | 2 | ||||
-rw-r--r-- | include/vcl/window.hxx | 2 |
5 files changed, 36 insertions, 9 deletions
diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx index 4e00ab2cc55e..1d50cc430762 100644 --- a/include/sfx2/dockwin.hxx +++ b/include/sfx2/dockwin.hxx @@ -79,6 +79,10 @@ public: SfxChildWindow *pCW, vcl::Window* pParent, const ResId& rResId); + SfxDockingWindow( SfxBindings *pBindings, + SfxChildWindow *pCW, + vcl::Window* pParent, + const OUString& rID, const OUString& rUIXMLDescription ); virtual ~SfxDockingWindow(); void Initialize (SfxChildWinInfo* pInfo); diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index f683cc83dda2..caf25cd9a782 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -22,6 +22,7 @@ #include <tools/solar.h> #include <vcl/dllapi.h> +#include <vcl/builder.hxx> #include <vcl/floatwin.hxx> #include <vector> @@ -222,7 +223,9 @@ public: // - DockingWindow - -class VCL_DLLPUBLIC DockingWindow : public vcl::Window +class VCL_DLLPUBLIC DockingWindow + : public vcl::Window + , public VclBuilderContainer { class ImplData; private: @@ -256,9 +259,15 @@ private: mbPinned:1, mbRollUp:1, mbDockBtn:1, - mbHideBtn:1; + mbHideBtn:1, + mbIsDefferedInit:1, + mbIsCalculatingInitialLayoutSize:1, + mbInitialLayoutDone:1; + + vcl::Window* mpDialogParent; SAL_DLLPRIVATE void ImplInitDockingWindowData(); + SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, Window &rBox); // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE DockingWindow (const DockingWindow &); @@ -270,16 +279,26 @@ protected: SAL_DLLPRIVATE void ImplInitSettings(); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); + SAL_DLLPRIVATE void DoInitialLayout(); + + void loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription); + public: - SAL_DLLPRIVATE bool ImplStartDocking( const Point& rPos ); + bool isLayoutEnabled() const; + void setOptimalLayoutSize(); + bool isCalculatingInitialLayoutSize() const { return mbIsCalculatingInitialLayoutSize; } + SAL_DLLPRIVATE bool ImplStartDocking( const Point& rPos ); + SAL_DLLPRIVATE bool isDeferredInit() const { return mbIsDefferedInit; } + void doDeferredInit(WinBits nBits); protected: DockingWindow( WindowType nType ); public: - DockingWindow( vcl::Window* pParent, WinBits nStyle = WB_STDDOCKWIN ); - DockingWindow( vcl::Window* pParent, const ResId& rResId ); - virtual ~DockingWindow(); + DockingWindow(vcl::Window* pParent, WinBits nStyle = WB_STDDOCKWIN); + DockingWindow(vcl::Window* pParent, const ResId& rResId); + DockingWindow(vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription); + virtual ~DockingWindow(); virtual void StartDocking(); virtual bool Docking( const Point& rPos, Rectangle& rRect ); @@ -339,6 +358,9 @@ public: Size GetSizePixel() const SAL_OVERRIDE; void SetOutputSizePixel( const Size& rNewSize ) SAL_OVERRIDE; Size GetOutputSizePixel() const; + + virtual void SetText( const OUString& rStr ) SAL_OVERRIDE; + virtual OUString GetText() const SAL_OVERRIDE; }; inline void DockingWindow::SetPin( bool bPin ) diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index edb8d6b6434a..efeabf858e76 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -776,7 +776,8 @@ VCL_DLLPUBLIC bool isLayoutEnabled(const vcl::Window *pWindow); inline bool isContainerWindow(const vcl::Window &rWindow) { WindowType eType = rWindow.GetType(); - return (eType == WINDOW_CONTAINER || eType == WINDOW_SCROLLWINDOW); + return eType == WINDOW_CONTAINER || eType == WINDOW_SCROLLWINDOW || + (eType == WINDOW_DOCKINGWINDOW && ::isLayoutEnabled(&rWindow)); } inline bool isContainerWindow(const vcl::Window *pWindow) diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 1ec6054ca747..f52d54d48e44 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -164,7 +164,7 @@ public: private: SAL_DLLPRIVATE void Init(); SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin ); - SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, VclContainer &rBox); + SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, Window &rBox); DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, void* ); protected: diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 7e09b262d0ce..b6874997ed22 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -440,7 +440,6 @@ public: SAL_DLLPRIVATE bool ImplIsFloatingWindow() const; SAL_DLLPRIVATE bool ImplIsPushButton() const; SAL_DLLPRIVATE bool ImplIsSplitter() const; - SAL_DLLPRIVATE bool ImplIsDockingWindow() const; SAL_DLLPRIVATE bool ImplIsOverlapWindow() const; SAL_DLLPRIVATE void ImplIsInTaskPaneList( bool mbIsInTaskList ); @@ -763,6 +762,7 @@ public: void SetType( WindowType nType ); WindowType GetType() const; bool IsSystemWindow() const; + bool IsDockingWindow() const; bool IsDialog() const; bool IsMenuFloatingWindow() const; bool IsToolbarFloatingWindow() const; |