ColorEditDialog.st
author Claus Gittinger <cg@exept.de>
Sun, 24 Jun 2012 18:42:06 +0200
changeset 2892 a1349bc5e2fe
parent 2831 3dbef5687ae6
child 2904 bd6cacbab203
permissions -rw-r--r--
changed: #updateImplementorsOf: #updateListAfterPatternSearch:
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
"{ Package: 'stx:libtool2' }"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
SimpleDialog subclass:#ColorEditDialog
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
    15
	instanceVariableNames:'red green blue hue light saturation colorNameHolder
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    16
		htmlColorNameHolder colorDefinitionStringHolder previewBox
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    17
		brightnessStringHolder'
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'Interface-UIPainter'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!ColorEditDialog class methodsFor:'documentation'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
copyright
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
 COPYRIGHT (c) 1995 by eXept Software AG
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
              All Rights Reserved
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 hereby transferred.
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
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    An edit-dialog for colors.
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
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
examples
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
                                                                                [exBegin]                                      
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    |editor color|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
1846
65558eb9f4d3 comments
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
    50
    editor := ColorEditDialog new.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    editor color:(Color green).
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    editor open.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    editor accepted ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
        editor color inspect.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    ]
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
                                                                                [exEnd]
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
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    60
!ColorEditDialog class methodsFor:'help specs'!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    61
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    62
flyByHelpSpec
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    63
    "This resource specification was automatically generated
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    64
     by the UIHelpTool of ST/X."
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    65
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    66
    "Do not manually edit this!! If it is corrupted,
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    67
     the UIHelpTool may not be able to read the specification."
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    68
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    69
    "
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    70
     UIHelpTool openOnClass:ColorEditDialog    
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    71
    "
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    72
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    73
    <resource: #help>
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    74
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    75
    ^ super flyByHelpSpec addPairsFrom:#(
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    76
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    77
#pickColor
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    78
'Pick a Color from the Screen'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    79
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    80
)
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    81
!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    82
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    83
helpSpec
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    84
    "This resource specification was automatically generated
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    85
     by the UIHelpTool of ST/X."
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    86
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    87
    "Do not manually edit this!! If it is corrupted,
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    88
     the UIHelpTool may not be able to read the specification."
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    89
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    90
    "
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    91
     UIHelpTool openOnClass:ColorEditDialog    
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    92
    "
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    93
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    94
    <resource: #help>
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    95
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    96
    ^ super helpSpec addPairsFrom:#(
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    97
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    98
#brightness
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    99
'The Color''s brightness value (0..1)'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   100
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   101
#colorDefinitionString
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   102
'A Smalltalk expression to construct the color.'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   103
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   104
#colorName
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   105
'The standard colorname (as used in the X-Window System), if known'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   106
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   107
#copyToClipboard
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   108
'Copy the color to the clipboard'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   109
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   110
#hlsMixer
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   111
'Mix color from hls (hue-light-saturation) components'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   112
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   113
#htmlColorName
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   114
'The color as used in an HTML page.'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   115
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   116
#pasteFromClipboard
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   117
'Paste color from the Clipboard'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   118
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   119
#rgbMixer
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   120
'Mix color from rgb (red-green-blue) components'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   121
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   122
)
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   123
! !
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   124
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   125
!ColorEditDialog class methodsFor:'image specs'!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   126
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   127
pickColorIcon
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   128
    ^ ToolbarIconLibrary pipette16x16Icon
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   129
! !
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   130
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
!ColorEditDialog class methodsFor:'interface specs'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
    "This resource specification was automatically generated
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
     by the UIPainter of ST/X."
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
    "Do not manually edit this!! If it is corrupted,
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
     the UIPainter may not be able to read the specification."
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
    "
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   141
     UIPainter new openOnClass:ColorEditDialog andSelector:#windowSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   142
     ColorEditDialog new openInterface:#windowSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   143
     ColorEditDialog open
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
    "
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    <resource: #canvas>
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
    ^ 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
     #(FullSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
        name: windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
        window: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
       (WindowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
          label: 'Define Color'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
          name: 'Define Color'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   155
          min: (Point 440 360)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   156
          max: (Point 440 360)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   157
          bounds: (Rectangle 0 0 440 360)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
        )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
        component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
       (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
          collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
              name: 'RGBLabelPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   164
              layout: (LayoutFrame 0 0 0 0 70 0 76 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
                    label: 'Red:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
                    name: 'RedLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
                    label: 'Green:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
                    name: 'GreenLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
                    label: 'Blue:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
                    name: 'BlueLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
              name: 'RGBSliderPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   199
              layout: (LayoutFrame 70 0 0 0 -177 1 76 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
                    name: 'RedSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
                    model: red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
                    backgroundColor: (Color 100.0 0.0 0.0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   215
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
                    name: 'GreenSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
                    model: green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
                    backgroundColor: (Color 0.0 100.0 0.0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   225
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
                    name: 'BlueSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
                    model: blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
                    backgroundColor: (Color 0.0 0.0 100.0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   235
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
              name: 'RGBFieldPanel'
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   243
              layout: (LayoutFrame -173 1 0 0 -143 1 76 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
                    name: 'RedField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
                    model: red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   259
                    extent: (Point 28 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
                    name: 'GreenField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
                    model: green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   269
                    extent: (Point 28 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
                    name: 'BlueField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
                    model: blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   279
                    extent: (Point 28 20)
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   280
                  )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   281
                 )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   282
               
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   283
              )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   284
            )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   285
           (VerticalPanelViewSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   286
              name: 'RGBFieldPanelHex'
2274
e09282d74ec3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   287
              layout: (LayoutFrame -141 1 0 0 -119 1 76 0)
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   288
              horizontalLayout: fit
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   289
              verticalLayout: spreadSpace
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   290
              horizontalSpace: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   291
              verticalSpace: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   292
              component: 
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   293
             (SpecCollection
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   294
                collection: (
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   295
                 (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   296
                    name: 'EntryField4'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   297
                    model: red
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   298
                    type: hexIntegerInRange
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   299
                    numChars: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   300
                    minValue: 0
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   301
                    maxValue: 255
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   302
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   303
                    extent: (Point 20 20)
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   304
                  )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   305
                 (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   306
                    name: 'EntryField5'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   307
                    model: green
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   308
                    type: hexIntegerInRange
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   309
                    numChars: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   310
                    minValue: 0
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   311
                    maxValue: 255
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   312
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   313
                    extent: (Point 20 20)
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   314
                  )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   315
                 (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   316
                    name: 'EntryField6'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   317
                    model: blue
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   318
                    type: hexIntegerInRange
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   319
                    numChars: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   320
                    minValue: 0
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   321
                    maxValue: 255
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   322
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   323
                    extent: (Point 20 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
              name: 'HLSLabelPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   331
              layout: (LayoutFrame 0 0 86 0 70 0 163 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
                    label: 'Hue:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
                    name: 'Label1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
                    label: 'Light:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
                    name: 'Label2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
                 (LabelSpec
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   354
                    label: 'Saturation:'
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
                    name: 'Label3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
              name: 'HLSSliderPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   366
              layout: (LayoutFrame 70 0 86 0 -177 1 163 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
                    name: 'Slider1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
                    model: hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
                    stop: 359
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
                    keyboardStep: 1
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   382
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
                    name: 'Slider2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
                    model: light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
                    step: 1
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   390
                    backgroundColor: (Color 66.9993133440146 66.9993133440146 66.9993133440146)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
                    keyboardStep: 1
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   392
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
                    name: 'Slider3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
                    model: saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
                    step: 1
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   400
                    backgroundColor: (Color 66.9993133440146 66.9993133440146 66.9993133440146)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
                    keyboardStep: 1
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   402
                    extent: (Point 193 16)
1840
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
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
              name: 'HLSFieldPanel'
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   410
              layout: (LayoutFrame -173 1 86 0 -143 1 163 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
                    name: 'EntryField1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
                    model: hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
                    maxValue: 359
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   426
                    extent: (Point 28 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
                    name: 'EntryField2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
                    model: light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
                    maxValue: 100
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   436
                    extent: (Point 28 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
                    name: 'EntryField3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
                    model: saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
                    maxValue: 100
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   446
                    extent: (Point 28 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
           (ViewSpec
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   453
              name: 'PreviewBoxFrame'
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
              layout: (LayoutFrame -117 1 4 0.0 -3 1.0 -39 1.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
              level: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
                    label: 'Preview'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
                    name: 'PreviewBox'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
                    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
   463
                    level: -1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
                    translateLabel: true
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   465
                    postBuildCallback: postBuildPreviewBox:
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
                  )
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
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
           (LabelSpec
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   472
              label: 'Brightness:'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   473
              name: 'Label5'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   474
              layout: (LayoutFrame 0 0 175 0 70 0 197 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   475
              activeHelpKey: brightness
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   476
              translateLabel: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   477
              adjust: right
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   478
            )
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   479
           (InputFieldSpec
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   480
              name: 'EntryField8'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   481
              layout: (LayoutFrame 71 0 175 0 -296 1 197 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   482
              activeHelpKey: brightness
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   483
              model: brightnessStringHolder
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   484
              isReadOnly: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   485
              immediateAccept: false
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   486
              acceptOnReturn: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   487
              acceptOnTab: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   488
              acceptOnLostFocus: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   489
              acceptOnPointerLeave: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   490
            )
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   491
           (LabelSpec
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
              label: 'Color Name:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
              name: 'ColorNameLabel'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   494
              layout: (LayoutFrame 2 0 214 0 115 0 236 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   495
              activeHelpKey: colorName
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
              translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
              adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
           (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
              name: 'ColorNameField'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   501
              layout: (LayoutFrame 117 0 214 0 -122 1 236 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   502
              activeHelpKey: colorName
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
              model: colorNameHolder
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   504
              immediateAccept: false
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   505
              acceptOnReturn: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   506
              acceptOnTab: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   507
              acceptOnLostFocus: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   508
              acceptOnPointerLeave: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   509
            )
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   510
           (LabelSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   511
              label: 'HTML Color Name:'
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   512
              name: 'HTMLColorNameLabel'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   513
              layout: (LayoutFrame 2 0 240 0 115 0 262 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   514
              activeHelpKey: htmlColorName
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   515
              translateLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   516
              adjust: right
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   517
            )
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   518
           (InputFieldSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   519
              name: 'MLHTColorNameFieldField'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   520
              layout: (LayoutFrame 117 0 240 0 -122 1 262 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   521
              activeHelpKey: htmlColorName
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   522
              model: htmlColorNameHolder
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   523
              immediateAccept: false
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
              acceptOnReturn: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
              acceptOnTab: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
              acceptOnLostFocus: true
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   527
              acceptOnPointerLeave: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   528
            )
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   529
           (LabelSpec
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   530
              label: 'Color Definition:'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   531
              name: 'Label4'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   532
              layout: (LayoutFrame 2 0 266 0 115 0 288 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   533
              activeHelpKey: colorDefinitionString
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   534
              translateLabel: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   535
              adjust: right
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   536
            )
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   537
           (InputFieldSpec
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   538
              name: 'EntryField7'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   539
              layout: (LayoutFrame 117 0 266 0 -122 1 288 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   540
              activeHelpKey: colorDefinitionString
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   541
              model: colorDefinitionStringHolder
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   542
              isReadOnly: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   543
              immediateAccept: false
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   544
              acceptOnReturn: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   545
              acceptOnTab: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   546
              acceptOnLostFocus: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   547
              acceptOnPointerLeave: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   548
            )
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   549
           (ActionButtonSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   550
              label: 'Copy Color'
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   551
              name: 'CopyColor'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   552
              layout: (LayoutFrame 12 0 298 0 100 0 320 0)
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   553
              activeHelpKey: hlsMixer
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   554
              translateLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   555
              resizeForLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   556
              tabable: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   557
              model: copyColor
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   558
            )
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   559
           (ActionButtonSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   560
              label: 'Paste Color'
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   561
              name: 'PasteColor'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   562
              layout: (LayoutFrame 108 0 298 0 196 0 320 0)
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   563
              translateLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   564
              resizeForLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   565
              tabable: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   566
              model: pasteColor
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   567
            )
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   568
           (ActionButtonSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   569
              label: 'pickColorIcon'
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   570
              name: 'Button1'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   571
              layout: (LayoutFrame 285 0 298 0 312 0 325 0)
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   572
              activeHelpKey: pickColor
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   573
              hasCharacterOrientedLabel: false
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   574
              translateLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   575
              resizeForLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   576
              tabable: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   577
              model: pickColor
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
           (HorizontalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
              name: 'HorizontalPanel1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
              layout: (LayoutFrame 0 0.0 -32 1 0 1.0 0 1.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
              horizontalLayout: fitSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
              verticalLayout: centerMax
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
              reverseOrderIfOKAtLeft: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
                 (ActionButtonSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
                    label: 'Cancel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
                    name: 'CancelButton'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
                    resizeForLabel: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
                    tabable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
                    model: cancel
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
                 (ActionButtonSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
                    label: 'OK'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
                    name: 'OKButton'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
                    resizeForLabel: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
                    tabable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
                    model: accept
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
                    isDefault: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
                    defaultable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
           )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615
         
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
        )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   617
      )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   618
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
2347
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   620
!ColorEditDialog class methodsFor:'startup'!
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   621
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   622
openOn:aColor
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   623
    ^ self new
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   624
        color:aColor;
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   625
        open;
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   626
        yourself
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   627
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   628
    "
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   629
     self openOn:Color red
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   630
    "
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   631
! !
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   632
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   633
!ColorEditDialog methodsFor:'accessing'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   634
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   635
color
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   636
    |colorName|
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   637
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   638
    colorName := self colorName.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   639
    colorName notEmptyOrNil ifTrue:[
2574
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   640
        ^ Color name:(colorName asSymbol)
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   641
    ].
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   642
    ^ Color redByte:(red value) greenByte:(green value) blueByte:(blue value)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   643
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   644
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   645
color:aColor
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   646
    aColor isNil ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   647
        ^ self
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   648
    ].
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   649
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   650
    aColor isSymbol ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   651
        self colorNameHolder value:aColor
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   652
    ] ifFalse:[
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   653
        self red value:aColor redByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   654
        self green value:aColor greenByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
        self blue value:aColor blueByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
    ]
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   657
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   658
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   659
colorName
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   660
    ^ colorNameHolder value
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   661
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   662
2574
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   663
colorNameOrColor
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   664
    |colorName|
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   665
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   666
    colorName := self colorName.
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   667
    colorName notEmptyOrNil ifTrue:[
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   668
        "/ ^ Color name:(colorName asSymbol)
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   669
        ^ colorName asSymbol
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   670
    ].
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   671
    ^ Color redByte:(red value) greenByte:(green value) blueByte:(blue value)
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   672
!
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   673
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   674
htmlColorName
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   675
    ^ htmlColorNameHolder value
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   676
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   677
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   678
!ColorEditDialog methodsFor:'actions'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   679
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   680
colorChanged
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   681
    |clr nm|
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   682
2574
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   683
    clr := self colorNameOrColor.
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   684
    clr isColor ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   685
        "not a symbol"
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   686
        self setPreview:clr.
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   687
        self htmlColorNameHolder value:(clr htmlPrintString) withoutNotifying:self.
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   688
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   689
        nm := #(white red green blue black) detect:[:nm | clr = (Color perform:nm)] ifNone:nil.
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   690
        nm notNil ifTrue:[
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   691
            self colorDefinitionStringHolder value:('Color ',nm).
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   692
        ] ifFalse:[
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   693
            self colorDefinitionStringHolder value:('Color rgbValue:16r',(clr rgbValue hexPrintString leftPaddedTo:6 with:$0)).
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   694
        ].
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   695
        self brightnessStringHolder value:((clr brightness asFixedPoint:3) printString).
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   696
    ].
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   697
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   698
    "Modified: / 27-01-2011 / 12:54:04 / cg"
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   699
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   700
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   701
colorChangedTo:clr
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   702
    "compute rgb and hls (if possible)"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   703
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   704
    |h|
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   705
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   706
    self red   value:clr redByte withoutNotifying:self.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   707
    self green value:clr greenByte withoutNotifying:self.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   708
    self blue  value:clr blueByte withoutNotifying:self.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   709
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   710
    h := clr hue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
    h notNil ifTrue:[
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   712
        self hue        value:(h rounded) withoutNotifying:self.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
    ].
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   714
    self light      value:(clr light rounded) withoutNotifying:self.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   715
    self saturation value:(clr saturation rounded) withoutNotifying:self.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   716
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   717
    self colorChanged
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   718
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   719
    "Modified: / 27-01-2011 / 12:48:28 / cg"
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   721
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   722
colorNameChanged
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   723
    "compute rgb and hls (if possible)"
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   724
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   725
    |clr|
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   726
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   727
    clr := Color name:colorNameHolder value ifIllegal:nil.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   728
    clr isNil ifTrue:[
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   729
        ^ self
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   730
    ].
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   731
    self colorChangedTo:clr.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   732
!
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   733
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   734
copyColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   735
    self window setClipboardObject:self color
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   736
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   737
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   738
copyColorName
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   739
    self window setClipboardText:self htmlColorName
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   740
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   741
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   742
hlsSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
    "compute rgb"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
    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
   746
        red    value:(r * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
        green  value:(g * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
        blue   value:(b * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
    colorNameHolder value:'' withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
    self colorChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   754
htmlColorNameChanged
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   755
    "compute rgb and hls (if possible)"
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   756
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   757
    |clr|
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   758
2417
cc89133cc041 changed #htmlColorNameChanged - ignore empty color names
Stefan Vogel <sv@exept.de>
parents: 2347
diff changeset
   759
    htmlColorNameHolder value isEmptyOrNil ifTrue:[
cc89133cc041 changed #htmlColorNameChanged - ignore empty color names
Stefan Vogel <sv@exept.de>
parents: 2347
diff changeset
   760
        ^ self.
cc89133cc041 changed #htmlColorNameChanged - ignore empty color names
Stefan Vogel <sv@exept.de>
parents: 2347
diff changeset
   761
    ].
cc89133cc041 changed #htmlColorNameChanged - ignore empty color names
Stefan Vogel <sv@exept.de>
parents: 2347
diff changeset
   762
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   763
    clr := Color rgbValue:(Integer 
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   764
                                readFrom:(htmlColorNameHolder value copyFrom:2)
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   765
                                radix:16
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   766
                                onError:nil).
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   767
    clr isNil ifTrue:[
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   768
        ^ self
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   769
    ].
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   770
    self colorNameHolder value:'' withoutNotifying:self.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   771
    self colorChangedTo:clr.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   772
!
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   773
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   774
pasteColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   775
    |copyBufferColor|
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   776
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   777
    copyBufferColor := self window getClipboardObject.
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   778
    copyBufferColor isColor ifFalse:[
2521
5cfd5fcd7bd3 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 2417
diff changeset
   779
        UserPreferences current beepInEditor ifTrue:[                
5cfd5fcd7bd3 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 2417
diff changeset
   780
            self window beep.
5cfd5fcd7bd3 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 2417
diff changeset
   781
        ].
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   782
        ^ self
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   783
    ].
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   784
    self color:copyBufferColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   785
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   786
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   787
pickColor
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   788
    |color|
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   789
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   790
    color := Color fromUserWithFeedBack:[:clr | self setPreview:clr].
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   791
    color notNil ifTrue:[
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   792
        self color:color.
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   793
    ]
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   794
!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   795
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   796
rgbSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
    "compute hls"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   798
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
    |r g b|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   801
    r := self red value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
    g := self green value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   803
    b := self blue value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   804
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
    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
   806
        h isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   807
            "/ achromatic
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   808
        ] ifFalse:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   809
            self hue    value:(h rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   810
        ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   811
        self light      value:(l rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   812
        self saturation value:(s rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   813
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   814
    self colorNameHolder value:'' withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
    self colorChanged
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   816
!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   817
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   818
setPreview:color
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   819
    previewBox isNil ifTrue:[^ self "called before setup"].
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   820
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   821
    previewBox backgroundColor:color.
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   822
    previewBox foregroundColor:(color brightness < 0.5 
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   823
                            ifTrue:[Color white] 
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   824
                            ifFalse:[Color black]).
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   825
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   826
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   827
!ColorEditDialog methodsFor:'aspects'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   828
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   829
blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   830
    blue isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   831
        blue := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   832
        blue addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   833
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   834
    ^blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   835
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   836
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   837
brightnessStringHolder
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   838
    brightnessStringHolder isNil ifTrue:[
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   839
        brightnessStringHolder := 0 asValue.
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   840
        "/ brightness addDependent:self.
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   841
    ].
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   842
    ^ brightnessStringHolder
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   843
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   844
    "Created: / 27-01-2011 / 12:48:00 / cg"
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   845
!
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   846
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   847
colorDefinitionStringHolder
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   848
    colorDefinitionStringHolder isNil ifTrue:[
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   849
        colorDefinitionStringHolder := '' asValue.
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   850
        "/ colorDefinitionStringHolder addDependent:self.
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   851
    ].
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   852
    ^colorDefinitionStringHolder
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   853
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   854
    "Created: / 27-01-2011 / 12:38:12 / cg"
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   855
!
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   856
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   857
colorNameHolder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   858
    colorNameHolder isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   859
        colorNameHolder := '' asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   860
        colorNameHolder addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   861
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   862
    ^colorNameHolder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   863
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   864
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   865
green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   866
    green isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   867
        green := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   868
        green addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   869
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   870
    ^green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   871
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   872
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   873
htmlColorNameHolder
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   874
    htmlColorNameHolder isNil ifTrue:[
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   875
        htmlColorNameHolder := '' asValue.
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   876
        htmlColorNameHolder addDependent:self.
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   877
    ].
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   878
    ^htmlColorNameHolder
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   879
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   880
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   881
hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   882
    hue isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   883
        hue := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   884
        hue addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   885
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   886
    ^hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   887
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   888
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   889
light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   890
    light isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   891
        light := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   892
        light addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   893
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   894
    ^light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   895
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   896
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   897
red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   898
    red isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   899
        red := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   900
        red addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   901
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   902
    ^red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   903
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   904
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   905
saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   906
    saturation isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   907
        saturation := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   908
        saturation addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   909
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   910
    ^saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   911
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   912
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   913
!ColorEditDialog methodsFor:'change & update'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   914
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   915
update:something with:aParameter from:changedObject
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   916
    (changedObject == red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   917
    or:[changedObject == green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   918
    or:[changedObject == blue]]) ifTrue:[
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   919
        self rgbSliderChanged.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   920
        ^ self
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   921
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   922
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   923
    (changedObject == hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   924
    or:[changedObject == light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   925
    or:[changedObject == saturation]]) ifTrue:[
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   926
        self hlsSliderChanged.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   927
        ^ self
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   928
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   929
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   930
    (changedObject == colorNameHolder) ifTrue:[
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   931
        self colorNameChanged.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   932
        ^ self
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   933
    ].
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   934
    (changedObject == htmlColorNameHolder) ifTrue:[
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   935
        self htmlColorNameChanged.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   936
        ^ self
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   937
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   938
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   939
    super update:something with:aParameter from:changedObject
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   940
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   941
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   942
!ColorEditDialog methodsFor:'startup & release'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   943
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   944
postBuildPreviewBox:aView
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   945
    previewBox := aView
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   946
!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   947
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   948
postBuildWith:aBuilder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   949
    super postBuildWith:aBuilder.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   950
    self colorChanged.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   951
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   952
    "Modified: / 6.9.1998 / 22:55:25 / cg"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   953
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   954
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   955
!ColorEditDialog class methodsFor:'documentation'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   956
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   957
version
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   958
    ^ '$Header$'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   959
!
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   960
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   961
version_CVS
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   962
    ^ '$Header$'
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   963
! !