![]() | ![]() | ![]() | Gwyddion Widgets Library Reference Manual |
---|
gwyoptionmenus — Option menu constructors for enums
GtkWidget* gwy_menu_palette (GCallback callback, gpointer cbdata); GtkWidget* gwy_option_menu_palette (GCallback callback, gpointer cbdata, const gchar *current); GtkWidget* gwy_option_menu_interpolation (GCallback callback, gpointer cbdata, GwyInterpolationType current); GtkWidget* gwy_option_menu_windowing (GCallback callback, gpointer cbdata, GwyWindowingType current); GtkWidget* gwy_option_menu_zoom_mode (GCallback callback, gpointer cbdata, GwyZoomMode current); GtkWidget* gwy_option_menu_2dcwt (GCallback callback, gpointer cbdata, Gwy2DCWTWaveletType current); GtkWidget* gwy_option_menu_fft_output (GCallback callback, gpointer cbdata, GwyFFTOutputType current); GtkWidget* gwy_option_menu_sfunctions_output (GCallback callback, gpointer cbdata, GwySFOutputType current); GtkWidget* gwy_option_menu_direction (GCallback callback, gpointer cbdata, GtkOrientation current); GtkWidget* gwy_option_menu_filter (GCallback callback, gpointer cbdata, GwyFilterType current); GtkWidget* gwy_option_menu_mergegrain (GCallback callback, gpointer cbdata, GwyMergeType current); GtkWidget* gwy_option_menu_fit_line (GCallback callback, gpointer cbdata, GwyFitLineType current); GtkWidget* gwy_option_menu_fractal (GCallback callback, gpointer cbdata, GwyFractalType current); GtkWidget* gwy_option_menu_metric_unit (GCallback callback, gpointer cbdata, gint from, gint to, const gchar *unit, gint current); GtkWidget* gwy_option_menu_create (const GwyEnum *entries, gint nentries, const gchar *key, GCallback callback, gpointer cbdata, gint current); gboolean gwy_option_menu_set_history (GtkWidget *option_menu, const gchar *key, gint current); gint gwy_option_menu_get_history (GtkWidget *option_menu, const gchar *key);
GtkWidget* gwy_menu_palette (GCallback callback, gpointer cbdata);
Creates a pop-up palette menu.
callback: | A callback called when a menu item is activated (or NULL for none). |
cbdata: | User data passed to the callback. |
Returns : | The newly created pop-up menu as GtkWidget. |
GtkWidget* gwy_option_menu_palette (GCallback callback, gpointer cbdata, const gchar *current);
Creates a GtkOptionMenu of palettes (more preciesly, palettes definitions), alphabetically sorted, with names and small sample images.
It sets object data "palette-name" to palette definition name for each menu item.
callback: | A callback called when a menu item is activated (or NULL for none). |
cbdata: | User data passed to the callback. |
current: | Palette definition name to be shown as currently selected (or NULL to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_interpolation (GCallback callback, gpointer cbdata, GwyInterpolationType current);
Creates a GtkOptionMenu of interpolation types i.e., values of GwyInterpolationType.
It sets object data "interpolation-type" to interpolation type for each menu item (use GPOINTER_TO_INT() when retrieving it)..
callback: | A callback called when a menu item is activated (or NULL for none). |
cbdata: | User data passed to the callback. |
current: | Interpolation type to be shown as currently selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_windowing (GCallback callback, gpointer cbdata, GwyWindowingType current);
Creates a GtkOptionMenu of windowing types i.e., values of GwyWindowingType.
It sets object data "windowing-type" to windowing type for each menu item (use GPOINTER_TO_INT() when retrieving it)..
callback: | A callback called when a menu item is activated (or NULL for none). |
cbdata: | User data passed to the callback. |
current: | Windowing type to be shown as currently selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_zoom_mode (GCallback callback, gpointer cbdata, GwyZoomMode current);
Creates a GtkOptionMenu of zoom modes i.e., values of GwyZoomMode.
It sets object data "zoom-mode" to zoom mode for each menu item (use GPOINTER_TO_INT() when retrieving it)..
callback: | A callback called when a menu item is activated (or NULL for none). |
cbdata: | User data passed to the callback. |
current: | Zoom mode type to be shown as currently selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_2dcwt (GCallback callback, gpointer cbdata, Gwy2DCWTWaveletType current);
Creates a GtkOptionMenu of available wavelet types.
It sets object data "2dcwt-wavelet-type" to 2D CWT wavelet type for each menu item (use GPOINTER_TO_INT() when retrieving it)..
callback: | A callback called when a menu item is activated (or NULL for none). |
cbdata: | User data passed to the callback. |
current: | 2D CWT wavelet type to be shown as currently selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_fft_output (GCallback callback, gpointer cbdata, GwyFFTOutputType current);
Creates a GtkOptionMenu of available FFT outputs.
It sets object data "fft-output-type" to FFT output type for each menu item (use GPOINTER_TO_INT() when retrieving it).
callback: | A callback called when a menu item is activated (or NULL for |
cbdata: | User data passed to the callback. |
current: | FFT output type to be shown as currently selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_sfunctions_output (GCallback callback, gpointer cbdata, GwySFOutputType current);
Creates a GtkOptionMenu of available one-dimensional statistical functions.
It sets object data "sf-output-type" to statistical functions output type for each menu item (use GPOINTER_TO_INT() when retrieving it).
callback: | A callback called when a menu item is activated (or NULL for none). |
cbdata: | User data passed to the callback. |
current: | Statistical function output type to be shown as currently selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_direction (GCallback callback, gpointer cbdata, GtkOrientation current);
Creates a GtkOptionMenu of datafield computation directions available.
It sets object data "direction-type" to statistical functions output type for each menu item (use GPOINTER_TO_INT() when retrieving it).
callback: | A callback called when a menu item is activated (or NULL for |
cbdata: | User data passed to the callback. |
current: | Direction selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_filter (GCallback callback, gpointer cbdata, GwyFilterType current);
Creates a GtkOptionMenu of available 2D filters
It sets object data "filter-type" to filter type for each menu item (use GPOINTER_TO_INT() when retrieving it).
callback: | A callback called when a menu item is activated (or NULL for |
cbdata: | User data passed to the callback. |
current: | Filter selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_mergegrain (GCallback callback, gpointer cbdata, GwyMergeType current);
Creates a GtkOptionMenu of available grain merging modes
It sets object data "mergegrain-type" to grain merge type for each menu item (use GPOINTER_TO_INT() when retrieving it).
callback: | A callback called when a menu item is activated (or NULL for |
cbdata: | User data passed to the callback. |
current: | Grain merging selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_fit_line (GCallback callback, gpointer cbdata, GwyFitLineType current);
Creates a GtkOptionMenu of available line fit modes
It sets object data "fit-type" to line fit for each menu item (use GPOINTER_TO_INT() when retrieving it).
callback: | A callback called when a menu item is activated (or NULL for |
cbdata: | User data passed to the callback. |
current: | Line fit mode selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_fractal (GCallback callback, gpointer cbdata, GwyFractalType current);
Creates a GtkOptionMenu of available fractal analysis modes
It sets object data "fit-type" to line fit for each menu item (use GPOINTER_TO_INT() when retrieving it).
callback: | A callback called when a menu item is activated (or NULL for |
cbdata: | User data passed to the callback. |
current: | Fractal analysis mode selected (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_metric_unit (GCallback callback, gpointer cbdata, gint from, gint to, const gchar *unit, gint current);
Creates a GtkOptionMenu of units with SI prefixes in given range.
It sets object data "metric-unit" to the exponents of 10 for each menu item (use GPOINTER_TO_INT() when retrieving it).
callback: | A callback called when a menu item is activated (or NULL for |
cbdata: | User data passed to the callback. |
from: | The exponent of 10 the menu should start at (a multiple of 3, will be rounded towards zero if isn't). |
to: | The exponent of 10 the menu should end at (a multiple of 3, will be rounded towards zero if isn't). |
unit: | The unit to be prefixed. |
current: | Exponent of 10 selected (a multiple of 3) (or -1 to use what happens to appear first). |
Returns : | The newly created option menu as GtkWidget. |
GtkWidget* gwy_option_menu_create (const GwyEnum *entries, gint nentries, const gchar *key, GCallback callback, gpointer cbdata, gint current);
Creates an option menu for an enum.
It sets object data identified by key for each menu item to its value. Try to avoid -1 as an enum value.
entries: | Option menu entries. |
nentries: | The number of entries. |
key: | Value object data key. |
callback: | A callback called when a menu item is activated (or NULL for no callback). |
cbdata: | User data passed to the callback. |
current: | Value to be shown as currently selected (-1 to use what happens to be first). |
Returns : | The newly created option menu as GtkWidget. |
gboolean gwy_option_menu_set_history (GtkWidget *option_menu, const gchar *key, gint current);
Sets option menu history based on integer item object data (as set by gwy_option_menu_create()).
option_menu: | An option menu created by gwy_option_menu_create(). |
key: | Value object data key. Either the key you specified when called gwy_option_menu_create(), or the key listed in description of particular option menu constructor. |
current: | Value to be shown as currently selected. |
Returns : | TRUE if the history was set, FALSE if current was not found. |
gint gwy_option_menu_get_history (GtkWidget *option_menu, const gchar *key);
Gets the integer enum value corresponding to currently selected item.
option_menu: | An option menu created by gwy_option_menu_create(). |
key: | Value object data key. Either the key you specified when called gwy_option_menu_create(), or the key listed in description of particular option menu constructor. |
Returns : | The enum value corresponding to currently selected item. In case of failure -1 is returned. |
<< gwydgets |