gtk_toolPanelWidget

gtk_toolPanelWidget — Defines a widget that hold a set of V_Sim panel.

Synopsis

#define             VISU_UI_TYPE_DOCK_WINDOW
                    VisuUiDockWindow;
                    VisuUiPanel;
                    VisuUiPanelClass;
void                visu_ui_dock_window_getCharacteristics
                                                        (VisuUiDockWindow *dock,
                                                         gchar **id,
                                                         gboolean *visibility,
                                                         gint *x,
                                                         gint *y,
                                                         gint *width,
                                                         gint *height);
GtkWidget *         visu_ui_dock_window_getContainer    (VisuUiDockWindow *dock);
GtkWidget *         visu_ui_dock_window_getNotebook     (VisuUiDockWindow *dock);
GtkWidget *         visu_ui_dock_window_getWindow       (VisuUiDockWindow *dock);
void                visu_ui_dock_window_setPosition     (VisuUiDockWindow *dock,
                                                         guint x,
                                                         guint y);
void                visu_ui_dock_window_setSize         (VisuUiDockWindow *dock,
                                                         guint width,
                                                         guint height);
void                visu_ui_dock_window_setVisibility   (VisuUiDockWindow *dock,
                                                         gboolean visible);
void                visu_ui_panel_attach                (VisuUiPanel *visu_ui_panel,
                                                         VisuUiDockWindow *dock);
GList *             visu_ui_panel_class_getAllPanels    (void);
GList *             visu_ui_panel_class_getAllWindows   (void);
VisuUiDockWindow *  visu_ui_panel_class_getCommandPanel (void);
VisuUiDockWindow *  visu_ui_panel_class_getDockById     (const gchar *id);
VisuUiPanel *       visu_ui_panel_class_getPanelById    (const gchar *id);
void                visu_ui_panel_class_setCurrent      (VisuData *dataObj,
                                                         VisuGlView *view);
void                visu_ui_panel_class_setHeaderVisibility
                                                        (gboolean status);
void                visu_ui_panel_detach                (VisuUiPanel *visu_ui_panel);
VisuUiDockWindow *  visu_ui_panel_getContainer          (VisuUiPanel *visu_ui_panel);
const gchar *       visu_ui_panel_getContainerId        (VisuUiPanel *visu_ui_panel);
GtkWindow *         visu_ui_panel_getContainerWindow    (VisuUiPanel *visu_ui_panel);
VisuData *          visu_ui_panel_getData               (VisuUiPanel *visu_ui_panel);
VisuBoxed *         visu_ui_panel_getFocused            (VisuUiPanel *visu_ui_panel);
GtkWidget *         visu_ui_panel_getHeaderWidget       (VisuUiPanel *visu_ui_panel);
const gchar *       visu_ui_panel_getId                 (VisuUiPanel *visu_ui_panel);
const gchar *       visu_ui_panel_getLabel              (VisuUiPanel *visu_ui_panel);
VisuGlView *        visu_ui_panel_getView               (VisuUiPanel *visu_ui_panel);
gboolean            visu_ui_panel_getVisible            (VisuUiPanel *visu_ui_panel);
GtkWidget *         visu_ui_panel_new                   (gchar *id,
                                                         gchar *name,
                                                         gchar *tabName);
GtkWidget *         visu_ui_panel_newWithIconFromPath   (gchar *id,
                                                         gchar *name,
                                                         gchar *tabName,
                                                         const gchar *iconPath);
GtkWidget *         visu_ui_panel_newWithIconFromStock  (gchar *id,
                                                         gchar *name,
                                                         gchar *tabName,
                                                         const gchar *stock);
void                visu_ui_panel_setContainer          (VisuUiPanel *visu_ui_panel,
                                                         VisuUiDockWindow *window);
void                visu_ui_panel_setContainerId        (VisuUiPanel *visu_ui_panel,
                                                         const gchar *id);
void                visu_ui_panel_setDockable           (VisuUiPanel *visu_ui_panel,
                                                         gboolean value);

Object Hierarchy

  GBoxed
   +----VisuUiDockWindow
  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkBin
                           +----GtkAlignment
                                 +----VisuUiPanel

Implemented Interfaces

VisuUiPanel implements AtkImplementorIface and GtkBuildable.

Signals

  "page-entered"                                   : Action

Description

This widget is a complex association of a GtkComboBox and a GtkNotebook with V_Sim panels. It can have its own window or be attached into the main command panel.

This widget also has a built-in menu to exchange V_Sim panel between different instances of a VisuUiPanel. A VisuUiPanel is refered by its name and has a position and a size. These values can be stored in the parameter files.

Details

VISU_UI_TYPE_DOCK_WINDOW

