summaryrefslogtreecommitdiff
path: root/src/Fl_Menu.cxx
AgeCommit message (Collapse)Author
3 dayswipmaxim nikonov
2026-01-04Fix a possible popup menu crash event.Matthias Melcher
2025-12-06Fix doxygen warningsAlbrecht Schlosser
2025-11-30Fix menu crash dereferencing nullptr (#1335)Matthias Melcher
2025-11-25Refactor large pulldown function into smaller functions.Matthias Melcher
2025-11-22Declutter draw and handle methods.Matthias Melcher
Refactoring long methods into smaller parts that are easier to understand.
2025-11-21Additional menu code cleanup.Matthias Melcher
Better variable names, More descriptive integer types.
2025-11-21Fix a few more warnings by Clang.Matthias Melcher
- Apple Clang 17.0.0. - png, z, jpeg lib integer cast warnings remain - FLTK callback function cast warnings remain.
2025-11-21Fix missing return statement.Matthias Melcher
2025-11-21Reformat src/Fl_Menu.cxx.Matthias Melcher
Reorder declarations and implementations. Rename to current FLTK standards, reformat.
2025-11-20Improve documentation for popup menus.Matthias Melcher
Documented every function and variable in Fl_Menu.cxx.
2025-11-19Add headline menu item style (#1059)Matthias Melcher
A menu item can be designated as a headline. Fully integrated and used in Fluid.
2025-11-17Add pen/stylus/tablet API and driver for macOS (#1326)Matthias Melcher
* define the pen/tablet support API * add pen event handler stub as a fallback * add pen device test "penpal". * Add macOS pen/stylus/tablet driver. * Add Oxygen documentation.
2025-04-01Adding the FL_MENU_CHATTY flag to Fl_Menu_Item.Matthias Melcher
If set, menu items will also call the callback when highlighting changes. The reason is given with Fl::callback_reason(). #941
2025-03-10Fix handling of menu widnows taller than their screenManoloFLTK
A problem was visible with the menubar test app and a 2-screen system where screens are one above the other. When moving down the huge menu, it became positioned on the wrong screen.
2024-12-10Fix Fl_Menu_Item::measure width calculation (#1164)Matthias Melcher
Fl_Menu_Item::measure did not take the gap between a possible checkbox and the label text into consideration.
2024-12-09Fix inconsistencies with Tab/Backspace handling in menus (#1157)dannye
2024-12-09Fixes triggering callback for inactive menu items (#1159)Matthias Melcher
The old code would trigger a callback when hovering the mouse of an inactive item and pressing Return.
2024-12-09 Fix: Hang/Infinite loop on submenu with all inactive/invisible items (#1158)ManoloFLTK
2024-12-09Fix: Mouse hover+Enter key selects inactive menu items (#1159)ManoloFLTK
2024-10-06Submenus with no callback enter their submenu instead of closing the whole ↵dannye
menu (#1043) Thanks for those nice changes.
2024-09-04Fixes menu scrolling for secondary screens (#1060)Matthias Melcher
- huge menus would scroll down when the mouse pointer hit position 0, but for some secondary screens, the top edge is not at y==0, so now we check for a range a the top border of the working space of the screen showing the menu.
2024-09-04Fixes menubar glitch when mouse is at y==0 (#1060)Matthias Melcher
2024-08-27Adding horiizonatl and vertical label marginMatthias Melcher
- sizeof(Fl_Widget) not increased - label positions can be adjusted - try it out in test/label app - full support in FLUD
2024-08-14Adding Fl_Widget::label_image_spacing() (#1039)Matthias Melcher
- May need a better method name. - This makes the gap between the image in a label and the label text user settable. - Can be tested using test/label app
2024-08-04Fix testing of multi-label alt shortcuts (#974)dannye
* find_shortcut(): fix testing of multi-label alt shortcuts * Use static function instead of macro
2024-06-27Navigation in menubar: wrap around when using arrow past end or start of ↵ManoloFLTK
menubar. Slight behavior change of Fl_Menu_Bar relatively to 1.3: left and right arrow keys when pressed in the first (resp. last) (sub)menu of a menubar wrap to the menu at the other end of the bar. Also, left and right arrow keys open the previous (resp. next) menu of the bar when pressed in a submenu. Rationale: macOS, gnome and Windows apps equipped with a menubar do that.
2024-06-25Navigation in menubar: wrap around when using arrow past end or start of ↵ManoloFLTK
menubar. Fix some border cases.
2024-06-24Navigation in menubar: wrap around when using arrow past end or start of ↵ManoloFLTK
menubar. See "Menu navigation in FLTK is different from Ubuntu X11 navigation" in fltk.general. Menubar wrapping is what macOS and gnome applications do.
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