GIMP Widgets Library Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
GimpPageSelector; enum GimpPageSelectorTarget; GtkWidget * gimp_page_selector_new (void
); void gimp_page_selector_set_n_pages (GimpPageSelector *selector
,gint n_pages
); gint gimp_page_selector_get_n_pages (GimpPageSelector *selector
); void gimp_page_selector_set_target (GimpPageSelector *selector
,GimpPageSelectorTarget target
); GimpPageSelectorTarget gimp_page_selector_get_target (GimpPageSelector *selector
); void gimp_page_selector_set_page_thumbnail (GimpPageSelector *selector
,gint page_no
,GdkPixbuf *thumbnail
); GdkPixbuf * gimp_page_selector_get_page_thumbnail (GimpPageSelector *selector
,gint page_no
); void gimp_page_selector_set_page_label (GimpPageSelector *selector
,gint page_no
,const gchar *label
); gchar * gimp_page_selector_get_page_label (GimpPageSelector *selector
,gint page_no
); void gimp_page_selector_select_all (GimpPageSelector *selector
); void gimp_page_selector_unselect_all (GimpPageSelector *selector
); void gimp_page_selector_select_page (GimpPageSelector *selector
,gint page_no
); void gimp_page_selector_unselect_page (GimpPageSelector *selector
,gint page_no
); gboolean gimp_page_selector_page_is_selected (GimpPageSelector *selector
,gint page_no
); gint * gimp_page_selector_get_selected_pages (GimpPageSelector *selector
,gint *n_selected_pages
); void gimp_page_selector_select_range (GimpPageSelector *selector
,const gchar *range
); gchar * gimp_page_selector_get_selected_range (GimpPageSelector *selector
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GimpPageSelector
GimpPageSelector implements AtkImplementorIface, GtkBuildable and GtkOrientable.
typedef enum { GIMP_PAGE_SELECTOR_TARGET_LAYERS, /*< desc="Layers" >*/ GIMP_PAGE_SELECTOR_TARGET_IMAGES /*< desc="Images" >*/ } GimpPageSelectorTarget;
Import targets for GimpPageSelector.
GtkWidget * gimp_page_selector_new (void
);
Creates a new GimpPageSelector widget.
Returns : |
Pointer to the new GimpPageSelector widget. |
Since GIMP 2.4
void gimp_page_selector_set_n_pages (GimpPageSelector *selector
,gint n_pages
);
Sets the number of pages in the document to open.
|
Pointer to a GimpPageSelector. |
|
The number of pages. |
Since GIMP 2.4
gint gimp_page_selector_get_n_pages (GimpPageSelector *selector
);
|
Pointer to a GimpPageSelector. |
Returns : |
the number of pages in the document to open. |
Since GIMP 2.4
void gimp_page_selector_set_target (GimpPageSelector *selector
,GimpPageSelectorTarget target
);
|
Pointer to a GimpPageSelector. |
|
How to open the selected pages. |
Since GIMP 2.4
GimpPageSelectorTarget gimp_page_selector_get_target (GimpPageSelector *selector
);
|
Pointer to a GimpPageSelector. |
Returns : |
How the selected pages should be opened. |
Since GIMP 2.4
void gimp_page_selector_set_page_thumbnail (GimpPageSelector *selector
,gint page_no
,GdkPixbuf *thumbnail
);
Sets the thumbnail for given page_no
. A default "page" icon will
be used if no page thumbnail is set.
|
Pointer to a GimpPageSelector. |
|
The number of the page to set the thumbnail for. |
|
The thumbnail pixbuf. |
Since GIMP 2.4
GdkPixbuf * gimp_page_selector_get_page_thumbnail (GimpPageSelector *selector
,gint page_no
);
|
Pointer to a GimpPageSelector. |
|
The number of the page to get the thumbnail for. |
Returns : |
The page's thumbnail, or NULL if none is set. The returned
pixbuf is owned by GimpPageSelector and must not be
unref'ed when no longer needed. |
Since GIMP 2.4
void gimp_page_selector_set_page_label (GimpPageSelector *selector
,gint page_no
,const gchar *label
);
Sets the label of the specified page.
|
Pointer to a GimpPageSelector. |
|
The number of the page to set the label for. |
|
The label. |
Since GIMP 2.4
gchar * gimp_page_selector_get_page_label (GimpPageSelector *selector
,gint page_no
);
|
Pointer to a GimpPageSelector. |
|
The number of the page to get the thumbnail for. |
Returns : |
The page's label, or NULL if none is set. This is a newly
allocated string that should be g_free() 'd when no longer
needed. |
Since GIMP 2.4
void gimp_page_selector_select_all (GimpPageSelector *selector
);
Selects all pages.
|
Pointer to a GimpPageSelector. |
Since GIMP 2.4
void gimp_page_selector_unselect_all (GimpPageSelector *selector
);
Unselects all pages.
|
Pointer to a GimpPageSelector. |
Since GIMP 2.4
void gimp_page_selector_select_page (GimpPageSelector *selector
,gint page_no
);
Adds a page to the selection.
|
Pointer to a GimpPageSelector. |
|
The number of the page to select. |
Since GIMP 2.4
void gimp_page_selector_unselect_page (GimpPageSelector *selector
,gint page_no
);
Removes a page from the selection.
|
Pointer to a GimpPageSelector. |
|
The number of the page to unselect. |
Since GIMP 2.4
gboolean gimp_page_selector_page_is_selected (GimpPageSelector *selector
,gint page_no
);
|
Pointer to a GimpPageSelector. |
|
The number of the page to check. |
Returns : |
TRUE if the page is selected, FALSE otherwise. |
Since GIMP 2.4
gint * gimp_page_selector_get_selected_pages (GimpPageSelector *selector
,gint *n_selected_pages
);
|
Pointer to a GimpPageSelector. |
|
Returns the number of selected pages. |
Returns : |
A sorted array of page numbers of selected pages. Use g_free() if
you don't need the array any longer. |
Since GIMP 2.4
void gimp_page_selector_select_range (GimpPageSelector *selector
,const gchar *range
);
Selectes the pages described by range
. The range string is a
user-editable list of pages and ranges, e.g. "1,3,5-7,9-12,14".
Note that the page numbering in the range string starts with 1,
not 0.
Invalid pages and ranges will be silently ignored, duplicate and overlapping pages and ranges will be merged.
|
Pointer to a GimpPageSelector. |
|
A string representing the set of selected pages. |
Since GIMP 2.4
gchar * gimp_page_selector_get_selected_range
(GimpPageSelector *selector
);
|
Pointer to a GimpPageSelector. |
Returns : |
A newly allocated string representing the set of selected
pages. See gimp_page_selector_select_range() for the
format of the string. |
Since GIMP 2.4
"n-pages"
property "n-pages" gint : Read / Write
The number of pages of the document to open.
Allowed values: >= 0
Default value: 0
Since GIMP 2.4
"target"
property"target" GimpPageSelectorTarget : Read / Write
The target to open the document to.
Default value: GIMP_PAGE_SELECTOR_TARGET_LAYERS
Since GIMP 2.4
"activate"
signalvoid user_function (GimpPageSelector *widget,
gpointer user_data) : Action
The "activate" signal on GimpPageSelector is an action signal. It is emitted when a user double-clicks an item in the page selection.
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
Since GIMP 2.4
"selection-changed"
signalvoid user_function (GimpPageSelector *widget,
gpointer user_data) : Run First
This signal is emitted whenever the set of selected pages changes.
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
Since GIMP 2.4