menu

menu — Menu and sensitivity functions

Functions

Types and Values

Includes

#include <libgwyapp/gwyapp.h>

Description

Menu and toolbox item sensitivity is updated by main application whenever its state changes. Possible states that may affect widget sesitivity are defined in GwyMenuSensFlags.

Functions

gwy_app_image_menu()

GtkWidget *
gwy_app_image_menu (GtkAccelGroup *accel_group,
                    GwySensitivityGroup *sens_group);

Constructs the application Data Process menu.

The menu is created from data processing functions registered by modules, therefore module registration has to be done first for this function to make sense.

Parameters

accel_group

Acceleration group to be associated with the menu.

 

Returns

Newly created image data processing menu.

[transfer full]


gwy_app_graph_menu()

GtkWidget *
gwy_app_graph_menu (GtkAccelGroup *accel_group,
                    GwySensitivityGroup *sens_group);

Constructs the application Graph menu.

The menu is created from graph functions registered by modules, therefore module registration has to be done first for this function to make sense.

Parameters

accel_group

Acceleration group to be associated with the menu.

 

Returns

Newly created graph data processing menu.

[transfer full]


gwy_app_xyz_menu()

GtkWidget *
gwy_app_xyz_menu (GtkAccelGroup *accel_group,
                  GwySensitivityGroup *sens_group);

Constructs the application XYZ Data menu.

The menu is created from XYZ data processing functions registered by modules, therefore module registration has to be done first for this function to make sense.

Parameters

accel_group

Acceleration group to be associated with the menu.

 

Returns

Newly created XYZ data processing menu.

[transfer full]


gwy_app_curve_map_menu()

GtkWidget *
gwy_app_curve_map_menu (GtkAccelGroup *accel_group,
                        GwySensitivityGroup *sens_group);

Constructs the application Curve Maps menu.

The menu is created from curve map data processing functions registered by modules, therefore module registration has to be done first for this function to make sense.

Parameters

accel_group

Acceleration group to be associated with the menu.

 

Returns

Newly created curve map data processing menu.

[transfer full]


gwy_app_synth_menu()

GtkWidget *
gwy_app_synth_menu (GtkAccelGroup *accel_group,
                    GwySensitivityGroup *sens_group);

Constructs the application Curve Maps menu.

The menu is created from curve map data processing functions registered by modules, therefore module registration has to be done first for this function to make sense.

Parameters

accel_group

Acceleration group to be associated with the menu.

 

Returns

Newly created curve map data processing menu.

[transfer full]


gwy_app_volume_menu()

GtkWidget *
gwy_app_volume_menu (GtkAccelGroup *accel_group,
                     GwySensitivityGroup *sens_group);

Constructs the application Volume Data menu.

The menu is created from volume data processing functions registered by modules, therefore module registration has to be done first for this function to make sense.

Parameters

accel_group

Acceleration group to be associated with the menu.

 

Returns

Newly created volume data processing menu.

[transfer full]


gwy_app_image_menu_add_run_last()

void
gwy_app_image_menu_add_run_last (GtkWidget *menu);

gwy_app_run_process_func()

GwyRunModeFlags
gwy_app_run_process_func (const gchar *name);

Runs a data processing function on the current data.

From the run modes function name supports, the most interactive one is selected.

Parameters

name

A data processing function name.

 

Returns

The actually used mode (nonzero), or 0 on failure.


gwy_app_run_process_func_in_mode()

void
gwy_app_run_process_func_in_mode (const gchar *name,
                                  GwyRunModeFlags run);

Runs a data processing function on current data in specified mode.

Parameters

name

A data processing function name.

 

run

A run mode.

 

gwy_app_run_graph_func()

void
gwy_app_run_graph_func (const gchar *name);

Runs a graph function on the current graph.

Parameters

name

A graph function name.

 

gwy_app_run_volume_func()

GwyRunModeFlags
gwy_app_run_volume_func (const gchar *name);

Runs a volume data processing function on the current data.

From the run modes function name supports, the most interactive one is selected.

Parameters

name

A volume data processing function name.

 

Returns

The actually used mode (nonzero), or 0 on failure.


gwy_app_run_volume_func_in_mode()

void
gwy_app_run_volume_func_in_mode (const gchar *name,
                                 GwyRunModeFlags run);

Runs a volume data processing function on current data in specified mode.

Parameters

name

A volume data processing function name.

 

run

A run mode.

 

gwy_app_run_xyz_func()

GwyRunModeFlags
gwy_app_run_xyz_func (const gchar *name);

Runs a XYZ data processing function on the current data.

From the run modes function name supports, the most interactive one is selected.

Parameters

