![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
gboolean (*GtkMainSetFilesFunc) (VisuData *data, GtkWindow *parent); GtkWidget* (*createGtkWidgetFunc) (void); ToolPanel* (*PanelInitFunc) (); #define currentRenderingWindow GtkMain; GtkMainClass; GtkWidget* gtkMainNew (); void gtkMain_quit (); GtkMain* gtkMainClassGet_currentPanel (); gchar* gtkMainClassGet_lastOpenDirectory (); gboolean gtkMainClassGet_rememberPosition (); GtkMainSetFilesFunc gtkMainClassGet_renderingSpecificOpen (RenderingMethod *method); void gtkMainClassSet_currentPanel (GtkMain *main); void gtkMainClassSet_lastOpenDirectory (char *directory); void gtkMainClassSet_rememberPosition (gboolean val); void gtkMainClassSet_renderingSpecificMethods (RenderingMethod *method, GtkMainSetFilesFunc methodLoad);
gboolean (*GtkMainSetFilesFunc) (VisuData *data, GtkWindow *parent);
Methods that conform to this prototype is used to set filename(s) to be loaded when the 'load' button is pushed. They can use a GtkFileChooser to prompt the user for file names.
|
a VisuData to store the informations ; |
|
the parent window of the dialog. |
Returns : |
FALSE if no filename as been set, TRUE if the calling method should
call gtkMainLoadAndRender_file() with a g_idle_add method.
|
GtkWidget* (*createGtkWidgetFunc) (void);
This prototype is used whenever a method is required to create a GtkWidget.
Returns : |
a newly created GtkWidget. |
ToolPanel* (*PanelInitFunc) ();
Prototype of the functions used to initialise a new panel.
Returns : |
a newly created ToolPanel. |
#define currentRenderingWindow RENDERING_WINDOW(gtkMainClassGet_currentPanel()->renderingWindow)
TO BE REMOVED, do not use.
typedef struct { GtkWindow parent; /* Pointers on permanent windows. */ GtkWidget *renderingWindow; GtkWidget *pairsDialog; GtkWidget *interactiveDialog; GtkWidget *aboutDialog; /* Private data. */ GtkMain_private *private; } GtkMain;
This structure describes a GtkMain object.
GtkWindow |
the parent object, a GtkWindow here ; |
GtkWidget * |
a pointer on the associated rendering window ; |
GtkWidget * |
a pointer to the corresponding pair dialog, or NULL if not yet built ; |
GtkWidget * |
idem for the interactive dialog ; |
GtkWidget * |
idem for the about dialog ; |
GtkMain_private * |
a pointer to the private data. |
typedef struct _GtkMainClass GtkMainClass;
A short way to identify _GtkMainClass structure.
GtkWidget* gtkMainNew ();
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.
Returns : |
a newly create command panel. |
void gtkMain_quit ();
Quit the program. If the preference to have a confirm dialog is set, then it raises the little warning window before quiting (or not).
GtkMain* gtkMainClassGet_currentPanel ();
This routine can be used to get the command panel, everywhere from V_Sim.
Returns : |
the command Panel. |
gchar* gtkMainClassGet_lastOpenDirectory ();
V_Sim stores the last open directory to set the file chooser to
this one the next time it will come. Use
gtkMainClassSet_lastOpenDirectory()
to store it after a GTK_RESPONSE_OK
has been returned by a file chooser and then initialise each new
with this routine.
Returns : |
a string owned by V_Sim. |
gboolean gtkMainClassGet_rememberPosition ();
V_Sim can store the position of its main windows. Use this routine to get the status of this capability.
Returns : |
TRUE if set. |
GtkMainSetFilesFunc gtkMainClassGet_renderingSpecificOpen (RenderingMethod *method);
This method is used to retrieve the GtkMainSetFilesFunc associate with
the specified method
.
|
a RenderingMethod object. |
Returns : |
a load method if one has been specified for method
or gtkMainClassSet_fileFromDefaultFileChooser() .
|
void gtkMainClassSet_currentPanel (GtkMain *main);
After having created the command panel with gtkMainNew()
, use this
routine to declare it as the current command panel.
|
a command panel. |
void gtkMainClassSet_lastOpenDirectory (char *directory);
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.
|
a full path to a directory. |
void gtkMainClassSet_rememberPosition (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.
|
an boolean. |
void gtkMainClassSet_renderingSpecificMethods (RenderingMethod *method, GtkMainSetFilesFunc methodLoad);
This function is used by a client to add gtk methods to a rendering method.
The methodLoad
argument is called to when the 'load' button is pushed.
|
a RenderingMethod object; |
|
a GtkMainSetFilesFunc method (can be NULL). |