swamigui Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Known Implementations | Properties |
SwamiguiPanel; SwamiguiPanelIface; gboolean (*SwamiguiPanelCheckFunc) (IpatchList *selection
,GType *selection_types
); void swamigui_panel_type_get_info (GType type
,char **label
,char **blurb
,char **stockid
); gboolean swamigui_panel_type_check_selection (GType type
,IpatchList *selection
,GType *selection_types
); GType * swamigui_panel_get_types_in_selection (IpatchList *selection
);
SwamiguiPanel is implemented by SwamiguiModEdit, SwamiguiPanelSF2Gen, SwamiguiPanelSF2GenEnv, SwamiguiPanelSF2GenMisc, SwamiguiProp and SwamiguiSampleEditor.
typedef struct { GTypeInterface parent_class; char *label; /* User label name for panel */ char *blurb; /* more descriptive text about panel */ char *stockid; /* stock ID of icon */ SwamiguiPanelCheckFunc check_selection; } SwamiguiPanelIface;
gboolean (*SwamiguiPanelCheckFunc) (IpatchList *selection
,GType *selection_types
);
Function prototype used for checking if an item selection is valid for a panel.
void swamigui_panel_type_get_info (GType type
,char **label
,char **blurb
,char **stockid
);
Lookup info on a panel for a given type
. A NULL
value can be passed for any
of the string parameters to ignore it. Note also that a NULL
value may
be returned for any of the return parameters. The returned parameters are
internal and should not be modified or freed.
|
Type with a SwamiguiPanel interface to get info on |
|
Out - User panel label (short, could be NULL )
|
|
Out - User panel description (longer, for tool tips, could be NULL )
|
|
Out - Stock ID string of icon for this panel (could be NULL )
|
gboolean swamigui_panel_type_check_selection (GType type
,IpatchList *selection
,GType *selection_types
);
Checks if the panel with the given type
supports the item selection
. The
selection_types
parameter is for optimization purposes, so that panel types
can quickly check if they should be active or not based on the item types
in the selection (possibly saving another iteration of the selection
), this
array will be calculated if not supplied, so its only useful if checking
many panel types for a given selection
.
|
Type with a SwamiguiPanel interface |
|
Item selection to test support for, list should not be empty |
|
0 terminated array of unique item types in selection or
NULL to calculate the array
|
Returns : |
TRUE if panel supports selection, FALSE otherwise
|
GType * swamigui_panel_get_types_in_selection
(IpatchList *selection
);
Gets an array of unique item types in selection
.
|
Item selection list |
Returns : |
Newly allocated and 0 terminated array of unique types of items
in selection .
|