Class Index | Cross Index | Namespace Index |
The base class of the whole hierarchy
Contained in: Gtk
Derived from:
Gtk::Base
Derived by:
Gtk::Data
#include <gtk--/object.h>
public function member index: |
||
emitable signal void | destroy | (); |
void | destroy_ | (); |
gpointer | get_data | (const string& key) const; |
gpointer | get_data_by_id | (GQuark data_id) const; |
gpointer | get_user_data | () const; |
GtkObject* | gtkobj | (); |
const GtkObject* | gtkobj | () const; |
static bool | isA | (Object* object); |
gint | nsignals | (); |
void | remove_data | (const string& key); |
void | remove_data_by_id | (GQuark data_id); |
void | remove_no_notify | (const string& key); |
void | remove_no_notify_by_id | (GQuark data_id); |
void | set_data | (const string& key, gpointer data); |
void | set_data_by_id | (GQuark data_id, gpointer data); |
void | set_data_by_id_full | (GQuark data_id, gpointer data, GtkDestroyNotify destroy); |
void | set_data_full | (const string& key, gpointer data, GtkDestroyNotify destroy); |
virtual void | set_dynamic | (); |
void | set_user_data | (gpointer data); |
guint* | signals | (); |
guint | type | (); |
virtual | ~Object | (); |
protected function member index: |
||
static void | destroy_notify_ | (gpointer s); |
static void | gtkmm_sigsegv | (const char* name); |
virtual void | reference | (); |
void | set_type | (GtkType type); |
virtual void | unreference | (); |
void | weakref | (GtkDestroyNotify notify, gpointer data); |
void | weakunref | (GtkDestroyNotify notify, gpointer data); |
Objects have arguments that are name/typed-value pairs. They may be readable or writable (or both or neither). The special handlers in every object are responsible for setting and getting these parameters. If the handler for a given argument must be called before the object may be used, be sure the GTK_ARG_CONSTRUCT or GTK_ARG_CONSTRUCT_ONLY flags are set; otherwise they are set only when the user does so.
Object also store a simpler association table, sometimes called the object_data. This is just an efficient mapping from a fixed set of strings to a gpointer. This can be used as arbitrary extra members. Notice that each new field name allocates a new quark, so it is probably best only to use this for fields with fixed names.
The primary difference between object_data and arguments is that the object defines
two functions which set and get each type of argument. The object just has a table to
store its object data in: it does not receive notice when data changes.
This can be used to tell toplevel widgets that they should die if they are managed(). You should never connect a slot which references "this" because destroy is called during dtor.
key: Name of the key for that association.Returns: The data if found, or NULL if no such data exists.
Use and to get an id from a string.
This is intended to be a pointer for your convenience in writing applications.
Subsequent calls to get_data will return NULL.If you specified a destroy handler with set_data_full, it will be invoked.
key: Name of the key for that association.
Remove a specified datum from the object's data associations. Subsequent calls to get_data will return NULL.Use and to get an id from a string.
data_id: Quark of the key.
Just like remove_data except that any destroy handler will be ignored. Therefore this only affects data set using set_data_full.key: Name of the key for that association.
Use and to get an id from a string.data_id: Quark of the key.
If the object already had an association with that name, the old association will be destroyed. key: Name of the key.data: Data to associate with that key.
Use and to get an id from a string.data_id: Quark of the key.
data: Data to associate with that key.
Use and to get an id from a string.data_id: Quark of the key.
data: Data to associate with that key.
destroy: Function to call when the association is destroyed.
key: Name of the key.data: Data to associate with that key.
destroy: Function to call when the association is destroyed.
Weak references are a mechanism to safely keep a pointer to an object without using the reference counting mechansim. They use a callback function to receive notice that the object is about to be freed (aka finalized). This happens after the destroy callback has been run.notify: Callback to invoke before the object is freed. data: Extra data to pass to notify.
notify: Callback to search for. data: Data to search for.