SwamiguiPanel

SwamiguiPanel

Synopsis

                    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);

Object Hierarchy

  GInterface
   +----SwamiguiPanel

Known Implementations

SwamiguiPanel is implemented by SwamiguiModEdit, SwamiguiPanelSF2Gen, SwamiguiPanelSF2GenEnv, SwamiguiPanelSF2GenMisc, SwamiguiProp and SwamiguiSampleEditor.

Properties

  "item-selection"           IpatchList*           : Read / Write

Description

Details

SwamiguiPanel

typedef struct _SwamiguiPanel SwamiguiPanel;

SwamiguiPanelIface

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;

SwamiguiPanelCheckFunc ()

gboolean            (*SwamiguiPanelCheckFunc)           (IpatchList *selection,
                                                         GType *selection_types);

Function prototype used for checking if an item selection is valid for a panel.

selection :

Item selection to verify (will contain at least 1 item)

selection_types :

0 terminated array of unique item GTypes found in selection

Returns :

Should return TRUE if item selection is valid, FALSE otherwise

swamigui_panel_type_get_info ()

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 :

Type with a SwamiguiPanel interface to get info on

label :

Out - User panel label (short, could be NULL)

blurb :

Out - User panel description (longer, for tool tips, could be NULL)

stockid :

Out - Stock ID string of icon for this panel (could be NULL)

swamigui_panel_type_check_selection ()

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 :

Type with a SwamiguiPanel interface

selection :

Item selection to test support for, list should not be empty

selection_types :

0 terminated array of unique item types in selection or NULL to calculate the array

Returns :

TRUE if panel supports selection, FALSE otherwise

swamigui_panel_get_types_in_selection ()

GType *             swamigui_panel_get_types_in_selection
                                                        (IpatchList *selection);

Gets an array of unique item types in selection.

selection :

Item selection list

Returns :

Newly allocated and 0 terminated array of unique types of items in selection.

Property Details

The "item-selection" property

  "item-selection"           IpatchList*           : Read / Write

Item selection list.