GtkWindow
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,...)
Operations
- New
- ActivateFocus
- GetDefaultWidget
- GetFocus
- GetRole
- GetTitle
- RemoveAccelGroup
- SetAttachedTo
- SetRole
- SetTransientFor
ActivateFocus #
Activates the current focused widget within the window
method : public : ActivateFocus() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if a widget was focused and activated |
GetDefaultWidget #
Gets the default widget for the window — the widget activated when the user presses Enter
method : public : GetDefaultWidget() ~ GtkWidgetReturn
| Type | Description |
|---|---|
| GtkWidget | default GtkWidget |
GetFocus #
Gets the widget that currently has keyboard focus within the window
method : public : GetFocus() ~ GtkWidgetReturn
| Type | Description |
|---|---|
| GtkWidget | focused GtkWidget, Nil if no widget has focus |
GetRole #
Returns the role of the window. See gtk_window_set_role() for further explanation
method : public : GetRole() ~ StringReturn
| Type | Description |
|---|---|
| String | the role of the window if set, or Nil |
GetTitle #
Retrieves the title of the window
method : public : GetTitle() ~ StringReturn
| Type | Description |
|---|---|
| String | the title of the window, or Nil if none has |
New # constructor
Creates a new #GtkWindow, which is a toplevel window that can contain other widgets
New(type:GtkWindowType)Parameters
| Name | Type | Description |
|---|---|---|
| type | GtkWindowType | window type |
RemoveAccelGroup #
Removes the accelerator group
method : public : RemoveAccelGroup(accel_group:GtkAccelGroup) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| accel_group | GtkAccelGroup | the GtkAccelGroup |
SetAttachedTo #
Attaches the window to a specific widget, used for popup-style windows
method : public : SetAttachedTo(attach_widget:GtkWidget) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| attach_widget | GtkWidget | widget to attach to |
SetRole #
This function is only useful on X11, not with other GTK+ targets. In combination with the window title, the window role allows a [window manager][gtk-X11-arch] to identify "the same" window when an application is restarted.
method : public : SetRole(role:String) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| role | String | unique identifier for the window to be used when restoring a session |