GwyGLWindow

GwyGLWindow — OpenGL data display window

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── GwyGLWindow

Implemented Interfaces

GwyGLWindow implements AtkImplementorIface and GtkBuildable.

Includes

#include <libgwydgets/gwydgets.h>

Description

GwyGLWindow encapsulates a GwyGLView together with appropriate controls. You can create an OpenGL window for an OpenGL view with gwy_gl_window_new(). It has an `action area' below the controls where additional widgets can be packed with gwy_gl_window_add_action_widget().

Functions

gwy_gl_window_new()

GtkWidget *
gwy_gl_window_new (GwyContainer *data);

Creates a new OpenGL 3D data displaying window.

Parameters

data

A GwyContainer containing the data to display.

 

Returns

A newly created widget, as GtkWidget.


gwy_gl_window_get_gl_view()

GtkWidget *
gwy_gl_window_get_gl_view (GwyGLWindow *window);

Returns the GwyGLView widget this 3D window currently shows.

Parameters

window

An OpenGL data view window.

 

Returns

The currently shown GwyDataView.


gwy_gl_window_add_action_widget()

void
gwy_gl_window_add_action_widget (GwyGLWindow *window,
                                 GtkWidget *widget);

Adds a widget (usually a button) to 3D window action area.

The action area is located under the parameter notebook.

Parameters

window

An OpenGL data view window.

 

widget

A widget to pack into the action area.

 

gwy_gl_window_add_small_toolbar_button()

void
gwy_gl_window_add_small_toolbar_button
                               (GwyGLWindow *window,
                                const gchar *icon_name,
                                const gchar *tooltip,
                                GCallback callback,
                                gpointer cbdata);

Adds a button to small window toolbar.

The small toolbar is those visible when full controls are hidden. Due to space constraints the button must be contain only a pixmap.

Parameters

window

An OpenGL data view window.

 

icon_name

Button pixmap icon name, like "gtk-save" or GWY_ICON_CROP.

 

tooltip

Button tooltip.

 

callback

Callback action for "clicked" signal. It is connected swapped, that is it gets cbdata as its first argument, the clicked button as the last.

 

cbdata

Data to pass to callback .

 

gwy_gl_window_set_overlay_chooser()

void
gwy_gl_window_set_overlay_chooser (GwyGLWindow *window,
                                   GtkWidget *chooser);

Sets the overlay chooser widget of a 3D window.

Once set, the overlay chooser widget cannot be changed.

The 3D window does not use the provided widget in any way, it just places it in an appropriate place in the user interface. It is expected that the caller will set up the layer and call gwy_gl_view_set_ovlay() appropriately upon selection of data in the chooser.

Parameters

window

An OpenGL data view window.

 

chooser

Overlay chooser widget.

 

gwy_gl_window_get_overlay_chooser()

GtkWidget *
gwy_gl_window_get_overlay_chooser (GwyGLWindow *window);

Types and Values

struct GwyGLWindow

struct GwyGLWindow;

struct GwyGLWindowClass

struct GwyGLWindowClass {
    GtkWindowClass parent_class;

    void (*reserved1)(void);
    void (*reserved2)(void);
    void (*reserved3)(void);
    void (*reserved4)(void);
};

See Also

GwyGLView -- the basic OpenGL 3D data display widget