AbstractControlBar |
|
|
FindSlotNumber FirstEmptySlot InstallInto InstallIntoSlot SlotContents |
|
ButtonCount |
Define Class AbstractControlBar; mixes in with Object; attribute ButtonCount: Unsigned, noGetter, noSetter; // The number of buttons in the control bar. operation FindSlotNumber(item: Viewable) : Unsigned, noMethod; // Return the slot number of the item specified, // or return 0 if the item could not be found in the control bar. // Must override. operation SlotContents(slotNumber: Unsigned) : Viewable, noMethod; // Return the item that lives in the specified slot number. // Return nilObject if the slot is empty. // Must override. operation InstallIntoSlot(newItem: Viewable; slotNumber: Unsigned), noMethod; // Install a new item into the control bar. // Must override. operation FirstEmptySlot() : Unsigned; // Returns the slot number of the first unoccupied slot. // Sometimes override to implement more efficiently. overrides InstallInto; // Installs a new item into the control bar using // InstallIntoSlot. If the new item is a control bar gadget, // this method asks the gadget for its preferred slot // number. Otherwise, the first empty slot is chosen. // Rarely override. end class;