CwRebar
CwRebar contains one or more bands; each band can contain a single widget. Interactions with the child widget can be sent to a listener such as the rebar or the application to which the rebar belongs.
Limitations to CwRebar
The rebar control consists of one or more bands, each of which may contain a child widget control. Neither the color of the rebar control nor the colors of the individual bands is settable. Rebars with fixed-width bands should be placed in a fixed size window.
Protocol
Protocols can be divided into serveral groups:
•pertaining to creation
•pertaining to the rebar
•pertaining to a band contained in the rebar. Those bands are instances of CwBand.
creation
createBand: theName argBlock: argBlock
Create a CwBand as a child of the receiver.
rebar
autoSize: aBolean
specifies whether a band resizes automatically
deleteAllItems
Delete all the items from the receiver and release all OS resources associated with the items.
deleteItem: anItem
Delete the item from the receiver and release all OS resources associated with the item.
deleteItems: items
Delete the specified items from the receiver and release all OS resources associated with the items.
fixedOrder: aBoolean
specifies wthether the bars always appear in the same order. If the bars may be reordered, the user can drag and drop the bands to reorder them.
variableHeight: aBoolean
Sets whether the bands in the rebar need not all share the same height.CwBand protocol
Pertaining to bands in the rebar
backgroundBitmap: a CgPixmap
Specifies the pixmap that appears as the item's background.
bandLabel: aString
Specifies the label that appears on the item.
height: anInteger
Specifies the height of the band in pixels.
widget: aCwWidget
Specifies the child widget of the band.
width: anInteger
Specifies the width of the band in pixels.
Several methods control the way the band looks and how the bands are laid out within the rebar.
alwaysGripper: aBoolean
if true, always show a gripper separating bands. (default is true)
break: aBoolean
if true, start the band on a new row. (default is false)
childToEdge: aBoolean
– make any child widget fill the band (default is true)
fixed Size: aBoolean
if true, do not alter the size. (default is false)
never Grip: aBoolean
if true, never show a gripper separating bands. (default is false)
variable Height: aBoolean
if true, the height of the band may differ from the height of other bands in the rebar control. (default is false)
The following protocols affect the width of all the bands in the rebar:
hide
Make the band invisible.
maximize
Make the band as large as possible.
minimize
Make the band as small as possible.
show
Make the band visible.
Callbacks and Events
The progress bar has no callbacks or events specific to it.
Example
Create a Rebar with a single band. That band contains a pushbutton.
| aButton1 band1 |
rebar := CwRebar
createWidget: 'rebar'
parent: shell
argBlock: nil.
...
aButton1 := CwPushButton createManagedWidget: 'Button 2'
parent: rebar
argBlock: [:w | w
labelString: 'Button 2';
x: 100;
width: 75;
height: 26;
marginWidth: 17].
...
band1 := rebar
createBand: 'band1'
argBlock: [:w |
w
bandLabel: 'band1';
widget: aButton1].
...
aButton1
addCallback: XmNactivateCallback
receiver: self
selector: #singleSelection:clientData:callData:
Last modified date: 04/21/2022