GnomeDbControl

Name

GnomeDbControl -- Easy-to-use class to create GNOME-DB Bonobo controls

Synopsis



struct      GnomeDbControlPrivate;
GnomeDbControl* gnome_db_control_construct  (GnomeDbControl *control,
                                             GtkWidget *w);
GnomeDbControl* gnome_db_control_new        (GtkWidget *w);
void        gnome_db_control_set_ui         (GnomeDbControl *control,
                                             const gchar *app_prefix,
                                             const gchar *ui_xml_file,
                                             BonoboUIVerb *verbs,
                                             gpointer user_data);
void        gnome_db_control_activate       (GnomeDbControl *control);
void        gnome_db_control_deactivate     (GnomeDbControl *control);
void        gnome_db_control_set_status     (GnomeDbControl *control,
                                             const gchar *msg);
gpointer    gnome_db_control_get_user_data  (GnomeDbControl *control);
void        gnome_db_control_set_user_data  (GnomeDbControl *control,
                                             gpointer user_data);
GtkWidget*  gnome_db_control_get_widget     (GnomeDbControl *control);
BonoboControl* gnome_db_control_get_bonobo_control
                                            (GnomeDbControl *control);
Bonobo_UIContainer gnome_db_control_get_ui_container
                                            (GnomeDbControl *control);

Description

The GnomeDbControl class is an easy-to-use way to create Bonobo controls that interact with the GNOME-DB front end application. That is, if you want to extend the front end application by adding another component, you should use this class.

But not only can you use it to extend the front end application, but also to implement your own Bonobo controls, even totally unrelated to GNOME-DB.

Details

struct GnomeDbControlPrivate

struct GnomeDbControlPrivate;


gnome_db_control_construct ()

GnomeDbControl* gnome_db_control_construct  (GnomeDbControl *control,
                                             GtkWidget *w);


gnome_db_control_new ()

GnomeDbControl* gnome_db_control_new        (GtkWidget *w);

Creates a new GnomeDbControl object, which is an instance of the Bonobo::Control and GNOME::Database::UIControl CORBA interfaces.

When calling this function, you must specify an already created GtkWidget, which is the one that will be used for creating the Bonobo control. You should use this class if you intend to write your own Bonobo controls.


gnome_db_control_set_ui ()

void        gnome_db_control_set_ui         (GnomeDbControl *control,
                                             const gchar *app_prefix,
                                             const gchar *ui_xml_file,
                                             BonoboUIVerb *verbs,
                                             gpointer user_data);

Sets the UI for the given GnomeDbControl object. This is done by specifying a file that contains the description of the UI (see Bonobo documentation) and a set of verbs and their corresponding actions.


gnome_db_control_activate ()

void        gnome_db_control_activate       (GnomeDbControl *control);

Activates the given GnomeDbControl object. This means that the UI for this control is merged with the UI of the container.


gnome_db_control_deactivate ()

void        gnome_db_control_deactivate     (GnomeDbControl *control);

Deactivates the given GnomeDbControl object, which means that the control's UI is removed from the container's.


gnome_db_control_set_status ()

void        gnome_db_control_set_status     (GnomeDbControl *control,
                                             const gchar *msg);

Displays the given message on the container's status bar. If you use GnomeDbWindow for your containers, you automatically have a status bar on your window, and, with this function, you can set the message to be displayed on that status bar from the components.


gnome_db_control_get_user_data ()

gpointer    gnome_db_control_get_user_data  (GnomeDbControl *control);

Gets the user data associated with the given GnomeDbControl object. This data is user-specific, and can be used to add context-sensitive data to each instance of the GnomeDbControl class.


gnome_db_control_set_user_data ()

void        gnome_db_control_set_user_data  (GnomeDbControl *control,
                                             gpointer user_data);

Associates user data with the given GnomeDbControl object. This data can then be retrieved by using the gnome_db_control_get_user_data function.


gnome_db_control_get_widget ()

GtkWidget*  gnome_db_control_get_widget     (GnomeDbControl *control);

Gets the GtkWidget being wrapped by the given GnomeDbControl. The returned value for this function should be the same pointer than the one used when creating the GnomeDbControl (that is, in the call to gnome_db_control_new).


gnome_db_control_get_bonobo_control ()

BonoboControl* gnome_db_control_get_bonobo_control
                                            (GnomeDbControl *control);

Gets the BonoboControl object from the given GnomeDbControl object. You may find this function interesting in cases where you need "low level" access to the underlying Bonobo control.


gnome_db_control_get_ui_container ()

Bonobo_UIContainer gnome_db_control_get_ui_container
                                            (GnomeDbControl *control);

Returns the Bonobo_UIContainer for the given GnomeDbControl object.