diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-07-20 16:08:38 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-07-22 08:59:59 +0000 |
commit | b949604b91f77dee3b2737ea09e1ac3ade4eed1c (patch) | |
tree | 84b3f65668c933f8fc5e5ce3541df5aa0919c7ef /include | |
parent | b5c05876f73c31270bc374e4f481ef1d09a42e5f (diff) |
GSoC notebookbar: file menu
+ added icon to the notebookbar, after click the file menu will appear
Change-Id: I30e1ed7e2c4a194e150c7196652904fd4e5c9e8e
Reviewed-on: https://gerrit.libreoffice.org/27347
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/notebookbar/SfxNotebookBar.hxx | 12 | ||||
-rw-r--r-- | include/vcl/notebookbar.hxx | 4 | ||||
-rw-r--r-- | include/vcl/tabctrl.hxx | 10 |
3 files changed, 23 insertions, 3 deletions
diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx index d76b35e6a16b..d3387a2e5338 100644 --- a/include/sfx2/notebookbar/SfxNotebookBar.hxx +++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx @@ -11,6 +11,8 @@ #define INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX #include <sfx2/dllapi.h> +#include <com/sun/star/frame/XLayoutManager.hpp> +#include <vcl/notebookbar.hxx> class SfxBindings; @@ -22,6 +24,7 @@ class SFX2_DLLPUBLIC SfxNotebookBar { public: static void CloseMethod(SfxBindings& rBindings); + static void CloseMethod(SystemWindow* pSysWindow); /// Function to be called from the sdi's ExecMethod. static void ExecMethod(SfxBindings& rBindings); @@ -33,6 +36,15 @@ public: const OUString& rUIFile); static void RemoveListeners(SystemWindow* pSysWindow); + + static void ShowMenubar(bool bShow); + +private: + static bool m_bLock; + static css::uno::Reference<css::frame::XLayoutManager> m_xLayoutManager; + static css::uno::Reference<css::frame::XFrame> m_xFrame; + + DECL_STATIC_LINK_TYPED(SfxNotebookBar, ToggleMenubar, NotebookBar*, void); }; } // namespace sfx2 diff --git a/include/vcl/notebookbar.hxx b/include/vcl/notebookbar.hxx index 05c91a89a232..51f32aab6d45 100644 --- a/include/vcl/notebookbar.hxx +++ b/include/vcl/notebookbar.hxx @@ -17,7 +17,7 @@ #include <com/sun/star/ui/XContextChangeEventListener.hpp> /// This implements Widget Layout-based notebook-like menu bar. -class NotebookBar : public Control, public VclBuilderContainer +class VCL_DLLPUBLIC NotebookBar : public Control, public VclBuilderContainer { friend class NotebookBarContextChangeEventListener; public: @@ -28,6 +28,8 @@ public: virtual Size GetOptimalSize() const SAL_OVERRIDE; virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) SAL_OVERRIDE; + void SetIconClickHdl(Link<NotebookBar*, void> aHdl); + virtual void StateChanged(StateChangedType nType) override; const css::uno::Reference<css::ui::XContextChangeEventListener>& getContextChangeEventListener() const { return m_pEventListener; } diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index a708161c8c83..14974e7609b3 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -132,10 +132,10 @@ public: sal_uInt16 GetPageId( const TabPage& rPage ) const; sal_uInt16 GetPageId( const OString& rName ) const; - void SetCurPageId( sal_uInt16 nPageId ); + virtual void SetCurPageId( sal_uInt16 nPageId ); sal_uInt16 GetCurPageId() const; - void SelectTabPage( sal_uInt16 nPageId ); + virtual void SelectTabPage( sal_uInt16 nPageId ); void SetTabPage( sal_uInt16 nPageId, TabPage* pPage ); TabPage* GetTabPage( sal_uInt16 nPageId ) const; @@ -194,14 +194,19 @@ public: virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override; }; +class NotebookBar; + class VCL_DLLPUBLIC NotebookbarTabControl : public TabControl { public: NotebookbarTabControl( vcl::Window* pParent, WinBits nStyle = WB_STDTABCONTROL ); void SetContext( vcl::EnumContext::Context eContext ); + void SetIconClickHdl( Link<NotebookBar*, void> aHdl ); virtual sal_uInt16 GetPageId( const Point& rPos ) const override; + virtual void SelectTabPage( sal_uInt16 nPageId ) override; + virtual void SetCurPageId( sal_uInt16 nPageId ) override; protected: virtual bool ImplPlaceTabs( long nWidth ) override; @@ -209,6 +214,7 @@ protected: private: vcl::EnumContext::Context eLastContext; + Link<NotebookBar*,void> m_aIconClickHdl; }; #endif // INCLUDED_VCL_TABCTRL_HXX |