sfx2/source/dialog/backingwindow.cxx | 31 ++++++++++++++++++++++++++++++- sfx2/source/dialog/backingwindow.hxx | 1 + 2 files changed, 31 insertions(+), 1 deletion(-)
New commits: commit ea20bddcf54a0d35d944855931e8b9e51bf02842 Author: Efe Gürkan YALAMAN <efeyala...@gmail.com> Date: Fri Jul 4 18:04:30 2014 +0300 Start of filtering implementation Change-Id: Iebf71deb4739703d87b944300cbc1b8ee2daacc5 diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index daa5322..15c126a 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -33,6 +33,7 @@ #include <vcl/msgbox.hxx> #include <vcl/toolbox.hxx> +#include <vcl/menubtn.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -301,7 +302,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 ); @@ -574,6 +588,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 c6cdade..b2b14ca 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*);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits