diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-07-23 15:07:33 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-07-23 15:07:33 +0000 |
| commit | 57cef6a4bde017e205e54271e769de0db596d893 (patch) | |
| tree | 3045170ea9a91dd0db8c52835ea22cfb4d8b88e8 /FL | |
| parent | c22732b9e0ef37075840d2b2f6b64a06fb4f4968 (diff) | |
Remove extra 3 pixel offset when the size is below a certain amount;
instead, use a constant +1 offset.
Add another bit to flags_, VISIBLE_FOCUS, which provides
per-widget keyboard focus control. The default is for all
widgets to participate in keyboard focus navigation. Use the
set_visible_focus(), clear_visible_focus(), and visible_focus()
methods on Fl_Widget to control this.
Clean up the Fl_Widget documentation and add missing stuff.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2543 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Widget.H | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 958879364..a51bd7143 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget.H,v 1.6.2.4.2.14 2002/05/13 05:05:11 spitzak Exp $" +// "$Id: Fl_Widget.H,v 1.6.2.4.2.15 2002/07/23 15:07:32 easysw Exp $" // // Widget header file for the Fast Light Tool Kit (FLTK). // @@ -85,7 +85,8 @@ protected: int flags() const {return flags_;} void set_flag(int c) {flags_ |= c;} void clear_flag(int c) {flags_ &= ~c;} - enum {INACTIVE=1, INVISIBLE=2, OUTPUT=4, SHORTCUT_LABEL=64, CHANGED=128}; + enum {INACTIVE=1, INVISIBLE=2, OUTPUT=4, SHORTCUT_LABEL=64, + CHANGED=128, VISIBLE_FOCUS=512}; FL_EXPORT void draw_box() const; FL_EXPORT void draw_box(Fl_Boxtype, Fl_Color) const; @@ -174,6 +175,10 @@ public: void set_changed() {flags_ |= CHANGED;} void clear_changed() {flags_ &= ~CHANGED;} FL_EXPORT int take_focus(); + void set_visible_focus() { flags_ |= VISIBLE_FOCUS; } + void clear_visible_focus() { flags_ &= ~VISIBLE_FOCUS; } + void visible_focus(int v) { if (v) set_visible_focus(); else clear_visible_focus(); } + int visible_focus() { return flags_ & VISIBLE_FOCUS; } FL_EXPORT static void default_callback(Fl_Widget*, void*); void do_callback() {callback_(this,user_data_);} @@ -207,5 +212,5 @@ public: #endif // -// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.14 2002/05/13 05:05:11 spitzak Exp $". +// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.15 2002/07/23 15:07:32 easysw Exp $". // |
