![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Signals |
#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
);
GBoxed +----VisuUiDockWindow
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkBin +----GtkAlignment +----VisuUiPanel
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.
#define VISU_UI_TYPE_DOCK_WINDOW (visu_ui_dock_window_get_type())
The type of VisuUiDockWindow objects.
typedef struct _VisuUiDockWindow VisuUiDockWindow;
Short name for the structure of containers of VisuUiPanel.
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.
|
a VisuUiDockWindow object ; |
|
a location to store the identifier (owned by V_Sim) ; |
|
a location to store the status of the dock, hidden or not ; |
|
a location to store its x position on the root window ; |
|
a location to store its y position on the root window ; |
|
a location to store its width ; |
|
a location to store its height. |
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.
|
a dock window descriptor. |
Returns : |
a top-level container (usually a GtkVBox). [transfer none] |
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.
|
a dock window descriptor. |
Returns : |
the GtkNotebook containing the VisuUiPanel of this VisuUiDockWindow. [transfer none] |
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.
|
a dock window descriptor. |
Returns : |
a top-level container (usually a GtkWindow) or NULL. [transfer none] |
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.
|
a VisuUiDockWindow object ; |
|
the requested x position ; |
|
the requested y position. |
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.
|
a VisuUiDockWindow object ; |
|
the requested width ; |
|
the requested height. |
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.
|
a VisuUiDockWindow object ; |
|
a boolean. |
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()
.
|
a VisuUiPanel ; |
|
a VisuUiDockWindow. |
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*]
|
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*]
|
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] |
VisuUiDockWindow * visu_ui_panel_class_getDockById (const gchar *id
);
This routine associates a VisuUiDockWindow identifier to the object pointer.
|
a VisuUiDockWindow identifier. |
Returns : |
the VisuUiDockWindow that corresponds to this identifier. The dock window is built if not currently exist. |
VisuUiPanel * visu_ui_panel_class_getPanelById (const gchar *id
);
This routine associates a VisuUiPanel identifier to the object pointer.
|
a VisuUiPanel identifier. |
Returns : |
the VisuUiPanel that corresponds to this identifier or NULL if none exists. [transfer none] |
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()
.
|
a VisuData object. |
|
a VisuGlView object. |
Since 3.7
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.
|
a boolean. |
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.
|
a VisuUiPanel. |
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.
|
a VisuUiPanel. |
Returns : |
a VisuUiDockWindow object. |
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.
|
a VisuUiPanel. |
Returns : |
a string owned by V_Sim. |
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.
|
a VisuUiPanel. |
Returns : |
a GtkWindow object. [transfer none] |
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.
|
a VisuUiPanel. |
Returns : |
the currently focused VisuData (can be NULL if none). [transfer none] |
VisuBoxed * visu_ui_panel_getFocused (VisuUiPanel *visu_ui_panel
);
Retrieves the currently focused VisuBoxed object in the default VisuUiRenderingWindow.
|
a VisuUiPanel. |
Returns : |
the currently focused
VisuBoxed (can be NULL if none). [transfer none][allow-none]
|
Since 3.7
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.
|
a VisuUiPanel. |
Returns : |
a container widget that should be put in the tab of a GtkNotebook. [transfer none] |
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).
|
a VisuUiPanel. |
Returns : |
a constant string identifying this VisuUiPanel. |
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.
|
a VisuUiPanel. |
Returns : |
an UTF-8 internationalised name (property of V_Sim, should not be freed). |
VisuGlView * visu_ui_panel_getView (VisuUiPanel *visu_ui_panel
);
Convenient routine to get the current VisuGlView, see
visu_ui_panel_class_setCurrent()
.
|
a VisuUiPanel object. |
Returns : |
the current VisuGlView, or NULL. [transfer none] |
Since 3.7
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.
|
a VisuUiPanel. |
Returns : |
TRUE if the given visu_ui_panel is potentialy visible to the user. |
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.
|
a string without space and non internationalised ;. [type filename] |
|
a string in UTF-8 that can be internationalised ; |
|
a shorter name than name , in UTF-8 that can be
internationalised. |
Returns : |
a newly created widget. |
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
.
|
a string without space and non internationalised ; |
|
a string in UTF-8 that can be internationalised ; |
|
a shorter name than name , in UTF-8 that can be
internationalised ; |
|
a path to an icon (should be 20x20). |
Returns : |
a newly created widget. [transfer full] |
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
.
|
a string without space and non internationalised ; |
|
a string in UTF-8 that can be internationalised ; |
|
a shorter name than name , in UTF-8 that can be
internationalised ; |
|
the name of a stock icon. |
Returns : |
a newly created widget. [transfer full] |
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.
|
a VisuUiPanel ; |
|
a VisuUiDockWindow. |
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.
|
a VisuUiPanel ; |
|
a VisuUiDockWindow identifier. |
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()
).
|
a VisuUiPanel ; |
|
a boolean. |
"page-entered"
signalvoid 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.
|
the VisuUiPanel that emits the signal. |
|
user data set when the signal handler was connected. |
Since 3.3