summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfe Gürkan YALAMAN <efeyalaman@gmail.com>2014-07-04 18:04:30 +0300
committerEfe Gürkan YALAMAN <efeyalaman@gmail.com>2014-08-08 18:25:52 +0300
commit1b5edb71265484d8d0ce8895c37f3b4aefb79772 (patch)
tree3603c43c35780d5ccceae39b657ee8fd653ab539
parent40bffc3c658f988ebd7bb87865229b35757c4c82 (diff)
Start of filtering implementation
Change-Id: Iebf71deb4739703d87b944300cbc1b8ee2daacc5
-rw-r--r--sfx2/source/dialog/backingwindow.cxx31
-rw-r--r--sfx2/source/dialog/backingwindow.hxx1
2 files changed, 31 insertions, 1 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index c7a39f25f909..1f9064158a45 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -34,6 +34,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/toolbox.hxx>
+#include <vcl/menubtn.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -303,7 +304,20 @@ void BackingWindow::initControls()
*Filter and the bars*/
setupButton( mpOpenButton );
- setupButton( mpTemplateButton );
+ //setupButton( mpTemplateButton );
+ Font bFont(mpTemplateButton->GetControlFont());
+ bFont.SetHeight(nButtonsFontSize);
+ mpTemplateButton->SetControlFont(bFont);
+
+ // color that fits the theme
+ mpTemplateButton->SetControlForeground(aButtonsText);
+
+
+ mpTemplateButton->SetDropDown( PUSHBUTTON_DROPDOWN_MENUBUTTON );
+ MenuButton *pMenuButton = static_cast<MenuButton*> (mpTemplateButton);
+ pMenuButton->SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
+ pMenuButton->SetActivateHdl( LINK( this, BackingWindow, ActivateHdl ));
+ //pMenuButton->Activate();
setupButton( mpWriterAllButton );
setupButton( mpDrawAllButton );
@@ -578,6 +592,21 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton )
return 0;
}
+IMPL_LINK( BackingWindow, ActivateHdl, Button*, pButton )
+{
+ printf("---------------------------------");
+ MenuButton *pMenuButton = static_cast<MenuButton*> (pButton);
+ PopupMenu *pFilterMenu = new PopupMenu;
+
+ //pFilterMenu->SetSelectHdl(LINK( this, BackingWindow, FilterMenuSelectHdl));
+ pFilterMenu->InsertItem(0, "Writer");
+
+
+ pMenuButton->SetPopupMenu( pFilterMenu );
+
+
+ return 0;
+}
IMPL_LINK_NOARG( BackingWindow, OpenRegionHdl)
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index c6cdade2239a..b2b14ca0e739 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -111,6 +111,7 @@ class BackingWindow
std::set<const ThumbnailViewItem*,selection_cmp_fn> maSelFolders;
DECL_LINK(ClickHdl, Button*);
+ DECL_LINK(ActivateHdl, Button*);
DECL_LINK(ExtLinkClickHdl, Button*);
DECL_LINK(OpenRegionHdl, void*);
DECL_LINK(OpenTemplateHdl, ThumbnailViewItem*);