diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-03-18 17:33:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-18 17:33:27 +0100 |
| commit | 5c482f9d9b357e098f955351f425bc985254ff28 (patch) | |
| tree | c410588ac915886aea4bef3478a12d682bb5ad9f /FL | |
| parent | a9fb6a979fbcf31c2405d61ea720879bd5507d02 (diff) | |
Fix and update alignment #346 (#701)
* interactive layout alignment rewritten
* interface for new alignment rules
* new alignment dialog box
* user defined layout rules added
* layout rules can be stored in projects, settings, and external files
* Valgrind verification
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Gl_Window.H | 3 | ||||
| -rw-r--r-- | FL/Fl_Group.H | 1 | ||||
| -rw-r--r-- | FL/Fl_Menu_Item.H | 6 | ||||
| -rw-r--r-- | FL/Fl_Widget.H | 9 | ||||
| -rw-r--r-- | FL/Fl_Window.H | 1 |
5 files changed, 15 insertions, 5 deletions
diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H index c33bed8db..8889a086b 100644 --- a/FL/Fl_Gl_Window.H +++ b/FL/Fl_Gl_Window.H @@ -207,7 +207,8 @@ public: void make_overlay_current(); // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. - Fl_Gl_Window* as_gl_window() FL_OVERRIDE {return this;} + Fl_Gl_Window* as_gl_window() FL_OVERRIDE { return this; } + Fl_Gl_Window const* as_gl_window() const FL_OVERRIDE { return this; } float pixels_per_unit(); /** Gives the window width in OpenGL pixels. diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H index 1e21b20ba..173f8754b 100644 --- a/FL/Fl_Group.H +++ b/FL/Fl_Group.H @@ -228,6 +228,7 @@ public: // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. Fl_Group* as_group() FL_OVERRIDE { return this; } + Fl_Group const* as_group() const FL_OVERRIDE { return this; } // back compatibility functions: diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H index 0f1083a9a..4bca0e1ce 100644 --- a/FL/Fl_Menu_Item.H +++ b/FL/Fl_Menu_Item.H @@ -317,6 +317,10 @@ struct FL_EXPORT Fl_Menu_Item { before FLTK 1.4.0. */ int value() const {return (flags & FL_MENU_VALUE) ? 1 : 0;} + + /** Sets the current value of the check or radio item. */ + void value(int v) { v ? set() : clear(); } + /** Turns the check or radio item "on" for the menu item. Note that this does not turn off any adjacent radio items like setonly() does. @@ -326,7 +330,7 @@ struct FL_EXPORT Fl_Menu_Item { /** Turns the check or radio item "off" for the menu item. */ void clear() {flags &= ~FL_MENU_VALUE;} - void setonly(); + void setonly(Fl_Menu_Item const* first = NULL); /** Gets the visibility of an item. */ int visible() const {return !(flags&FL_MENU_INVISIBLE);} diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index b0317dc6e..969aee6fa 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -1091,7 +1091,8 @@ public: \note This method is provided to avoid dynamic_cast. \see Fl_Widget::as_window(), Fl_Widget::as_gl_window() */ - virtual Fl_Group* as_group() {return 0;} + virtual Fl_Group* as_group() { return NULL; } + virtual Fl_Group const* as_group() const { return NULL; } /** Returns an Fl_Window pointer if this widget is an Fl_Window. @@ -1105,7 +1106,8 @@ public: \note This method is provided to avoid dynamic_cast. \see Fl_Widget::as_group(), Fl_Widget::as_gl_window() */ - virtual Fl_Window* as_window() {return 0;} + virtual Fl_Window* as_window() { return 0; } + virtual Fl_Window const* as_window() const { return NULL; } /** Returns an Fl_Gl_Window pointer if this widget is an Fl_Gl_Window. @@ -1117,7 +1119,8 @@ public: \note This method is provided to avoid dynamic_cast. \see Fl_Widget::as_group(), Fl_Widget::as_window() */ - virtual class Fl_Gl_Window* as_gl_window() {return 0;} + virtual class Fl_Gl_Window* as_gl_window() { return NULL; } + virtual class Fl_Gl_Window const* as_gl_window() const { return NULL; } /** Returns non zero if MAC_USE_ACCENTS_MENU flag is set, 0 otherwise. */ diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index ef4d78007..a6709a216 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -560,6 +560,7 @@ public: // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. Fl_Window* as_window() FL_OVERRIDE { return this; } + Fl_Window const* as_window() const FL_OVERRIDE { return this; } /** Return non-null if this is an Fl_Overlay_Window object. |