#define VISU_UI_TYPE_DOCK_WINDOW (visu_ui_dock_window_get_type())

The type of VisuUiDockWindow objects.


VisuUiDockWindow

typedef struct _VisuUiDockWindow VisuUiDockWindow;

Short name for the structure of containers of VisuUiPanel.


VisuUiPanel

typedef struct _VisuUiPanel VisuUiPanel;

Short form for a VisuUiPanel_struct structure.


VisuUiPanelClass

typedef struct _VisuUiPanelClass VisuUiPanelClass;

Opaque structure.


visu_ui_dock_window_getCharacteristics ()

void                visu_ui_dock_window_getCharacteristics
                                                        (VisuUiDockWindow *dock,
                                                         gchar **id,
                                                         gboolean *visibility,
                                                         gint *x,
                                                         gint *y,
                                                         gint *width,
                                                         gint *height);

A routine to know everything about a VisuUiDockWindow.

dock :

a VisuUiDockWindow object ;

id :

a location to store the identifier (owned by V_Sim) ;

visibility :

a location to store the status of the dock, hidden or not ;

x :

a location to store its x position on the root window ;

y :

a location to store its y position on the root window ;

width :

a location to store its width ;

height :

a location to store its height.

visu_ui_dock_window_getContainer ()

GtkWidget *         visu_ui_dock_window_getContainer    (VisuUiDockWindow *dock);

A dock window is a small utility window with a list of VisuUiPanel. This window can be embedded in a container or have its own GtkWindow. This routine get the top-level container inside a given VisuUiDockWindow. If you prefer to get the GtkWindow containing the VisuUiDockWindow use visu_ui_dock_window_getWindow() instead.

dock :

a dock window descriptor.

Returns :

a top-level container (usually a GtkVBox). [transfer none]

visu_ui_dock_window_getNotebook ()

GtkWidget *         visu_ui_dock_window_getNotebook     (VisuUiDockWindow *dock);

A dock window is a small utility window with a list of VisuUiPanel. All VisuUiPanel are contained in a GtkNotebook. This routine gets it.

dock :

a dock window descriptor.

Returns :

the GtkNotebook containing the VisuUiPanel of this VisuUiDockWindow. [transfer none]

visu_ui_dock_window_getWindow ()

GtkWidget *         visu_ui_dock_window_getWindow       (VisuUiDockWindow *dock);

A dock window is a small utility window with a list of VisuUiPanel. This window can be embedded in a container or have its own GtkWindow. This routine get the GtkWindow containing the VisuUiDockWindow in the case the dock is stand-alone. If not NULL is returned.

dock :

a dock window descriptor.

Returns :

a top-level container (usually a GtkWindow) or NULL. [transfer none]

visu_ui_dock_window_setPosition ()

void                visu_ui_dock_window_setPosition     (VisuUiDockWindow *dock,
                                                         guint x,
                                                         guint y);

Change the position of the given VisuUiDockWindow. The position is possibly adapted to avoid been out of screen.

dock :

a VisuUiDockWindow object ;

x :

the requested x position ;

y :

the requested y position.

visu_ui_dock_window_setSize ()

void                visu_ui_dock_window_setSize         (VisuUiDockWindow *dock,
                                                         guint width,
                                                         guint height);

Change the size of the given VisuUiDockWindow. The size is possibly adapted to avoid been out of screen.

dock :

a VisuUiDockWindow object ;

width :

the requested width ;

height :

the requested height.

visu_ui_dock_window_setVisibility ()

void                visu_ui_dock_window_setVisibility   (VisuUiDockWindow *dock,
                                                         gboolean visible);

Change the visibility of a VisuUiDockWindow. If hidden, the dock is added to the list of hidden VisuUiDockWindow that can be shown again using the pop-up menu on every visible VisuUiDockWindow. The 'Main' dock window can not be hidden.

dock :

a VisuUiDockWindow object ;

visible :

a boolean.

visu_ui_panel_attach ()

void                visu_ui_panel_attach                (VisuUiPanel *visu_ui_panel,
                                                         VisuUiDockWindow *dock);

Put the given visu_ui_panel in the given dock window. It adds in this dock window a new page in the GtkNotebook using as tab header the widget returned by visu_ui_panel_getHeaderWidget().

visu_ui_panel :

a VisuUiPanel ;

dock :

a VisuUiDockWindow.

visu_ui_panel_class_getAllPanels ()

GList *             visu_ui_panel_class_getAllPanels    (void);

This routine can be used to know all existing VisuUiPanel.

Returns :

a newly created list (use g_list_free() on it after use). [transfer full][element-type VisuUiPanel*]

visu_ui_panel_class_getAllWindows ()

GList *             visu_ui_panel_class_getAllWindows   (void);

