gtk_main

gtk_main

Synopsis

ToolPanel*          (*PanelInitFunc)                    ();
#define             currentRenderingWindow

                    GtkMain;
                    GtkMainClass;

GtkWidget*          gtkMainNew                          (gboolean oneWindow);
void                gtkMain_quit                        (GtkMain *main);
void                gtkMainBuild_interactiveDialog      (GtkMain *main);
gboolean            gtkMainRun_commandLine              (gpointer data);

void                gtkMainClassCreate_main             (GtkWindow **panel,
                                                         GtkWindow **render);
GtkMain*            gtkMainClassGet_currentPanel        ();
gboolean            gtkMainClassGet_rememberPosition    ();
void                gtkMainClassSet_currentPanel        (GtkMain *main);
void                gtkMainClassSet_rememberPosition    (gboolean val);

Description

A longer description goes here.

Details

PanelInitFunc ()

ToolPanel*          (*PanelInitFunc)                    ();

Prototype of the functions used to initialise a new panel.

Returns :

a newly created ToolPanel.

currentRenderingWindow

#define currentRenderingWindow RENDERING_WINDOW(gtkMainClassGet_currentPanel()->renderingWindow)

TO BE REMOVED, do not use.


GtkMain

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 parent;

the parent object, a GtkWindow here ;

GtkWidget *renderingWindow;

a pointer on the associated rendering window ;

GtkWidget *pairsDialog;

a pointer to the corresponding pair dialog, or NULL if not yet built ;

GtkWidget *interactiveDialog;

idem for the interactive dialog ;

GtkWidget *aboutDialog;

idem for the about dialog ;

GtkMain_private *private;

a pointer to the private data.

GtkMainClass

typedef struct _GtkMainClass GtkMainClass;

A short way to identify _GtkMainClass structure.


gtkMainNew ()

GtkWidget*          gtkMainNew                          (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.

oneWindow :

a boolean.

Returns :

a newly create command panel.

gtkMain_quit ()

void                gtkMain_quit                        (GtkMain *main);

Quit the program. If the preference to have a confirm dialog is set, then it raises the little warning window before quiting (or not).


gtkMainBuild_interactiveDialog ()

void                gtkMainBuild_interactiveDialog      (GtkMain *main);

Create the mouse action dialog window (if not already done).

main :

a GtkMain object.

gtkMainRun_commandLine ()

gboolean            gtkMainRun_commandLine              (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 visuGtkRun_commandLine() instead.

data :

a pointer on a GtkMain object.

Returns :

always FALSE.

gtkMainClassCreate_main ()

void                gtkMainClassCreate_main             (GtkWindow **panel,
                                                         GtkWindow **render);

A convenience routine to create a command panel, a rendering window and links them together.

Returns :

the created command panel.

gtkMainClassGet_currentPanel ()

GtkMain*            gtkMainClassGet_currentPanel        ();

This routine can be used to get the command panel, everywhere from V_Sim.

Returns :

the command Panel.

gtkMainClassGet_rememberPosition ()

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.

gtkMainClassSet_currentPanel ()

void                gtkMainClassSet_currentPanel        (GtkMain *main);

After having created the command panel with gtkMainNew(), use this routine to declare it as the current command panel.

main :

a command panel.

gtkMainClassSet_rememberPosition ()

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.

val :

an boolean.