generalized wizard dialog?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey.

I made my first little wizard dialog a little while ago, and learned a
lot about the problems involved with making a wizard.  In order to make
this process easier and less error prone, I thinking about making a
generalized wizard dialog.

first, does something like this already exist that I can use?

I'm just now starting to think out my place, so I'm not clear yet what
will be involved, but I'll try to flesh out my idea a bit.

I think of a wizard as a collection of possible states.  Each state
defines what the dialog looks like, what kind of events can be generated
by that dialog and the event handlers appropriate for that state.  The
event handlers can cause the state to change, in which case another ...
GtkWizardState (how 'bout that name?) takes over.

Each complete wizard requires at least two states.  The initial state
and the final state.  Perhaps these should be special instances
(sub-classes) of the more general state object.

States are identified by ints, which are grouped in an enum{} structure.
States...  maybe are passed to the GtkWizardDialog in an array of
pointers to a group of pre-existing (pre-allocated) GtkWizardStates,
then the dialog is run like any other...  with gtk_dialog_run().

hm...

let's say...  the states changes cannot form a loop.  if a certain state
has to be run more than once, it must by done by backing up through the
list of states that have run after it.  This of course implies a simple
list of states that would define a run path...  which could be
implemented by a "previousstate" pointer in each state object.  The standard
action of a "Back" button would be to make the previousstate the new
currently active state (and NULL the previousstate pointer).

Which buttons are available in the bottom row would be defined by each
state, etc..

I think something like this wouldn't be terribly difficult to put
together and would probably make my life a little simpler.  If it
doesn't already exist (in one form or another) then I'm going to make
it, and I'll share it if anyone's interested.

- Ben

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux