EggAssistant

GtkAssistant is now part of GTK+, with a way nicer API than the described here, so please move along :).

Owners: CarlosGarnacho

API Details

The assistant will have 2 widgets:

EggAssistantPage

Inherits from GtkBin, it's just a container which provides title, header pixmap and watermark, but is not responsible of drawing them. Also provides the "prepare" signal, which works like in other assistant implementations

EggAssistant

Inherits from GtkDialog, provides the next/back/... buttons and a frame for the contained EggAssistantPages. It's responsible of requesting pages' title, header and watermark and drawing them. For drawing the top and side colors it just inverses the GTK_STATE_NORMAL and GTK_STATE_SELECTED colors, thus adapting to theme changes.

It uses egg_assistant_set_forward_page_func() and egg_assistant_set_back_page_func() for handling page switches instead of "next" and "back" signals. By default, the forward function moves to the next page, and back function returns to the previously shown page, independently of the forward function (maintains a stack of visited pages, with forward being a "push" and backward a "pop"), so unless people want to make very crazy things, this is a very sane default, making only necessary to specify the forward function if it's necessary.

In other terms, The API to handle pages is quite similar to the GtkNotebook one (add pages/get page number/get page).

Pending issues

  • border color drawing doesn't work with pixmap themes (but this isn't specific to this implementation, happens too in the others)
  • inverted color still doesn't play fine with unsensitive assistants
  • it could be worth adding a method in EggAssistant for handling watermark alignment, like in Matthias' implementation

Attic/ProjectRidley/EggAssistant (last edited 2013-11-23 01:05:07 by WilliamJonMcCann)