Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_Widget Class Reference

Fl_Widget is the base class for all widgets in FLTK. More...

#include <Fl_Widget.h>

Inheritance diagram for Fl_Widget:

Fl_Box Fl_Button Fl_Clock_Output Fl_Divider Fl_Input Fl_Item Fl_ListView_Header Fl_ProgressBar Fl_Split Fl_Valuator List of all members.

Public Types

enum  { RESERVED_TYPE = 0x64, GROUP_TYPE = 0xe0, WINDOW_TYPE = 0xf0 }
 values for widget_type(). More...


Public Methods

uchar widget_type () const
void widget_type (uchar t)
bool is_group () const
bool is_window () const
uchar type () const
void type (uchar t)
virtual void draw ()
virtual void layout ()
virtual void preferred_size (int &w, int &h) const
int send (int event)
int dispatch_event (int event)
virtual int handle (int event)
const Fl_Stylestyle () const
void style (const Fl_Style *s)
void style (const Fl_Style &s)
bool copy_style (const Fl_Style *s)
Fl_Group * parent () const
void parent (Fl_Group *w)
Fl_Windowwindow () const
int x () const
void x (int v)
int y () const
void y (int v)
int w () const
void w (int v)
int h () const
void h (int v)
int width ()
int height ()
bool resize (int x, int y, int w, int h)
bool position (int X, int Y)
bool size (int W, int H)
const Fl_Stringlabel () const
void label (const Fl_String &l)
void label (const char *l)
void copy_label (const char *a)
void copy_label (const Fl_String &a)
void measure_label (int &w, int &h) const
const Fl_Stringtooltip () const
void tooltip (const char *t)
void tooltip (const Fl_String &t)
const Fl_Stringfield_name () const
void field_name (const char *f)
void field_name (const Fl_String &f)
Fl_Imageimage () const
void image (Fl_Image *a)
void image (Fl_Image &a)
int shortcut () const
void shortcut (int s)
int test_shortcut () const
Fl_Callback_p callback () const
void callback (Fl_Callback *c, void *p)
void callback (Fl_Callback *c)
void callback (Fl_Callback0 *c)
void callback (Fl_Callback1 *c, long p=0)
void * user_data () const
void user_data (void *v)
long argument () const
void argument (long v)
uchar when () const
void when (uchar i)
void do_callback (Fl_Widget *o, void *arg, void *widget_data=0)
void do_callback (Fl_Widget *o, long arg, void *widget_data=0)
void do_callback (void *widget_data=0)
void connect (int event, void *obj, Fl_Signal_Callback *cb)
void connect (int event, Fl_Signal_Callback *cb)
int emit_signal (int event, void *opt_data=0)
Fl_Signal * signal ()
bool contains (const Fl_Widget *) const
bool inside (const Fl_Widget *o) const
bool pushed () const
bool focused () const
bool belowmouse () const
Fl_Align layout_align () const
void layout_align (Fl_Align f)
Fl_Flags flags () const
Fl_Flags flags (Fl_Flags f)
Fl_Flags set_flag (int c)
Fl_Flags clear_flag (int c)
Fl_Flags invert_flag (int c)
Fl_Align align () const
void align (int a)
bool visible_r () const
void show ()
void hide ()
bool visible () const
void set_visible ()
void clear_visible ()
bool active () const
bool active_r () const
void activate ()
void deactivate ()
void activate (int b)
bool output () const
void set_output ()
void clear_output ()
bool takesevents () const
bool changed () const
void set_changed ()
void clear_changed ()
bool value () const
void set_value ()
void clear_value ()
bool selected () const
void set_selected ()
void clear_selected ()
bool focus_on_click ()
void set_focus_on_click ()
void clear_focus_on_click ()
bool focus_on_key ()
void set_focus_on_key ()
void clear_focus_on_key ()
void accept_focus (bool v)
bool accept_focus ()
bool take_focus ()
void throw_focus ()
void redraw ()
void redraw_label ()
void redraw (int x, int y, int w, int h)
void redraw (uchar c)
Fl_Damage damage () const
void set_damage (uchar d)
void clear_damage ()
void relayout ()
void relayout (uchar damage)
Fl_Layout_Damage layout_damage () const
void layout_damage (uchar d)
void make_current () const
void draw_frame () const
void draw_box () const
void draw_glyph (int t, int x, int y, int w, int h, Fl_Flags f) const
void draw_label (int x, int y, int w, int h, Fl_Flags) const
void draw_inside_label (int x, int y, int w, int h, Fl_Flags) const
void draw_inside_label () const
Fl_Boxtype box () const
Fl_Boxtype button_box () const
Fl_Boxtype focus_box () const
Fl_Glyph glyph () const
Fl_Font label_font () const
Fl_Font text_font () const
Fl_Labeltype label_type () const
Fl_Color color () const
Fl_Color label_color () const
Fl_Color selection_color () const
Fl_Color selection_text_color () const
Fl_Color button_color () const
Fl_Color highlight_color () const
Fl_Color highlight_label_color () const
Fl_Color text_color () const
unsigned label_size () const
unsigned text_size () const
unsigned leading () const
Fl_Flags scrollbar_align () const
unsigned scrollbar_width () const
void box (Fl_Boxtype)
void button_box (Fl_Boxtype)
void focus_box (Fl_Boxtype)
void glyph (Fl_Glyph)
void label_font (Fl_Font)
void text_font (Fl_Font)
void label_type (Fl_Labeltype)
void color (Fl_Color)
void label_color (Fl_Color)
void selection_color (Fl_Color)
void selection_text_color (Fl_Color)
void button_color (Fl_Color)
void highlight_color (Fl_Color)
void highlight_label_color (Fl_Color)
void text_color (Fl_Color a)
void label_size (unsigned a)
void text_size (unsigned a)
void leading (unsigned a)
virtual bool load_data (Fl_Data_Source *ds)
virtual bool save_data (Fl_Data_Source *ds)
virtual void reset ()
virtual ~Fl_Widget ()
 DEFSLOT_O (Fl_Widget, Fl_Widget, slot_label, const char *)
 DEFSLOT_O (Fl_Widget, Fl_Widget, slot_active, int)
 DEFSLOT_O (Fl_Widget, Fl_Widget, slot_visibility, int)