name

A XYZ data processing function name.

 

Returns

The actually used mode (nonzero), or 0 on failure.


gwy_app_run_xyz_func_in_mode()

void
gwy_app_run_xyz_func_in_mode (const gchar *name,
                              GwyRunModeFlags run);

Runs a XYZ data processing function on current data in specified mode.

Parameters

name

A XYZ data processing function name.

 

run

A run mode.

 

gwy_app_run_curve_map_func()

GwyRunModeFlags
gwy_app_run_curve_map_func (const gchar *name);

Runs a curve map processing function on the current data.

From the run modes function name supports, the most interactive one is selected.

Parameters

name

A curve map processing function name.

 

Returns

The actually used mode (nonzero), or 0 on failure.


gwy_app_run_curve_map_func_in_mode()

void
gwy_app_run_curve_map_func_in_mode (const gchar *name,
                                    GwyRunModeFlags run);

Runs a curve map processing function on current data in specified mode.

Parameters

name

A curve map processing function name.

 

run

A run mode.

 

gwy_app_run_synth_func()

GwyRunModeFlags
gwy_app_run_synth_func (const gchar *name);

Runs a synthetic data function on the current data.

From the run modes function name supports, the most interactive one is selected.

Parameters

name

A synthetic data function name.

 

Returns

The actually used mode (nonzero), or 0 on failure.


gwy_app_run_synth_func_in_mode()

void
gwy_app_run_synth_func_in_mode (const gchar *name,
                                GwyRunModeFlags run);

Runs a synthetic data function on current data in specified mode.

Parameters

name

A synthetic data function name.

 

run

A run mode.

 

gwy_app_create_recent_func_menu()

GtkWidget *
gwy_app_create_recent_func_menu (GwyDataKind data_kind,
                                 GtkWindow *window,
                                 GwySensitivityGroup *sens_group);

Creates a recent function menu for given kind of data.

The menu content is updated automatically when function such as gwy_app_run_volume_func() is used.

Parameters

data_kind

Data kind, determining the functions to show in the menu.

 

window

Window the menu will be added to.

 

sens_group

Sensitvity group for the menu.

 

Returns

New recent function menu as a GtkWidget.

[transfer full]


gwy_app_sensitivity_get_group()

GwySensitivityGroup *
gwy_app_sensitivity_get_group (void);

Gets the application-wide widget sensitvity group.

The flags to be used with this sensitvity group are defined in GwyMenuSensFlags.

Returns

The global sensitvity group instead. No reference is added, you can add yours, but the returned object will exist to the end of program anyway.


gwy_app_sensitivity_add_widget()

void
gwy_app_sensitivity_add_widget (GtkWidget *widget,
                                GwyMenuSensFlags mask);

Adds a widget to the application-wide widget sensitvity group.

The semantics of this function is the same as gwy_sensitivity_group_add_widget() (in fact, it's a simple wrapper around it).

Parameters

widget

Widget to add.

 

mask

Which flags the widget is sensitive to.

 

gwy_app_sensitivity_set_state()

void
gwy_app_sensitivity_set_state (GwyMenuSensFlags affected_mask,
                               GwyMenuSensFlags state);

Sets the state of application-wide widget sensitvity group.

The semantics of this function is the same as gwy_sensitivity_group_set_state() (in fact, it's a simple wrapper around it).

Parameters

affected_mask

Which bits in state to copy to state.

 

state

The new state (masked with affected_mask ).

 

Types and Values

enum GwyMenuSensFlags

Global application sensitivity flags.

They represent various application states that may be preconditions for widgets to become sensitive.

Members

GWY_MENU_FLAG_FILE

A file is open, with any type of data.

 

GWY_MENU_FLAG_UNDO

There is something to undo (for current data window).

 

GWY_MENU_FLAG_REDO

There is something to redo (for current data window).

 

GWY_MENU_FLAG_IMAGE

There is at least a one data window present.

 

GWY_MENU_FLAG_IMAGE_SHOW

There is a presentation on the data.

 

GWY_MENU_FLAG_IMAGE_MASK

   

GWY_MENU_FLAG_GL

An OpenGL 3D view is present.

 

GWY_MENU_FLAG_GRAPH

There is at least a one graph window present.

 

GWY_MENU_FLAG_GRAPH_CURVE

There current graph window contains at least one curve. This ensures a graph function will not be run on an empty graph.

 

GWY_MENU_FLAG_VOLUME

There is at least one volume data window present.

 

GWY_MENU_FLAG_XYZ

There is at least one XYZ surface data window present.

 

GWY_MENU_FLAG_CMAP

There is at least one GwyLawn curve map window present.