ORIGIN '~beta/guienv/guienv'; BODY 'private/colorDialogBody' -- guienvLib: Attributes -- colorDialog: window (* this pattern implements a color selection dialog in which you * can specify a color interactively in a dialog window. You can * specify explicit color values in either RGB or HSV color values, * select colors from a set of predefined color names, or you can * select the color directly in a HSV color space. * * Interactively, a color is selected as a custom color value by * 'dragging' the color from the 'Color' area down into one of the * color spots in the 'Custom' group. *) (# apply:< (* this is invoked each time either 'Apply' or 'Close' button * are pressed. If the 'Close' button was pressed, 'closing' * is 'true'. When invoked, 'c' will contain the selected * color value *) (# c: @color; closing: @boolean enter closing ... #); setColor: (* You can set the custom colors or the selected color by * invoking this operation. If 'no'>0, the corresponding custom * color will be set. If no=0, then the selected color will be * set. In both cases, the new color is expected in 'c'. *) (# no: @integer; c: @color enter (no,c) ... #); getColor: (* You can get the custom colors or the selected color by * invoking this operation. If 'no'>0, the corresponding custom * color will be returned in 'c'. If no=0, then the selected * color will be returned in 'c'. *) (# no: @integer; c: @color enter no ... exit c #); open::< (# ... #); private: @... #)
21.3 ColorDialog Interface | © 1994-2002 Mjølner Informatics |
[Modified: Wednesday July 22nd 1998 at 11:54]
|