Window


Object Hierarchy:

Gtk.Window Gtk.Window Gtk.Window Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Window Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.Window Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.Window Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget

Description:

[ CCode ( type_id = "gtk_window_get_type ()" ) ]
public class Window : Bin, Implementor, Buildable

A GtkWindow is a toplevel window which can contain other widgets.

Windows normally have decorations that are under the control of the windowing system and allow the user to manipulate the window (resize it, move it, close it,...).

GtkWindow as GtkBuildable

The GtkWindow implementation of the Buildable interface supports a custom `< accel-groups>` element, which supports any number of `<group>` elements representing the AccelGroup objects you want to add to your window (synonymous with add_accel_group.

It also supports the `<initial-focus>` element, whose name property names the widget to receive the focus when the window is mapped.

An example of a UI definition fragment with accel groups:

<object class="GtkWindow">
<accel-groups>
<group name="accelgroup1"/>
</accel-groups>
<initial-focus name="thunderclap"/>
</object>

...

<object class="GtkAccelGroup" id="accelgroup1"/>

The GtkWindow implementation of the Buildable interface supports setting a child as the titlebar by specifying “titlebar” as the “type” attribute of a `<child>` element.

CSS nodes

window.background
├── decoration
├── <titlebar child>.titlebar [.default-decoration]
╰── <child>
main CSS node with name window and style class .background, and a subnode with name decoration.

Style classes that are typically used with the main CSS node are .csd (when client-side decorations are in use), .solid-csd (for client-side decorations without invisible borders), .ssd (used by mutter when rendering server-side decorations). GtkWindow also represents window states with the following style classes on the main node: .tiled, .maximized, .fullscreen. Specialized types of window often add their own discriminating style classes, such as .popup or .tooltip.

GtkWindow adds the .titlebar and .default-decoration style classes to the widget that is added as a titlebar child.

GtkWindow


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Static methods:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor



2022 vala-language.org