gtk_renderingWindowWidget

gtk_renderingWindowWidget — Defines a complex widget used to render files and print information.

Synopsis

                    VisuUiRenderingWindow;
                    VisuUiRenderingWindowClass;
gboolean            visu_ui_rendering_window_class_getAutoAdjust
                                                        ();
gboolean            visu_ui_rendering_window_class_getDisplayCoordinatesInReduce
                                                        ();
VisuInteractive *   visu_ui_rendering_window_class_getInteractive
                                                        ();
gboolean            visu_ui_rendering_window_class_setAutoAdjust
                                                        (gboolean status);
gboolean            visu_ui_rendering_window_class_setDisplayCoordinatesInReduce
                                                        (gboolean status);
gboolean            visu_ui_rendering_window_dump       (VisuUiRenderingWindow *window,
                                                         VisuDump *format,
                                                         const char *fileName,
                                                         gint width,
                                                         gint height,
                                                         ToolVoidDataFunc functionWait,
                                                         gpointer data,
                                                         GError **error);
GtkAccelGroup *     visu_ui_rendering_window_getAccelGroup
                                                        (VisuUiRenderingWindow *window);
VisuData *          visu_ui_rendering_window_getData    (VisuUiRenderingWindow *window);
VisuGlView *        visu_ui_rendering_window_getGlView  (VisuUiRenderingWindow *window);
VisuGlExtMarks *    visu_ui_rendering_window_getMarks   (VisuUiRenderingWindow *window);
void                visu_ui_rendering_window_loadFile   (VisuUiRenderingWindow *window,
                                                         VisuData *data,
                                                         guint iSet);
GtkWidget *         visu_ui_rendering_window_new        (int width,
                                                         int height,
                                                         gboolean withFrame,
                                                         gboolean withToolBar);
void                visu_ui_rendering_window_open       (VisuUiRenderingWindow *window,
                                                         GtkWindow *parent);
void                visu_ui_rendering_window_popInteractive
                                                        (VisuUiRenderingWindow *window,
                                                         VisuInteractive *inter);
void                visu_ui_rendering_window_popMessage (VisuUiRenderingWindow *window);
void                visu_ui_rendering_window_pushInteractive
                                                        (VisuUiRenderingWindow *window,
                                                         VisuInteractive *inter);
void                visu_ui_rendering_window_pushMessage
                                                        (VisuUiRenderingWindow *window,
                                                         const gchar *message);
void                visu_ui_rendering_window_reload     (VisuUiRenderingWindow *window);
void                visu_ui_rendering_window_setCurrent (VisuUiRenderingWindow *window,
                                                         gboolean force);
void                visu_ui_rendering_window_setData    (VisuUiRenderingWindow *window,
                                                         VisuData *data);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkBox
                           +----GtkVBox
                                 +----VisuUiRenderingWindow

Implemented Interfaces

VisuUiRenderingWindow implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Signals

  "export"                                         : Action
  "load-next-file"                                 : No Hooks
  "load-prev-file"                                 : No Hooks
  "open"                                           : Action
  "reload"                                         : Action
  "search"                                         : Action
  "show-action-dialog"                             : No Hooks
  "show-main-panel"                                : No Hooks
  "show-orientation-chooser"                       : Action

Description

This is a complex widget, inheriting from GtkWindow, with a rendering area and a status bar area. A VisuData is always attached to this widget, see visu_ui_rendering_window_setData(). If not the V_Sim logo is displayed.

The rendering area can receive keyboard or mouse events, see visu_ui_rendering_window_class_getInteractive.

The status bar area has different buttons to load or export a file. It also display some usefull information like the number of rendered nodes. It has also a real status bar location displaying tips about current available actions. One can add news using visu_ui_rendering_window_pushMessage().

Details

VisuUiRenderingWindow

typedef struct _VisuUiRenderingWindow VisuUiRenderingWindow;

Short form for a VisuUiRenderingWindow_struct structure.


VisuUiRenderingWindowClass

typedef struct _VisuUiRenderingWindowClass VisuUiRenderingWindowClass;

Opaque structure.


visu_ui_rendering_window_class_getAutoAdjust ()

gboolean            visu_ui_rendering_window_class_getAutoAdjust
                                                        ();

The camera can be set to auto adjust its zoom capability for the data to be full size at zoom level 1.

Returns :

TRUE if the camera auto adjust on data loading.

Since 3.6


visu_ui_rendering_window_class_getDisplayCoordinatesInReduce ()

gboolean            visu_ui_rendering_window_class_getDisplayCoordinatesInReduce
                                                        ();

Picked nodes have their coordinates displayed in the status bar of the rendering window. This methods retrieves if they are printed in reduced values or not.

