summaryrefslogtreecommitdiff
path: root/src/Fl_Menu.cxx
AgeCommit message (Collapse)Author
2023-01-12Simpler implementation of Fl_Window_Driver::scroll_to_selected_item()ManoloFLTK
2023-01-12Wayland menus: remove useless Fl_Window_Driver::extra_menutitle()ManoloFLTK
2023-01-11Wayland: Further improved implementation of menu windowsManoloFLTK
Tall menus now work also as single popup window and show the correct selected item. Groups of popups with a menutitle, an associated menuwindow, and possibly submenus are constructed around the menuwindow, the menutitle being a child popup of the menuwindow. This positions these popup groups better than before.
2023-01-08Wayland: Improved implementation of menu windowsManoloFLTK
2023-01-05Refactor drawing small circles: add fl_draw_circle()Albrecht Schlosser
This method can be used to draw small circles as part of the GUI. It is independent of the current scheme. Very small circles are approximated by drawing several rectangles.
2022-12-30Use `FL_OVERRIDE` for all overridden virtual methods (#611)Matthias Melcher
FL_OVERRIDE is defined as `override` for C++11 and higher FL_OVERRIDE is defined as `override` for VisualC 2015 and newer Don't interfere with Fl_Widget::override()
2022-12-27Wayland: Dropdown menu moves when navigated (#613) - cont'dManoloFLTK
Menu windows containing sub-menus are now processed differently.
2022-11-25Add "Oxy" scheme (STR 2675, STR 3477)Albrecht Schlosser
This commit is similar to the patch given in STR 3477, oxy_v5.diff: https://www.fltk.org/strfiles/3477/oxy_v5.diff ... with modifications, and updated to current FLTK code.
2022-11-23Update remaining "arrow drawing" in menusAlbrecht Schlosser
Use the new standard arrow drawing methods (whose style depends on the active scheme) for "arrows" used in Fl_Menu and Fl_Menu_Button. To do: maybe we need some "fine tuning" of arrow sizes in some of the modified widgets using the new "arrow drawing" methods.
2022-11-23Keep indicator that menubar is still active (#551)Matthias Melcher
2022-11-22Refactor and simplify "arrow drawing" in widgetsAlbrecht Schlosser
"Arrows" in widgets are those GUI elements mostly represented by triangles pointing in a particular direction as in scrollbars, choice widgets, some menus, valuators and Fl_Counter widgets. The code has been simplified and standardized such that all these GUI elements are drawn identically per FLTK scheme. Widget authors no longer need to write code to calculate arrow sizes and draw polygons etc. Different schemes can and do implement different drawing functions. Todo: see comments "FIXME_ARROW" in src/Fl_Menu_Button.cxx and src/Fl_Menu.cxx
2022-11-07Create class Fl_Unix_Screen_Driver used by X11 and Wayland platformsManoloFLTK
2022-09-27Use PR #507 by @ggarra13 to fix issue #85.ManoloFLTK
2022-03-08Fix doxygen warningAlbrecht Schlosser
2022-03-05Fix MSVC compiler warningAlbrecht Schlosser
warning C4099: 'Fl_Menu_Item': type name first seen using 'struct' now seen using 'class'
2022-03-04Add the Wayland platform to FLTK 1.4ManoloFLTK
2022-01-26Fix for #381, `backward` function crashMatthias Melcher
when no menu item is selected.
2021-11-26Fix for issue #254: remove hardware overlay support .ManoloFLTK
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2020-03-26Update documentation, fix typosAlbrecht Schlosser
2019-02-05Fix for STR #3503 - handle Fl_Menu_ deleted while its menu window is running.ManoloFLTK
2019-02-05Fixed two warnings from Doxygen.Matthias Melcher
2019-02-02Fixed pulldown menu position when at the bottom of the screen (STR #2880).Matthias Melcher
2019-02-02STR #2714: remove new shadow lint for MacOSMatthias Melcher
2018-12-27Fixing some minor lint, found by Pavel Shlyak using PVS studioMatthias Melcher
2018-12-11Quick fix: menu disappearing (STR #3503 continued)Albrecht Schlosser
Quick fix to repair a case when Fl_Menu_Item::pulldown() was called with only five arguments (argument pbutton == null) as discussed here: https://github.com/fltk/fltk/commit/d87ac9b59783dec5628e7ae242b390cf5097b77a#comments
2018-12-07Fix crash if menu is deleted while menu is open (SGR #3503).Albrecht Schlosser
This can happen if a menu widget (e.g. Fl_Choice) is deleted in a timer callback while the menu is open (pulldown active).
2018-06-26Move Fl_System_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12976 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31Added Fl::menu_linespacing() to solve STR# 2927.Greg Ercolano
Method name follows Fl_Tree::linespacing(). Implemented similarly to Fl::scrollbar_size(), since its use crosses Fl_Menu_Item and 'menuwindow' classes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-17MSWindows fixes for previous commits.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-09Rewrite Fl_Menu.cxx for the driver model.Manolo Gouy
See the detailed description in menuwindow::handle(int e) of Fl_Menu.cxx of how the menu window class could require 1 or 2 less support functions from the Fl_System_Driver class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11557 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-12Add localization of modifier key names in shortcut labels.Albrecht Schlosser
Modifier key names like Alt, Shift, Ctrl, Meta can now be localized by setting global string pointers. See documentation of fl_shortcut_label(). Port branch-1.3, svn r 11321. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11354 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13Details on PORTME items. Move fl_parse_color() to screen drivers.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11Mark places that need to be refactored with // PORTME:Matthias Melcher
Searching for __APPLE, WIN32 or X11 did give me many false results. I instead marked most ifdef's that I would like to get rid of with the text // PORTME:, so they can be easily found by a global search. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11155 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-15Fix spelling errors and improve documentation.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-03-20Documentation: Clarify Fl_Menu_Item::size() docs.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-29Use Fl::is_scheme() where appropriate.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10542 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-28Fixed a menu-positioning problem where a menu window could appear on another ↵Manolo Gouy
screen than where expected. Occurred when one screen has negative x coordinates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10211 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-07Removed unnecessary drawing calls (STR #2898)Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9738 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05Fixed build error in msvs because Fl ref to FULLSCREEN enum was not ↵Fabien Costantini
accessible in Fl_Widget. new inline is_fullscreen() getter has been implemented to avoid a build error with (at least) msvc compilers. Fixed a ton of warnings / problems when bilding on windows 64 bits target with ms toolchain. cleaned up about 200 warnings raised when building win74 targets. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-22Fix STR #2770: menubar menus have problems near screen edges.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9183 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-29Fix STR#2695 & 2697: correct computation of work areas with multiple screens.Manolo Gouy
This introduces 3 new functions static void Fl::screen_work_area(X,Y,W,H) static void Fl::screen_work_area(X,Y,W,H,mx,my) static void Fl::screen_work_area(X,Y,W,H,screen_no) that compute screen work areas and are used by FLTK to position menu windows. The Fl::x(),y(),w(),h() functions are made consistent across platforms: they return the origin/size of the work area of the main screen (as far as possible, see below). On the Mac OS platform, all screen functions reflect changes in screen number and positions without requiring the application to restart. On the X11 platform, I did not find an API to compute the main screen work area in all conditions. What's used does compute the correct work area when there's a single screen, but not when there are several, because it returns an area that encompasses all screens. The implemented workaround is that Fl::x(),y(),w(),h() and Fl::screen_work_area(X,Y,W,H,0) return the exact work area when there's a single screen, and return the full screen area when there are several. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-28STR 2711: fixed radio menu button drawing.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9071 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-08Fix STR #2695 (continued). Use of Fl::x() is appropriate only under Mac OS.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8935 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-08Fix STR #2695: to scroll menus properly, use Fl::x(),y(),w() and h() ↵Manolo Gouy
functions that return the work area rather than the screen size. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8929 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-20Fixed Fl_Menu issue with unusual menu flags (STR #2680).Albrecht Schlosser
Setting some flags in a terminating Fl_Menu_Item (one with a NULL label/text/name) caused an endless loop. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19Modifications to all LGPL headers for STR #2685.Greg Ercolano
(to clarify static exception LGPL by changing license references) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-03Fix STR #2654.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8775 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-07Fix STR #2619. An extra FL_MOVE event is sent on X11 after the menu item is ↵Manolo Gouy
selected by the keyboard. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-06Fix STR #2613. Allows a menu item to be invisible but with functional shortcutManolo Gouy
as authorized by the doc. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8639 ea41ed52-d2ee-0310-a9c1-e6b18d33e121