Main Page | Class Hierarchy | Class List | File List | Class Members

Flu_Collapsable_Group Class Reference

This widget implements a collapsable group with a configurable framerate. More...

#include <Flu_Collapsable_Group.h>

List of all members.

Public Member Functions

 Flu_Collapsable_Group (int x, int y, int w, int h, const char *l=0)
 Normal FLTK constructor.

float collapse_time () const
 Get the amount of time to take when animating a collapse.

void collapse_time (float t)
 Set the amount of time to take when animating a collapse.

float frame_rate () const
 Get the frame rate to aim for during a collapse animation.

void frame_rate (float f)
 Set the frame rate to aim for during a collapse animation.

void align (unsigned char a)
 Set the position of the controller widget along the top edge of the group. This only has an effect if fit() is not set. Default value is FL_ALIGN_LEFT.

unsigned char align () const
 Get the position of the controller widget along the top edge of the group.

void fit (bool b)
 Pass true to force the button to be the same width as the group, false to leave it its default size. Default value is false.

bool fit () const
 Get whether the button is being forced to fit the width of the group.

bool open () const
 Get whether the group is closed or open (i.e. collapsed or not).

void open (bool o)
 Set whether the group is closed or open (i.e. collapsed or not). Default is true.

bool closed () const
 Get whether the group is closed or open (i.e. collapsed or not).

bool changing () const
 Get whether the group is in the process of opening or closing.

void resize (int x, int y, int w, int h)
 Override of Fl_Group::resize().

void label (const char *l)
 Override of Fl_Group::label().

const char * label ()
 Override of Fl_Group::label().

Pass-through functions for the internal Fl_Group
These are strictly for convenience. Only the most commonly called functions have been re-implemented. You can also explicitly access the group object for more control.

void clear ()
Fl_Widget * child (int n) const
int children () const
void begin ()
void end ()
void resizable (Fl_Widget *box)
void resizable (Fl_Widget &box)
Fl_Widget * resizable () const
void add (Fl_Widget &w)
void add (Fl_Widget *w)
void insert (Fl_Widget &w, int n)
void insert (Fl_Widget &w, Fl_Widget *beforethis)
void remove (Fl_Widget &w)
void add_resizable (Fl_Widget &box)

Public Attributes

Flu_Button button
Fl_Group group

Protected Member Functions

void draw ()
void updateCB ()

Static Protected Member Functions

void _collapseCB (Fl_Widget *w, void *arg)
void _updateCB (void *arg)

Protected Attributes

void(* _callback )(Fl_Widget *, void *)
void * _callbackData
void(* _collapseCallback )(void *)
void * _collapseCallbackData
int _originalHeight
int _newHeight
float _deltaHeight
float _currentHeight
float _collapseTime
float _timeout
float _fps
Fl_Widget * _oldResizable
bool _open
bool _changing
bool _fit
unsigned char _align
FluSimpleString _label


Detailed Description

This widget implements a collapsable group with a configurable framerate.

This class is a group with a button and an Fl_Group inside (both publicly exposed). The Fl_Group contains the actual child widgets of this group.

Most of the Fl_Group member functions are reimplemented here in a pass-through fashion to the internal group. This means that casual use of a descendent instance will be almost exactly the same as for a regular Fl_Group, with any additional access provided directly through member group.

The goal of this class is to provide a dynamically collapsable group similar to those available in other GUI toolkits.

The callback is invoked whenever the button is pressed to open/close the group.


Member Function Documentation

void Flu_Collapsable_Group::align unsigned char  a  )  [inline]
 

Set the position of the controller widget along the top edge of the group. This only has an effect if fit() is not set. Default value is FL_ALIGN_LEFT.

Accepted values are FL_ALIGN_LEFT, FL_ALIGN_CENTER, and FL_ALIGN_RIGHT


The documentation for this class was generated from the following file:
Generated on Fri Nov 5 12:41:32 2004 for FLTK Utility Library and Widget Collection (FLU) by doxygen 1.3.5