Top | ![]() |
![]() |
![]() |
![]() |
typedef | VisuUiMain_private |
struct | VisuUiMain |
enum | VisuUiDirectoryType |
VisuUiMainClass |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkWindow ╰── VisuUiMain
This is the main interface in V_Sim. It hosts the common action buttons, like open a file, save resources, switch to interactive session... It also hosts the different panels.
void
(*VisuUiMainInitFunc) (VisuUiMain *ui
);
These methods are used by V_Sim to initialise some part of the interface. They are called once on start-up.
Since: 3.8
GtkWidget *
visu_ui_main_new (gboolean oneWindow
);
Create the command panel window and is dependencies, such as the
associated rendering window... WARNING: some part are still currently
static, so only once instance can be created at a time. If
oneWindow
argument is TRUE, then the rendering area is creating in
the same GtkWindow on the right of the panel.
void visu_ui_main_quit (VisuUiMain *main
,gboolean force
);
Quit the program. If the preference to have a confirm dialog is set, then it raises the little warning window before quiting (or not).
void
visu_ui_main_buildInteractiveDialog (VisuUiMain *main
);
Create the mouse action dialog window (if not already done).
gboolean
visu_ui_main_runCommandLine (gpointer data
);
Call the get routines from the command line module and associate
the different tasks to the different panels. For a version that do
not use the panels, call visu_ui_runCommandLine()
instead.
gboolean
visu_ui_main_initPanels (gpointer data
);
Call the init routines for the different panels.
VisuUiRenderingWindow *
visu_ui_main_getRendering (VisuUiMain *main
);
Retrieve the rendering window controlled by main
.
Since: 3.8
void
visu_ui_main_class_setRememberPosition
(gboolean val
);
V_Sim can try to remember the position of its main windows, then open them again will result in a positioning on screen equivalent to previous position.
gboolean visu_ui_main_class_getRememberPosition ();
V_Sim can store the position of its main windows. Use this routine to get the status of this capability.
const gchar *
visu_ui_main_getLastOpenDirectory (VisuUiMain *main
);
V_Sim stores the last open directory to set the file chooser to
this one the next time it will come. Use
visu_ui_main_setLastOpenDirectory()
to store it after a GTK_RESPONSE_OK
has been returned by a file chooser and then initialise each new
with this routine.
void visu_ui_main_setLastOpenDirectory (VisuUiMain *main
,const char *directory
,VisuUiDirectoryType type
);
V_Sim stores the last open directory to set the file chooser to this one the next time it will come. Use this routine each time a file chooser returns GTK_RESPONSE_OK. The given string will be copied and can be freed after use.
main |
a VisuUiMain object. |
|
directory |
a full path to a directory ; |
|
type |
the kind of directory to set the remember flag on. |
gchar ** visu_ui_main_getSelectedDirectory (VisuUiMain *main
,GtkWindow *parent
,gboolean multiple
,const gchar *dir
);
General procedure to get the location of one or more directories.
In the multiple case, all selected directories shares a common ancestor
since the selection is done through the same selector that for single
directory but with multiple selection activated. If dir
is NULL
the last opened (and stored) directory is used (see
visu_ui_main_getLastOpenDirectory()
and visu_ui_main_setLastOpenDirectory()
).
main |
a VisuUiMain object. |
|
parent |
if NULL, the command panel window is used ;. |
[allow-none] |
multiple |
if TRUE, multiple directories can be selected ; |
|
dir |
if not NULL, give the opening directory. |
[allow-none] |
a newly
allocated array of paths, NULL terminated. Use g_strfreev()
to free
it after use. If no directory is selected, then NULL is returned.
[array zero-terminated=1][transfer full]
VisuUiMain * visu_ui_main_class_getCurrentPanel ();
This routine can be used to get the command panel, everywhere from V_Sim.
void
visu_ui_main_class_setCurrentPanel (VisuUiMain *main
);
After having created the command panel with visu_ui_main_new()
, use this
routine to declare it as the current command panel.
void visu_ui_main_class_createMain (GtkWindow **panel
,GtkWindow **renderWindow
,GtkWidget **renderArea
);
A convenience routine to create a command panel, a rendering window and links them together.
panel |
a location for a VisuUiMain panel ; |
|
renderWindow |
a location for a GtkWindow ; |
|
renderArea |
a location for a GtkWidget. |
VisuUiRenderingWindow * visu_ui_main_class_getDefaultRendering ();
Get the rendering window of V_Sim.
typedef struct VisuUiMain_private_struct VisuUiMain_private;
Private fields for VisuUiMain objects.
V_Sim remembers the last open directory when presenting a new file selector. This enum is used to specify different kind of directories. Like that saving a configuration file in a given directory will not affect the prefered directory for browsing a list of files.
typedef struct _VisuUiMainClass VisuUiMainClass;
A short way to identify _VisuUiMainClass structure.
“DataFocused”
signalvoid user_function (VisuUiMain *ui, VisuData *dataObj, gpointer user_data)
This signal is emitted when dataObj
has been displayed on the
rendering window and is ready for use.
ui |
the object which received the signal ; |
|
dataObj |
the newly associated VisuData object. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
Since: 3.7
“DirectoryChanged”
signalvoid user_function (VisuUiMain *ui, guint kind, gpointer user_data)
The current directory has been changed. The kind of directory is
defined by kind
(see #).
ui |
the object emitting the signal. |
|
kind |
a flag. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
Since: 3.6