diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 03:39:53 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 03:39:53 +0500 |
| commit | f93978aba486bf0fea8d9ee857d014a02f3f7d96 (patch) | |
| tree | 44d4626c2d56666056983d8fedf1b897f4ecf249 /src/Fl_Input_Choice.cxx | |
| parent | ddba971ebb304512ba9e0a01b77ec71b59b977b6 (diff) | |
wi[
Diffstat (limited to 'src/Fl_Input_Choice.cxx')
| -rw-r--r-- | src/Fl_Input_Choice.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_Input_Choice.cxx b/src/Fl_Input_Choice.cxx index e01743eb6..59aeecfe9 100644 --- a/src/Fl_Input_Choice.cxx +++ b/src/Fl_Input_Choice.cxx @@ -95,7 +95,7 @@ \endcode \par Subclassing Example - One can subclass Fl_Input_Choice to override the virtual methods inp_x/y/w/h() + One can subclass Fl_Input_Choice to the virtual methods inp_x/y/w/h() and menu_x/y/w/h() to take control of the internal Fl_Input and Fl_Menu_Button widget positioning. In this example, input and menubutton's positions are swapped: \code @@ -105,11 +105,11 @@ class MyInputChoice : public Fl_Input_Choice { protected: - virtual int inp_x() const { return x() + Fl::box_dx(box()) + menu_w(); } // override to reposition - virtual int menu_x() const { return x() + Fl::box_dx(box()); } // override to reposition + virtual int inp_x() const { return x() + Fl::box_dx(box()) + menu_w(); } // to reposition + virtual int menu_x() const { return x() + Fl::box_dx(box()); } // to reposition public: MyInputChoice(int X,int Y,int W,int H,const char*L=0) : Fl_Input_Choice(X,Y,W,H,L) { - resize(X,Y,W,H); // necessary for ctor to trigger our overrides + resize(X,Y,W,H); // necessary for ctor to trigger our s } }; |
