data-browser — Data browser
enum | GwyAppWhat |
enum | GwyAppPage |
enum | GwyDataItem |
enum | GwyVisibilityResetType |
enum | GwyDataWatchEventType |
#include <app/gwyapp.h>
The data browser is both an entity that monitors of various data in Gwyddion and the corresponding user interface showing the data lists and letting the user deleting or copying them. The public functions are generally related to the first part.
An GwyContainer that represents an SPM file is managed by functions such as gwy_app_data_browser_add()
or
gwy_app_data_browser_remove()
. Note that the high-level libgwyapp functions (with app in their name) such as
gwy_app_file_load()
already call the data browser functions as appropriate.
If a file-like GwyContainer has not been added to the data browser it is unmanaged and cannot be used with most of
the data browser functions. The exceptions are GQuark constructors such as gwy_app_get_mask_key_for_id()
, copying
functions such as gwy_app_data_browser_copy_channel()
, title management functions such as
gwy_app_set_surface_title()
, thumbnail creation helpers such as gwy_app_get_graph_thumbnail()
, and functions for
listing the ids of various data types such as gwy_app_data_browser_get_data_ids()
.
Individual data pieces can be added to managed GwyContainers with functions such as
gwy_app_data_browser_add_data_field()
that can take care of creating the window showing the new data. Removal is
generally done by directly removing the corresponding data object(s) from the GwyContainer.
An important part of the data browser is keeping track which data item is currently selected (to know what a data
processing method should process, etc.). You can obtain the information about various currently selected objects
using gwy_app_data_browser_get_current()
. Making a data item currently selected is accomplished either using
function such as gwy_app_data_browser_select_data_view()
, which corresponds to the user switching to the data
window, or gwy_app_data_browser_select_data_field()
which just selects the data item as current in the browser.
The latter is less safe and can result in strange behaviour because for some purposes only data actually displayed
can be ‘current’.
void (*GwyAppDataForeachFunc) (GwyContainer *data
,gpointer user_data
);
Type of function passed to gwy_app_data_browser_foreach()
.
data |
A data container managed by the data-browser. |
|
user_data |
User data passed to |
void (*GwyAppDataWatchFunc) (GwyContainer *data
,gint id
,GwyDataWatchEventType event
,gpointer user_data
);
Type of function passed to gwy_app_data_browser_add_channel_watch()
.
data |
A data container managed by the data-browser. |
|
id |
Object (channel) id in the container. |
|
user_data |
User data passed to |
Since: 2.21
void
gwy_app_data_browser_add (GwyContainer *data
);
Adds a data container to the application data browser.
The data browser takes a reference on the container so you can release yours.
data |
A data container. |
void
gwy_app_data_browser_remove (GwyContainer *data
);
Removed a data container from the application data browser.
data |
A data container. |
void
gwy_app_data_browser_merge (GwyContainer *data
);
Merges the data from a data container to the current one.
data |
A data container, not managed by the data browser. |
Since: 2.7
GwyContainer *
gwy_app_data_browser_get (gint number
);
Gets the data corresponding to a numerical identifier.
The identifier can be obtained with gwy_app_data_browser_get_number()
. See its documentation for discussion.
number |
Numerical identifier of open data managed by the data browser, or zero. |
The corresponding data container. NULL
is returned if number
does not identify any existing data.
Since: 2.41
gint
gwy_app_data_browser_get_number (GwyContainer *data
);
Gets the numerical identifier of data.
Each time a data container is added with gwy_app_data_browser_add()
it is assigned a new unique numerical
identifier. This number can be used in multi-data modules to remember and restore secondary data.
Note, however, that the number is only guaranteed to be unique within one process. It does not persist across different program invocations and it does not make sense to store it to the settings or other kinds of permanent storage.
data |
A data container managed by the data browser. For convenience, |
A positive numerical identifier of data
. Zero is returned if data
is NULL
.
Since: 2.41
gboolean gwy_app_data_browser_reset_visibility (GwyContainer *data
,GwyVisibilityResetType reset_type
);
Resets visibility of all data objects in a container.
data |
A data container. |
|
reset_type |
Type of visibility reset. |
TRUE
if anything is visible after the reset.
void gwy_app_data_browser_set_keep_invisible (GwyContainer *data
,gboolean keep_invisible
);
Sets data browser behaviour for inaccessible data.
Normally, when all visual objects belonging to a file are closed the container is removed from the data browser and
dereferenced, leading to its finalization. By setting keep_invisible
to TRUE
the container can be made to sit in
the browser indefinitely.
data |
A data container. |
|
keep_invisible |
|
gboolean
gwy_app_data_browser_get_keep_invisible
(GwyContainer *data
);
Gets data browser behaviour for inaccessible data.
data |
A data container. |
See gwy_app_data_browser_set_keep_invisible()
.
void
gwy_app_data_browser_block_switching (void
);
Temporarily blocks data switching according to the active window.
This may be necessary during operations which would be derailed by data switching. For instance DnD from tree views showing the contents of active data does not work correctly if the window manager switches active windows during the DnD, so at the drop time the tree view content no longer matches the dragged row.
Use gwy_app_data_browser_unblock_switching()
to restore data switching. It will also switch data to the window that
should be currently active, if the active window has changed (but without any intermediate steps if the active
window has changed multiple times).
Switching cannot be blocked permanently because it would get the data browser out of sync.
Since: 2.67
void
gwy_app_data_browser_unblock_switching
(void
);
Stops temporarily blocking data switching according to the active window.
The blocking is started by gwy_app_data_browser_block_switching()
. See its description for details.
Since: 2.67
void
gwy_app_data_browser_select_data_view (GwyDataView *data_view
);
Switches application data browser to display container of data_view
's data and selects data_view
's data in the
channel list.
data_view |
A data view widget. |
void
gwy_app_data_browser_select_graph (GwyGraph *graph
);
Switches application data browser to display container of graph
's data and selects graph
's data in the graph
list.
graph |
A graph widget. |
void
gwy_app_data_browser_select_spectra (GwySpectra *spectra
);
Switches application data browser to display container of spectra
's data and selects spectra
's data in the graph
list.
However, it is not actually supposed to work with spectra from a different container than those of the currently active channel, so do not try that for now.
spectra |
A spectra object. |
Since: 2.7
void
gwy_app_data_browser_select_volume (GwyDataView *data_view
);
Switches application data browser to display container of data and selects data_view
's volume data in the graph
list.
data_view |
A data view widget showing a preview of volume data. |
Since: 2.32
void
gwy_app_data_browser_select_xyz (GwyDataView *data_view
);
Switches application data browser to display container of data and selects data_view
's XYZ data in the graph list.
data_view |
A data view widget showing a preview of XYZ data. |
Since: 2.45
void
gwy_app_data_browser_select_curve_map (GwyDataView *data_view
);
Switches application data browser to display container of data and selects data_view
's curve_map data in the graph
list.
data_view |
A data view widget showing a preview of curve_map data. |
Since: 2.60
gint gwy_app_data_browser_add_data_field (GwyDataField *dfield
,GwyContainer *data
,gboolean showit
);
Adds a data field to a data container.
The data browser takes a reference to dfield
so usually you will want to release your reference, especially when
done as the ‘create output’ step of a module function.
dfield |
A data field to add. |
|
data |
A data container to add |
|
showit |
|
The id of the data field in the container.
gint gwy_app_data_browser_add_graph_model (GwyGraphModel *gmodel
,GwyContainer *data
,gboolean showit
);
Adds a graph model to a data container.
The data browser takes a reference to gmodel
so usually you will want to release your reference, especially when
done as the ‘create output’ step of a module function.
gmodel |
A graph model to add. |
|
data |
A data container to add |
|
showit |
|
The id of the graph model in the container.
gint gwy_app_data_browser_add_spectra (GwySpectra *spectra
,GwyContainer *data
,gboolean showit
);
Adds a spectra object to a data container.
The data browser takes a reference to spectra
so usually you will want to release your reference, especially when
done as the ‘create output’ step of a module function.
spectra |
A spectra object to add. |
|
data |
A data container to add |
|
showit |
|
The id of the spectra object in the container.
Since: 2.7
gint gwy_app_data_browser_add_brick (GwyBrick *brick
,GwyDataField *preview
,GwyContainer *data
,gboolean showit
);
Adds a volume data brick to a data container.
The data browser takes a reference to brick
(and preview
if given) so usually you will want to release your
reference, especially when done as the ‘create output’ step of a module function.
brick |
A data brick to add. |
|
preview |
Preview data field. It may be |
|
data |
A data container to add |
|
showit |
|
The id of the data brick in the container.
Since: 2.32
gint gwy_app_data_browser_add_surface (GwySurface *surface
,GwyContainer *data
,gboolean showit
);
Adds XYZ surface data to a data container.
The data browser takes a reference to surface
so usually you will want to release your reference, especially when
done as the ‘create output’ step of a module function.
surface |
XYZ surface data to add. |
|
data |
A data container to add |
|
showit |
|
The id of the data surface in the container.
Since: 2.45
gint gwy_app_data_browser_add_lawn (GwyLawn *lawn
,GwyDataField *preview
,GwyContainer *data
,gboolean showit
);
Adds GwyLawn curve map data to a data container.
The data browser takes a reference to lawn
so usually you will want to release your reference, especially when
done as the ‘create output’ step of a module function.
lawn |
GwyLawn to add. |
|
preview |
Preview data field. It may be |
|
data |
A data container to add |
|
showit |
|
The id of the data lawn in the container.
Since: 2.60
void gwy_app_data_browser_get_current (GwyAppWhat what
,...
);
Gets information about current objects.
All output arguments are always set to some value, even if the requested object does not exist. Object arguments
are set to pointer to the object if it exists (no reference is added), or cleared to NULL
if no such object
exists.
Quark arguments are set to the corresponding key even if no such object is actually present (use object arguments to check for object presence) but the location where it would be stored is known. This is common with presentations and masks. They are be set to 0 if no corresponding location exists -- for example, when the current mask key is requested but the current data contains no channel (or there is no current data at all).
The rules for id arguments are similar to quarks, except they are set to -1 to indicate undefined result.
The current objects can change due to user interaction even during the execution of modal dialogs (typically used by modules). Therefore to achieve consistency one has to ask for the complete set of current objects at once.
what |
First information about current objects to obtain. |
|
... |
pointer to store the information to (object pointer for objects, GQuark pointer for keys, gint pointer for ids), followed by 0-terminated list of GwyAppWhat, pointer couples. |
gint *
gwy_app_data_browser_get_data_ids (GwyContainer *data
);
Gets the list of all channels in a data container.
The function originally could be used only for data containers managed by the data browser. Since version 2.45 it can be used for all file-like data containers.
data |
A data container. |
A newly allocated array with channel ids, -1 terminated.
gint *
gwy_app_data_browser_get_graph_ids (GwyContainer *data
);
Gets the list of all graphs in a data container.
The function originally could be used only for data containers managed by the data browser. Since version 2.45 it can be used for all file-like data containers.
data |
A data container. |
A newly allocated array with graph ids, -1 terminated.
gint *
gwy_app_data_browser_get_spectra_ids (GwyContainer *data
);
Gets the list of all spectra in a data container.
The function originally could be used only for data containers managed by the data browser. Since version 2.45 it can be used for all file-like data containers.
data |
A data container. |
A newly allocated array with spectrum ids, -1 terminated.
Since: 2.7
gint *
gwy_app_data_browser_get_volume_ids (GwyContainer *data
);
Gets the list of all volume data in a data container.
The function originally could be used only for data containers managed by the data browser. Since version 2.45 it can be used for all file-like data containers.
data |
A data container. |
A newly allocated array with volume data ids, -1 terminated.
Since: 2.33
gint *
gwy_app_data_browser_get_xyz_ids (GwyContainer *data
);
Gets the list of all XYZ data in a data container.
data |
A data container. |
A newly allocated array with XYZ data ids, -1 terminated.
Since: 2.45
gint *
gwy_app_data_browser_get_curve_map_ids
(GwyContainer *data
);
Gets the list of all GwyLawn curve map data in a data container.
data |
A data container. |
A newly allocated array with GwyLawn curve map data ids, -1 terminated.
Since: 2.60
gint * gwy_app_data_browser_find_data_by_title (GwyContainer *data
,const gchar *titleglob
);
Gets the list of all channels in a data container whose titles match the specified pattern.
The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.
data |
A data container. |
|
titleglob |
Pattern, as used by GPatternSpec, to match the channel titles against. |
A newly allocated array with channel ids, -1 terminated.
Since: 2.21
gint * gwy_app_data_browser_find_graphs_by_title (GwyContainer *data
,const gchar *titleglob
);
Gets the list of all graphs in a data container whose titles match the specified pattern.
The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.
data |
A data container. |
|
titleglob |
Pattern, as used by GPatternSpec, to match the graph titles against. |
A newly allocated array with graph ids, -1 terminated.
Since: 2.21
gint * gwy_app_data_browser_find_spectra_by_title (GwyContainer *data
,const gchar *titleglob
);
Gets the list of all spectra in a data container whose titles match the specified pattern.
The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.
data |
A data container. |
|
titleglob |
Pattern, as used by GPatternSpec, to match the spectra titles against. |
A newly allocated array with spectra ids, -1 terminated.
Since: 2.21
gint * gwy_app_data_browser_find_volume_by_title (GwyContainer *data
,const gchar *titleglob
);
Gets the list of all volume data in a data container whose titles match the specified pattern.
The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.
data |
A data container. |
|
titleglob |
Pattern, as used by GPatternSpec, to match the volume data titles against. |
A newly allocated array with volume data ids, -1 terminated.
Since: 2.45
gint * gwy_app_data_browser_find_xyz_by_title (GwyContainer *data
,const gchar *titleglob
);
Gets the list of all XYZ data in a data container whose titles match the specified pattern.
The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.
data |
A data container. |
|
titleglob |
Pattern, as used by GPatternSpec, to match the XYZ data titles against. |
A newly allocated array with XYZ data ids, -1 terminated.
Since: 2.45
gint * gwy_app_data_browser_find_curve_map_by_title (GwyContainer *data
,const gchar *titleglob
);
Gets the list of all curve_map data in a data container whose titles match the specified pattern.
data |
A data container. |
|
titleglob |
Pattern, as used by GPatternSpec, to match the curve map data titles against. |
A newly allocated array with curve map data ids, -1 terminated.
Since: 2.60
void gwy_app_data_clear_selections (GwyContainer *data
,gint id
);
Clears all selections associated with a data channel.
This is the preferred selection handling after changes in data geometry as they have generally unpredictable effects on selections. Selection should not be removed because this is likely to make the current tool stop working.
data |
A data container. |
|
id |
Data channel id. |
void gwy_app_data_browser_foreach (GwyAppDataForeachFunc function
,gpointer user_data
);
Calls a function for each data container managed by data browser.
function |
Function to run on each data container. |
|
user_data |
Data to pass as second argument of |
gulong gwy_app_data_browser_add_channel_watch (GwyAppDataWatchFunc function
,gpointer user_data
);
Adds a watch function called when a channel changes.
The function is called whenever a channel is added, removed, its data changes or its metadata such as the title changes. If a channel is removed it may longer exist when the function is called.
function |
Function to call when a channel changes. |
|
user_data |
User data to pass to |
The id of the added watch func that can be used to remove it later using
gwy_app_data_browser_remove_channel_watch()
.
Since: 2.21
void
gwy_app_data_browser_remove_channel_watch
(gulong id
);
Removes a channel watch function.
id |
Watch function id, as returned by |
Since: 2.21
gulong gwy_app_data_browser_add_graph_watch (GwyAppDataWatchFunc function
,gpointer user_data
);
Adds a watch function called when a graph changes.
The function is called whenever a graph is added, removed or its properties change. If a graph is removed it may longer exist when the function is called.
function |
Function to call when a graph changes. |
|
user_data |
User data to pass to |
The id of the added watch func that can be used to remove it later using
gwy_app_data_browser_remove_graph_watch()
.
Since: 2.41
void
gwy_app_data_browser_remove_graph_watch
(gulong id
);
Removes a graph watch function.
id |
Watch function id, as returned by |
Since: 2.41
gulong gwy_app_data_browser_add_volume_watch (GwyAppDataWatchFunc function
,gpointer user_data
);
Adds a watch function called when volume data change.
The function is called whenever a volume is added, removed, its data changes or its metadata such as the title changes. If a volume is removed it may longer exist when the function is called.
function |
Function to call when volume data change. |
|
user_data |
User data to pass to |
The id of the added watch func that can be used to remove it later using
gwy_app_data_browser_remove_volume_watch()
.
Since: 2.60
void
gwy_app_data_browser_remove_volume_watch
(gulong id
);
Removes a volume data watch function.
id |
Watch function id, as returned by |
Since: 2.60
gulong gwy_app_data_browser_add_xyz_watch (GwyAppDataWatchFunc function
,gpointer user_data
);
Adds a watch function called when XYZ data change.
The function is called whenever an XYZ surface is added, removed, its data changes or its metadata such as the title changes. If an XYZ is removed it may longer exist when the function is called.
function |
Function to call when XYZ data change. |
|
user_data |
User data to pass to |
The id of the added watch func that can be used to remove it later using
gwy_app_data_browser_remove_xyz_watch()
.
Since: 2.60
void
gwy_app_data_browser_remove_xyz_watch (gulong id
);
Removes an XYZ data watch function.
id |
Watch function id, as returned by |
Since: 2.60
gulong gwy_app_data_browser_add_curve_map_watch (GwyAppDataWatchFunc function
,gpointer user_data
);
Adds a watch function called when curve map data change.
The function is called whenever a curve map is added, removed, its data changes or its metadata such as the title changes. If a curve map is removed it may longer exist when the function is called.
function |
Function to call when curve map data change. |
|
user_data |
User data to pass to |
The id of the added watch func that can be used to remove it later using
gwy_app_data_browser_remove_curve_map_watch()
.
Since: 2.60
void
gwy_app_data_browser_remove_curve_map_watch
(gulong id
);
Removes a curve map data watch function.
id |
Watch function id, as returned by |
Since: 2.60
void gwy_app_sync_data_items (GwyContainer *source
,GwyContainer *dest
,gint from_id
,gint to_id
,gboolean delete_too
,...
);
Synchronizes auxiliary image data items between data containers.
All items except GWY_DATA_ITEM_PREVIEW
are valid for image data.
source |
Source container. |
|
dest |
Target container (may be identical to source). |
|
from_id |
Data number to copy items from. |
|
to_id |
Data number to copy items to. |
|
delete_too |
|
|
... |
0-terminated list of GwyDataItem values defining the items to copy. |
void gwy_app_sync_data_itemsv (GwyContainer *source
,GwyContainer *dest
,gint from_id
,gint to_id
,gboolean delete_too
,const GwyDataItem *items
,guint nitems
);
Synchronizes auxiliary image data items between data containers.
All items except GWY_DATA_ITEM_PREVIEW
are valid for image data.
source |
Source container. |
|
dest |
Target container (may be identical to source). |
|
from_id |
Data number to copy items from. |
|
to_id |
Data number to copy items to. |
|
delete_too |
|
|
items |
List of GwyDataItem values defining the items to copy. |
|
nitems |
Number of items in |
Since: 2.48
void gwy_app_sync_volume_items (GwyContainer *source
,GwyContainer *dest
,gint from_id
,gint to_id
,gboolean delete_too
,...
);
Synchronizes auxiliary volume data items between data containers.
Only GWY_DATA_ITEM_GRADIENT
, GWY_DATA_ITEM_TITLE
, GWY_DATA_ITEM_META
and GWY_DATA_ITEM_PREVIEW
are valid items
for volume data.
source |
Source container. |
|
dest |
Target container (may be identical to source). |
|
from_id |
Data number to copy items from. |
|
to_id |
Data number to copy items to. |
|
delete_too |
|
|
... |
0-terminated list of GwyDataItem values defining the items to copy. |
Since: 2.51
void gwy_app_sync_volume_itemsv (GwyContainer *source
,GwyContainer *dest
,gint from_id
,gint to_id
,gboolean delete_too
,const GwyDataItem *items
,guint nitems
);
Synchronizes auxiliary volume data items between data containers.
Only GWY_DATA_ITEM_GRADIENT
, GWY_DATA_ITEM_TITLE
, GWY_DATA_ITEM_META
and GWY_DATA_ITEM_PREVIEW
are valid items
for volume data.
source |
Source container. |
|
dest |
Target container (may be identical to source). |
|
from_id |
Data number to copy items from. |
|
to_id |
Data number to copy items to. |
|
delete_too |
|
|
items |
List of GwyDataItem values defining the items to copy. |
|
nitems |
Number of items in |
Since: 2.51
void gwy_app_sync_xyz_items (GwyContainer *source
,GwyContainer *dest
,gint from_id
,gint to_id
,gboolean delete_too
,...
);
Synchronizes auxiliary XYZ data items between data containers.
Only GWY_DATA_ITEM_GRADIENT
, GWY_DATA_ITEM_TITLE
, GWY_DATA_ITEM_META
and GWY_DATA_ITEM_PREVIEW
are valid items
for XYZ data.
source |
Source container. |
|
dest |
Target container (may be identical to source). |
|
from_id |
Data number to copy items from. |
|
to_id |
Data number to copy items to. |
|
delete_too |
|
|
... |
0-terminated list of GwyDataItem values defining the items to copy. |
Since: 2.60
void gwy_app_sync_xyz_itemsv (GwyContainer *source
,GwyContainer *dest
,gint from_id
,gint to_id
,gboolean delete_too
,const GwyDataItem *items
,guint nitems
);
Synchronizes auxiliary XYZ data items between data containers.
Only GWY_DATA_ITEM_GRADIENT
, GWY_DATA_ITEM_TITLE
, GWY_DATA_ITEM_META
and GWY_DATA_ITEM_PREVIEW
are valid items
for XYZ data.
source |
Source container. |
|
dest |
Target container (may be identical to source). |
|
from_id |
Data number to copy items from. |
|
to_id |
Data number to copy items to. |
|
delete_too |
|
|
items |
List of GwyDataItem values defining the items to copy. |
|
nitems |
Number of items in |
Since: 2.60
void gwy_app_sync_curve_map_items (GwyContainer *source
,GwyContainer *dest
,gint from_id
,gint to_id
,gboolean delete_too
,...
);
Synchronizes auxiliary curve map data items between data containers.
Only GWY_DATA_ITEM_GRADIENT
, GWY_DATA_ITEM_TITLE
, GWY_DATA_ITEM_META
, GWY_DATA_ITEM_REAL_SQUARE
and
GWY_DATA_ITEM_PREVIEW
are valid items for curve map data.
source |
Source container. |
|
dest |
Target container (may be identical to source). |
|
from_id |
Data number to copy items from. |
|
to_id |
Data number to copy items to. |
|
delete_too |
|
|
... |
0-terminated list of GwyDataItem values defining the items to copy. |
Since: 2.60
void gwy_app_sync_curve_map_itemsv (GwyContainer *source
,GwyContainer *dest
,gint from_id
,gint to_id
,gboolean delete_too
,const GwyDataItem *items
,guint nitems
);
Synchronizes auxiliary curve map data items between data containers.
Only GWY_DATA_ITEM_GRADIENT
, GWY_DATA_ITEM_TITLE
, GWY_DATA_ITEM_META
, GWY_DATA_ITEM_REAL_SQUARE
and
GWY_DATA_ITEM_PREVIEW
are valid items for curve map data.
source |
Source container. |
|
dest |
Target container (may be identical to source). |
|
from_id |
Data number to copy items from. |
|
to_id |
Data number to copy items to. |
|
delete_too |
|
|
items |
List of GwyDataItem values defining the items to copy. |
|
nitems |
Number of items in |
Since: 2.60
gint gwy_app_data_browser_copy_channel (GwyContainer *source
,gint id
,GwyContainer *dest
);
Copies a channel including all auxiliary data.
source |
Source container. |
|
id |
Data channel id. |
|
dest |
Target container (may be identical to source). |
The id of the copy.
gint gwy_app_data_browser_copy_volume (GwyContainer *source
,gint id
,GwyContainer *dest
);
Copies volume brick data including all auxiliary data.
source |
Source container. |
|
id |
Volume data brick id. |
|
dest |
Target container (may be identical to source). |
The id of the copy.
Since: 2.32
gint gwy_app_data_browser_copy_xyz (GwyContainer *source
,gint id
,GwyContainer *dest
);
Copies XYZ surface data including all auxiliary data.
source |
Source container. |
|
id |
XYZ surface data id. |
|
dest |
Target container (may be identical to source). |
The id of the copy.
Since: 2.45
gint gwy_app_data_browser_copy_curve_map (GwyContainer *source
,gint id
,GwyContainer *dest
);
Copies GwyLawn curve map data including all auxiliary data.
source |
Source container. |
|
id |
GwyLawn curve map data id. |
|
dest |
Target container (may be identical to source). |
The id of the copy.
Since: 2.60
GQuark
gwy_app_get_data_key_for_id (gint id
);
Calculates data field quark identifier from its id.
id |
Numerical id of a channel in file (container). |
The quark key identifying channel data field with number id
.
GQuark
gwy_app_get_mask_key_for_id (gint id
);
Calculates mask field quark identifier from its id.
id |
Numerical id of a channel in file (container). |
The quark key identifying mask data field with number id
.
GQuark
gwy_app_get_show_key_for_id (gint id
);
Calculates presentation field quark identifier from its id.
id |
Numerical id of a channel in file (container). |
The quark key identifying presentation data field with number id
.
GQuark
gwy_app_get_graph_key_for_id (gint id
);
Calculates graph model quark identifier from its id.
id |
Numerical id of a graph in file (container). |
The quark key identifying graph model with number id
.
Since: 2.7
GQuark
gwy_app_get_spectra_key_for_id (gint id
);
Calculates spectra quark identifier from its id.
id |
Numerical id of a spectra set in file (container). |
The quark key identifying spectra with number id
.
Since: 2.7
GQuark
gwy_app_get_brick_key_for_id (gint id
);
Calculates data brick quark identifier from its id.
id |
Numerical id of a data brick in file (container). |
The quark key identifying data brick with number id
.
Since: 2.32
GQuark
gwy_app_get_surface_key_for_id (gint id
);
Calculates XYZ surface quark identifier from its id.
id |
Numerical id of an XYZ surface in file (container). |
The quark key identifying XYZ surface with number id
.
Since: 2.45
GQuark
gwy_app_get_lawn_key_for_id (gint id
);
Calculates GwyLawn curve map quark identifier from its id.
id |
Numerical id of a GwyLawn curve map in file (container). |
The quark key identifying GwyLawn curve map with number id
.
Since: 2.60
GQuark
gwy_app_get_data_title_key_for_id (gint id
);
Calculates data field title quark identifier from its id.
id |
Numerical id of a image in file (container). |
The quark key identifying string title of image with number id
.
Since: 2.43
GQuark
gwy_app_get_data_base_key_for_id (gint id
);
Calculates data field base visualisation quark identifier from its id.
This is the common prefix for range and palette key. It is not useful alone because it is only prefix.
id |
Numerical id of a image in file (container). |
The quark key identifying base string prefix of image with number id
.
Since: 2.59
GQuark
gwy_app_get_data_range_type_key_for_id
(gint id
);
Calculates data field range type quark identifier from its id.
id |
Numerical id of a image in file (container). |
The quark key identifying GwyLayerBasicRangeType false colour mapping type of image with number id
.
Since: 2.43
GQuark
gwy_app_get_data_range_min_key_for_id (gint id
);
Calculates data field fixed range minimum quark identifier from its id.
id |
Numerical id of a image in file (container). |
The quark key identifying floating fixed false colour range minimum of image with number id
.
Since: 2.43
GQuark
gwy_app_get_data_range_max_key_for_id (gint id
);
Calculates data field fixed range maximum quark identifier from its id.
id |
Numerical id of a image in file (container). |
The quark key identifying floating fixed false colour range maximum of image with number id
.
Since: 2.43
GQuark
gwy_app_get_data_palette_key_for_id (gint id
);
Calculates data field palette quark identifier from its id.
id |
Numerical id of a image in file (container). |
The quark key identifying string name palette of image with number id
.
Since: 2.43
GQuark
gwy_app_get_data_meta_key_for_id (gint id
);
Calculates data field metadata quark identifier from its id.
id |
Numerical id of a image in file (container). |
The quark key identifying metadata container of image with number id
.
Since: 2.43
GQuark
gwy_app_get_data_real_square_key_for_id
(gint id
);
Calculates data field real-square quark identifier from its id.
id |
Numerical id of a image in file (container). |
The quark key identifying boolean controlling real-square setting of image with number id
.
Since: 2.60
GQuark
gwy_app_get_brick_title_key_for_id (gint id
);
Calculates data brick title quark identifier from its id.
id |
Numerical id of a data brick in file (container). |
The quark key identifying string title of data brick with number id
.
Since: 2.43
GQuark
gwy_app_get_brick_preview_key_for_id (gint id
);
Calculates data brick preview quark identifier from its id.
id |
Numerical id of a data brick in file (container). |
The quark key identifying preview data field of data brick with number id
.
Since: 2.43
GQuark
gwy_app_get_brick_palette_key_for_id (gint id
);
Calculates data brick palette quark identifier from its id.
id |
Numerical id of a data brick in file (container). |
The quark key identifying string name palette of data brick with number id
.
Since: 2.43
GQuark
gwy_app_get_brick_meta_key_for_id (gint id
);
Calculates data brick title quark identifier from its id.
id |
Numerical id of a data brick in file (container). |
The quark key identifying metadata container of data brick with number id
.
Since: 2.43
GQuark
gwy_app_get_surface_title_key_for_id (gint id
);
Calculates data surface title quark identifier from its id.
id |
Numerical id of a data surface in file (container). |
The quark key identifying string title of data surface with number id
.
Since: 2.45
GQuark
gwy_app_get_surface_palette_key_for_id
(gint id
);
Calculates XYZ surface palette quark identifier from its id.
id |
Numerical id of an XYZ surface in file (container). |
The quark key identifying string name palette of XYZ surface with number id
.
Since: 2.45
GQuark
gwy_app_get_surface_meta_key_for_id (gint id
);
Calculates XYZ surface title quark identifier from its id.
id |
Numerical id of an XYZ surface in file (container). |
The quark key identifying metadata container of XYZ surface with number id
.
Since: 2.45
GQuark
gwy_app_get_surface_preview_key_for_id
(gint id
);
Calculates XYZ surface preview quark identifier from its id.
id |
Numerical id of an XYZ surface in file (container). |
The quark key identifying preview data field of XYZ surface with number id
.
Since: 2.46
GQuark
gwy_app_get_lawn_title_key_for_id (gint id
);
Calculates GwyLawn curve map title quark identifier from its id.
id |
Numerical id of a GwyLawn curve map in file (container). |
The quark key identifying string title of GwyLawn curve map with number id
.
Since: 2.60
GQuark
gwy_app_get_lawn_palette_key_for_id (gint id
);
Calculates GwyLawn curve map palette quark identifier from its id.
id |
Numerical id of a GwyLawn curve map in file (container). |
The quark key identifying string name palette of GwyLawn curve map with number id
.
Since: 2.60
GQuark
gwy_app_get_lawn_meta_key_for_id (gint id
);
Calculates GwyLawn curve map title quark identifier from its id.
id |
Numerical id of a GwyLawn curve map in file (container). |
The quark key identifying metadata container of GwyLawn curve map with number id
.
Since: 2.60
GQuark
gwy_app_get_lawn_preview_key_for_id (gint id
);
Calculates GwyLawn curve map preview quark identifier from its id.
id |
Numerical id of a GwyLawn curve map in file (container). |
The quark key identifying preview data field of GwyLawn curve map with number id
.
Since: 2.60
GQuark
gwy_app_get_lawn_real_square_key_for_id
(gint id
);
Calculates GwyLawn curve map real-square quark identifier from its id.
id |
Numerical id of a GwyLawn curve map in file (container). |
The quark key identifying boolean controlling real-square setting of GwyLawn curve map with number id
.
Since: 2.60
void gwy_app_set_data_field_title (GwyContainer *data
,gint id
,const gchar *name
);
Sets channel title.
data |
A data container. |
|
id |
The data channel id. |
|
name |
The title to set. It can be |
gchar * gwy_app_get_data_field_title (GwyContainer *data
,gint id
);
Gets a data channel title.
This function should return a reasonable title for untitled channels, channels with old titles, channels with and without a file, etc.
data |
A data container. |
|
id |
Data channel id. |
The channel title as a newly allocated string.
void gwy_app_set_brick_title (GwyContainer *data
,gint id
,const gchar *name
);
Sets volume data title.
data |
A data container. |
|
id |
The volume data brick id. |
|
name |
The title to set. It can be |
Since: 2.32
gchar * gwy_app_get_brick_title (GwyContainer *data
,gint id
);
Gets a volume data brick title.
data |
A data container. |
|
id |
Volume data brick id. |
The brick title as a newly allocated string.
Since: 2.32
void gwy_app_set_surface_title (GwyContainer *data
,gint id
,const gchar *name
);
Sets XYZ surface data title.
data |
A data container. |
|
id |
The XYZ surface data channel id. |
|
name |
The title to set. It can be |
Since: 2.45
gchar * gwy_app_get_surface_title (GwyContainer *data
,gint id
);
Gets an XYZ surface data title.
data |
A data container. |
|
id |
XYZ data surface id. |
The surface title as a newly allocated string.
Since: 2.45
void gwy_app_set_lawn_title (GwyContainer *data
,gint id
,const gchar *name
);
Sets GwyLawn curve map data title.
data |
A data container. |
|
id |
The GwyLawn curve map data channel id. |
|
name |
The title to set. It can be |
Since: 2.60
gchar * gwy_app_get_lawn_title (GwyContainer *data
,gint id
);
Gets a GwyLawn curve map data title.
data |
A data container. |
|
id |
XYZ data lawn id. |
The lawn title as a newly allocated string.
Since: 2.60
void
gwy_app_data_browser_show (void
);
Shows the data browser window.
If the window does not exist, it is created.
void
gwy_app_data_browser_restore (void
);
Restores the data browser window.
The data browser window is always created (if it does not exist). If it should be visible according to settings, is
shown at the saved position. Otherwise it is kept hidden until gwy_app_data_browser_show()
.
void
gwy_app_data_browser_shut_down (void
);
Releases data browser resources and saves its state.
GdkPixbuf * gwy_app_get_channel_thumbnail (GwyContainer *data
,gint id
,gint max_width
,gint max_height
);
Creates a channel thumbnail.
data |
A data container. |
|
id |
Data channel id. |
|
max_width |
Maximum width of the created pixbuf, it must be at least 2. |
|
max_height |
Maximum height of the created pixbuf, it must be at least 2. |
A newly created pixbuf with channel thumbnail. It keeps the aspect
ratio of the data field while not exceeding max_width
and
max_height
.
GdkPixbuf * gwy_app_get_graph_thumbnail (GwyContainer *data
,gint id
,gint max_width
,gint max_height
);
Creates a graph thumbnail.
Note this function needs the GUI running (unlike the other thumbnail functions). It cannot be used in a console program.
data |
A data container. |
|
id |
Graph model data id. |
|
max_width |
Maximum width of the created pixbuf, it must be at least 2. |
|
max_height |
Maximum height of the created pixbuf, it must be at least 2. |
A newly created pixbuf with graph thumbnail. Since graphs do not have natural width and height, its size
will normally be exactly max_width
and max_height
.
Since: 2.45
GdkPixbuf * gwy_app_get_volume_thumbnail (GwyContainer *data
,gint id
,gint max_width
,gint max_height
);
Creates a volume thumbnail.
data |
A data container. |
|
id |
Volume data id. |
|
max_width |
Maximum width of the created pixbuf, it must be at least 2. |
|
max_height |
Maximum height of the created pixbuf, it must be at least 2. |
A newly created pixbuf with volume data thumbnail. It keeps the aspect ratio of the brick preview while
not exceeding max_width
and max_height
.
Since: 2.33
GdkPixbuf * gwy_app_get_xyz_thumbnail (GwyContainer *data
,gint id
,gint max_width
,gint max_height
);
Creates an XYZ data thumbnail.
data |
A data container. |
|
id |
XYZ surface data id. |
|
max_width |
Maximum width of the created pixbuf, it must be at least 2. |
|
max_height |
Maximum height of the created pixbuf, it must be at least 2. |
A newly created pixbuf with XYZ data thumbnail. It keeps the aspect ratio of the brick preview while not
exceeding max_width
and max_height
.
Since: 2.45
GdkPixbuf * gwy_app_get_curve_map_thumbnail (GwyContainer *data
,gint id
,gint max_width
,gint max_height
);
Creates a curve map thumbnail.
data |
A data container. |
|
id |
Volume data id. |
|
max_width |
Maximum width of the created pixbuf, it must be at least 2. |
|
max_height |
Maximum height of the created pixbuf, it must be at least 2. |
A newly created pixbuf with curve map data thumbnail. It keeps the aspect ratio of the lawn preview while
not exceeding max_width
and max_height
.
Since: 2.60
void gwy_app_data_browser_select_data_field (GwyContainer *data
,gint id
);
Makes a data field (image) current in the data browser.
data |
The container to select. |
|
id |
Number (id) of the data field in |
void gwy_app_data_browser_select_graph_model (GwyContainer *data
,gint id
);
Makes a graph model current in the data browser.
data |
The container to select. |
|
id |
Number (id) of the graph model in |
void gwy_app_data_browser_select_surface (GwyContainer *data
,gint id
);
Makes a surface (XYZ data) current in the data browser.
data |
The container to select. |
|
id |
Number (id) of the surface in |
Since: 2.61
void gwy_app_data_browser_select_brick (GwyContainer *data
,gint id
);
Makes a brick (volume data) current in the data browser.
data |
The container to select. |
|
id |
Number (id) of the brick in |
Since: 2.61
void gwy_app_data_browser_select_lawn (GwyContainer *data
,gint id
);
Makes a lawn (curve map) current in the data browser.
data |
The container to select. |
|
id |
Number (id) of the lawn in |
Since: 2.61
void gwy_app_data_browser_show_3d (GwyContainer *data
,gint id
);
Shows a 3D window displaying a channel.
If a 3D window of the specified channel already exists, it is just presented to the user. If it does not exist, it is created.
The caller must ensure 3D display is available, for example by checking gwy_app_gl_is_ok()
.
data |
A data container. |
|
id |
Channel id. |
GtkWindow * gwy_app_find_window_for_channel (GwyContainer *data
,gint id
);
Finds the window displaying a data channel.
data |
A data container to find window for. |
|
id |
Data channel id. It can be -1 to find any data window displaying a channel from |
The window if found, NULL
if no data window displays the requested channel.
GtkWindow * gwy_app_find_window_for_graph (GwyContainer *data
,gint id
);
Finds the window displaying a graph model.
data |
A data container to find window for. |
|
id |
Graph model id. It can be -1 to find any graph window displaying a graph model from |
The window if found, NULL
if no graph window displays the requested channel.
Since: 2.45
GtkWindow * gwy_app_find_window_for_volume (GwyContainer *data
,gint id
);
Finds the window displaying given volume data.
data |
A data container to find window for. |
|
id |
Volume data id. It can be -1 to find any data window displaying volume data from |
The window if found, NULL
if no data window displays the requested volume data.
Since: 2.42
GtkWindow * gwy_app_find_window_for_xyz (GwyContainer *data
,gint id
);
Finds the window displaying given XYZ data.
data |
A data container to find window for. |
|
id |
XYZ data id. It can be -1 to find any data window displaying XYZ data from |
The window if found, NULL
if no data window displays the requested XYZ data.
Since: 2.45
GtkWindow * gwy_app_find_window_for_curve_map (GwyContainer *data
,gint id
);
Finds the window displaying given curve map.
data |
A data container to find window for. |
|
id |
curve map id. It can be -1 to find any data window displaying curve map from |
The window if found, NULL
if no data window displays the requested curve map.
Since: 2.60
gboolean
gwy_app_data_browser_get_gui_enabled (void
);
Reports whether creation of windows by the data-browser is enabled.
TRUE
if the data-browser is permitted to create windows, FALSE
if it is not.
Since: 2.21
void
gwy_app_data_browser_set_gui_enabled (gboolean setting
);
Globally enables or disables creation of widgets by the data-browser.
By default, the data-browser creates windows for data objects automatically, for instance when reconstructing view
of a loaded file, after a module function creates a new channel or graph or when it is explicitly asked so by
gwy_app_data_browser_show_3d()
. Non-GUI applications that run module functions usually wish to disable GUI.
If GUI is disabled the data browser never creates windows showing data objects and also gwy_app_data_browser_show()
becomes no-op.
Disabling GUI after widgets have been already created is a bad idea. Hence you should do so before loading files or calling module functions.
setting |
|
Since: 2.21
Types of current objects that can be requested with gwy_app_data_browser_get_current()
.
Data container (corresponds to files). |
||
Data view widget (shows a channel). |
||
Graph widget (shows a graph model). |
||
Data field (image). |
||
Quark corresponding to the data field (image). |
||
Number (id) of the data field (image) in its container. |
||
Mask data field. |
||
Quark corresponding to the mask field. |
||
Presentation data field. |
||
Quark corresponding to the presentation field. |
||
Graph model. |
||
Quark corresponding to the graph model. |
||
Number (id) of the graph model in its container. |
||
Single point spectra. (Since 2.7) |
||
Quark corresponding to the single point spectra. (Since 2.7) |
||
Number (id) of the the single point spectra in its container. (Since 2.7) |
||
Data view widget (shows preview of volume data) (Since 2.32). |
||
Data brick (volume data) (Since 2.32). |
||
Quark corresponding to the data brick (Since 2.32). |
||
Number (id) of the the data brick in its container (Since 2.32). |
||
Numeric id of data container (Since 2.41). |
||
Data view widget (shows preview of surface XYZ data) (Since 2.45). |
||
Surface data (XYZ) (Since 2.45). |
||
Quark corresponding to the surface data (Since 2.45). |
||
Number (id) of the the surface data in its container (Since 2.45). |
||
Currently selected data browser page as a GwyAppPage (Since 2.45). |
||
Lawn (curve map) (Since 2.60). |
||
Quark corresponding to the curve map (Since 2.60). |
||
Number (id) of the lawn (curve map) in its container (Since 2.60). |
||
Data view widget (shows preview of curve map lawn data) (Since 2.60). |
Data browser page, corresponding to one of possible data types.
No page. This value is returned when no data are active in the browser. |
||
Channel (image data). |
||
Graph. |
||
Single point spectra. |
||
Volume data. |
||
XYZ data. |
||
Curve map data. (Since 2.60) |
Since: 2.45
Type of auxiliary channel data.
Not all auxiliary data types are valid for all primary data types. See individual functions such as
gwy_app_sync_data_items()
or gwy_app_sync_volume_items()
for specification which items can be used with them.
Color gradient. |
||
An alias of |
||
Mask color components. |
||
Channel title. |
||
Range type and range boundaries. |
||
Range type. |
||
Physical/pixel aspect ratio mode. |
||
Data selections. |
||
Metadata. |
||
Calibration and uncertainty data. (Since 2.23) |
||
Volume, XYZ or curve map data preview. (Since 2.51) |
Data object visibility reset type.
The precise behaviour of GWY_VISIBILITY_RESET_DEFAULT
may be subject of further changes. It indicates the wish to
restore saved visibilities and do something reasonable when there are no visibilities to restore.
Restore visibilities from container and if nothing would be visible, make an arbitrary data object visible. |
||
Restore visibilities from container. |
||
Show all data objects. |
||
Hide all data objects. This normally makes the file inaccessible. |
Type of event reported to GwyAppDataWatchFunc watcher functions.
A new data object has appeared. |
||
A data object has changed. |
||
A data object has been removed. |
Since: 2.21