summaryrefslogtreecommitdiff
path: root/src/Fl_Menu.cxx
AgeCommit message (Collapse)Author
2011-05-01Fix STR #2616. This is a very indirect consequence of the fix made for STR #2594Manolo Gouy
that allowed to set the focus to an Fl_Window. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8631 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18Fix STR #2603: deselected menu item when mouse enters menu bar out from any ↵Manolo Gouy
menu title. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8604 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-20#2490: attempt to fix the issue. PLease test on 1.3 w/X11Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28Fixed Copyright to 2010.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-11Fixed menu and shortcut handling (STR #2243). This partly reverts theAlbrecht Schlosser
fix for STR #2199 - for details see STR #2243. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-30Fixed special handling for ISO back-tab keycode (STR #2369)Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-28Fixed a bunch of warnings from gcc 4.4.5 . Most of these are parenthesis ↵Matthias Melcher
missing to make the precedence of && over || obvious. Ah well, why not... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-26Attempt at a better menubar shortct alignment.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7151 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-08-03Added new Fl_Window:: flags() and methods:Albrecht Schlosser
- set_menu_window() to mark a window as a menu window - set_tooltip_window() to mark a window as a tooltip window and the corresponding get methods: - menu_window() - tooltip_window(). This is a first step for providing more information for correct parenting and properties to support modern (X) window managers (STR #2230). Please see also the information in fltk.development: http://www.fltk.org/newsgroups.php?gfltk.development+v:8003 ToDo: Another point is to be able to handle menu windows and popup windows that are opened while a menu is active properly (will follow later). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6841 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-04-12Avoiding crashes for recrsive common dialogs (this does not fix the issue at ↵Matthias Melcher
hand yet) (STR #1986, 2150) / Added menu shortcut alignment for OS X / Fixed bad system menu hadling in OS X (STR #2153) / Fixed File Input mouse pointer dragging (STR #2181) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6757 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-04-02 Brace and indent mods for readability..Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6736 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-03-22fixed a typoAlbrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6712 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01Changed Copyright in 'src' directoryMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-11Replaced all occurrences of deprecated Fl::release() by Fl::grab(0).Albrecht Schlosser
Changed files: src/Fl_Menu.cxx (2x) src/fl_show_colormap.cxx (1x) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6577 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-04STR#2086 related Fixes :Fabien Costantini
This one was really tough to track, understand: In fact, the problem was comming from the misplacement of the menu window, which itself came from invalid measurement, which itself came from invalid fl_witdh() measurement, but only when fl_gc is not valid because fl_width() relies on Win32 on the call of GetTextExtentPoint32W which can't succeed if the HDC(here fl_gc) is not valid ! Now the fix: A best-effort algorithm has been furthered to supply a valid fltk hdc if we can have one or a screen hdc if no fltk window is found by fl::first_window(). Note that when fl_gc is NULL inside fl_width() call, it can happen that Fl_Window::current() is not null but invalid (already deleted). Finally, in the case of the buggy menu window observed here, this fl_gc was set to NULL just after an Fl_Menu_Window deletion and re-creation in Fl_Menu_Item::pulldown(). Also added a comment to describe the new fl_width() behavior. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6540 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-31Moved Fl_Preferences documentation to the correct places.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6490 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16Doxygen documentation : took the opportunity to update copyright info as we ↵Fabien Costantini
modified already in batch almost all sources, added also a fil doxygen command to class headers to harmonize with original matt Fl_Widget dox. format. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-15Doxygen documentation. Fixed somes typos and also H4 remanent misplaced ↵Fabien Costantini
tags and comments. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6258 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-15Doxygen documentation WP7 Done. Fl_Menu_Item was a real pain to doxyfy.Fabien Costantini
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6248 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-04-23First attempt at consistently using Fl_Font as a type for the font index and ↵Matthias Melcher
Fl_Font_Size as a type to measure font height (or rather size). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6113 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-02-25Fixed Tab key to wrap around menu bars (STR #1877)Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6043 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-27STR #1617: fltkgl.vcproj in the vnet directory had missing closing brackets ↵Matthias Melcher
in the XML code. The question remains: who ate the slashes? git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5721 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-02Added glut files to vc2005 solution.Matthias Melcher
Fixed popup menus that would not stay popped up when clicke once and the first item was disabled. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-01-18Fixed dismissing buttons in menu bars (STR #1494) Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5605 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-11-19STR #1463, STR #449: Better event mouse handling fixing detached menus and ↵Matthias Melcher
sticky tooltips. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-10-03More cleanup of GTK+ scheme - menu buttons now use the new look-n-feel,Michael R Sweet
and I also fixed the radio button offset for the plastic scheme. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5506 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-07-17Fixed crash on mixed use of keyboard and mouse for Fl_Menu_Button (STR #1356)Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5259 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-16STR #1322: fixes wrong menutitle position for popup menus. This was ↵Matthias Melcher
originally another fix for pulldown menus (see STR #794, SVN 4259), but had an impact on popups. This fix should work well for both situations. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5204 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-03-27STR 1213: leaving the area of a menubar when dragging would not cancel out ↵Matthias Melcher
the menu selection. This version now deselects a menu if the mouse leaves a menu structure, moving or dragging. This is an extension of the original patch which would file on selecting menu titles, or returning to the previous menu window inside a menu hierarchy. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-01-17Fix menubar menu clicking, so that menu items work again and clicking outsideMichael R Sweet
the menu cancels it. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4766 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-01-17Clicking outside a menu window dismisses it (STR #1144)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-01-17Check if the user clicks outside the menu area in the menu bar so that weMichael R Sweet
don't get stuck with the focus in the menubar. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4764 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-01-16STR #1109 re-fix: when fixing 1109, I accidentally enabled clicking on ↵Matthias Melcher
grayed out menu items. This commit should fix that an make the menu ignore grayed out items altogether. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4763 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-12-12STR #1109: Klickin on an inactive item would keep the menubar from realizing ↵Matthias Melcher
the end of the pulldown phase and swallow the next click. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4697 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-10-30Updated the default label and text colors of all widgets to useMichael R Sweet
FL_FOREGROUND_COLOR instead of FL_BLACK (STR #1052) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4609 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-09-25STR #973: popup menus now pop up fully visible in the current screen if ↵Matthias Melcher
possible and useful. In detail, menus in a menubar will pop up above the title if they would cut into the screen bottom. Submenus will show the *last* item to the right of the parent instead of the first. Finally, Pulldowns with title will simply apppera over the title instead of under the title. There are two exceptions: Menus that have a selected item will not be modified, so the selected item is visible. Hence an Fl_Choice will never have a 'fixed' menu. If putting the menu high would intersect the top frame of the screen, we leave the menu at the bottom. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4584 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-09-12STR #1007: Applied second patch by hand. OP: could you please check if all ↵Matthias Melcher
changes were made correctly? Thanks! git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-07Fixed OSX compilation problems with non-HFS filesystems (STRMichael R Sweet
#972) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4470 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16Update source file headers with STR web page.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-10Fixed position of menu titles (STR #794)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4259 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-31Added MacOS X monitor support.Michael R Sweet
Now use new screen_xywh() API for keeping things on the current screen. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4227 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05Fix menu drawing...Michael R Sweet
src/fl_draw.cxx: - fl_measure(): use "h" instead of "min(w,h)", since "w" is usually 0. src/Fl_Menu.cxx: - Revert previous "fix" in Fl_Menu_Item::measure() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4070 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05Fixed menu item width calculations with symbols (STR #740)Michael R Sweet
src/Fl_Menu.cxx: - Fl_Menu_Item::measure() - initialize w and h to label font size so that the symbol size is calculated properly. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4066 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24Copyright updates.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24Added QNX bug workaround for menu handling (STR #704)Michael R Sweet
src/Fl_Menu.cxx: - menuwindow::handle(): #ifdef QNX check for done menu git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4051 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06Fl_Menu now draws the arrow more like other toolkits and 2.0Michael R Sweet
(STR #651) src/Fl_Menu.cxx: - Change submenu drawing code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-01-04Fix menu crash bug (STR #685)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3959 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-14Fl_Menu now draws sub-menu arrows like other toolkits and FLTKMichael R Sweet
2.0 (STR #651) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-11-23STR#628: fixed almost all instances where the popup menu wouldMatthias Melcher
jump to the main screen. Very few extremes do not work 100%, but that would require much more information in the menu calls. Nothing to worry about. Anyway, jumping menus are fixed on the Mac. Linux and Windows may require similar solutions, however, setups with two different screen size are rare on those systems. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3914 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-10-18Documentation updates (STR #570)Michael R Sweet
Added DESTDIR support and now remove all man pages for the "uninstall" target (STR #545) Fix PNG drawing on buggy WIN32 graphics cards (STR #548) The configure script didn't propagate the CPPFLAGS environment variable (STR #549) The numpad keys didn't work properly on WIN32 (STR #502) fl_input() and friends now set the input focus to the text field when the dialog is shown (STR #553) Fixed background color mixup when drawing Fl_Choice menus (STR #544) Fixed MingW makefiles (STR #550) More VC++ project file tweaking (STR #559) Fl_PNG_Image didn't use the png_set_trns_to_alpha function when available (STR #547) The FL_UNFOCUS event wasn't always sent when switching tabs (STR #558) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121