summaryrefslogtreecommitdiff
path: root/include/vcl/notebookbar.hxx
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2016-06-17 23:54:00 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-06-27 17:51:56 +0000
commit1df394503f1e62b091453c95c05a212892ae8d58 (patch)
tree4767346ce348cc498df09985b6fa431a45f255d3 /include/vcl/notebookbar.hxx
parent0c80b4dfd27109def7a5bdc34c3fcc5499db6c0d (diff)
GSoC notebookbar: switching tabs depending on context
+ sfx2::sidebar::EnumContext moved to the vcl module + TabPage contains vector with context values + vcl builder reads control's contexts from the "class" mark + ContextTabControl shows tabs depending on context Change-Id: I661b0d3f35d46ace2a2e8eb1d374148f0c60017d Reviewed-on: https://gerrit.libreoffice.org/26447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'include/vcl/notebookbar.hxx')
-rw-r--r--include/vcl/notebookbar.hxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/vcl/notebookbar.hxx b/include/vcl/notebookbar.hxx
index 9dd7e9f5b708..37fa7ee3dc36 100644
--- a/include/vcl/notebookbar.hxx
+++ b/include/vcl/notebookbar.hxx
@@ -12,9 +12,13 @@
#include <vcl/builder.hxx>
#include <vcl/ctrl.hxx>
+#include <vcl/contexttabctrl.hxx>
+#include <com/sun/star/ui/XContextChangeEventListener.hpp>
+#include <vcl/EnumContext.hxx>
/// This implements Widget Layout-based notebook-like menu bar.
-class NotebookBar : public Control, public VclBuilderContainer
+class NotebookBar : public Control, public VclBuilderContainer,
+ public css::ui::XContextChangeEventListener
{
public:
NotebookBar(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame);
@@ -25,6 +29,20 @@ public:
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) SAL_OVERRIDE;
virtual void StateChanged(StateChangedType nType) override;
+
+ // XContextChangeEventListener
+ virtual void SAL_CALL notifyContextChangeEvent(const css::ui::ContextChangeEventObject& rEvent)
+ throw (css::uno::RuntimeException, std::exception) override;
+
+ virtual ::css::uno::Any SAL_CALL queryInterface(const ::css::uno::Type& aType)
+ throw (::css::uno::RuntimeException, ::std::exception) override;
+ virtual void SAL_CALL acquire() throw () override;
+ virtual void SAL_CALL release() throw () override;
+ virtual void SAL_CALL disposing(const ::css::lang::EventObject&)
+ throw (::css::uno::RuntimeException, ::std::exception) override;
+
+private:
+ VclPtr<ContextTabControl> m_pTabControl;
};
#endif // INCLUDED_VCL_NOTEBOOKBAR_HXX