Returns :

TRUE if the coordinates are displayed in reduced values.

Since 3.6


visu_ui_rendering_window_class_getInteractive ()

VisuInteractive *   visu_ui_rendering_window_class_getInteractive
                                                        ();

The user actions on the rendering area are handled by a VisuInteractive object.

Returns :

the VisuInteractive object used by the rendering window of V_Sim. This object is owned by V_Sim. [transfer none]

Since 3.6


visu_ui_rendering_window_class_setAutoAdjust ()

gboolean            visu_ui_rendering_window_class_setAutoAdjust
                                                        (gboolean status);

If set, the camera auto adjust its zoom capability for the data to be full size at zoom level 1.

status :

a boolean.

Returns :

TRUE if the value has been changed.

Since 3.6


visu_ui_rendering_window_class_setDisplayCoordinatesInReduce ()

gboolean            visu_ui_rendering_window_class_setDisplayCoordinatesInReduce
                                                        (gboolean status);

If set, the coordinates of picked nodes are displayed in reduced values.

status :

a boolean.

Returns :

TRUE if the value has been changed.

Since 3.6


visu_ui_rendering_window_dump ()

gboolean            visu_ui_rendering_window_dump       (VisuUiRenderingWindow *window,
                                                         VisuDump *format,
                                                         const char *fileName,
                                                         gint width,
                                                         gint height,
                                                         ToolVoidDataFunc functionWait,
                                                         gpointer data,
                                                         GError **error);

Call this method to dump the given window to a file.

window :

a valid VisuUiRenderingWindow object ;

format :

a VisuDump object, corresponding to the write method ;

fileName :

a string that defined the file to write to ;. [type filename]

width :

an integer ;

height :

an integer ;

functionWait :

a method to call periodically during the dump ;. [allow-none][closure data][scope call]

data :

some pointer on object to be passed to the wait function. [closure]

error :

a location to store some error (not NULL) ;

Returns :

TRUE if everything went right.

visu_ui_rendering_window_getAccelGroup ()

GtkAccelGroup *     visu_ui_rendering_window_getAccelGroup
                                                        (VisuUiRenderingWindow *window);

Retrieve the accelerator group of window.

window :

a VisuUiRenderingWindow object.

Returns :

the GtkAccelGroup object of window. [transfer none]

Since 3.7


visu_ui_rendering_window_getData ()

VisuData *          visu_ui_rendering_window_getData    (VisuUiRenderingWindow *window);

This method is used to get the VisuData attached to a window.

window :

a valid VisuUiRenderingWindow object.

Returns :

the VisuData attached to the window or NULL if none. [transfer none]

visu_ui_rendering_window_getGlView ()

VisuGlView *        visu_ui_rendering_window_getGlView  (VisuUiRenderingWindow *window);

This method is used to get the VisuGlView attached to the rendering window.

window :

a valid VisuUiRenderingWindow object.

Returns :

the VisuGlView attached to the window or NULL on error. [transfer none]

Since 3.7


visu_ui_rendering_window_getMarks ()

VisuGlExtMarks *    visu_ui_rendering_window_getMarks   (VisuUiRenderingWindow *window);

Get the VisuGlExtMarks of the given window.

window :

a VisuUiRenderingWindow object ;

Returns :

a VisuGlExtMarks object owned by V_Sim. [transfer none]

Since 3.6


visu_ui_rendering_window_loadFile ()

void                visu_ui_rendering_window_loadFile   (VisuUiRenderingWindow *window,
                                                         VisuData *data,
                                                         guint iSet);

This method calls the general function to load data from file and deals with errors with gtkDialogs. The filenames must have already been set into data using visu_data_addFile().

window :

a valid VisuUiRenderingWindow object.

data :

the VisuData to be loaded.

iSet :

the id of data to load.

visu_ui_rendering_window_new ()

GtkWidget *         visu_ui_rendering_window_new        (int width,
                                                         int height,
                                                         gboolean withFrame,
                                                         gboolean withToolBar);

A VisuUiRenderingWindow widget is a GtkWindow that have an area for OpenGL drawing and a statusBar with many stuff like action buttons, real status bar for notifications, ... The rendering area can be drawn with a frame or not. With this routine, only the VisuUiRenderingWindow widget is created.

width :

its desired width ;

height :

its desired height ;

withFrame :

a boolean ;

withToolBar :

a boolean.

Returns :

a newly created VisuUiRenderingWindow widget.

visu_ui_rendering_window_open ()

void                visu_ui_rendering_window_open       (VisuUiRenderingWindow *window,
                                                         GtkWindow *parent);

