gtk_interactive

gtk_interactive — The interactive dialog.

Synopsis

enum                VisuUiInteractiveActionId;
GtkWidget *         (*VisuUiInteractiveBuild)           (VisuUiMain *main,
                                                         gchar **label,
                                                         gchar **help,
                                                         GtkWidget **radio);
void                (*VisuUiInteractiveStartStop)       (VisuUiRenderingWindow *window);
guint               visu_ui_interactive_addAction       (VisuUiInteractiveBuild build,
                                                         VisuUiInteractiveStartStop start,
                                                         VisuUiInteractiveStartStop stop);
void                visu_ui_interactive_init            ();
void                visu_ui_interactive_initBuild       (VisuUiMain *main);
void                visu_ui_interactive_setMessage      (const gchar *message,
                                                         GtkMessageType type);
void                visu_ui_interactive_start           (VisuUiRenderingWindow *window);
void                visu_ui_interactive_toggle          ();
void                visu_ui_interactive_unsetMessage    ();

Description

This is the second main interface for V_Sim after the command panel. It provides widgets to interact with the nodes. There is three built-in interactive modes : the observe one (as in normal behaviour), the pick one and the move one.

It is possible to add new action thanks to visu_ui_interactive_addAction() function. It is also possible to show a small warning message with visu_ui_interactive_setMessage() that shows a GtkInfoBar.

Details

enum VisuUiInteractiveActionId

typedef enum {
    VISU_UI_ACTION_OBSERVE,
    VISU_UI_ACTION_PICK,
    VISU_UI_ACTION_MOVE,
} VisuUiInteractiveActionId;

Possibe actions.

VISU_UI_ACTION_OBSERVE

interactive session is observe ;

VISU_UI_ACTION_PICK

interactive session is pick ;

VISU_UI_ACTION_MOVE

interactive session is geometry changes.

VISU_UI_ACTION_N_PRESET

private.

VisuUiInteractiveBuild ()

GtkWidget *         (*VisuUiInteractiveBuild)           (VisuUiMain *main,
                                                         gchar **label,
                                                         gchar **help,
                                                         GtkWidget **radio);

One can create new tab in the interactive dialog window by providing routines with this prototype.

main :

the main interface.

label :

a location to store the name of the tab ;

help :

a location to store the help message to be shown at the bottom of the window ;

radio :

a location on the radio button that will be toggled when the desired action is used.

Returns :

a new container to be include as a tab in the interactive dialog window.

VisuUiInteractiveStartStop ()

void                (*VisuUiInteractiveStartStop)       (VisuUiRenderingWindow *window);

Routines of this prototype are called each time the interactive mode should be changed.

window :

the rendering window that starts or stops the interaction defined in the tab.

visu_ui_interactive_addAction ()

guint               visu_ui_interactive_addAction       (VisuUiInteractiveBuild build,
                                                         VisuUiInteractiveStartStop start,
                                                         VisuUiInteractiveStartStop stop);

One can add new interactive mode with specific tab in the interactive dialog.

build :

a routine to build a tab.

start :

a routine to run when session is selected.

stop :

a routine to run when session is stopped.

Returns :

an id for this new action.

Since 3.6


visu_ui_interactive_init ()

void                visu_ui_interactive_init            ();

Initialise the observe/pick window, connect the signals, give names to widgets...


visu_ui_interactive_initBuild ()

void                visu_ui_interactive_initBuild       (VisuUiMain *main);

create the window.

main :

the command panel the about dialog is associated to.

visu_ui_interactive_setMessage ()

void                visu_ui_interactive_setMessage      (const gchar *message,
                                                         GtkMessageType type);

Show a message in the interactive dialog.

message :

a string.

type :

the type of message.

Since 3.6


visu_ui_interactive_start ()

void                visu_ui_interactive_start           (VisuUiRenderingWindow *window);

Start the observe & pick session.

window :

the current rendering widget.

visu_ui_interactive_toggle ()

void                visu_ui_interactive_toggle          ();

The user can switch between a current specific interactive action and the observe mode. This routine is used to do this.*

Since 3.6


visu_ui_interactive_unsetMessage ()

void                visu_ui_interactive_unsetMessage    ();

Hide any message from the interactive dialog. See also visu_ui_interactive_setMessage().

Since 3.6