![]() |
![]() |
![]() |
LibMateComponentUI API Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
MateComponentSelectorPrivate; struct MateComponentSelector; MateComponentSelectorClass; GtkWidget * matecomponent_selector_construct (MateComponentSelector *sel
,const gchar *title
,MateComponentSelectorWidget *selector
); GtkWidget * matecomponent_selector_new (const gchar *title
,const gchar **interfaces_required
); gchar * matecomponent_selector_get_selected_id (MateComponentSelector *sel
); gchar * matecomponent_selector_get_selected_name (MateComponentSelector *sel
); gchar * matecomponent_selector_get_selected_description (MateComponentSelector *sel
); gchar * matecomponent_selector_select_id (const gchar *title
,const gchar **interfaces_required
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----MateComponentSelector
This MateDialog allows the user to select a component implementing a set of interfaces. The easiest way to do this in your code is by using:
Example 10. Simple MateComponent/Control selection
1 2 3 4 5 6 7 8 |
{ char *interfaces [] = { "IDL:MateComponent/Control:1.0", NULL }; char *oaf_iid; oaf_iid = matecomponent_selector_select_id ( _("Please select a Control"), interfaces); g_warning ("You selected '%s'", oaf_iid); g_free (oaf_iid); } |
This will throw up a dialog containing all the available components
implementing the IDL:MateComponent/Control:1.0 interface and list them for
the user to select.
typedef struct _MateComponentSelectorPrivate MateComponentSelectorPrivate;
typedef struct { GtkDialogClass parent_class; void (* ok) (MateComponentSelector *sel); void (* cancel) (MateComponentSelector *sel); gpointer dummy[2]; } MateComponentSelectorClass;
GtkWidget * matecomponent_selector_construct (MateComponentSelector *sel
,const gchar *title
,MateComponentSelectorWidget *selector
);
Don't use this ever - use construct-time properties instead. TODO: Remove from header when we are allowed to change the API. Constructs the innards of a matecomponent selector window.
|
the selector to construct |
|
the title for the window |
|
the component view widget to put inside it. |
Returns : |
the constructed widget. |
GtkWidget * matecomponent_selector_new (const gchar *title
,const gchar **interfaces_required
);
Creates a new MateComponentSelector widget. The title of the dialog
is set to title
, and the list of selectable servers is populated
with those servers which support the interfaces specified in
interfaces_required
.
|
A string which should go in the title of the MateComponentSelector window. |
|
A NULL-terminated array of interfaces which a server must support in order to be listed in the selector. Defaults to "IDL:MateComponent/Embeddable:1.0" if no interfaces are listed. |
Returns : |
A pointer to the newly-created MateComponentSelector widget. |
gchar * matecomponent_selector_get_selected_id (MateComponentSelector *sel
);
|
A MateComponentSelector widget. |
Returns : |
A newly-allocated string containing the ID of the currently-selected CORBA server (i.e., the corba server whose name is highlighted in the list). The user of this function is responsible for freeing this. It will give an oaf iid back. |
gchar * matecomponent_selector_get_selected_name (MateComponentSelector *sel
);
|
A MateComponentSelector widget. |
Returns : |
A newly-allocated string containing the name of the currently-selected CORBA server (i.e., the corba server whose name is highlighted in the list). The user of this function is responsible for freeing this. |
gchar * matecomponent_selector_get_selected_description
(MateComponentSelector *sel
);
|
A MateComponentSelector widget. |
Returns : |
A newly-allocated string containing the description of the currently-selected CORBA server (i.e., the corba server whose name is highlighted in the list). The user of this function is responsible for freeing this. |
gchar * matecomponent_selector_select_id (const gchar *title
,const gchar **interfaces_required
);
Calls matecomponent_selector_new()
to create a new
MateComponentSelector widget with the specified paramters, title
and
interfaces_required
. Then runs the dialog modally and allows
the user to make a selection.
|
The title to be used for the dialog. |
|
A list of required interfaces. See
matecomponent_selector_new() .
|
Returns : |
The Oaf IID of the selected server, or NULL if no server is selected. The ID string has been allocated with g_strdup. |
"cancel"
signalvoid user_function (MateComponentSelector *matecomponentselector,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"ok"
signalvoid user_function (MateComponentSelector *matecomponentselector,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |