Learn R Programming

gWidgets2 (version 1.0-9)

gwindow: gwindow

Description

top-level window object

Dispatches on type of child (menubar, toolbar, statusbar, widget)

The dispose method destroys the top-level window and its children.

Usage

gwindow(
  title = "Window",
  visible = TRUE,
  name = title,
  width = NULL,
  height = NULL,
  parent = NULL,
  handler = NULL,
  action = NULL,
  ...,
  toolkit = guiToolkit()
)

.gwindow( toolkit, title, visible, name, width, height, parent, handler, action, ... )

# S3 method for GWindow add(obj, child, expand = NULL, fill = NULL, anchor = NULL, ...)

# S3 method for GWindow dispose(obj, ...)

Arguments

title

title for window's title bar. This is the main property and is accessed via svalue or svalue<-.

visible

logical. If codeTRUE window is drawn when constructed. Otherwise, window can be drawn later using visible<-. This value can default to FALSE by setting the option: options("gWidgets:gwindow-default-visible-is-false"=TRUE). There are advantages: windows can draw slowly when adding many items. With gWidgets2RGtk2, the ggraphics widget can like to be added to an undrawn widget as this avoids sizing issue.

name

Name for registry of windows

width

initial width of window

height

initial height of window. This sets height before window manager manages the window

parent

If non-NULL, can be used to suggest default location of window. The argument name was changed from location to parent. This can be a coordinate pair (x,y) with (0,0) the upper left corner, or a gwindow instance. In the latter case the location is suggested by the location of the current window. This is useful for placing dialogs near the parent window.

handler

handler for destroy event

action

action passed t handler

...

ignored

toolkit

toolkit

obj

parent object

child

child widget

expand

NULL or logical. For box containers controls whether a child will expand to fill the allocated space.

fill

NULL or character. For box containers. The value of fill (not always respected) is used to control if expansion happens vertically (y), horizontally (x) or both (both or TRUE). For vertically filled box containers, children always fill horizontally (atleast) and for horizontally filled box containers, children always fill vertically (atleast). This is important to realize when trying to size buttons, say.

anchor

NULL or integer. For box containers. The anchor argument is used to position the child within the parent when there is more space allocated than the child requests. This is specified with a Cartesian pair in -1,0,1 x -1, 0, 1.

Value

a GWindow instance