This routine can be used to know all existing VisuUiDockWindow.

Returns :

a newly created list (use g_list_free() on it after use). [transfer container][element-type VisuUiDockWindow*]

visu_ui_panel_class_getCommandPanel ()

VisuUiDockWindow *  visu_ui_panel_class_getCommandPanel (void);

There is always a VisuUiDockWindow that is inside the command panel. This routine gets it.

Returns :

the VisuUiDockWindow that is inside the command panel. [transfer none]

visu_ui_panel_class_getDockById ()

VisuUiDockWindow *  visu_ui_panel_class_getDockById     (const gchar *id);

This routine associates a VisuUiDockWindow identifier to the object pointer.

id :

a VisuUiDockWindow identifier.

Returns :

the VisuUiDockWindow that corresponds to this identifier. The dock window is built if not currently exist.

visu_ui_panel_class_getPanelById ()

VisuUiPanel *       visu_ui_panel_class_getPanelById    (const gchar *id);

This routine associates a VisuUiPanel identifier to the object pointer.

id :

a VisuUiPanel identifier.

Returns :

the VisuUiPanel that corresponds to this identifier or NULL if none exists. [transfer none]

visu_ui_panel_class_setCurrent ()

void                visu_ui_panel_class_setCurrent      (VisuData *dataObj,
                                                         VisuGlView *view);

Set the currently focussed VisuData. It then can be retrieve using visu_ui_panel_getData().

dataObj :

a VisuData object.

view :

a VisuGlView object.

Since 3.7


visu_ui_panel_class_setHeaderVisibility ()

void                visu_ui_panel_class_setHeaderVisibility
                                                        (gboolean status);

The header can be represented using the full image and label always or only the image when the tab is not on top.

status :

a boolean.

visu_ui_panel_detach ()

void                visu_ui_panel_detach                (VisuUiPanel *visu_ui_panel);

Remove the given visu_ui_panel from its current container and add it to the list of hidden tool panels. It can be added again using the pop-up menu of any VisuUiDockWindow.

visu_ui_panel :

a VisuUiPanel.

visu_ui_panel_getContainer ()

VisuUiDockWindow *  visu_ui_panel_getContainer          (VisuUiPanel *visu_ui_panel);

Return the VisuUiDockWindow that the given visu_ui_panel is attached to or NULL if the visu_ui_panel is currently dettached.

visu_ui_panel :

a VisuUiPanel.

Returns :

a VisuUiDockWindow object.

visu_ui_panel_getContainerId ()

const gchar *       visu_ui_panel_getContainerId        (VisuUiPanel *visu_ui_panel);

Return the identifying string of the VisuUiDockWindow that the given visu_ui_panel is attached to or NULL if the visu_ui_panel is currently dettached.

visu_ui_panel :

a VisuUiPanel.

Returns :

a string owned by V_Sim.

visu_ui_panel_getContainerWindow ()

GtkWindow *         visu_ui_panel_getContainerWindow    (VisuUiPanel *visu_ui_panel);

Return the GtkWindow that the given visu_ui_panel is rendered in or NULL if the visu_ui_panel is currently dettached.

visu_ui_panel :

a VisuUiPanel.

Returns :

a GtkWindow object. [transfer none]

visu_ui_panel_getData ()

VisuData *          visu_ui_panel_getData               (VisuUiPanel *visu_ui_panel);

The visu_ui_panel is supposed to work on a VisuData, this routine can be used to get it.

visu_ui_panel :

a VisuUiPanel.

Returns :

the currently focused VisuData (can be NULL if none). [transfer none]

visu_ui_panel_getFocused ()

VisuBoxed *         visu_ui_panel_getFocused            (VisuUiPanel *visu_ui_panel);

Retrieves the currently focused VisuBoxed object in the default VisuUiRenderingWindow.

visu_ui_panel :

a VisuUiPanel.

Returns :

the currently focused VisuBoxed (can be NULL if none). [transfer none][allow-none]

Since 3.7


visu_ui_panel_getHeaderWidget ()

GtkWidget *         visu_ui_panel_getHeaderWidget       (VisuUiPanel *visu_ui_panel);

The VisuUiPanel should be used in a page of a GtkNotebook. This routine is used to get the widget that should be used in the tab. This widget is a container with an icon and a label.

visu_ui_panel :

a VisuUiPanel.

Returns :

a container widget that should be put in the tab of a GtkNotebook. [transfer none]

visu_ui_panel_getId ()

const gchar *       visu_ui_panel_getId                 (VisuUiPanel *visu_ui_panel);

The VisuUiPanel can be identifyed by an id (a string without space, usually using ASCII characters only).

visu_ui_panel :

a VisuUiPanel.

Returns :

a constant string identifying this VisuUiPanel.

