NamedStyle Struct Reference

Inherits Style.

List of all members.

Public Member Functions

 NamedStyle (const char *name, void(*revert)(Style *), NamedStyle **backptr)

Public Attributes

const char * name
void(* revertfunc )(Style *)
NamedStyle ** back_pointer
NamedStylenext

Static Public Attributes

NamedStylefirst


Detailed Description

Typically a widget class will define a single NamedStyle that is used by all instances of that widget. A "theme" can locate this structure by looking it up by name (using the find() method) and then change it to change the appearance of all widgets of that class.

The reason a string name is used, rather than making the style be a public static data member of the class, is so that a theme can modify a large number of types of widgets without having them all linked into a program. If find() returns null it should just skip that setting code because that widget is not used by this program.

The "revert" function is mostly provided to make it easy to initialize the fields even though C++ does not allow a structure constant. It is also used to undo theme changes when reset_theme() is called.


The documentation for this struct was generated from the following files:
Sun Jan 7 00:55:18 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.