WizardGroup Class Reference

Inherits Group.

List of all members.

Public Member Functions

 WizardGroup (int x, int y, int w, int h, const char *l=0, bool begin=false)
void draw ()
void next ()
void prev ()
void value (Widget *)
Widgetvalue () const


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_win->begin(); 
  G_wiz = new WizardGroup(0,0,WIDTH, HEIGHT);// create Wizard
  G_wiz->begin();
  add_group("This is the\nFirst\npage", RED,true, false ); // Wz p.1
  add_group("This is the\nSecond\npage", YELLOW, false, false); // Wz p.2
  add_group("This is the\nLast\npage", GREEN, false, true); // Wz p.3
  G_wiz->end();
  G_win->end();
  G_win->show(argc, argv);
  return run();
}


Member Function Documentation

void WizardGroup::draw void   )  [virtual]
 

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

Reimplemented from 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.

Widget* WizardGroup::value  )  const [inline]
 

return the current visible child.

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:
Sun Jan 7 00:55:19 2007. FLTK ©2006 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.