visu_ui_panel_getLabel ()

const gchar *       visu_ui_panel_getLabel              (VisuUiPanel *visu_ui_panel);

The VisuUiPanel has two label, a short one, used in the tab of a GtkNotebook and one longer. This routine gets the longer.

visu_ui_panel :

a VisuUiPanel.

Returns :

an UTF-8 internationalised name (property of V_Sim, should not be freed).

visu_ui_panel_getView ()

VisuGlView *        visu_ui_panel_getView               (VisuUiPanel *visu_ui_panel);

Convenient routine to get the current VisuGlView, see visu_ui_panel_class_setCurrent().

visu_ui_panel :

a VisuUiPanel object.

Returns :

the current VisuGlView, or NULL. [transfer none]

Since 3.7


visu_ui_panel_getVisible ()

gboolean            visu_ui_panel_getVisible            (VisuUiPanel *visu_ui_panel);

This is used to retrieve if the visu_ui_panel is currently realised and the visualised page of the GtkNotebook it is associated to.

visu_ui_panel :

a VisuUiPanel.

Returns :

TRUE if the given visu_ui_panel is potentialy visible to the user.

visu_ui_panel_new ()

GtkWidget *         visu_ui_panel_new                   (gchar *id,
                                                         gchar *name,
                                                         gchar *tabName);

Create a new VisuUiPanel with the given id, displaying name in the combo box of a VisuUiDockWindow and tabName in the tab of the page notebook.

id :

a string without space and non internationalised ;. [type filename]

name :

a string in UTF-8 that can be internationalised ;

tabName :

a shorter name than name, in UTF-8 that can be internationalised.

Returns :

a newly created widget.

visu_ui_panel_newWithIconFromPath ()

GtkWidget *         visu_ui_panel_newWithIconFromPath   (gchar *id,
                                                         gchar *name,
                                                         gchar *tabName,
                                                         const gchar *iconPath);

Create a new VisuUiPanel with the given id, displaying name in the combo box of a VisuUiDockWindow and tabName in the tab of the page notebook. The displayed icon will be read from the iconPath.

id :

a string without space and non internationalised ;

name :

a string in UTF-8 that can be internationalised ;

tabName :

a shorter name than name, in UTF-8 that can be internationalised ;

iconPath :

a path to an icon (should be 20x20).

Returns :

a newly created widget. [transfer full]

visu_ui_panel_newWithIconFromStock ()

GtkWidget *         visu_ui_panel_newWithIconFromStock  (gchar *id,
                                                         gchar *name,
                                                         gchar *tabName,
                                                         const gchar *stock);

Create a new VisuUiPanel with the given id, displaying name in the combo box of a VisuUiDockWindow and tabName in the tab of the page notebook. The displayed icon will be taken from the stock.

id :

a string without space and non internationalised ;

name :

a string in UTF-8 that can be internationalised ;

tabName :

a shorter name than name, in UTF-8 that can be internationalised ;

stock :

the name of a stock icon.

Returns :

a newly created widget. [transfer full]

visu_ui_panel_setContainer ()

void                visu_ui_panel_setContainer          (VisuUiPanel *visu_ui_panel,
                                                         VisuUiDockWindow *window);

Change the container of a visu_ui_panel. If it is currently attached to a VisuUiDockWindow, it firstly detachs it.

visu_ui_panel :

a VisuUiPanel ;

window :

a VisuUiDockWindow.

visu_ui_panel_setContainerId ()

void                visu_ui_panel_setContainerId        (VisuUiPanel *visu_ui_panel,
                                                         const gchar *id);

Change the container of a visu_ui_panel using the given id. If it is currently attached to a VisuUiDockWindow, it firstly detachs it.

visu_ui_panel :

a VisuUiPanel ;

id :

a VisuUiDockWindow identifier.

visu_ui_panel_setDockable ()

void                visu_ui_panel_setDockable           (VisuUiPanel *visu_ui_panel,
                                                         gboolean value);

A VisuUiPanel can be moved between different VisuUiDockWindow or not. This ability is controlled by the dockable flag. Change it with this method. If visu_ui_panel is set dockable, then, it can be hidden or moved to another or a new VisuUiDockWindow with the pop-up memu that is triggered by a small button in the header widget (see visu_ui_panel_getHeaderWidget()).

visu_ui_panel :

a VisuUiPanel ;

value :

a boolean.

Signal Details

The "page-entered" signal

void                user_function                      (VisuUiPanel *panel,
                                                        gpointer     user_data)      : Action

This signal is emitted when a page of the GtkNotebook with all the V_Sim panels is entered.

panel :

the VisuUiPanel that emits the signal.

user_data :

user data set when the signal handler was connected.

Since 3.3