v_sim.UiGlWidget

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget v_sim.UiGlWidget v_sim.UiGlWidget Gtk.Widget->v_sim.UiGlWidget

Subclasses:

None

Methods

Inherited:

Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

v_sim.UiGlWidgetClass (1), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

getCurrentContext ()

class

new (contextIsDirect)

setCurrent (force)

setModel (model)

Virtual Methods

Inherited:

Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Widget (39)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Widget (69), GObject.Object (1)

Class Details

class v_sim.UiGlWidget(**kwargs)
Bases:

Gtk.Widget

Abstract:

No

Structure:

v_sim.UiGlWidgetClass

Short name to address VisuUiGlWidget_struct objects.

classmethod getCurrentContext()
Returns:

the v_sim.UiGlWidget with the current OpenGL context.

Return type:

v_sim.UiGlWidget

Class routine that returns the OpenGL widget which has the current context.

classmethod new(contextIsDirect)
Parameters:

contextIsDirect (bool) – a boolean.

Returns:

a newly created widget.

Return type:

Gtk.Widget

Create a new OpenGL area inside a GTK widget. If contextIsDirect then it tries to initialise the OpenGL context to a direct one.

setCurrent(force)
Parameters:

force (bool) – a boolean.

Returns:

True if succeed.

Return type:

bool

Make this object current. This means that all future OpenGL primitive will be rendered on this surface. If force is True, the GL routine is actually called whereas in other cases, if self believe being already current, nothing is done.

setModel(model)
Parameters:

model (v_sim.GlExtSet) – a v_sim.GlExtSet object.

This method is used to defined a redraw method for the OpenGL area. By doing this the area will automatically redraw itself when necessary. Before doing it it calls v_sim.UiGlWidget.setCurrent(), and after it calls swapGl().