File 'gui/action.cls' (part of 'Pool_GuiBase')

Description (short)
button rows
Written by
Andreas Kupries
Description
button rows
Keywords
button rows, widgets

Class 'actionrow'

Description
Maintains a row of buttons and associates commands.
Superclasses
widget
Options
fill
padx
pady
orientation
default
escape
Methods
public
Repack ()
add (name text command)
change (name newtext)
createSubwidgets ()
cvtOrientation (o)
doForSub (cmd)
Membervariables
public
n
names

Options

-fill
Fill flag to use to pack each button
default value: none
-padx
Horizontal padding to use during packing of each button.
default value: 0
-pady
Vertical padding to use during packing of each button.
default value: 0
-orientation
Orientation of the button row.
default value: horizontal
-default
Index of the default button to invoke the complete action
default value: -1
-escape
Index of the default button to cancel
default value: -1

Methods

Repack ()

Called after changes to the value of some options. Executes a relayout of the widget.

add (name text command)

Adds a new button to the row, labels it with text and performs the necessary setup so that command is executed in case of its invocation.
Argument: name Symbolic name of the new button.
Argument: text text to use as label of the new button
Argument: command script to execute in case of an invocation of the new button.

change (name newtext)

Changes the text associated to the button with the symbolic name to newtext.
Argument: name Symbolic name of the button to change.
Argument: newtext text to place into the button.

createSubwidgets ()

Overrides widget:createSubwidgets
Generates subordinate widgets and their layout. Here only the master frame requires configuration. The buttons will be added later via add.
Notes: Called automatically by the object framework.

cvtOrientation (o)

converts row orientation o into a value acceptable to 'pack -side'.
Argument: o orientation to convert.

doForSub (cmd)

Executes the cmd for all buttons which are part of the widget.
Argument: cmd Script to be executed. Occurences of %b will be substituted with the path of the current button.


Membervariables

n
Counter, contains the number of buttons added so far.
initial value: 0
names
Map from symbolic names to button locations

Generated by AutoDoc 2.4 at 09/14/2000, invoked by Andreas Kupries