ColorEditDialog.st
author Claus Gittinger <cg@exept.de>
Mon, 06 Mar 2006 09:49:01 +0100
changeset 2022 746cc87a768e
parent 1846 65558eb9f4d3
child 2224 6ec083adc6bf
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by eXept Software AG
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
              All Rights Reserved
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"{ Package: 'stx:libtool2' }"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
SimpleDialog subclass:#ColorEditDialog
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	instanceVariableNames:'red green blue hue light saturation colorNameHolder'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	classVariableNames:''
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	category:'Interface-UIPainter'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!ColorEditDialog class methodsFor:'documentation'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
copyright
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
 COPYRIGHT (c) 1995 by eXept Software AG
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
              All Rights Reserved
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 This software is furnished under a license and may be used
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 other person.  No title to or ownership of the software is
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 hereby transferred.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
documentation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    An edit-dialog for colors.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
examples
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
                                                                                [exBegin]                                      
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    |editor color|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
1846
65558eb9f4d3 comments
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
    49
    editor := ColorEditDialog new.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    editor color:(Color green).
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    editor open.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    editor accepted ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
        editor color inspect.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    ]
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
                                                                                [exEnd]
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
!ColorEditDialog class methodsFor:'interface specs'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    "This resource specification was automatically generated
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
     by the UIPainter of ST/X."
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
    "Do not manually edit this!! If it is corrupted,
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
     the UIPainter may not be able to read the specification."
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    "
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
     UIPainter new openOnClass:ColorEditor andSelector:#windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
     ColorEditor new openInterface:#windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
     ColorEditor open
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    "
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    <resource: #canvas>
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    ^ 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
     #(FullSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
        name: windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
        window: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
       (WindowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
          label: 'Define Color'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
          name: 'Define Color'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
          min: (Point 340 260)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
          max: (Point nil 260)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
          bounds: (Rectangle 0 0 453 260)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
        )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
        component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
       (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
          collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
              name: 'RGBLabelPanel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
              layout: (LayoutFrame 0 0 0 0 58 0 76 0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
                    label: 'Red:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
                    name: 'RedLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
                    label: 'Green:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
                    name: 'GreenLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
                    label: 'Blue:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
                    name: 'BlueLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
              name: 'RGBSliderPanel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
              layout: (LayoutFrame 62 0 0 0 -166 1 76 0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
                    name: 'RedSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
                    model: red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
                    backgroundColor: (Color 100.0 0.0 0.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
                    extent: (Point 225 16)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
                    name: 'GreenSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
                    model: green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
                    backgroundColor: (Color 0.0 100.0 0.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
                    extent: (Point 225 16)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
                    name: 'BlueSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
                    model: blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
                    backgroundColor: (Color 0.0 0.0 100.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
                    extent: (Point 225 16)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
              name: 'RGBFieldPanel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
              layout: (LayoutFrame -161 1 0 0 -123 1 76 0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
                    name: 'RedField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
                    model: red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
                    acceptOnPointerLeave: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
                    extent: (Point 38 20)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
                    name: 'GreenField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
                    model: green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
                    acceptOnPointerLeave: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
                    extent: (Point 38 20)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
                    name: 'BlueField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
                    model: blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
                    acceptOnPointerLeave: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
                    extent: (Point 38 20)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
              name: 'HLSLabelPanel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
              layout: (LayoutFrame 0 0 86 0 58 0 163 0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
                    label: 'Hue:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
                    name: 'Label1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
                    label: 'Light:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
                    name: 'Label2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
                    label: 'Sat:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
                    name: 'Label3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
              name: 'HLSSliderPanel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
              layout: (LayoutFrame 62 0 86 0 -166 1 163 0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
                    name: 'Slider1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
                    model: hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
                    stop: 359
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
                    keyboardStep: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
                    extent: (Point 225 16)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
                    name: 'Slider2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
                    model: light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
                    backgroundColor: (Color 66.9993 66.9993 66.9993)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
                    keyboardStep: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
                    extent: (Point 225 16)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
                    name: 'Slider3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
                    model: saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
                    backgroundColor: (Color 66.9993 66.9993 66.9993)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
                    keyboardStep: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
                    extent: (Point 225 16)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
              name: 'HLSFieldPanel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
              layout: (LayoutFrame -161 1 86 0 -123 1 163 0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
                    name: 'EntryField1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
                    model: hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
                    maxValue: 359
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
                    acceptOnPointerLeave: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
                    extent: (Point 38 20)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
                    name: 'EntryField2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
                    model: light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
                    maxValue: 100
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
                    acceptOnPointerLeave: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
                    extent: (Point 38 20)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
                    name: 'EntryField3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
                    model: saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
                    maxValue: 100
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
                    acceptOnPointerLeave: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
                    extent: (Point 38 20)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
           (ViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
              name: 'Box1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
              layout: (LayoutFrame -117 1 4 0.0 -3 1.0 -39 1.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
              level: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
                    label: 'Preview'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
                    name: 'PreviewBox'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
                    layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -2 1.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
                    level: -1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
           (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
              label: 'Color Name:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
              name: 'ColorNameLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
              layout: (LayoutFrame 0 0 190 0 106 0 212 0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
              translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
              adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
           (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
              name: 'ColorNameField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
              layout: (LayoutFrame 110 0 190 0 -123 1 212 0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
              model: colorNameHolder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
              immediateAccept: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
              acceptOnReturn: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
              acceptOnTab: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
              acceptOnLostFocus: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
              acceptOnPointerLeave: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
           (HorizontalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
              name: 'HorizontalPanel1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
              layout: (LayoutFrame 0 0.0 -32 1 0 1.0 0 1.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
              horizontalLayout: fitSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
              verticalLayout: centerMax
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
              reverseOrderIfOKAtLeft: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
                 (ActionButtonSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
                    label: 'Cancel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
                    name: 'CancelButton'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
                    resizeForLabel: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
                    tabable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
                    model: cancel
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
                 (ActionButtonSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
                    label: 'OK'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
                    name: 'OKButton'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
                    resizeForLabel: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
                    tabable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
                    model: accept
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
                    isDefault: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
                    defaultable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
           )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
         
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
        )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
      )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
!ColorEditDialog methodsFor:'accessing'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
color
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
    ^Color redByte:(red value) greenByte:(green value) blueByte:(blue value)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
color:aColor 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
    aColor notNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
        self red value:aColor redByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
        self green value:aColor greenByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
        self blue value:aColor blueByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
    ]
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
colorName
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
    ^ colorNameHolder value
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
!ColorEditDialog methodsFor:'actions'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
colorChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
    |box clr|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
    box := self componentAt: #PreviewBox.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
    box isNil ifTrue:[^ self "called before setup"].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
    clr := self color.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
    box backgroundColor:clr.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
    box foregroundColor:(clr brightness < 0.5 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
                            ifTrue:[Color white] 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
                            ifFalse:[Color black]).
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
colorNameChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
    "compute rgb and hls (if possible)"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
    |clr h|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
    clr := Color name:colorNameHolder value ifIllegal:nil.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
    clr isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
        ^ self
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
    red   value:clr redByte withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
    green value:clr greenByte withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
    blue  value:clr blueByte withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
    h := clr hue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
    h notNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
        hue        value:(h rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
    light      value:(clr light rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
    saturation value:(clr saturation rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
    self colorChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
hlsSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
    "compute rgb"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
    Color withRGBFromHue:hue value light:light value saturation:saturation value do:[:r :g :b |
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
        red    value:(r * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
        green  value:(g * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
        blue   value:(b * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   477
    colorNameHolder value:'' withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   478
    self colorChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   480
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   481
rgbSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   482
    "compute hls"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   484
    |r g b|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   486
    r := self red value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
    g := self green value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
    b := self blue value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   489
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   490
    Color withHLSFromRed:(r * 100 / 255) green:(g * 100 / 255) blue:(b * 100 / 255) do:[:h :l :s |
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
        h isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
            "/ achromatic
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
        ] ifFalse:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
            self hue    value:(h rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
        ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
        self light      value:(l rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
        self saturation value:(s rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
    self colorNameHolder value:'' withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
    self colorChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
!ColorEditDialog methodsFor:'aspects'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
    blue isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
        blue := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
        blue addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
    ^blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
colorNameHolder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
    colorNameHolder isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
        colorNameHolder := '' asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
        colorNameHolder addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
    ^colorNameHolder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
    green isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
        green := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
        green addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
    ^green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
    hue isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
        hue := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
        hue addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
    ^hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
    light isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
        light := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
        light addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
    ^light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
    red isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
        red := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
        red addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
    ^red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
    saturation isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
        saturation := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
        saturation addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
    ^saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
!ColorEditDialog methodsFor:'change & update'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
update:something with:aParameter from:changedObject
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
    (changedObject == red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
    or:[changedObject == green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
    or:[changedObject == blue]]) ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
        ^ self rgbSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
    (changedObject == hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
    or:[changedObject == light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
    or:[changedObject == saturation]]) ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
        ^ self hlsSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
    (changedObject == colorNameHolder) ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
        ^ self colorNameChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
    ^ super update:something with:aParameter from:changedObject
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
!ColorEditDialog methodsFor:'startup & release'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
postBuildWith:aBuilder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
    super postBuildWith:aBuilder.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
    self colorChanged.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
    "Modified: / 6.9.1998 / 22:55:25 / cg"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
!ColorEditDialog class methodsFor:'documentation'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
version
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
    ^ '$Header$'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
! !