![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Signals |
gtk_renderingWindowWidgetgtk_renderingWindowWidget — Defines a complex widget used to render files and print information. |
#define RENDERING_WINDOW_TYPE #define RENDERING_WINDOW (obj) #define RENDERING_WINDOW_CLASS (klass) #define IS_RENDERING_WINDOW (obj) #define IS_RENDERING_WINDOW_CLASS (klass) #define RENDERING_WINDOW_GET_CLASS (obj) VisuRenderingWindow; VisuRenderingWindowClass; GType visu_rendering_window_get_type (void
); #define RENDERING_WINDOW_ID GtkWidget* visu_rendering_window_new (int width
,int height
,gboolean withFrame
,gboolean withToolBar
); GtkWidget* visu_rendering_window_newEmbedded (int width
,int height
); void renderingWindowPush_message (VisuRenderingWindow *window
,gchar *message
); void renderingWindowPop_message (VisuRenderingWindow *window
); GdkPixbuf* renderingWindowGet_backgroundImage (VisuRenderingWindow *window
,guchar **rowData
,gboolean *hasAlphaChannel
,int *width
,int *height
); void renderingWindowFree_backgroundImage (VisuRenderingWindow *window
); void visu_rendering_window_setData (VisuRenderingWindow *window
,VisuData *data
); VisuData* visu_rendering_window_getVisuData (VisuRenderingWindow *window
); void visu_rendering_window_loadFile (VisuRenderingWindow *window
,VisuData *data
,guint iSet
); void renderingWindowOpen_file (VisuRenderingWindow *window
,GtkWindow *parent
); gboolean visu_rendering_window_dump (VisuRenderingWindow *window
,VisuDump *format
,const char *fileName
,gint width
,gint height
,GError **error
,ToolVoidDataFunc functionWait
,gpointer data
); void renderingWindowRedraw (VisuRenderingWindow *window
,gboolean forceRedraw
); void renderingWindowSet_current (VisuRenderingWindow *window
,gboolean force
); void renderingWindowPush_interactive (VisuRenderingWindow *window
,VisuInteractive *inter
); void renderingWindowPop_interactive (VisuRenderingWindow *window
,VisuInteractive *inter
); VisuMarks* visu_rendering_window_getMarks (VisuRenderingWindow *window
); VisuInteractive* renderingWindowClassGet_interactive (); gboolean visu_rendering_window_setDisplayCoordinatesInReduce (gboolean status
); gboolean visu_rendering_window_getDisplayCoordinatesInReduce (); gboolean visu_rendering_window_setAutoAdjust (gboolean status
); gboolean visu_rendering_window_getAutoAdjust ();
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----VisuRenderingWindow
VisuRenderingWindow implements AtkImplementorIface, GtkBuildable and GtkOrientable.
"export" : Run Last / Action "open" : Run Last / Action "reload" : Run Last / Action "show-action-dialog" : Run Last / No Recursion / Action / No Hooks "show-main-panel" : Run Last / No Recursion / Action / No Hooks
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_rendering_window_setData()
. If not
the V_Sim logo is displayed.
The rendering area can receive keyboard or mouse events, see
renderingWindowSet_pickEventListener()
or
renderingWindowSet_observeEventListener()
. Then, callbacks are
defined using renderingWindowSet_interactiveHandlers()
.
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
renderingWindowPush_message()
.
#define RENDERING_WINDOW_TYPE (visu_rendering_window_get_type())
Return the associated GType to the Renderingwindow objects.
#define RENDERING_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), RENDERING_WINDOW_TYPE, VisuRenderingWindow))
Cast the given object to a VisuRenderingWindow object.
|
the widget to cast. |
#define RENDERING_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), RENDERING_WINDOW_TYPE, VisuRenderingWindowClass))
Cast the given class to a VisuRenderingWindowClass object.
|
the class to cast. |
#define IS_RENDERING_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), RENDERING_WINDOW_TYPE))
Return if the given object is a valid VisuRenderingWindow object.
|
the object to test. |
#define IS_RENDERING_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), RENDERING_WINDOW_TYPE))
Return if the given class is a valid VisuRenderingWindowClass class.
|
the class to test. |
#define RENDERING_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, RENDERING_WINDOW_TYPE, VisuRenderingWindowClass))
It returns the class of the given obj
.
|
a GObject to get the class of. |
typedef struct _VisuRenderingWindow VisuRenderingWindow;
Short form for a VisuRenderingWindow_struct structure.
typedef struct _VisuRenderingWindowClass VisuRenderingWindowClass;
Short form for a VisuRenderingWindowClass_struct structure.
GType visu_rendering_window_get_type (void
);
GType are unique numbers to identify objects.
Returns : |
the GType associated with VisuRenderingWindow objects. |
#define RENDERING_WINDOW_ID "ContainerWindow"
The key to get the embedding GtkWindow of a given VisuRenderingWindow
widget, if any. See visu_rendering_window_newEmbedded()
.
GtkWidget* visu_rendering_window_new (int width
,int height
,gboolean withFrame
,gboolean withToolBar
);
A VisuRenderingWindow 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
VisuRenderingWindow widget is created. To embed it into a window
automatically, use visu_rendering_window_newEmbedded()
instead.
|
its desired width ; |
|
its desired height ; |
|
a boolean ; |
|
a boolean. |
Returns : |
a newly created VisuRenderingWindow widget. |
GtkWidget* visu_rendering_window_newEmbedded (int width
,int height
);
Like visu_rendering_window_new()
but create also a GtkWindow to go
around. This widget is reachable using g_object_get_data()
with the
key RENDERING_WINDOW_ID. In that case, no frame is drawn around
the rendering area.
|
its desired width ; |
|
its desired height. |
Returns : |
a newly created VisuRenderingWindow widget.. transfer full. |
void renderingWindowPush_message (VisuRenderingWindow *window
,gchar *message
);
Use this method to add some informations on the status bar.
|
a valid VisuRenderingWindow object ; |
|
an UTF8 string to print on the status bar. |
void renderingWindowPop_message (VisuRenderingWindow *window
);
Remove the last message.
|
a valid VisuRenderingWindow object. |
GdkPixbuf* renderingWindowGet_backgroundImage (VisuRenderingWindow *window
,guchar **rowData
,gboolean *hasAlphaChannel
,int *width
,int *height
);
Use this method to load an image in memory (according to GdkPixbuf specification) and retrieve the row data in memory.
|
a valid VisuRenderingWindow object ; |
|
a pointer to be set on the data in memory ; |
|
a pointer to store if the loaded iage has an alpha channel ; |
|
store the width ; |
|
store the height. |
Returns : |
a pointer to GdkPixbuf that is own by the window object. his image
stay in memory until a call to renderigWindowFree_backgroundImage()
occurs.
|
void renderingWindowFree_backgroundImage (VisuRenderingWindow *window
);
Free loaded background image if exists.
|
a valid VisuRenderingWindow object. |
void visu_rendering_window_setData (VisuRenderingWindow *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 dataReadyForRendering signal,
and all modules that needs to draw something should catch this signal and
draw in the rendering window. If data
is NULL, the dataNotReadyForRendering
is emitted instead.
|
a valid VisuRenderingWindow object ; |
|
a VisuData to render in the given window (can be NULL).
|
VisuData* visu_rendering_window_getVisuData (VisuRenderingWindow *window
);
This method is used to get the VisuData attached to a window.
|
a valid VisuRenderingWindow object. |
Returns : |
the VisuData attached to the window or NULL if none.. transfer none. |
void visu_rendering_window_loadFile (VisuRenderingWindow *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()
.
|
a valid VisuRenderingWindow object. |
|
the VisuData to be loaded. |
|
the id of data to load.
|
void renderingWindowOpen_file (VisuRenderingWindow *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.
|
the window the file will by rendered on ; |
|
the parent window for the filechooser dialog. |
gboolean visu_rendering_window_dump (VisuRenderingWindow *window
,VisuDump *format
,const char *fileName
,gint width
,gint height
,GError **error
,ToolVoidDataFunc functionWait
,gpointer data
);
Call this method to dump the given window
to a file.
|
a valid VisuRenderingWindow object ; |
|
a VisuDump object, corresponding to the write method ; |
|
a string that defined the file to write to ; |
|
an integer ; |
|
an integer ; |
|
a location to store some error (not NULL) ;. allow-none. |
|
a method to call periodically during the dump ;. scope call |
|
some pointer on object to be passed to the wait function.. closure |
Returns : |
TRUE if everything went right. |
void renderingWindowRedraw (VisuRenderingWindow *window
,gboolean forceRedraw
);
Update the OpenGL area of the rendering window if the opengl option
is set to immediate. If not, use forceRedraw
to redraw.
|
a valid VisuRenderingWindow object ; |
|
a boolean. |
void renderingWindowSet_current (VisuRenderingWindow *window
,gboolean force
);
Set the OpenGL area as the current rendering area. If force
is TRUE
then the context is switched whatever buffered value.
|
a valid VisuRenderingWindow object ; |
|
a boolean. |
Since 3.5
void renderingWindowPush_interactive (VisuRenderingWindow *window
,VisuInteractive *inter
);
It adds inter
to the stack of interactive sessions currently
attached to window
and launch it.
|
a VisuRenderingWindow object. |
|
a VisuInteractive object. |
Since 3.6
void renderingWindowPop_interactive (VisuRenderingWindow *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.
|
a VisuRenderingWindow object. |
|
a VisuInteractive object. |
Since 3.6
VisuMarks* visu_rendering_window_getMarks (VisuRenderingWindow *window
);
Get the VisuMarks of the given window
.
|
a VisuRenderingWindow object ; |
Returns : |
a VisuMarks object owned by V_Sim. . transfer none. |
Since 3.6
VisuInteractive* renderingWindowClassGet_interactive ();
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. |
Since 3.6
gboolean visu_rendering_window_setDisplayCoordinatesInReduce
(gboolean status
);
If set, the coordinates of picked nodes are displayed in reduced values.
|
a boolean. |
Returns : |
TRUE if the value has been changed. |
Since 3.6
gboolean visu_rendering_window_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
gboolean visu_rendering_window_setAutoAdjust (gboolean status
);
If set, the camera auto adjust its zoom capability for the data to be full size at zoom level 1.
|
a boolean. |
Returns : |
TRUE if the value has been changed. |
Since 3.6
gboolean visu_rendering_window_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
"export"
signalvoid user_function (VisuRenderingWindow *window, gpointer user_data) : Run Last / Action
Signal emitted when the user ask for data export.
|
the object emitting the signal. |
|
user data set when the signal handler was connected. |
Since 3.6
"open"
signalvoid user_function (VisuRenderingWindow *window, gpointer user_data) : Run Last / Action
Signal emitted when the user ask to open new data.
|
the object emitting the signal. |
|
user data set when the signal handler was connected. |
Since 3.6
"reload"
signalvoid user_function (VisuRenderingWindow *window, gpointer user_data) : Run Last / Action
Signal emitted when the user ask to reload current data.
|
the object emitting the signal. |
|
user data set when the signal handler was connected. |
Since 3.6
"show-action-dialog"
signalvoid user_function (VisuRenderingWindow *window, gpointer user_data) : Run Last / No Recursion / Action / No Hooks
Signal emitted when the user ask to show the action dialog.
|
the object emitting the signal. |
|
user data set when the signal handler was connected. |
Since 3.6
"show-main-panel"
signalvoid user_function (VisuRenderingWindow *window, gpointer user_data) : Run Last / No Recursion / Action / No Hooks
Signal emitted when the user ask to raise the main panel.
|
the object emitting the signal. |
|
user data set when the signal handler was connected. |
Since 3.6