GtkWindow
A window which will likely contain the rest of the application.
Object Hierarchy
Direct Subclasses
Description
A window is the framework that contains the application. It
provides a context for the other widgets that make up the
application.
As a subclass of GtkBin a window may
only have one child. To add more widgets to a window first
add a widget which can accept more than one child like a
GtkHBox or a GtkVBox.
Then add the other widgets to the child container. Trying to
add more than one child will produce a warning.
Example 155. Adding too many children.
<?php
// Create a new window.
$window = new GtkWindow();
// Add two buttons.
$window->add(new GtkButton('1'));
$window->add(new GtkButton('2'));
/*
Spits out:
Gtk-WARNING **: Attempting to add a widget with type GtkButton to
a GtkWindow, but as a GtkBin subclass a GtkWindow can only
contain one widget at a time; it already contains a widget
of type GtkButton
*/
?> |
GtkWindow is a top level widget. This
means that it may not be added as a child of another widget.
Trying to do so will produce a Gtk-WARNING.
Constructors
--
Creates a new GtkWindow instance.
Fields
allow_grow:
Whether or not the window is allowed to grow.
allow_shrink:
Whether or not the window is allowed to shrink.
configure_notify_received:
Whether or not a window resize configuration event is currently
outstanding.
configure_request_count:
The number of outstanding resize configuration requests.
decorated:
Whether or not the window is currently decorated.
default_widget:
The widget which will be activated by default.
destroy_with_parent:
Whether or not the window will be destroyed with its parent window.
focus_widget:
The widget that currently has keyboard focus.
frame:
The frame window surrounding the window.
frame_bottom:
frame_left:
frame_right:
frame_top:
gravity:
The gravity of the window.
group:
has_focus:
has_frame:
has_user_ref_count:
iconify_initially:
keys_changed_handler:
maximize_initially:
mnemonic_modifier:
modal:
Whether or not the window is modal.
need_default_position:
need_default_size:
position:
stick_initially:
title:
The title of the window.
transient_parent:
type:
The window's type.
type_hint:
A hint describing the window's type.
wm_role:
wmclass_class:
wmclass_name:
Signals
"activate-default"
"activate-focus"
"frame-event"
Emitted when an event other than key-press, key-release, or a change in
focus occurs on the window's frame.
"keys-changed"
Emitted when a mnemonic accelerator is added, removed or changed or the
mnemonic modifier is set.
"move-focus"
Emitted when the user changes the window's focus widget.
"set-focus"
Emitted when the window's focus widget is changed.