diff options
author | Efe Gürkan YALAMAN <efeyalaman@gmail.com> | 2014-07-04 18:04:30 +0300 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-08-14 22:20:25 +0200 |
commit | 219f314c47add3d850bc0bdee2cd2381d48f49ea (patch) | |
tree | 2dee448bfa2bd682c0a66aceaca60dedb9a718fa /sfx2 | |
parent | e3f513ce20044db9ea26a22e366c0eb9ec945320 (diff) |
Start of filtering implementation
Change-Id: Iebf71deb4739703d87b944300cbc1b8ee2daacc5
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 31 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.hxx | 1 |
2 files changed, 31 insertions, 1 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index e6e739ba093c..49892ef3cc1a 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> @@ -302,7 +303,20 @@ void BackingWindow::initControls() *Filter and the bars*/ setupButton( mpOpenButton ); - setupButton( mpTemplateButton ); + //setupButton( mpTemplateButton ); + Font aFont(mpTemplateButton->GetSettings().GetStyleSettings().GetPushButtonFont()); + aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier)); + mpTemplateButton->SetControlFont(aFont); + + // 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 ); @@ -575,6 +589,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*); |