A standard top level window.
Synopsis
gnocl::windows [-option value...]
Screenshot

Options
- -acceptFocus boolean (default:
1)
- Whether the window should receive
the input focus.
- -allowGrow boolean (default:
1)
- Whether the window may be greater
than its children require.
- -allowShrink boolean (default:
1)
- Whether the window can be made
smaller than the place that its children require.
- -borderWidth integer or
one of small, normal or big
- Space in pixel between the children
and the border of the widget.
- -child widget-ID
- Widget ID of the child.
- -data string (default:
"")
- User defined data which can be
retrieved via the cget subcommand.
- -decorated boolean (default:
1)
- Whether the window should be
decorated or not.
- -defaultHeight integer
- Default height of the window.
- -defaultWidget string (default:
"")
- Default widget that recieves focus when toplevel first exposed.
- -defaultWidth integer
- Default width of the window.
- -destroyWithParent boolean
(default: 0)
- Whether the window should be
destroy at the same time as its parent.
- -dragTargets list of
strings
- List of source targets (e.g.
text/plain or application/x-color) which are supported.
- -dropTargets list
of strings
- List of destination targets (e.g.
text/plain or application/x-color) which are supported.
- -height integer
- Height of the window.
- -heightRequest integer
- Requested height of the window.
- -icon percent-string
(default: "")
- Sets the icon of the window which
is
shown, depending on the window manager, in the window decoration, the
window list, and/or if the window is iconified. This must be either a
file name (prefix "%/") or empty.
- -keepAbove boolean
(default: 0)
- Whether or not to keep this window
topmost in the window rendering z-stack.
- -keepBelow boolean (default:
0)
- Whether or not to keep this window
bottommost in the window rendering z-stack.
- -name string
- Name of the widget, can be used to
set options in an rc file.
- -opacity double
(default: 1)
- Request the windowing system to
make window partially transparent,
with opacity 0 being fully transparent and 1 fully opaque.
- -onDelete string
(default: "")
- Tcl command which is executed if
the
widget shall be deleted. If the command returns 0, the widget is not
deleted. Before evaluation the following percent strings are
substituted:
%w widget name
- -onDestroy string
(default: "")
- Tcl command which is executed if
the widget is destroyed. Before evaluation the following percent
strings are substituted:
%w widget name
- -onDragData string
(default: "")
- Tcl command which is executed if
data
is draged from this the widget to another. This command must return the
data to be draged. Before evaluation the following percent strings are
substituted:
%w widget
name
%t time
%T type of
data
- -onDropData string
(default: "")
- Tcl command which is executed if
data
is dropped on the widget. Before evaluation the following percent
strings are substituted:
%w widget
name
%d data
%l length
of
data
%t time
%T type
of data
%x x
coordinate
%y y
coordinate
- -onKeyPress string
(default: "")
- Tcl command which is executed if a
key is pressed while the widget is having the focus. Before evaluation
the following percent strings are substituted:
%w widget
name
%k key
code
as
integer
%K key
code
as
symbol
%a unicode
character,
or
the
empty
string
if there is no corresponding character
%s state
of
the
buttons
and
modifiers
(bitmask)
- -onKeyRelease string
(default: "")
- Tcl command which is executed if a
key is released while the widget is having the focus. Before evaluation
the following percent strings are substituted:
%w widget
name
%k key
code
as
integer
%K key
code
as
symbol
%a unicode
character,
or
the
empty
string
if there is no corresponding character.
%s state
of
the
buttons
and
modifiers
(bitmask)
- -onPopupMenu string
(default: "")
- Tcl command which is executed if
the
"popup-menu" signal is received, which is normally the case if the user
presses Shift-F10. Before evaluation the following percent strings are
substituted:
%w widget
name - -onRealize string
(default: "")
- Tcl command which is executed in
the
global scope if the widget has been realized. Before evaluation the
following percent strings are substituted:
%w widget
name. - -onResize string
(default: "")
- Tcl command which is executed
whenever the window s. Before evaluation the following percent strings
are substituted:
%w widget
name
%x x
coordinate
%y y
coordinate
%W width
of
window
%H height of window
- -onShowHelp string
(default: "")
- Tcl command which is executed in
the
global scope if the "show-help" signal is received, which is normally
the case if the user presses F1 or Ctrl-F1. Before evaluation the
following percent strings are substituted:
%w widget
name
%h help
type:
either
"whatsThis"
or
"tooltip"
- -resizable boolean
(default: 1)
- Whether the user can change the
size of the window.
- -resizeGrip boolean
(default: 1)
- Whether or not to display thw
window corner resize grip. This is only displayed if the window is
resizable.
- -sensitive boolean
(default: 1)
- Whether or not the item is
sensitive to user input.
- -skipPagerHint boolean
(default: 0)
- Whether or not the desktop
environment not to display
the window in the pager.
(A "pager" is any desktop navigation tool such as a workspace
switcher that displays a thumbnail representation of the windows
on the screen.)
- -skipTaskBarHint boolean
(default: 0)
- Whether or not the desktop
environment not to display
the window in the task bar.
- -stick boolean
(default: 0)
- Whether or not the window that it
will appear on all user
desktops. This setting cannot be overriden by the user operation of
desktop setting controls.
- -title string
(default: "")
- Title of the window.
- -tooltip string
(default: "")
- Message that appear next to this
widget when the mouse pointer is held over it for a short amount of
time.
- -transient string
(default: "")
- Specify window as a child window
for the toplevel container of the calling widget. If the widget itself
is the toplevel, then this value will be returned.
- -typeHint string
(default: "")
- Instruct the window
manager to decorate and handle the window in a way which is
suitable to the function of the window in your application.The
range of valid options include: normal,
dialog,
menu, toolbar, splashscreen, utility, dock, and desktop.
- -urgencyHint boolean
(default: 0)
- Whether or not the the desktop
environment to draw
the users attention to the window
- -modal boolean
(default: 0)
- Whether the window is modal, i.e.
it grabs all GTK+ events.
- -visible boolean
(default: 1)
- Whether or not the item is visible.
- -width integer
- Width of the window.
- -widthRequest integer
- Requested width of the window.
- -x integer
- X position of the window.
- -y integer
- Y position of the window.
Description
To be visible each widget must be a direct or indirect children of a
top level window. The window widget is the standard top level window.
Its appearance is dependent of the window manager.
Commands
- id beep
- Emit 'beep' sound from window.
- id center | centre
- Centre window on active screen.
- id cget
option
- Returns the value for one option.
The option may have any of the values accepted by configure.
- id class
- Return class of object, i.e. "window".
- id configure
[-option value...]
- Configures the widget. Option may
have any of the values accepted on creation of the widget.
- id delete
- Deletes the widget and the
associated tcl command.
- id geometry
- TO BE COMPLETED
- id grab
- TO BE COMPLETED
- id hasFocus string
(default: "")
- TO BE COMPLETED
- id hide
- TO BE COMPLETED
- id iconify
?state?
- Iconifies or deiconifies the window
dependent on the value of state. The default value for state is true.
- id jitter integer
- 'Jitter' or horizontally shake the
window for number of times specified by integer (default = 20).
- id pointer
- TO BE COMPLETED
- id present
- TO BE COMPLETED
- id reposition
- TO BE COMPLETED
- id setFocus
- TO BE COMPLETED
- id show
- TO BE COMPLETED
- id ungrab
- TO BE COMPLETED
Example
set label [gnocl::label \ -text "Simple Window"]
gnocl::window \ -title "Window" \ -child $label \ -defaultWidth 200 \ -onDestroy { exit }
|
|