mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
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
This commit is contained in:
+8
-3
@@ -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 $".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user