## Gwy3DWindow Gwy3DWindow — 3D data display window |

## Functions

GtkWidget * | gwy_3d_window_new ()
GtkWidget * | gwy_3d_window_get_3d_view ()
void | gwy_3d_window_add_action_widget ()
void | gwy_3d_window_add_small_toolbar_button ()
void | gwy_3d_window_set_overlay_chooser ()
void | gwy_3d_window_class_set_tooltips ()
GtkTooltips * | gwy_3d_window_class_get_tooltips ()

## Types and Values

struct | Gwy3DWindow
struct | Gwy3DWindowClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkBin
                            ╰── GtkWindow
                                ╰── Gwy3DWindow

## Implemented Interfaces

Gwy3DWindow implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <libgwydgets/gwydgets.h>

## Description

Gwy3DWindow encapsulates a Gwy3DView together with appropriate controls. You can create a 3D window for a 3D view with `gwy_3d_window_new()`. It has an `action area' below the controls where additional widgets can be packed with `gwy_3d_window_add_action_widget()`.

## Functions

### gwy_3d_window_new ()

    GtkWidget *
    gwy_3d_window_new (Gwy3DView *gwy3dview);

Creates a new OpenGL 3D data displaying window.

#### Parameters

gwy3dview | A Gwy3DView containing the data-displaying widget to show. |

#### Returns

A newly created widget, as GtkWidget.

### gwy_3d_window_get_3d_view ()

    GtkWidget *
    gwy_3d_window_get_3d_view (Gwy3DWindow *gwy3dwindow);

Returns the Gwy3DView widget this 3D window currently shows.

#### Parameters

gwy3dwindow | A 3D data view window. |

#### Returns

The currently shown GwyDataView.

### gwy_3d_window_add_action_widget ()

    void
    gwy_3d_window_add_action_widget (Gwy3DWindow *gwy3dwindow,
                                     GtkWidget *widget);

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

The action area is located under the parameter notebook.

#### Parameters

gwy3dwindow | A 3D data view window. |
widget | A widget to pack into the action area. |

### gwy_3d_window_add_small_toolbar_button ()

    void
    gwy_3d_window_add_small_toolbar_button
                                   (Gwy3DWindow *gwy3dwindow,
                                    const gchar *stock_id,
                                    const gchar *tooltip,
                                    GCallback callback,
                                    gpointer cbdata);

Adds a button to small `gwy3dwindow` 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

gwy3dwindow | A 3D data view window. |
stock_id | Button pixmap stock id, like GTK_STOCK_SAVE. |
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_3d_window_set_overlay_chooser ()

    void
    gwy_3d_window_set_overlay_chooser (Gwy3DWindow *gwy3dwindow,
                                       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_3d_view_set_ovlay()` appropriately upon selection of data in the chooser.

#### Parameters

gwy3dwindow | A 3D data view window. |
chooser | Overlay chooser widget. |

Since: 2.26

### gwy_3d_window_class_set_tooltips ()

    void
    gwy_3d_window_class_set_tooltips (GtkTooltips *tips);

`gwy_3d_window_class_set_tooltips` is deprecated and should not be used in newly-written code.

Sets the tooltips object to use for adding tooltips to 3D window parts.

This function does not do anything useful. Do not use it.

This is a class method. It affects only newly cerated 3D windows, existing 3D windows will continue to use the tooltips they were constructed with.

If no class tooltips object is set before first Gwy3DWindow is created, the class instantiates one on its own. You can normally obtain it with `gwy_3d_window_class_get_tooltips()` then. The class takes a reference on the tooltips in either case.

#### Parameters

tips | Tooltips object Gwy3DWindow's should use for setting tooltips. A `NULL` value disables tooltips altogether. |

### gwy_3d_window_class_get_tooltips ()

    GtkTooltips *
    gwy_3d_window_class_get_tooltips (void);

`gwy_3d_window_class_get_tooltips` is deprecated and should not be used in newly-written code.

Gets the tooltips object used for adding tooltips to 3D window parts.

This function does not do anything useful. Do not use it.

#### Returns

The GtkTooltips object.

## Types and Values

### struct Gwy3DWindow

    struct Gwy3DWindow;

### struct Gwy3DWindowClass

    struct Gwy3DWindowClass {
        GtkWindowClass parent_class;

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

## See Also

Gwy3DView -- the basic 3D data display widget