Do as if the load button has been pushed, i.e. open a filechooser dialog on the parent window, and load the resulting file, refreshing the view if necessary.

window :

the window the file will by rendered on ;

parent :

the parent window for the filechooser dialog. [allow-none]

visu_ui_rendering_window_popInteractive ()

void                visu_ui_rendering_window_popInteractive
                                                        (VisuUiRenderingWindow *window,
                                                         VisuInteractive *inter);

It removes inter from the stack of interactive sessions currently attached to window. If inter was first on the stack, the next session is launched.

window :

a VisuUiRenderingWindow object.

inter :

a VisuInteractive object.

Since 3.6


visu_ui_rendering_window_popMessage ()

void                visu_ui_rendering_window_popMessage (VisuUiRenderingWindow *window);

Remove the last message.

window :

a valid VisuUiRenderingWindow object.

visu_ui_rendering_window_pushInteractive ()

void                visu_ui_rendering_window_pushInteractive
                                                        (VisuUiRenderingWindow *window,
                                                         VisuInteractive *inter);

It adds inter to the stack of interactive sessions currently attached to window and launch it.

window :

a VisuUiRenderingWindow object.

inter :

a VisuInteractive object.

Since 3.6


visu_ui_rendering_window_pushMessage ()

void                visu_ui_rendering_window_pushMessage
                                                        (VisuUiRenderingWindow *window,
                                                         const gchar *message);

Use this method to add some informations on the status bar.

window :

a valid VisuUiRenderingWindow object ;

message :

an UTF8 string to print on the status bar.

visu_ui_rendering_window_reload ()

void                visu_ui_rendering_window_reload     (VisuUiRenderingWindow *window);

This routines reloads the current VisuData object by rereading it on disk. If there is no current VisuData object, it reports an error.

window :

a VisuUiRenderingWindow object.

Since 3.7


visu_ui_rendering_window_setCurrent ()

void                visu_ui_rendering_window_setCurrent (VisuUiRenderingWindow *window,
                                                         gboolean force);

Set the OpenGL area as the current rendering area. If force is TRUE then the context is switched whatever buffered value.

window :

a valid VisuUiRenderingWindow object ;

force :

a boolean.

Since 3.5


visu_ui_rendering_window_setData ()

void                visu_ui_rendering_window_setData    (VisuUiRenderingWindow *window,
                                                         VisuData *data);

This method is used to attach a VisuData object to a given window. When, data is not NULL, this method emit the "dataRendered" signal, and all modules that needs to draw something should catch this signal and draw in the rendering window.

window :

a valid VisuUiRenderingWindow object ;

data :

a VisuData to render in the given window. [allow-none]

Signal Details

The "export" signal

void                user_function                      (VisuUiRenderingWindow *window,
                                                        gpointer               user_data)      : Action

Signal emitted when the user ask for data export.

window :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

Since 3.6


The "load-next-file" signal

void                user_function                      (VisuUiRenderingWindow *window,
                                                        gpointer               user_data)      : No Hooks

Signal emitted when the user ask to load next file of a given list.

window :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

Since 3.7


The "load-prev-file" signal

void                user_function                      (VisuUiRenderingWindow *window,
                                                        gpointer               user_data)      : No Hooks

Signal emitted when the user ask to load previous file of a given list.

window :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

Since 3.7


The "open" signal

void                user_function                      (VisuUiRenderingWindow *window,
                                                        gpointer               user_data)      : Action

Signal emitted when the user ask to open new data.

window :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

Since 3.6


The "reload" signal

void                user_function                      (VisuUiRenderingWindow *window,
                                                        gpointer               user_data)      : Action

Signal emitted when the user ask to reload current data.

window :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

Since 3.6


The "search" signal

void                user_function                      (VisuUiRenderingWindow *window,
                                                        gpointer               user_data)      : Action

Signal emitted when the user ask to search info in current data.

window :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

Since 3.7


The "show-action-dialog" signal

void                user_function                      (VisuUiRenderingWindow *window,
                                                        gpointer               user_data)      : No Hooks

Signal emitted when the user ask to show the action dialog.

window :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

Since 3.6


The "show-main-panel" signal

void                user_function                      (VisuUiRenderingWindow *window,
                                                        gpointer               user_data)      : No Hooks

Signal emitted when the user ask to raise the main panel.

window :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

Since 3.6


The "show-orientation-chooser" signal

void                user_function                      (VisuUiRenderingWindow *window,
                                                        gpointer               user_data)      : Action

Signal emitted when the user ask to precisely select a camera angle.

window :

the object emitting the signal.

user_data :

user data set when the signal handler was connected.

Since 3.7