HasButtonInTitleBar |
|
|
ButtonBox Draw Tap |
|
ButtonIsShowing ButtonOperation |
| Field | Type | |
|---|---|---|
| HasButtonInTitleBar: | buttonBorder: | Border |
| buttonWidth: | Micron | |
| closeBoxMargin: | Micron | |
| buttonName: | Text | |
| buttonTarget: | Object | |
| buttonOperation: | OperationNumber | |
| buttonIsShowing: | Boolean |
Define Class HasButtonInTitleBar; mixes in with TitledWindow; field buttonBorder: Border; // border used to frame button in title bar field buttonWidth: Micron; // width of button in title bar field closeBoxMargin: Micron; // distance from right edge of button to close box field buttonName: Text; // label for button field buttonTarget: Object, weak; // object on which to call buttonOperation field buttonOperation: OperationNumber, getter, setter; // operation number to call on buttonTarget field buttonIsShowing: Boolean, getter; // used by ButtonIsShowing attribute operation ButtonBox(var content: Box); // returns box used for button in title bar attribute ButtonIsShowing: Boolean; // getter returns value in field; // setter sets field and dirties button box; // call setter to show or hide button based on current state; attribute ButtonOperation: OperationNumber; overrides Draw; // draws button in title bar overrides Tap; // handles taps in button in title bar end class;