v_sim.UiMain¶
- Subclasses:
 None
Methods¶
- Inherited:
 Gtk.Window (119), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
- Structs:
 v_sim.UiMainClass (5), Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class  | 
  | 
class  | 
|
class  | 
|
class  | 
|
class  | 
  | 
class  | 
  | 
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
Properties¶
- Inherited:
 
Style Properties¶
- Inherited:
 
Signals¶
- Inherited:
 Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name  | 
Short Description  | 
|---|---|
This signal is emitted when dataObj has been displayed on the rendering window and is ready for use.  | 
|
The current directory has been changed.  | 
Fields¶
- Inherited:
 Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
aboutDialog  | 
r  | 
||
interactiveDialog  | 
r  | 
||
pairsDialog  | 
r  | 
||
parent  | 
r  | 
||
priv  | 
r  | 
||
renderingWindow  | 
r  | 
Class Details¶
- class v_sim.UiMain(*args, **kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
Structure to describe the main interface of V_Sim.
- classmethod createMain(panel, renderWindow, renderArea)¶
 - Parameters:
 panel (
Gtk.Window) – a location for av_sim.UiMainpanel ;renderWindow (
Gtk.Window) – a location for aGtk.Window;renderArea (
Gtk.Widget) – a location for aGtk.Widget.
A convenience routine to create a command panel, a rendering window and links them together.
- classmethod getCurrentPanel()¶
 - Returns:
 the command Panel.
- Return type:
 
This routine can be used to get the command panel, everywhere from V_Sim.
- classmethod getDefaultRendering()¶
 - Returns:
 the rendering window.
- Return type:
 
Get the rendering window of V_Sim.
- classmethod getRememberPosition()¶
 - 
V_Sim can store the position of its main windows. Use this routine to get the status of this capability.
 
- classmethod initPanels(data)¶
 - Parameters:
 data (
objectorNone) – a pointer on av_sim.UiMainobject.- Returns:
 always
False.- Return type:
 
Call the init routines for the different panels.
- classmethod new(oneWindow)¶
 - Parameters:
 oneWindow (
bool) – a boolean.- Returns:
 a newly create command panel.
- Return type:
 
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 sameGtk.Windowon the right of the panel.
- classmethod runCommandLine(data)¶
 - Parameters:
 data (
objectorNone) – a pointer on av_sim.UiMainobject.- Returns:
 always
False.- Return type:
 
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
v_sim.ui_runCommandLine() instead.
- classmethod setRememberPosition(val)¶
 - Parameters:
 val (
bool) – an boolean.
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.
- buildInteractiveDialog()¶
 Create the mouse action dialog window (if not already done).
- class_setCurrentPanel()¶
 After having created the command panel with
v_sim.UiMain.new(), use this routine to declare it as the current command panel.
- getLastOpenDirectory()¶
 - Returns:
 a string owned by V_Sim.
- Return type:
 
V_Sim stores the last open directory to set the file chooser to this one the next time it will come. Use
v_sim.UiMain.setLastOpenDirectory() to store it after aGtk.ResponseType.OKhas been returned by a file chooser and then initialise each new with this routine.
- getRendering()¶
 - Returns:
 the
v_sim.UiRenderingWindowcontroled by this self panel.- Return type:
 
Retrieve the rendering window controlled by self.
New in version 3.8.
- getSelectedDirectory(parent, multiple, dir)¶
 - Parameters:
 - Returns:
 a newly allocated array of paths,
Noneterminated. UseGLib.strfreev() to free it after use. If no directory is selected, thenNoneis returned.- Return type:
 [
str]
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
Nonethe last opened (and stored) directory is used (seev_sim.UiMain.getLastOpenDirectory() andv_sim.UiMain.setLastOpenDirectory()).
- quit(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).
 
- setLastOpenDirectory(directory, type)¶
 - Parameters:
 directory (
str) – a full path to a directory ;type (
v_sim.UiDirectoryType) – the kind of directory to set the remember flag on.
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.ResponseType.OK. The given string will be copied and can be freed after use.
Signal Details¶
- v_sim.UiMain.signals.DataFocused(ui_main, dataObj)¶
 - Signal Name:
 DataFocused- Flags:
 - Parameters:
 ui_main (
v_sim.UiMain) – The object which received the signaldataObj (
v_sim.Data) – the newly associatedv_sim.Dataobject.
This signal is emitted when dataObj has been displayed on the rendering window and is ready for use.
New in version 3.7.
- v_sim.UiMain.signals.DirectoryChanged(ui_main, kind)¶
 - Signal Name:
 DirectoryChanged- Flags:
 - Parameters:
 ui_main (
v_sim.UiMain) – The object which received the signalkind (
int) – a flag.
The current directory has been changed. The kind of directory is defined by kind (see #).
New in version 3.6.