diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-10 15:09:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-11 15:32:14 +0100 |
commit | 33603a582bdd173a8e85c78bb0e8ef82874b8e59 (patch) | |
tree | 863593b5516b61ca37122ea566087bea8744e830 /sw/source/uibase/inc | |
parent | 51e5e4970bda753faf7403cbf3c68ded3ed7a71f (diff) |
convert writer navigator to .ui format
Change-Id: I83f834ea050372362b50de61753c2b3e33c67778
Diffstat (limited to 'sw/source/uibase/inc')
-rw-r--r-- | sw/source/uibase/inc/conttree.hxx | 18 | ||||
-rw-r--r-- | sw/source/uibase/inc/navipi.hxx | 33 | ||||
-rw-r--r-- | sw/source/uibase/inc/utlui.hrc | 5 |
3 files changed, 31 insertions, 25 deletions
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 9598b76e6999..3afdd3e135d5 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -55,6 +55,7 @@ class SwContentTree : public SvTreeListBox , public SfxListener { + VclPtr<SwNavigationPI> m_xDialog; ImageList m_aEntryImages; OUString m_sSpace; AutoTimer m_aUpdTimer; @@ -156,7 +157,7 @@ protected: virtual void ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) override; public: - SwContentTree(vcl::Window* pParent, const ResId& rResId); + SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog); virtual ~SwContentTree() override; virtual void dispose() override; OUString GetEntryAltText( SvTreeListEntry* pEntry ) const override; @@ -199,7 +200,7 @@ public: virtual bool Collapse( SvTreeListEntry* pParent ) override; /** Execute commands of the Navigator */ - void ExecCommand(sal_uInt16 nCmd, bool bModifier); + void ExecCommand(const OUString& rCmd, bool bModifier); void ShowTree(); /** folded together will not be glidled */ @@ -221,6 +222,7 @@ public: virtual void KeyInput(const KeyEvent& rKEvt) override; virtual bool Select( SvTreeListEntry* pEntry, bool bSelect=true ) override; + virtual Size GetOptimalSize() const override; using Control::Notify; // FIXME why do we have 2 of these virtual void Notify(SfxBroadcaster& rBC, SfxHint const& rHint) override; @@ -247,10 +249,11 @@ namespace sfx2 { class FileDialogHelper; } class SwGlobalTree : public SvTreeListBox { private: - AutoTimer aUpdateTimer; - OUString aContextStrings[GLOBAL_CONTEXT_COUNT]; + VclPtr<SwNavigationPI> xDialog; + AutoTimer aUpdateTimer; + OUString aContextStrings[GLOBAL_CONTEXT_COUNT]; - ImageList aEntryImages; + ImageList aEntryImages; SwWrtShell* pActiveShell; SvTreeListEntry* pEmphasisEntry; // Drag'n Drop emphasis @@ -330,9 +333,10 @@ protected: virtual void ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) override; public: - SwGlobalTree(vcl::Window* pParent, const ResId& rResId); + SwGlobalTree(vcl::Window* pParent, SwNavigationPI* pDialog); virtual ~SwGlobalTree() override; virtual void dispose() override; + virtual Size GetOptimalSize() const override; void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox); void InsertRegion( const SwGlblDocContent* pCont, @@ -342,7 +346,7 @@ public: void ShowTree(); void HideTree(); - void ExecCommand(sal_uInt16 nCmd); + void ExecCommand(const OUString& rCmd); void Display(bool bOnlyUpdateUserData = false); diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 6c93a1b9467a..503c1d7da878 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -27,6 +27,7 @@ #include <sfx2/childwin.hxx> #include <sfx2/ctrlitem.hxx> #include <sfx2/tbxctrl.hxx> +#include <svx/sidebar/PanelLayout.hxx> #include <conttree.hxx> class SwWrtShell; @@ -38,20 +39,26 @@ class SwView; class SwNavigationConfig; class SfxObjectShellLock; class SfxChildWindowContext; -class SwNavigationPI; enum class RegionMode; class SpinField; class SwNavHelpToolBox : public ToolBox { + VclPtr<SwNavigationPI> m_xDialog; virtual void MouseButtonDown(const MouseEvent &rEvt) override; virtual void RequestHelp( const HelpEvent& rHEvt ) override; - public: - SwNavHelpToolBox(SwNavigationPI* pParent, const ResId &rResId); + virtual void dispose() override; +public: + SwNavHelpToolBox(Window* pParent); + void SetDialog(SwNavigationPI* pDialog) + { + m_xDialog = pDialog; + } + ~SwNavHelpToolBox() override; }; -class SwNavigationPI : public vcl::Window, - public SfxControllerItem, public SfxListener +class SwNavigationPI : public PanelLayout, + public SfxControllerItem, public SfxListener { friend class SwNavigationChild; friend class SwContentTree; @@ -59,8 +66,10 @@ class SwNavigationPI : public vcl::Window, VclPtr<SwNavHelpToolBox> m_aContentToolBox; VclPtr<ToolBox> m_aGlobalToolBox; - ImageList m_aContentImageList; + VclPtr<NumEditAction> m_xEdit; + VclPtr<VclContainer> m_aContentBox; VclPtr<SwContentTree> m_aContentTree; + VclPtr<VclContainer> m_aGlobalBox; VclPtr<SwGlobalTree> m_aGlobalTree; VclPtr<ListBox> m_aDocListBox; Idle m_aPageChgIdle; @@ -81,13 +90,9 @@ class SwNavigationPI : public vcl::Window, SwNavigationConfig *m_pConfig; SfxBindings &m_rBindings; - long m_nDocLBIniHeight; - long m_nWishWidth; sal_uInt16 m_nAutoMarkIdx; RegionMode m_nRegionMode; // 0 - URL, 1 - region with link 2 - region without link - short m_nZoomIn; - short m_nZoomOutInit; - short m_nZoomOut; + Size m_aExpandedSize; bool m_bIsZoomedIn : 1; bool m_bPageCtrlsVisible : 1; @@ -114,7 +119,6 @@ class SwNavigationPI : public vcl::Window, DECL_LINK( ClosePopupWindow, SfxPopupWindow *, void ); void UsePage(); - void InitImageList(); void SetPopupWindow( SfxPopupWindow* ); using Window::Notify; @@ -122,14 +126,11 @@ class SwNavigationPI : public vcl::Window, protected: - virtual void Resize() override; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; - // release ObjectShellLock early enough for app end virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; NumEditAction& GetPageEdit(); - bool ToggleTree(); + void ToggleTree(); void SetGlobalMode(bool bSet) {m_bGlobalMode = bSet;} public: diff --git a/sw/source/uibase/inc/utlui.hrc b/sw/source/uibase/inc/utlui.hrc index 7285dfaf6b77..6789d2ab4d71 100644 --- a/sw/source/uibase/inc/utlui.hrc +++ b/sw/source/uibase/inc/utlui.hrc @@ -145,8 +145,6 @@ #define RES_FRMEX_MENU (STR_AUTH_FIELD_END + 1) -#define DLG_NAVIGATION_PI (RC_UTLUI_BEGIN + 1) - #define IMG_NAVI_ENTRYBMP (RC_UTLUI_BEGIN + 4) #define ILIST_DB_DLG (RC_UTLUI_BEGIN + 6) @@ -157,6 +155,9 @@ #define IMG_VIEWLAYOUT_SINGLECOLUMN (RC_UTLUI_BEGIN + 16) #define IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE (RC_UTLUI_BEGIN + 17) #define IMG_PAGE_BREAK (RC_UTLUI_BEGIN + 18) +#define RID_IMG_DROP_REGION (RC_UTLUI_BEGIN + 19) +#define RID_IMG_DROP_LINK (RC_UTLUI_BEGIN + 20) +#define RID_IMG_DROP_COPY (RC_UTLUI_BEGIN + 21) //local ids of the Database ImageLists #define IMG_COLLAPSE 18002 /*RID_SVXIMG_COLLAPSEDNODE*/ |