Changed the flags_ field into unsigned int, so we can safely use all 32 bits
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6907 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
6fe13dc604
commit
6d4422d3e5
@ -174,7 +174,7 @@ public:
|
|||||||
|
|
||||||
\see void Fl_Group::clip_children(int c)
|
\see void Fl_Group::clip_children(int c)
|
||||||
*/
|
*/
|
||||||
int clip_children() { return (flags() & CLIP_CHILDREN) != 0; }
|
unsigned int clip_children() { return (flags() & CLIP_CHILDREN) != 0; }
|
||||||
|
|
||||||
// back compatibility functions:
|
// back compatibility functions:
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ class FL_EXPORT Fl_Widget {
|
|||||||
void* user_data_;
|
void* user_data_;
|
||||||
int x_,y_,w_,h_;
|
int x_,y_,w_,h_;
|
||||||
Fl_Label label_;
|
Fl_Label label_;
|
||||||
int flags_;
|
unsigned int flags_;
|
||||||
Fl_Color color_;
|
Fl_Color color_;
|
||||||
Fl_Color color2_;
|
Fl_Color color2_;
|
||||||
uchar type_;
|
uchar type_;
|
||||||
@ -135,11 +135,11 @@ protected:
|
|||||||
/** Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead. */
|
/** Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead. */
|
||||||
void h(int v) {h_ = v;}
|
void h(int v) {h_ = v;}
|
||||||
/** Gets the widget flags mask */
|
/** Gets the widget flags mask */
|
||||||
int flags() const {return flags_;}
|
unsigned int flags() const {return flags_;}
|
||||||
/** Sets a flag in the flags mask */
|
/** Sets a flag in the flags mask */
|
||||||
void set_flag(int c) {flags_ |= c;}
|
void set_flag(unsigned int c) {flags_ |= c;}
|
||||||
/** Clears a flag in the flags mask */
|
/** Clears a flag in the flags mask */
|
||||||
void clear_flag(int c) {flags_ &= ~c;}
|
void clear_flag(unsigned int c) {flags_ &= ~c;}
|
||||||
/** flags possible values enumeration.
|
/** flags possible values enumeration.
|
||||||
See activate(), output(), visible(), changed(), set_visible_focus()
|
See activate(), output(), visible(), changed(), set_visible_focus()
|
||||||
*/
|
*/
|
||||||
@ -645,7 +645,7 @@ public:
|
|||||||
\retval 0 if the widget is not drawn and hence invisible.
|
\retval 0 if the widget is not drawn and hence invisible.
|
||||||
\see show(), hide(), visible_r()
|
\see show(), hide(), visible_r()
|
||||||
*/
|
*/
|
||||||
int visible() const {return !(flags_&INVISIBLE);}
|
unsigned int visible() const {return !(flags_&INVISIBLE);}
|
||||||
|
|
||||||
/** Returns whether a widget and all its parents are visible.
|
/** Returns whether a widget and all its parents are visible.
|
||||||
\retval 0 if the widget or any of its parents are invisible.
|
\retval 0 if the widget or any of its parents are invisible.
|
||||||
@ -690,7 +690,7 @@ public:
|
|||||||
\retval 0 if the widget is inactive
|
\retval 0 if the widget is inactive
|
||||||
\see active_r(), activate(), deactivate()
|
\see active_r(), activate(), deactivate()
|
||||||
*/
|
*/
|
||||||
int active() const {return !(flags_&INACTIVE);}
|
unsigned int active() const {return !(flags_&INACTIVE);}
|
||||||
|
|
||||||
/** Returns whether the widget and all of its parents are active.
|
/** Returns whether the widget and all of its parents are active.
|
||||||
\retval 0 if this or any of the parent widgets are inactive
|
\retval 0 if this or any of the parent widgets are inactive
|
||||||
@ -729,7 +729,7 @@ public:
|
|||||||
\retval 0 if the widget is used for input and output
|
\retval 0 if the widget is used for input and output
|
||||||
\see set_output(), clear_output()
|
\see set_output(), clear_output()
|
||||||
*/
|
*/
|
||||||
int output() const {return (flags_&OUTPUT);}
|
unsigned int output() const {return (flags_&OUTPUT);}
|
||||||
|
|
||||||
/** Sets a widget to output only.
|
/** Sets a widget to output only.
|
||||||
\see output(), clear_output()
|
\see output(), clear_output()
|
||||||
@ -746,7 +746,7 @@ public:
|
|||||||
&& visible()) but is faster.
|
&& visible()) but is faster.
|
||||||
\retval 0 if the widget takes no events
|
\retval 0 if the widget takes no events
|
||||||
*/
|
*/
|
||||||
int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));}
|
unsigned int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Checks if the widget value changed since the last callback.
|
Checks if the widget value changed since the last callback.
|
||||||
@ -763,7 +763,7 @@ public:
|
|||||||
\retval 0 if the value did not change
|
\retval 0 if the value did not change
|
||||||
\see set_changed(), clear_changed()
|
\see set_changed(), clear_changed()
|
||||||
*/
|
*/
|
||||||
int changed() const {return flags_&CHANGED;}
|
unsigned int changed() const {return flags_&CHANGED;}
|
||||||
|
|
||||||
/** Marks the value of the widget as changed.
|
/** Marks the value of the widget as changed.
|
||||||
\see changed(), clear_changed()
|
\see changed(), clear_changed()
|
||||||
@ -808,7 +808,7 @@ public:
|
|||||||
\retval 0 if this widget has no visible focus.
|
\retval 0 if this widget has no visible focus.
|
||||||
\see visible_focus(int), set_visible_focus(), clear_visible_focus()
|
\see visible_focus(int), set_visible_focus(), clear_visible_focus()
|
||||||
*/
|
*/
|
||||||
int visible_focus() { return flags_ & VISIBLE_FOCUS; }
|
unsigned int visible_focus() { return flags_ & VISIBLE_FOCUS; }
|
||||||
|
|
||||||
/** Sets the default callback for all widgets.
|
/** Sets the default callback for all widgets.
|
||||||
Sets the default callback, which puts a pointer to the widget on the queue
|
Sets the default callback, which puts a pointer to the widget on the queue
|
||||||
|
@ -159,11 +159,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
void clear_border() {set_flag(NOBORDER);}
|
void clear_border() {set_flag(NOBORDER);}
|
||||||
/** See int Fl_Window::border(int) */
|
/** See int Fl_Window::border(int) */
|
||||||
int border() const {return !(flags() & NOBORDER);}
|
unsigned int border() const {return !(flags() & NOBORDER);}
|
||||||
/** Activate the flags NOBORDER|FL_OVERRIDE */
|
/** Activate the flags NOBORDER|FL_OVERRIDE */
|
||||||
void set_override() {set_flag(NOBORDER|OVERRIDE);}
|
void set_override() {set_flag(NOBORDER|OVERRIDE);}
|
||||||
/** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */
|
/** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */
|
||||||
int override() const { return flags()&OVERRIDE; }
|
unsigned int override() const { return flags()&OVERRIDE; }
|
||||||
/**
|
/**
|
||||||
A "modal" window, when shown(), will prevent any events from
|
A "modal" window, when shown(), will prevent any events from
|
||||||
being delivered to other windows in the same program, and will also
|
being delivered to other windows in the same program, and will also
|
||||||
@ -175,7 +175,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void set_modal() {set_flag(MODAL);}
|
void set_modal() {set_flag(MODAL);}
|
||||||
/** Returns true if this window is modal. */
|
/** Returns true if this window is modal. */
|
||||||
int modal() const {return flags() & MODAL;}
|
unsigned int modal() const {return flags() & MODAL;}
|
||||||
/**
|
/**
|
||||||
A "non-modal" window (terminology borrowed from Microsoft Windows)
|
A "non-modal" window (terminology borrowed from Microsoft Windows)
|
||||||
acts like a modal() one in that it remains on top, but it has
|
acts like a modal() one in that it remains on top, but it has
|
||||||
@ -184,7 +184,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void set_non_modal() {set_flag(NON_MODAL);}
|
void set_non_modal() {set_flag(NON_MODAL);}
|
||||||
/** Returns true if this window is modal or non-modal. */
|
/** Returns true if this window is modal or non-modal. */
|
||||||
int non_modal() const {return flags() & (NON_MODAL|MODAL);}
|
unsigned int non_modal() const {return flags() & (NON_MODAL|MODAL);}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Marks the window as a menu window.
|
Marks the window as a menu window.
|
||||||
@ -202,7 +202,7 @@ public:
|
|||||||
void set_menu_window() {set_flag(MENU_WINDOW);}
|
void set_menu_window() {set_flag(MENU_WINDOW);}
|
||||||
|
|
||||||
/** Returns true if this window is a menu window. */
|
/** Returns true if this window is a menu window. */
|
||||||
int menu_window() const {return flags() & MENU_WINDOW;}
|
unsigned int menu_window() const {return flags() & MENU_WINDOW;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Marks the window as a tooltip window.
|
Marks the window as a tooltip window.
|
||||||
@ -223,7 +223,7 @@ public:
|
|||||||
void set_tooltip_window() { set_flag(TOOLTIP_WINDOW);
|
void set_tooltip_window() { set_flag(TOOLTIP_WINDOW);
|
||||||
clear_flag(MENU_WINDOW); }
|
clear_flag(MENU_WINDOW); }
|
||||||
/** Returns true if this window is a tooltip window. */
|
/** Returns true if this window is a tooltip window. */
|
||||||
int tooltip_window() const {return flags() & TOOLTIP_WINDOW;}
|
unsigned int tooltip_window() const {return flags() & TOOLTIP_WINDOW;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Position the window so that the mouse is pointing at the
|
Position the window so that the mouse is pointing at the
|
||||||
|
Loading…
Reference in New Issue
Block a user