aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.cc
AgeCommit message (Collapse)AuthorFilesLines
2015-01-16Reduce number of allocations for menu creationMathias Gumz1-4/+18
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-105/+107
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.
2013-05-26build-sys: use AC_USE_SYSTEM_EXTENSIONSSami Kerola1-5/+0
The earlier _GNU_SOURCE definitions possibly did not take effect everywhere where it was intended.
2013-05-26build-sys: include config.h to all files using automakeSami Kerola1-4/+0
Do not try to be too smart which compilations need config.h, as most of them will simply because of the config.h has information about system capabilities.
2012-08-28changed timing functions to use a monotonic increasing clockMathias Gumz1-2/+2
gettimeofday() is subject to be changed on daylight-saving or to ntp-related (think leap-seconds). even worse, it is subject to be changed BACK in time. this is hard to fix correctly (see commit 45726d3016e and bug #3560509). it is irrelevant for timers to know the nano-seconds since the epoch anyways.
2012-01-04Check .empty() instead of .size() == 0Ryan Pavlik1-2/+2
Found with cppcheck.
2012-01-04Pre-increment non-primitive types.Ryan Pavlik1-1/+1
Found with cppcheck: "Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code."
2011-05-10Remove the Observer dependency from FbTk::MenuPavel Labath1-1/+1
2011-05-10Convert FbTk::Theme::reconfigSig and friends to the new Signal systemPavel Labath1-2/+2
I removed the const versions of reconfigSig() in the process since FbTk::Signal has no const methods anyway.
2011-04-11Menu.cc: send debug output to cerr, make the output more sensiblePavel Labath1-9/+15
2011-02-25bugfix: submenus didn't hide if a delay was setMathias Gumz1-2/+2
use the FbTk::Timer API correctly, bug(s) introduced by 1f0adef4daa2da5b08ed7f41e7a0ce1e3f71e46f e68511794130388ab9668fdef0dcf48dbbf002fd
2011-01-18bug fix: make fluxbox work under nxserver, closes #2813828Mathias Gumz1-0/+50
nxserver-3.x creates a XExposeEvent for the unmapped FbTk::Menu(), which is not configured completely yet (hence unmapped). this causes a call to FbTk::Menu::clearItem() which then uses a value of 0 for m_rows_per_column to divide the current index which triggers a SIGFPE. it is still unclear, why nxserver-3.x creates the XExposeEvent for the unmapped (menu) window. doing nothing if the menu is unmapped 'fixes' the problem for now. many thanks to Lars Engels (bsd-geek.de) to assist me in debugging this issue.
2011-01-15removed useless include statementsMathias Gumz1-4/+0
'typeinfo' was needed for RTTI in isItemSelectable() (see last commit) 'algorithm' is already included some lines above
2011-01-15better use of API, no need for 'timeval' in MenuMathias Gumz1-4/+1
2011-01-15MenuItem::isEnabled() is sufficient to decide Menu::isItemSelectable()Mathias Gumz1-3/+1
MenuSeparator is never enabled since it returns always 'false' in its implementation of isEnabled(). no need to use RTTI imho.
2011-01-15small refactoring of FbTk/Menu codeMathias Gumz1-208/+214
* removed useless struct _menu * code deduplication via renderMenuPixmap() * improved documentation: - 'sublevel' actually means 'column' - 'persub' means 'row_per_column'
2010-09-09bugfix: initialize the Shape of a menu AFTER we created the window for the menuMathias Gumz1-1/+4
on startup a lot of 'Fluxbox: X Error: BadDrawable (invalid Pixmap ...)' occured. this was caused by using an empty 'Window' to create the shape.
2010-09-08introduced FbTk::BidiStringMathias Gumz1-9/+4
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-09-23bugfix: 'HideMenus' command did not work if the user 'opened' an empty submenu.Mathias Gumz1-1/+1
'openeing' such an empty submenu lead to an already hidden menu referenced by the 'shown' pointer
2009-08-08allow navigating multi-column menus with left and right arrowsMark Tiefenbruck1-4/+21
2008-10-13merge menuDelay and menuDelayClose optionsMark Tiefenbruck1-2/+2
2008-10-05remove menu modesMark Tiefenbruck1-1/+1
2008-09-22fix active menu item when inserting or removing other itemsMark Tiefenbruck1-2/+7
2008-09-14Fixed a pixmap resource leak with selected pixmap in menus.Henrik Kinnunen1-3/+15
menu.hilite.selected.pixmap and menu.selected.pixmap was not deleted while switching between non-pixmap styles and pixmap styles.
2008-09-01highlight the nearest menu item when the current one is disabled, and add ↵Mark Tiefenbruck1-0/+15
separators to focus model menu
2008-08-19shift+enter wasn't sending right click if the menu item had a submenuMark Tiefenbruck1-3/+3
2008-08-16some cleanupMark Tiefenbruck1-1/+1
2008-05-30reset typeahead when adding/removing items in the menuMark Tiefenbruck1-0/+3
2008-04-21some fixes for gcc 3.4Thomas Orgis1-1/+1
2008-02-09fix highlighted menu item on mouse outMark Tiefenbruck1-2/+13
2008-01-11make FbTk::Command a template class, split parsing information out of ↵Mark Tiefenbruck1-3/+3
ObjectRegistry
2008-01-05update code to use ThemeProxyMark Tiefenbruck1-62/+62
2008-01-04remove old svn $Id$ tagsMark Tiefenbruck1-2/+0
2007-12-30remove some (hopefully) unneeded header includesMark Tiefenbruck1-0/+1
2007-12-28move shape handling from FbMenu to FbTk::MenuMark Tiefenbruck1-0/+4
2007-12-18fix torn menusMark Tiefenbruck1-11/+16
2007-12-18holding control will now keep the menu openMark Tiefenbruck1-2/+2
2007-12-18make MenuItem responsible for decision to close menu when clickedMark Tiefenbruck1-10/+11
2007-12-13close menus when they lose focus, instead of on [exec] commandsmarkt1-0/+2
2007-12-11only allow one open menu at a timemarkt1-20/+17
2007-10-13merged changes from pre-develmarkt1-6/+2
2007-09-08fix crash when changing toolbar visibility with empty toolbar.toolsmarkt1-1/+1
2007-07-17updated behavior of alt-tab to match pre-devel, fixing bug #1755698markt1-0/+1
2007-07-15make sure menus close only when right clicking down and up on the titlebarmarkt1-4/+8
2007-07-07save workspace names, and some fixes for menu behaviormarkt1-7/+13
2007-06-29updates for compiling with gcc 4.3markt1-0/+3
2007-03-21fix a little compile error on some machinesmarkt1-0/+2
2007-03-19active menu item wasn't getting reset properly when closed from [exec] with ↵markt1-4/+4
buttonpress
2007-03-11fixed parentrelative menu highlight bugmarkt1-12/+12
2007-03-07don't mark menu as focused, even if it gets a FocusIn, when it's not visiblemarkt1-1/+3