void slot_label (const char *newlabel)
 Change label of widget. More...

void slot_active (int value)
 Activate / Deactivate widget. More...

void slot_visibility (int value)
 Show / hide widget. More...


Static Public Methods

void default_glyph (const Fl_Widget *widget, int glyph, int x, int y, int w, int h, Fl_Flags flags)
void default_callback (Fl_Widget *w, void *arg)

Static Public Attributes

Fl_Named_Styledefault_style

Protected Methods

 Fl_Widget (int x, int y, int w, int h, const char *l=0)
 Traditional ctor. More...

 Fl_Widget (const char *l=0, int layout_size=30, Fl_Align layout_al=FL_ALIGN_TOP, int label_w=-1)
 New style ctor. More...


Friends

class Fl_Device

Detailed Description

Fl_Widget is the base class for all widgets in FLTK.

You can't create one of these because the constructor is not public. However you can subclass it.

Unless otherwise noted, the property setting methods such as color(n) or label(s) do not call redraw(), even if they change the widget's appearance. This is to make the setting of several properties faster and to allow most of them to be small inline functions. It is up to the calling program to call redraw() after changing any visible properties.

Definition at line 57 of file Fl_Widget.h.


Member Enumeration Documentation

anonymous enum
 

values for widget_type().

Enumeration values:
RESERVED_TYPE  Widget is reserved type.
GROUP_TYPE  Widget is group type.
WINDOW_TYPE  Widget is window type.

Definition at line 61 of file Fl_Widget.h.


Constructor & Destructor Documentation

Fl_Widget::Fl_Widget int    x,
int    y,
int    w,
int    h,
const char *    l = 0
[protected]
 

Traditional ctor.

This is the protected constructor for an Fl_Widget, but all derived widgets have a matching public constructor. It takes a value for x(), y(), w() , h(), and an optional value for label().

Fl_Widget::Fl_Widget const char *    l = 0,
int    layout_size = 30,
Fl_Align    layout_al = FL_ALIGN_TOP,
int    label_w = -1
[protected]
 

New style ctor.

This is the protected constructor for an Fl_Widget, but all derived widgets have a matching public constructor. It takes a value for x(), y(), w() , h(), and an optional value for label().


Member Function Documentation

void Fl_Widget::slot_active int    value [inline]
 

Activate / Deactivate widget.

This function is provided for straight signal connections.

Parameters:
value  True for activate and false for deactivate.

Definition at line 381 of file Fl_Widget.h.

void Fl_Widget::slot_label const char *    newlabel [inline]
 

Change label of widget.

This function redraws label also. This function is provided for straight signal connections.

Parameters:
newlabel  New label to set.

Definition at line 374 of file Fl_Widget.h.

void Fl_Widget::slot_visibility int    value [inline]
 

Show / hide widget.

This function is provided for straight signal connections.

Parameters:
value  True for show and false for hide.

Definition at line 388 of file Fl_Widget.h.


The documentation for this class was generated from the following file:
Generated on Thu Jul 31 15:33:56 2003 for eFLTK by doxygen1.2.15