fltk::WizardGroup Class Reference

Inherits fltk::Group.

List of all members.

Public Member Functions

void draw ()
void next ()
void prev ()
void value (Widget *)
Widgetvalue () const
 return the current visible child.

Detailed Description

This class encapsulates Groups and shows only one group
among n others at any time.
Just create a WizardGroup as you would create a Group and add child Widgets inside.
Sample use:

// some useful callbacks:
void done_cb(Widget*, void*) { G_win->hide(); }
void back_cb(Widget*, void*) { G_wiz->prev(); }
void next_cb(Widget*, void*) { G_wiz->next(); }
// main code:
int main(int argc, char **argv) {
  G_win = new Window(WIDTH,HEIGHT); // create main window
  G_wiz = new WizardGroup(0,0,WIDTH, HEIGHT);// create Wizard
  add_group("This is the\nFirst\npage", fltk::RED,true, false ); // Wz p.1
  add_group("This is the\nSecond\npage", fltk::YELLOW, false, false); // Wz p.2
  add_group("This is the\nLast\npage", fltk::GREEN, false, true); // Wz p.3
  G_win->show(argc, argv);
  return fltk::run();

Member Function Documentation

void WizardGroup::draw ( void  ) [virtual]

draw WizardGroup and make sure before that only one child is visible

Reimplemented from fltk::Group.

void WizardGroup::next ( )

show next (or last if no more next) child, usually a group.

void WizardGroup::prev ( )

show previous (or first if no more previous) child, usually a group.

void WizardGroup::value ( Widget kid)

Set the visible child, look in the Wizard for this widget, make it visible, hide all others.

The documentation for this class was generated from the following files: