.PP
Data members:
.PP
-There are four types of data members. Three of them are normal
-data numbers, and one is a virtual one, usually linked to a normal
-data member. The three normal data members are public, protected and
-private. Public and protected are basically just entries in the object
-structure, while private has it's own dynamically allocated private
-structure. Protected members are always put after the public one in the
-structure and are marked protected in the header file. There is only one
-identifier allowed per typename unlike in normal C. Example:
+There are five types of data members. Three of them are normal data numbers,
+one is class wide (global) in scope and one is a virtual one, usually linked to
+a normal data member or a class wide data member. The three normal data
+members are public, protected and private. Public and protected are basically
+just entries in the object structure, while private has it's own dynamically
+allocated private structure. Protected members are always put after the public
+one in the structure and are marked protected in the header file. There is
+only one identifier allowed per typename unlike in normal C. Example:
.nf
public int i;
private header file is created and you can only access the _priv pointer
below the class definition in the .gob file.
.PP
+Classwide data members:
+.PP
+Sometimes you want a datamember to be shared by all objects. You then need
+the "classwide" scope keyword. So for example the following adds a global
+member foo:
+.nf
+
+ classwide int foo;
+
+.fi
+To access the member you do the standard voodoo of getting the class from the
+object and casting it to your class pointer. Thus the following would work:
+.nf
+
+ SELF_CLASS(GTK_OBJECT(object)->klass)->foo = 20;
+
+.fi
+.PP
Automatic Initialization (0.93.0 and higher only):
.PP
You can automatically initialize the public private and protected data members