| Top |
| #define | gwy_adjustment_get_int() |
| GtkWidget * | gwy_gtkgrid_attach_adjbar () |
| void | gwy_gtkgrid_hscale_set_sensitive () |
| GtkWidget * | gwy_gtkgrid_hscale_get_scale () |
| GtkWidget * | gwy_gtkgrid_hscale_get_check () |
| GtkWidget * | gwy_gtkgrid_hscale_get_label () |
| GtkWidget * | gwy_gtkgrid_hscale_get_units () |
| GtkWidget * | gwy_gtkgrid_hscale_get_middle_widget () |
| void | gwy_color_selector_for_mask () |
| void | gwy_mask_color_selector_run () |
| void | gwy_list_store_row_changed () |
| GtkWidget * | gwy_label_new_header () |
| GtkWidget * | gwy_stock_like_button_new () |
| GtkWidget * | gwy_tool_like_button_new () |
| gboolean | gwy_widget_get_activate_on_unfocus () |
| void | gwy_widget_set_activate_on_unfocus () |
| void | gwy_widget_sync_sensitivity () |
| gboolean | gwy_widget_is_hbox () |
| GtkWidget * | gwy_add_button_to_dialog () |
| void | gwy_set_message_label () |
#define gwy_adjustment_get_int(adj) ((gint)floor(gtk_adjustment_get_value(GTK_ADJUSTMENT(adj)) + 0.5))
Gets a properly rounded integer value from an adjustment, cast to gint.
GtkWidget * gwy_gtkgrid_attach_adjbar (GtkGrid *grid,gint row,const gchar *name,const gchar *units,GObject *pivot,GwyHScaleStyle style);
Attaches an adjustment bar with spinbutton and labels, or something else, to a grid row.
The group of controls takes three grid columns: adjustment bar, spinbutton and units.
You can use functions gwy_gtkgrid_hscale_get_scale(), gwy_gtkgrid_hscale_get_check(), etc. to get the various
widgets from pivot later.
The function usually does the right thing but what exactly happens with various style
values is a bit convoluted.
grid |
A GtkGrid. |
|
row |
Row in |
|
name |
The label before |
|
units |
The label after |
|
pivot |
Either a GtkAdjustment, or a widget to use instead of the spin button and scale widgets (if |
|
style |
A mix of options an flags determining what and how will be attached to the grid. |
The middle widget. If a spinbutton is attached, then this spinbutton is returned. Otherwise (in
GWY_HSCALE_WIDGET case) pivot
itself.
void gwy_gtkgrid_hscale_set_sensitive (GObject *pivot,gboolean sensitive);
Sets sensitivity of a group of controls created by gwy_gtkgrid_attach_adjbar().
For controls without an enable/disable check button controls the sensitivity as expected. If the hscale was
created with GWY_HSCALE_CHECK you usually manage its sensitivity by setting state of the check button instead.
Only use this function when you want to enable/disable the entire group of controls, including the check button.
GtkWidget *
gwy_gtkgrid_hscale_get_scale (GObject *pivot);
Gets the horizontal scale associated with a pivot object.
May return NULL if constructed with GWY_HSCALE_NO_SCALE, GWY_HSCALE_WIDGET, or GWY_HSCALE_WIDGET_NO_EXPAND.
GtkWidget *
gwy_gtkgrid_hscale_get_check (GObject *pivot);
Gets the check button associated with a pivot object.
May return NULL if not constructed with GWY_HSCALE_CHECK.
GtkWidget *
gwy_gtkgrid_hscale_get_label (GObject *pivot);
Gets the (left) label associated with a pivot object.
May return NULL if constructed with GWY_HSCALE_CHECK.
GtkWidget *
gwy_gtkgrid_hscale_get_units (GObject *pivot);
Gets the units label associated with a pivot object.
May return NULL if constructed without units.
GtkWidget *
gwy_gtkgrid_hscale_get_middle_widget (GObject *pivot);
Gets the middle widget associated with a pivot object.
void gwy_color_selector_for_mask (const gchar *dialog_title,GwyColorButton *color_button,GwyContainer *container,const gchar *prefix);
Creates and runs a color selector dialog for a mask.
See gwy_mask_color_selector_run() for details.
void gwy_mask_color_selector_run (const gchar *dialog_title,GtkWindow *parent,GwyColorButton *color_button,GwyContainer *container,const gchar *prefix);
Creates and runs a color selector dialog for a mask.
Note this function does not return anything, it runs the color selection dialog modally and returns when it is finished.
dialog_title |
Title of the color selection dialog ( |
|
parent |
Dialog parent window. The color selector dialog will be made transient for this window. |
|
color_button |
Color button to update on color change (or |
|
container |
Container to initialize the color from and save it to. |
|
prefix |
Prefix in |
void gwy_list_store_row_changed (GtkListStore *store,GtkTreeIter *iter,GtkTreePath *path,gint row);
Convenience function to emit "GtkTreeModel::row-changed" signal on a tree store.
At least one of iter
, path
, row
must be set to identify the row to emit "row-changed" on, and usually exactly
one should be set. The remaining information necessary to call gtk_tree_model_row_changed() is inferred
automatically.
The behaviour of this function is undefined for specified, but inconsistent iter
, path
, and row
.
GtkWidget *
gwy_label_new_header (const gchar *text);
Creates a bold, left aligned label.
The purpose of this function is to avoid propagation of too much markup to translations (and to reduce code clutter by avoiding dummy constructor and left-aligning automatically).
GtkWidget * gwy_stock_like_button_new (const gchar *label_text,const gchar *icon_name);
Creates a button that looks like a stock button, but can have different label text.
GtkWidget * gwy_tool_like_button_new (const gchar *label_text,const gchar *icon_name);
Creates a button that looks like a tool button, but can have different label text.
gboolean
gwy_widget_get_activate_on_unfocus (GtkWidget *widget);
Obtains the activate-on-unfocus state of a widget.
void gwy_widget_set_activate_on_unfocus (GtkWidget *widget,gboolean activate);
Sets the activate-on-unfocus state of a widget.
When it is enabled, signal "GtkWidget::activate" is emited whenever focus leaves the widget.
void gwy_widget_sync_sensitivity (GtkWidget *master,GtkWidget *slave);
Make widget's sensitivity follow the sensitivity of another widget.
The sensitivity of slave
is set according to master
's effective sensitivity (as returned by
GTK_WIDGET_IS_SENSITIVE()), i.e. it does not just synchronize GtkWidget:sensitive property.
gboolean
gwy_widget_is_hbox (GtkWidget *widget);
Checks if a widget is a GTK+ horizontal box.
The function checks whether the widget is a GtkBox and also whether it is horizontal. The latter can change in principle, so the check should to be used when it makes sense.
GtkWidget * gwy_add_button_to_dialog (GtkDialog *dialog,const gchar *label_text,const gchar *icon_name,gint response_id);
Adds a button with an icon to a dialog.
void gwy_set_message_label (GtkLabel *label,const gchar *text,GtkMessageType type,gboolean is_markup);
Sets the text of a label according to message type style.
Options controlling gwy_table_attach_adjbar() and gwy_table_attach_hscale() behaviour.
|
Default label, hscale, spinbutton, and units widget row. Note that the default mapping is linear for hscales but signed square root for adjust bars. |
||
|
The scale mapping is logarithmic. |
||
|
The scale mapping is signed square root. |
||
|
The scale mapping is linear. |
||
|
There is no hscale/adjust bar. |
||
|
An user-specified widget is used in place of the adjustment control(s). |
||
|
An user-specified widget is used in place of hscale and spinbutton, and it is left-aligned instead of taking all the alloted space. |
||
|
The label is actually a check button that controls sensitivity of the row. This is a flag, to be bitwise or-ed with other values. |
||
|
The adjust bar snaps to ticks (hscales cannot snap). This is a flag, to be bitwise or-ed with other values. |
Type of predefined dialog response types.
|
Reset of all parameters (that do not have the no-reset flag set). Adding it to a GwyDialog creates a Reset button which is normally handled fully by the dialog itself. |
||
|
Update of the preview. Adding it to a GwyDialog creates an Update button which is normally handled fully by the dialog itself (including sensitivity tied to an instant updates parameter). |
||
|
Clearing/resetting of selection. Adding it to a GwyDialog creates a Clear button. You need to connect to “response” and handle the response yourself. |
||
|
The smallest value to use for non-standard response codes. It is not used by anything in the library (and neither is any larger response code). |