aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.hh
AgeCommit message (Collapse)AuthorFilesLines
2016-08-28fix compiler warning about std::auto_ptrMathias Gumz1-2/+2
fluxbox uses std::unique_ptr<> where it previously used std::auto_ptr<>. C++0X was approved in 2011. among other things, it deprecates std::auto_ptr. 5 years is long enough for compilers to catch up the standard.
2015-02-05Feature: different MenuSearch modesMathias Gumz1-5/+4
Fluxbox now supports three MenuSearch modes: * NoWhere - essentially "disabling" the menu search. * Somewhere - the search string matches somewhere. * ItemStart - the search string matches at the start of a menu item. The default value is "ItemStart", just in the good old times. As long as this feature is not configurable via the menu it would irritate users with distinct muscle memory who type without thinking OR checking the visual feedback: they would trigger items they did not intent to trigger after years of the old behavior. Once this feature get's an entry in the config menu the default value might change.
2015-01-28Feature: typeahead in menu matches text anywhereMathias Gumz1-27/+22
This commit implements a tweak to the typeahead feature already existent in fluxbox: If the user opens up a menu and starts typing, fluxbox tries to detect matching menu items and makes them available for quick selection. The typed pattern is now search also in the middle of the text. I opted to strip down the code quite a bit and remove complexity by throwing out FbTk::TypeAhead and FbTk::SearchResult because I do not see the need for a general solution when the only use case for such a feature is in fluxbox' menus. FbTk::ITypeAheadable shrunk down to 2 functions; the whole file might be combined with the code that implements FbTk::Menu::TypeSearch. FbTk::Menu::setIndex() and related code is also gone: the position of each menu item is defined by it's position in the items container. This reduces the mount of book keeping fluxbox has to do. Fewer moving parts is a good thing. It's possible that users start to complaint because they expect their typed pattern to match only at the beginning of the text OR that some demand other tweaks. We will see. This commit also fixes a regression introduced by 8387742c. The bug made the menu vanish.
2015-01-21Refactor: bundle related members togetherMathias Gumz1-37/+43
Also: try to avoid unsigned/signed problems in drawing code.
2015-01-16Reduce number of allocations for menu creationMathias Gumz1-3/+11
Every time either the Slit menu or the Toolbar menu were added to the root menu, the whole root menu was (re)created from scratch. Now we create and remove only the menus needed. Side effect: the position of these menus is now at the end of the root menu and not somewhere in between. If users complaint, I' ll think about it.
2015-01-15Refactor menu code: be more explicit and compactMathias Gumz1-28/+10
This commit is a preparation step for some menu cleanup ahead. To make it easier to understand which types of MenuItems are added where and when, I converted the overloaded FbTk::Menu::insert() functions into explicit ones (Menu::insertSubmenu(), Menu::insertItem(), etc. ). This makes it possible to just grep for 'insertSubmenu()'. Side effect this commit: it trims down the very verbose creation of menu items in regards to how the labels are created. Minor: FbTk::Menu::shown and FbTk::Menu::s_focused are moved out of the class.
2015-01-03Clean unused variablesMathias Gumz1-3/+0
2011-05-10Remove the Observer dependency from FbTk::MenuPavel Labath1-6/+2
2011-05-10Convert FbTk::Theme::reconfigSig and friends to the new Signal systemPavel Labath1-0/+3
I removed the const versions of reconfigSig() in the process since FbTk::Signal has no const methods anyway.
2011-02-24little helper function 'isTitleVisible()' for FbTk::MenuMathias Gumz1-0/+1
2011-01-15small refactoring of FbTk/Menu codeMathias Gumz1-19/+38
* removed useless struct _menu * code deduplication via renderMenuPixmap() * improved documentation: - 'sublevel' actually means 'column' - 'persub' means 'row_per_column'
2010-09-08introduced FbTk::BidiStringMathias Gumz1-3/+3
a 'BidiString' holds both the logical content and the visual reordered version of the content of a string. this helps to reduce the number of calls to reorder the string before drawing it (as introduced in the patch from Ken Bloom) and to be more consistent in menus and textboxes (drawing cursors and underlining text).
2009-10-01compile fix: using correct forward declaration for template classesMathias Gumz1-2/+2
we got this 'Warning (Anachronism): Old syntax for explicit specialization or instantiation ignored.' with the solaris compiler
2009-08-08allow navigating multi-column menus with left and right arrowsMark Tiefenbruck1-0/+2
2008-09-22fix active menu item when inserting or removing other itemsMark Tiefenbruck1-1/+1
2008-08-16some cleanupMark Tiefenbruck1-8/+1
2008-02-09fix highlighted menu item on mouse outMark Tiefenbruck1-0/+1
2008-01-11make FbTk::Command a template class, split parsing information out of ↵Mark Tiefenbruck1-2/+2
ObjectRegistry
2008-01-05update code to use ThemeProxyMark Tiefenbruck1-4/+5
2008-01-04remove old svn $Id$ tagsMark Tiefenbruck1-2/+0
2007-12-30removed some unneeded headersMathias Gumz1-5/+3
2007-12-30remove some (hopefully) unneeded header includesMark Tiefenbruck1-3/+2
2007-12-29'inline' in class declaration is implicitly inlineMathias Gumz1-38/+38
2007-12-28move shape handling from FbMenu to FbTk::MenuMark Tiefenbruck1-3/+4
2007-12-18fix torn menusMark Tiefenbruck1-1/+1
2007-12-18make MenuItem responsible for decision to close menu when clickedMark Tiefenbruck1-2/+2
2007-12-11only allow one open menu at a timemarkt1-1/+2
2007-10-13merged changes from pre-develmarkt1-3/+3
2007-07-15make sure menus close only when right clicking down and up on the titlebarmarkt1-0/+1
2007-07-07save workspace names, and some fixes for menu behaviormarkt1-1/+1
2007-06-03update menu xinerama settings after movingmarkt1-1/+2
2007-03-03added support for typeahead in menusmarkt1-5/+12
2007-02-28some code simplification and bug fixesmarkt1-7/+4
mainly, using a non-zero menuDelayClose allowed you to have multiple submenus open
2007-01-21various changes to menu behaviormarkt1-0/+2
2007-01-07per-window transparency, including apps and menu support, plus some simonb1-1/+1
infrastructure and related changes. Thanks for original patch from Julien Trolet, dmxen at sourceforge dot net
2006-08-09remove FbTk::Menu::enter/leaveNotifyEvent -- caused problems with placing ↵markt1-5/+1
submenus
2006-07-11dead functionmarkt1-0/+2
2006-07-01more dead functionsmarkt1-1/+1
2006-07-01more dead functionsmarkt1-0/+4
2006-05-20improve native language handling, move messages and menu labels to simonb1-4/+5
FbTk::FbString
2006-04-16fix all compiler warnings with -Wallsimonb1-1/+1
2006-04-02size_t fixes, thanks Semushin Slava aka php-coderfluxgen1-1/+1
2005-04-26extension of previous big patch. Move a bunch of menu things onto simonb1-9/+13
background pixmap. Same for textbuttons.
2005-04-10Big changes to how transparency workssimonb1-9/+4
Consequently rearrange lots of rendering ops, and strip calls to updateTransparent
2005-01-24copyright datemathias1-1/+1
2005-01-15cleaningfluxgen1-14/+14
2004-12-13icc complaint about a "possible" conflict between themathias1-1/+1
FbTk::Menu::update(Subject*) and FbTk::Menu::update(int index) to avoid this, we rename FbTk::Menu::update(int index) -> FbTk::Menu::updateMenu(int index) this is mostly cosmetic, but if it makes the life of a compiler happy, well .. be happy icc :)
2004-11-19svn propset svn:keywords "Id"mathias1-1/+1
2004-09-11head specific strut, patch from Mathieu De Zutterfluxgen1-2/+5
2004-08-29fix crash bug when windowmenu doesn't include extramenusrathnor1-3/+4
improve checking of existence/success of loading windowmenu file