summaryrefslogtreecommitdiff
path: root/FL/Fl_Menu_.H
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-10-13 12:49:26 +0200
committerMatthias Melcher <github@matthiasm.com>2023-10-13 12:49:26 +0200
commitb1321bb97e254a5aa4d5ed6eef03d89a3892d1f9 (patch)
treef031953def82e39f6c2ef9af50576ed7df9cb19d /FL/Fl_Menu_.H
parent0af27f6fda2479db5ebd27e22d68bd96ac7eb2da (diff)
#748: Adds option to choose menu window boxtype
...independently from the menu button or menu bar boxtype
Diffstat (limited to 'FL/Fl_Menu_.H')
-rw-r--r--FL/Fl_Menu_.H11
1 files changed, 11 insertions, 0 deletions
diff --git a/FL/Fl_Menu_.H b/FL/Fl_Menu_.H
index 3e7461173..acab1a33b 100644
--- a/FL/Fl_Menu_.H
+++ b/FL/Fl_Menu_.H
@@ -60,6 +60,7 @@ protected:
uchar alloc; // flag indicates if menu_ is a dynamic copy (=1) or not (=0)
uchar down_box_;
+ Fl_Boxtype menu_box_;
Fl_Font textfont_;
Fl_Fontsize textsize_;
Fl_Color textcolor_;
@@ -201,6 +202,16 @@ public:
/** Sets the box type used to surround the currently-selected items in the menus. */
void down_box(Fl_Boxtype b) {down_box_ = b;}
+ /** Get the box type for the menu popup windows.
+ \return the box type, or FL_NO_BOX if Fl_Menu_::box() is to be used instead
+ */
+ Fl_Boxtype menu_box() const { return menu_box_; }
+ /** Set the box type for the menu popup windows.
+ If menu_box set to FL_NO_BOX, the menu window will use Fl_Menu_::box() instead.
+ \param[in] b new box type or FL_NO_BOX
+ */
+ void menu_box(Fl_Boxtype b) { menu_box_ = b; }
+
/** For back compatibility, same as selection_color() */
Fl_Color down_color() const {return selection_color();}
/** For back compatibility, same as selection_color() */