Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | (*VisuUiNewWidgetFunc) () |
void | (*VisuUiInitWidgetFunc) () |
void | visu_ui_raiseWarning () |
void | visu_ui_raiseWarningLong () |
void | visu_ui_mainCreate () |
gboolean | visu_ui_runCommandLine () |
void | visu_ui_wait () |
GList * | visu_ui_createFilter () |
GdkPixbuf * | visu_ui_createPixbuf () |
GdkPixbuf * | tool_color_get_stamp () |
void | visu_ui_storeRecent () |
void | visu_ui_createInterface () |
GtkWidget * | visu_ui_buildRenderingWindow () |
GtkWindow * | visu_ui_getPanel () |
GtkWindow * | visu_ui_getRenderWindow () |
GtkWidget * | visu_ui_getRenderWidget () |
void | visu_ui_setRenderWidget () |
There are some common UI routines here. Error messages can be
displayed via dialogs, see visu_ui_raiseWarning()
...
GtkWidget *
(*VisuUiNewWidgetFunc) (void
);
This prototype is used whenever a method is required to create a GtkWidget.
void (*VisuUiInitWidgetFunc) (GtkWindow **panel
,GtkWindow **renderWindow
,GtkWidget **renderArea
);
This prototype is used whenever a method is required to initialise
the GTK interface of V_Sim. panel
must be set to point on the
window of the command panel, renderWindow
must point to the window
containing the rendering area (can be the same than panel
) and
renderArea
contains the widget that does the OpenGL rendering.
void visu_ui_raiseWarning (gchar *action
,gchar *message
,GtkWindow *window
);
Raise a warning window with the action in bold and the message written underneath.
void visu_ui_raiseWarningLong (gchar *action
,gchar *message
,GtkWindow *window
);
Same as visu_ui_raiseWarning()
except that the message is displayed
in a text buffer, ideal for a log.
void
visu_ui_mainCreate (VisuUiInitWidgetFunc panelFunc
);
It initializses the GTK part of V_Sim. During this initialisation,
the panelFunc
is called. It should create all the windows needed
by V_Sim, like the command panel and the rendering area. The return
widget is the widget returned itself by panelFunc
. It must be the
main widget: it is the command panel if used, the window containing
the rendering area if no command panel or the rendering area itself
if no container window.
gboolean
visu_ui_runCommandLine (gpointer data
);
Call the get routines from the command line module and deal with
them. This method is not aware of the panels and is intended to be
called only when the command panel is not used. In the opposite
case, use visu_ui_main_runCommandLine()
instead.
GList * visu_ui_createFilter (GList *list
,GtkWidget *fileChooser
);
Create a list of GtkFileFilter created from the given list of file formats
and attach it to the given fileChooser
.
list |
a GList of ToolFileFormat ;. |
[element-type ToolFileFormat*] |
fileChooser |
a file chooser to associate filters with. |
a list of VisuUiFileFilter. This list should be freed after use.
[element-type VisuUiFileFilter][transfer full]
GdkPixbuf *
visu_ui_createPixbuf (const gchar *filename
);
Replace the create_pixbuf()
routine from Glade. It looks only in
the default pixmap directory of V_Sim to find the given file.
GdkPixbuf * tool_color_get_stamp (const ToolColor *color
,gboolean alpha
);
This method is used by VisuUiColorCombobox object to create little stamps
representing the color. If the pixbuf of such stamps are needed, use
visu_ui_color_combobox_getPixbufFromColor()
if the color is registered in an
already existing VisuUiColorCombobox object or use this method to create
a new stamp.
a pixbuf pointer corresponding to the
little image as shown on a colorComboBox
(use g_object_unref()
to
free this pixbuf).
[transfer full]
Since: 3.7
void
visu_ui_storeRecent (const gchar *filename
);
Add filename
to the list of recent files.
Since: 3.8
void visu_ui_createInterface (GtkWindow **panel
,GtkWindow **renderWindow
,GtkWidget **renderArea
);
A convenient routine that creates a VisuUiRenderingWindow alone. To
create also a command panel, visu_ui_main_class_createMain()
should be
used instead.
GtkWidget *
visu_ui_buildRenderingWindow (VisuUiRenderingWindow *renderWindow
);
Create a GtkWindow with V_sim render window icon and wmclass set
to "V_Sim:v_sim_render". It also set the accelerators of
renderWindow
to the newly created window and pack renderWindow
inside.
Since: 3.7
GtkWindow *
visu_ui_getPanel (void
);
A convenient function to get the command panel window.
GtkWindow *
visu_ui_getRenderWindow (void
);
A convenient function to get the rendering area window.
GtkWidget *
visu_ui_getRenderWidget (void
);
A convenient function to get the rendering area widget.
void
visu_ui_setRenderWidget (VisuUiRenderingWindow *render
);
A convenient function to set the rendering area widget.
Since: 3.7
struct VisuUiFileFilter { GtkFileFilter *gtkFilter; ToolFileFormat* visuFilter; };
Structure used to associate the V_Sim way to store file filters with the Gtk way.
GtkFileFilter * |
the GtkFileFilter associate to |
|
ToolFileFormat * |
a ToolFileFormat object. |