![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Signals |
#define TOOL_PANEL_TYPE #define TOOL_PANEL (obj) #define TOOL_PANEL_CLASS (klass) #define IS_TOOL_PANEL (obj) #define IS_TOOL_PANEL_CLASS (klass) ToolPanel; ToolPanelClass; GType toolPanel_get_type (void
); DockWindow; GtkWidget* toolPanelNew (gchar *id
,gchar *name
,gchar *tabName
); GtkWidget* toolPanelNew_withIconFromPath (gchar *id
,gchar *name
,gchar *tabName
,const gchar *iconPath
); GtkWidget* toolPanelNew_withIconFromStock (gchar *id
,gchar *name
,gchar *tabName
,const gchar *stock
); GtkWidget* toolPanelGet_headerWidget (ToolPanel *toolPanel
); const gchar* toolPanelGet_label (ToolPanel *toolPanel
); const gchar* toolPanelGet_id (ToolPanel *toolPanel
); void toolPanelSet_dockable (ToolPanel *toolPanel
,gboolean value
); void toolPanelAttach (ToolPanel *toolPanel
,DockWindow *dock
); void toolPanelDetach (ToolPanel *toolPanel
); GtkWindow* toolPanelGet_containerWindow (ToolPanel *toolPanel
); DockWindow* toolPanelGet_container (ToolPanel *toolPanel
); const gchar* toolPanelGet_containerId (ToolPanel *toolPanel
); void toolPanelSet_container (ToolPanel *toolPanel
,DockWindow *window
); void toolPanelSet_containerId (ToolPanel *toolPanel
,const gchar *id
); VisuData* toolPanelGet_visuData (ToolPanel *toolPanel
); gboolean toolPanelGet_visible (ToolPanel *toolPanel
); GtkWidget* dockWindowGet_container (DockWindow *dock
); GtkWidget* dockWindowGet_notebook (DockWindow *dock
); GtkWidget* dockWindowGet_window (DockWindow *dock
); void toolPanelClassSet_visuData (VisuData *dataObj
); void toolPanelClassSet_headerVisibility (gboolean status
); DockWindow* toolPanelClassGet_commandPanel (void
); DockWindow* toolPanelClassGet_container (const gchar *id
); ToolPanel* toolPanelClassGet_toolPanelById (const gchar *id
); GList* toolPanelClassGet_allToolPanels (void
); GList* toolPanelClassGet_allWindows (void
); void toolPanelClassGet_windowCharacteristics (DockWindow *dock
,gchar **id
,gboolean *visibility
,gint *x
,gint *y
,gint *width
,gint *height
); void toolPanelClassSet_windowSize (const gchar *id
,guint width
,guint height
); void toolPanelClassSet_windowPosition (const gchar *id
,guint x
,guint y
); void toolPanelClassSet_windowVisibility (const gchar *id
,gboolean visible
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkAlignment +----ToolPanel
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 ToolPanel. A ToolPanel is refered by its name and has a position and a size. These values can be stored in the parameter files.
#define TOOL_PANEL_TYPE (toolPanel_get_type ())
Return the associated GType to the ToolPanel objects.
#define TOOL_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOL_PANEL_TYPE, ToolPanel))
Cast the given object to a ToolPanel object.
|
the widget to cast. |
#define TOOL_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOL_PANEL_TYPE, ToolPanelClass))
Cast the given class to a ToolPanelClass object.
|
the class to cast. |
#define IS_TOOL_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOL_PANEL_TYPE))
Return if the given object is a valid ToolPanel object.
|
the object to test. |
#define IS_TOOL_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOL_PANEL_TYPE))
Return if the given class is a valid ToolPanelClass class.
|
the class to test. |
typedef struct _ToolPanelClass ToolPanelClass;
Short form for a ToolPanelClass_struct structure.
GType toolPanel_get_type (void
);
GType are unique numbers to identify objects.
typedef struct _DockWindow DockWindow;
Short name for the structure of containers of ToolPanel.
GtkWidget* toolPanelNew (gchar *id
,gchar *name
,gchar *tabName
);
Create a new ToolPanel with the given id
, displaying name
in the
combo box of a DockWindow and tabName
in the tab of the page
notebook.
|
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.
|
Returns : |
a newly created widget. |
GtkWidget* toolPanelNew_withIconFromPath (gchar *id
,gchar *name
,gchar *tabName
,const gchar *iconPath
);
Create a new ToolPanel with the given id
, displaying name
in the
combo box of a DockWindow 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. |
GtkWidget* toolPanelNew_withIconFromStock (gchar *id
,gchar *name
,gchar *tabName
,const gchar *stock
);
Create a new ToolPanel with the given id
, displaying name
in the
combo box of a DockWindow 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. |
GtkWidget* toolPanelGet_headerWidget (ToolPanel *toolPanel
);
The ToolPanel 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 ToolPanel. |
Returns : |
a container widget that should be put in the tab of a GtkNotebook. |
const gchar* toolPanelGet_label (ToolPanel *toolPanel
);
The ToolPanel has two label, a short one, used in the tab of a GtkNotebook and one longer. This routine gets the longer.
|
a ToolPanel. |
Returns : |
an UTF-8 internationalised name (property of V_Sim, should not be freed). |
const gchar* toolPanelGet_id (ToolPanel *toolPanel
);
The ToolPanel can be identifyed by an id (a string without space, usually using ASCII characters only).
void toolPanelSet_dockable (ToolPanel *toolPanel
,gboolean value
);
A ToolPanel can be moved between different DockWindow or
not. This ability is controlled by the dockable flag. Change it
with this method. If toolPanel
is set dockable, then, it can be
hidden or moved to another or a new DockWindow with the pop-up
memu that is triggered by a small button in the header widget (see
toolPanelGet_headerWidget()
).
|
a ToolPanel ; |
|
a boolean. |
void toolPanelAttach (ToolPanel *toolPanel
,DockWindow *dock
);
Put the given toolPanel
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 toolPanelGet_headerWidget()
.
|
a ToolPanel ; |
|
a DockWindow. |
void toolPanelDetach (ToolPanel *toolPanel
);
Remove the given toolPanel
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 DockWindow.
|
a ToolPanel. |
GtkWindow* toolPanelGet_containerWindow (ToolPanel *toolPanel
);
Return the GtkWindow that the given toolPanel
is rendered in or
NULL if the toolPanel
is currently dettached.
DockWindow* toolPanelGet_container (ToolPanel *toolPanel
);
Return the DockWindow that the given toolPanel
is attached to or
NULL if the toolPanel
is currently dettached.
|
a ToolPanel. |
Returns : |
a DockWindow object. |
const gchar* toolPanelGet_containerId (ToolPanel *toolPanel
);
Return the identifying string of the DockWindow that the given
toolPanel
is attached to or NULL if the toolPanel
is currently dettached.
|
a ToolPanel. |
Returns : |
a string owned by V_Sim. |
void toolPanelSet_container (ToolPanel *toolPanel
,DockWindow *window
);
Change the container of a toolPanel. If it is currently attached to a DockWindow, it firstly detachs it.
|
a ToolPanel ; |
|
a DockWindow. |
void toolPanelSet_containerId (ToolPanel *toolPanel
,const gchar *id
);
Change the container of a toolPanel using the given id
. If it is
currently attached to a DockWindow, it firstly detachs it.
|
a ToolPanel ; |
|
a DockWindow identifier. |
VisuData* toolPanelGet_visuData (ToolPanel *toolPanel
);
The toolPanel
is supposed to work on a VisuData, this routine can
be used to get it.
gboolean toolPanelGet_visible (ToolPanel *toolPanel
);
This is used to retrieve if the toolPanel
is currently realised
and the visualised page of the GtkNotebook it is associated to.
|
a ToolPanel. |
Returns : |
TRUE if the given toolPanel is potentialy visible to the user.
|
GtkWidget* dockWindowGet_container (DockWindow *dock
);
A dock window is a small utility window with a list of ToolPanel.
This window can be embedded in a container or have its own
GtkWindow. This routine get the top-level container inside a given
DockWindow. If you prefer to get the GtkWindow containing the
DockWindow use dockWindowGet_window()
instead.
|
a dock window descriptor. |
Returns : |
a top-level container (usually a GtkVBox). |
GtkWidget* dockWindowGet_notebook (DockWindow *dock
);
A dock window is a small utility window with a list of ToolPanel. All ToolPanel are contained in a GtkNotebook. This routine gets it.
|
a dock window descriptor. |
Returns : |
the GtkNotebook containing the ToolPanel of this DockWindow. |
GtkWidget* dockWindowGet_window (DockWindow *dock
);
A dock window is a small utility window with a list of ToolPanel. This window can be embedded in a container or have its own GtkWindow. This routine get the GtkWindow containing the DockWindow 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. |
void toolPanelClassSet_visuData (VisuData *dataObj
);
Set the currently focussed VisuData. It then can be retrieve using
toolPanelGet_visuData()
.
|
a VisuData object. |
void toolPanelClassSet_headerVisibility (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. |
DockWindow* toolPanelClassGet_commandPanel (void
);
There is always a DockWindow that is inside the command panel. This routine gets it.
Returns : |
the DockWindow that is inside the command panel. |
DockWindow* toolPanelClassGet_container (const gchar *id
);
This routine associates a DockWindow identifier to the object pointer.
|
a DockWindow identifier. |
Returns : |
the DockWindow that corresponds to this identifier. The dock window is built if not currently exist. |
ToolPanel* toolPanelClassGet_toolPanelById (const gchar *id
);
This routine associates a ToolPanel identifier to the object pointer.
GList* toolPanelClassGet_allToolPanels (void
);
This routine can be used to know all existing ToolPanel.
Returns : |
a newly created list (use g_list_free() on it after use).
|
GList* toolPanelClassGet_allWindows (void
);
This routine can be used to know all existing DockWindow.
Returns : |
a newly created list (use g_list_free() on it after use).
|
void toolPanelClassGet_windowCharacteristics (DockWindow *dock
,gchar **id
,gboolean *visibility
,gint *x
,gint *y
,gint *width
,gint *height
);
A routine to know everything about a DockWindow.
|
a DockWindow 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. |
void toolPanelClassSet_windowSize (const gchar *id
,guint width
,guint height
);
Change the size of the given DockWindow. The size is possibly adapted to avoid been out of screen.
|
a DockWindow identifier ; |
|
the requested width ; |
|
the requested height. |
void toolPanelClassSet_windowPosition (const gchar *id
,guint x
,guint y
);
Change the position of the given DockWindow. The position is possibly adapted to avoid been out of screen.
|
a DockWindow identifier ; |
|
the requested x position ; |
|
the requested y position. |
void toolPanelClassSet_windowVisibility (const gchar *id
,gboolean visible
);
Change the visibility of a DockWindow. If hidden, the dock is added to the list of hidden DockWindow that can be shown again using the pop-up menu on every visible DockWindow. The 'Main' dock window can not be hidden.
|
a DockWindow identifier ; |
|
a boolean. |
"page-entered"
signalvoid user_function (ToolPanel *panel, gpointer user_data) : Run First / Action
This signal is emitted when a page of the GtkNotebook with all the V_Sim panels is entered.
|
the ToolPanel that emits the signal. |
|
user data set when the signal handler was connected. |
Since 3.3