summaryrefslogtreecommitdiff
path: root/src/Fl_Menu.cxx
AgeCommit message (Collapse)Author
2024-05-24Control screen used by Fl_Menu_Bar::play_menu() - cont'dManoloFLTK
2024-05-23Control screen used by Fl_Menu_Bar::play_menu()ManoloFLTK
2024-05-09Remove unused variables, fix compiler warningsAlbrecht Schlosser
2024-05-09Optimize "arrow" drawing and centeringAlbrecht Schlosser
- center (sub)menu arrow as good as possible - adjust arrow sizes in Fl_Counter widget - refactor "oxy" arrow drawing and centering in widgets
2024-05-08Have menu items drawn with same colors in all platforms (#969)ManoloFLTK
Also, remove this text from the doc of Fl_Menu_::down_box() "If this is FL_NO_BOX then it acts like FL_THIN_UP_BOX and selection_color() acts like FL_WHITE, for back compatibility." that was true only for the Windows platform and that required selection_color to be replaced by white for menu items which is not what FLTK 1.4 expects. The new state of menu item drawings is as follows : - all platforms draw menu items with the same symbolic colors - selected items and menu titles are drawn with the selection color as background color - menu items are drawn by default with no box but can be given one by Fl_Menu_::down_box(Fl_Boxtype) - the text of selected items is drawn with the menu's color unless fl_contrast() finds it does not make enough contrast with the background (selection color) and substitutes it with a more adapted color - the Windows platform uses a visibly different hue for its default selection color from what other platforms use
2024-05-07Limit (sub)menu arrow size as discussed in fltk.generalAlbrecht Schlosser
... in thread: "FLTK 1.4 Menu Bar Style", started on May 6, 2024 This is about the little triangle (or similar) pointing right when a submenu exists in a menu. The arrow form differs per scheme.
2024-02-05Fl_Window_Driver::set_popup_window(), ↵ManoloFLTK
Fl_Screen_Driver::screen_boundaries_known() Fl_Window_Driver::set_popup_window() is to be used to declare a window should be positioned relatively to a previously mapped other window. This allows a platform to process such windows differently from other windows if needed. Menu and tooltip windows are so declared. A call to Fl_Window_Driver::set_popup_window() also allows to distinguish a real menu or tooltip window from a window marked by Fl_Window::set_menu_window() or by Fl_Window::set_tooltip_window() but that's not a real menu or tooltip. New member function bool Fl_Screen_Driver::screen_boundaries_known() returns true by default. A platform where the position of windows inside a screen is hidden (e.g., Wayland) returns false. This allows FLTK to refrain from trying to make sure a computed position is inside a screen.
2024-01-22Fixes mouse pointer visibility for popups (#890)Matthias Melcher
2024-01-22Add popup_window() virtual member functions to Fl_Window_DriverManoloFLTK
2024-01-21Fix "Wayland: crash with set_menu_window()" - cont'd (#892)ManoloFLTK
2024-01-21Fix "Wayland: crash with set_menu_window()" (#892)ManoloFLTK
Fixes also a similar crash occuring after use of set_tooltip_window(). Two bool member variables are added to class Fl_Window_Driver to indicate true FLTK menu windows (i.e., created by Fl_Menu_Item::pulldown()) and true FLTK tooltip windows (i.e., Fl_Tooltip).
2023-12-02Improve contrast of check marks and radio buttons (#443)Albrecht Schlosser
- add fl_draw_radio(...) to standardize radio button drawing - src/Fl_Light_Button.cxx: use fl_contrast() to determine color of radio button and check (light) button check marks, and use new fl_draw_radio() method - src/Fl_Menu.cxx: same as src/Fl_Light_Button.cxx and use fl_draw_check() instead of "manually" drawing the check mark (forgotten in an earlier update)
2023-10-13#748: Adds option to choose menu window boxtypeMatthias Melcher
...independently from the menu button or menu bar boxtype
2023-10-11Synchronize all arrow colors and inactive drawing (#791)Matthias Melcher
2023-05-15Fix handling of tall menu windows with the KDE Wayland compositorManoloFLTK
Unfortunately (sigh), the KDE Wayland compositor does not seem to support correctly, that is, as described by the Wayland protocol, popup windows that are taller than the display : there is no means to make it draw such popup so that part of it is above the screen top, whereas the 3 other tested compositors (Mutter, Weston, Sway) don't have this problem. This commit implements a new approach to draw tall menu windows, and uses it only with the KDE compositor : instead of asking the compositor to slide the menu window up, the menu window remains at a fixed position and the graphics inside the window is slided up. This requires to add a member variable, int offset_y, to class menuwindow, that gets used only for the Wayland platform and that contains the vertical offset by which graphics to the menu window is moved, expressed in FLTK units. An accessor to the address of this member variable is added to class Fl_Window_Driver.
2023-05-02 Wayland: problem with menus on secondary monitor - cont'd (#724)ManoloFLTK
2023-02-10Don't for a box type for pulldowns (#675)Matthias Melcher
2023-01-20STR 3461: fix menu linespacingMatthias Melcher
2023-01-12Remove repeated code in classes menuwindow and menutitleManoloFLTK
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