![]() |
![]() |
Gwyddion Application Library Reference Manual | ![]() |
|
---|---|---|---|---|
Top | Description |
#include <app/gwyapp.h> void gwy_app_switch_tool (const gchar *toolname
); void gwy_app_add_main_accel_group (GtkWindow *window
); void gwy_app_save_window_position (GtkWindow *window
,const gchar *prefix
,gboolean position
,gboolean size
); void gwy_app_restore_window_position (GtkWindow *window
,const gchar *prefix
,gboolean grow_only
); GtkWidget * gwy_app_main_window_get (void
); void gwy_app_data_view_change_mask_color (GwyDataView *data_view
); gboolean gwy_app_quit (void
); void gwy_app_init_widget_styles (void
); void gwy_app_init_i18n (void
); gboolean gwy_app_init_common (GError **error
,...
);
void gwy_app_switch_tool (const gchar *toolname
);
Switches the current tool.
|
Tool name, that is GType name of the tool type. |
void gwy_app_add_main_accel_group (GtkWindow *window
);
Adds main (global) application accelerator group to a window.
This includes accelerators for terminating Gwyddion, opening files, etc.
|
A window. |
void gwy_app_save_window_position (GtkWindow *window
,const gchar *prefix
,gboolean position
,gboolean size
);
Saves position and/or size of a window to settings.
Some sanity checks are included, therefore if window position and/or size is too suspicious, it is not saved.
void gwy_app_restore_window_position (GtkWindow *window
,const gchar *prefix
,gboolean grow_only
);
Restores a window position and/or size from settings.
Unlike gwy_app_save_window_position()
, this function has no position
and
size
arguments, it simply restores all attributes that were saved.
Note to restore position (not size) it should be called twice for each window to accommodate sloppy window managers: once before the window is shown, second time immediately after showing the window.
Some sanity checks are included, therefore if saved window position and/or size is too suspicious, it is not restored.
|
A window to restore position of. |
|
Unique prefix in settings to get the information from (the same as
in gwy_app_save_window_position() ). |
|
TRUE to only attempt set the window default size bigger than it
requests, never smaller. |
GtkWidget * gwy_app_main_window_get (void
);
Returns Gwyddion main application window (toolbox).
Returns : |
The Gwyddion toolbox. |
void gwy_app_data_view_change_mask_color (GwyDataView *data_view
);
Runs mask color selector on a data view.
This is a convenience function to run gwy_color_selector_for_mask()
,
possibly taking the initial color from settings.
|
A data view (of application's data window). It must have a mask. |
gboolean gwy_app_quit (void
);
Quits the application.
This function may present a confirmation dialog to the user and it may
let the application to continue running. If it quits the application,
it performs some shutdown actions and then quits the Gtk+ main loop with
gtk_main_quit()
.
Returns : |
Always TRUE to be usable as an event handler. However, if the
application is actually terminated, this function does not return. |
void gwy_app_init_widget_styles (void
);
Sets up style properties for special Gwyddion widgets.
Normally not needed to call explicitly.
void gwy_app_init_i18n (void
);
Initializes internationalization.
Normally not needed to call explicitly.
gboolean gwy_app_init_common (GError **error
,...
);
Performs common initialization.
FIXME: Much more to say.
|
Error location for settings loading error. |
|
List of module types to load, terminated with NULL . Possible types
are "file", "graph", "layer", "process", "tool" plus two special
values "" and "all" for untyped modules (like plug-in proxy) and
all modules, respectively. |
Returns : |
Settings loading status. |