ColorEditDialog.st
author Claus Gittinger <cg@exept.de>
Wed, 31 Jul 2013 13:13:51 +0200
changeset 3040 b62c4b71910c
parent 2941 15df48eba1c4
child 3175 c205d80403ef
permissions -rw-r--r--
class: Tools::ViewTreeInspectorApplication changed: #submenuInspector: #submenuInterface:
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
2904
bd6cacbab203 changed: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 2831
diff changeset
   102
'A Smalltalk expression to construct the color'
2831
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
2904
bd6cacbab203 changed: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 2831
diff changeset
   114
'The color as used in an HTML page'
2831
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
)
2904
bd6cacbab203 changed: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 2831
diff changeset
   123
bd6cacbab203 changed: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 2831
diff changeset
   124
    "Modified: / 09-08-2012 / 09:35:29 / cg"
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   125
! !
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
!ColorEditDialog class methodsFor:'image specs'!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   128
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   129
pickColorIcon
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   130
    ^ ToolbarIconLibrary pipette16x16Icon
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   131
! !
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   132
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
!ColorEditDialog class methodsFor:'interface specs'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
    "This resource specification was automatically generated
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
     by the UIPainter of ST/X."
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
    "Do not manually edit this!! If it is corrupted,
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
     the UIPainter may not be able to read the specification."
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
    "
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   143
     UIPainter new openOnClass:ColorEditDialog andSelector:#windowSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   144
     ColorEditDialog new openInterface:#windowSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   145
     ColorEditDialog open
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    "
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
    <resource: #canvas>
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
    ^ 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
     #(FullSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
        name: windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
        window: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
       (WindowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
          label: 'Define Color'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
          name: 'Define Color'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   157
          min: (Point 440 360)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   158
          max: (Point 440 360)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   159
          bounds: (Rectangle 0 0 440 360)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
        )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
        component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
       (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
          collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
              name: 'RGBLabelPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   166
              layout: (LayoutFrame 0 0 0 0 70 0 76 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
                    label: 'Red:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
                    name: 'RedLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
                    label: 'Green:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
                    name: 'GreenLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
                    label: 'Blue:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
                    name: 'BlueLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
                    useDefaultExtent: true
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
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
              name: 'RGBSliderPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   201
              layout: (LayoutFrame 70 0 0 0 -177 1 76 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
                    name: 'RedSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
                    model: red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
                    backgroundColor: (Color 100.0 0.0 0.0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   217
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
                    name: 'GreenSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
                    model: green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
                    backgroundColor: (Color 0.0 100.0 0.0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   227
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
                    name: 'BlueSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
                    model: blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
                    backgroundColor: (Color 0.0 0.0 100.0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   237
                    extent: (Point 193 16)
1840
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
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
              name: 'RGBFieldPanel'
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   245
              layout: (LayoutFrame -173 1 0 0 -143 1 76 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
                    name: 'RedField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
                    model: red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   261
                    extent: (Point 28 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
                    name: 'GreenField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
                    model: green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   271
                    extent: (Point 28 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
                    name: 'BlueField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
                    model: blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   281
                    extent: (Point 28 20)
2224
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
              )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   286
            )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   287
           (VerticalPanelViewSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   288
              name: 'RGBFieldPanelHex'
2274
e09282d74ec3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   289
              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
   290
              horizontalLayout: fit
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   291
              verticalLayout: spreadSpace
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   292
              horizontalSpace: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   293
              verticalSpace: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   294
              component: 
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   295
             (SpecCollection
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   296
                collection: (
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   297
                 (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   298
                    name: 'EntryField4'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   299
                    model: red
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   300
                    type: hexIntegerInRange
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   301
                    numChars: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   302
                    minValue: 0
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   303
                    maxValue: 255
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   304
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   305
                    extent: (Point 20 20)
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   306
                  )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   307
                 (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   308
                    name: 'EntryField5'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   309
                    model: green
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   310
                    type: hexIntegerInRange
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   311
                    numChars: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   312
                    minValue: 0
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   313
                    maxValue: 255
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   314
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   315
                    extent: (Point 20 20)
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   316
                  )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   317
                 (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   318
                    name: 'EntryField6'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   319
                    model: blue
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   320
                    type: hexIntegerInRange
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   321
                    numChars: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   322
                    minValue: 0
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   323
                    maxValue: 255
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   324
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   325
                    extent: (Point 20 20)
1840
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
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
              name: 'HLSLabelPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   333
              layout: (LayoutFrame 0 0 86 0 70 0 163 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
                    label: 'Hue:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
                    name: 'Label1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
                    label: 'Light:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
                    name: 'Label2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
                 (LabelSpec
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   356
                    label: 'Saturation:'
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
                    name: 'Label3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
                    useDefaultExtent: true
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
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
              name: 'HLSSliderPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   368
              layout: (LayoutFrame 70 0 86 0 -177 1 163 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
                    name: 'Slider1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
                    model: hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
                    stop: 359
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
                    keyboardStep: 1
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   384
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
                    name: 'Slider2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
                    model: light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
                    step: 1
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   392
                    backgroundColor: (Color 66.9993133440146 66.9993133440146 66.9993133440146)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
                    keyboardStep: 1
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   394
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
                    name: 'Slider3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
                    model: saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
                    step: 1
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   402
                    backgroundColor: (Color 66.9993133440146 66.9993133440146 66.9993133440146)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
                    keyboardStep: 1
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   404
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
              name: 'HLSFieldPanel'
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   412
              layout: (LayoutFrame -173 1 86 0 -143 1 163 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
                    name: 'EntryField1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
                    model: hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
                    maxValue: 359
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   428
                    extent: (Point 28 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
                    name: 'EntryField2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
                    model: light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
                    maxValue: 100
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   438
                    extent: (Point 28 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
                    name: 'EntryField3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
                    model: saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
                    maxValue: 100
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
                    acceptOnPointerLeave: false
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   448
                    extent: (Point 28 20)
1840
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
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
           (ViewSpec
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   455
              name: 'PreviewBoxFrame'
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
              layout: (LayoutFrame -117 1 4 0.0 -3 1.0 -39 1.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
              level: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
                    label: 'Preview'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
                    name: 'PreviewBox'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
                    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
   465
                    level: -1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
                    translateLabel: true
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   467
                    postBuildCallback: postBuildPreviewBox:
1840
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
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
           (LabelSpec
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   474
              label: 'Brightness:'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   475
              name: 'Label5'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   476
              layout: (LayoutFrame 0 0 175 0 70 0 197 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   477
              activeHelpKey: brightness
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   478
              translateLabel: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   479
              adjust: right
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   480
            )
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   481
           (InputFieldSpec
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   482
              name: 'EntryField8'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   483
              layout: (LayoutFrame 71 0 175 0 -296 1 197 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   484
              activeHelpKey: brightness
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   485
              model: brightnessStringHolder
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   486
              isReadOnly: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   487
              immediateAccept: false
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   488
              acceptOnReturn: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   489
              acceptOnTab: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   490
              acceptOnLostFocus: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   491
              acceptOnPointerLeave: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   492
            )
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   493
           (LabelSpec
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
              label: 'Color Name:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
              name: 'ColorNameLabel'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   496
              layout: (LayoutFrame 2 0 214 0 115 0 236 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   497
              activeHelpKey: colorName
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
              translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
              adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
           (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
              name: 'ColorNameField'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   503
              layout: (LayoutFrame 117 0 214 0 -122 1 236 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   504
              activeHelpKey: colorName
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
              model: colorNameHolder
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   506
              immediateAccept: false
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   507
              acceptOnReturn: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   508
              acceptOnTab: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   509
              acceptOnLostFocus: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   510
              acceptOnPointerLeave: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   511
            )
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   512
           (LabelSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   513
              label: 'HTML Color Name:'
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   514
              name: 'HTMLColorNameLabel'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   515
              layout: (LayoutFrame 2 0 240 0 115 0 262 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   516
              activeHelpKey: htmlColorName
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   517
              translateLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   518
              adjust: right
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   519
            )
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   520
           (InputFieldSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   521
              name: 'MLHTColorNameFieldField'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   522
              layout: (LayoutFrame 117 0 240 0 -122 1 262 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   523
              activeHelpKey: htmlColorName
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   524
              model: htmlColorNameHolder
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   525
              immediateAccept: false
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
              acceptOnReturn: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
              acceptOnTab: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
              acceptOnLostFocus: true
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   529
              acceptOnPointerLeave: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   530
            )
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   531
           (LabelSpec
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   532
              label: 'Color Definition:'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   533
              name: 'Label4'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   534
              layout: (LayoutFrame 2 0 266 0 115 0 288 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   535
              activeHelpKey: colorDefinitionString
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   536
              translateLabel: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   537
              adjust: right
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   538
            )
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   539
           (InputFieldSpec
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   540
              name: 'EntryField7'
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   541
              layout: (LayoutFrame 117 0 266 0 -122 1 288 0)
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   542
              activeHelpKey: colorDefinitionString
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   543
              model: colorDefinitionStringHolder
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   544
              isReadOnly: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   545
              immediateAccept: false
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   546
              acceptOnReturn: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   547
              acceptOnTab: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   548
              acceptOnLostFocus: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   549
              acceptOnPointerLeave: true
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   550
            )
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   551
           (ActionButtonSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   552
              label: 'Copy Color'
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   553
              name: 'CopyColor'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   554
              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
   555
              activeHelpKey: hlsMixer
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   556
              translateLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   557
              resizeForLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   558
              tabable: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   559
              model: copyColor
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   560
            )
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   561
           (ActionButtonSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   562
              label: 'Paste Color'
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   563
              name: 'PasteColor'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   564
              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
   565
              translateLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   566
              resizeForLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   567
              tabable: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   568
              model: pasteColor
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   569
            )
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   570
           (ActionButtonSpec
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   571
              label: 'pickColorIcon'
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   572
              name: 'Button1'
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   573
              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
   574
              activeHelpKey: pickColor
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   575
              hasCharacterOrientedLabel: false
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   576
              translateLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   577
              resizeForLabel: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   578
              tabable: true
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   579
              model: pickColor
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
           (HorizontalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
              name: 'HorizontalPanel1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
              layout: (LayoutFrame 0 0.0 -32 1 0 1.0 0 1.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
              horizontalLayout: fitSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
              verticalLayout: centerMax
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
              reverseOrderIfOKAtLeft: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
                 (ActionButtonSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
                    label: 'Cancel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
                    name: 'CancelButton'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
                    resizeForLabel: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
                    tabable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
                    model: cancel
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
                 (ActionButtonSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
                    label: 'OK'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
                    name: 'OKButton'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
                    resizeForLabel: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
                    tabable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
                    model: accept
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
                    isDefault: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
                    defaultable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
                    useDefaultExtent: true
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
      )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   620
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   621
2347
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   622
!ColorEditDialog class methodsFor:'startup'!
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   623
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   624
openOn:aColor
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   625
    ^ self new
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   626
        color:aColor;
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   627
        open;
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   628
        yourself
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   629
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   630
    "
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   631
     self openOn:Color red
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   632
    "
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   633
! !
c37fb02785bc +openOn:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   634
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   635
!ColorEditDialog methodsFor:'accessing'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   636
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   637
color
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   638
    |colorName|
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   639
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   640
    colorName := self colorName.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   641
    colorName notEmptyOrNil ifTrue:[
2574
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   642
        ^ Color name:(colorName asSymbol)
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   643
    ].
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   644
    ^ Color redByte:(red value) greenByte:(green value) blueByte:(blue value)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   645
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   646
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   647
color:aColor
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   648
    aColor isNil ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   649
        ^ self
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   650
    ].
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   651
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   652
    aColor isSymbol ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   653
        self colorNameHolder value:aColor
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   654
    ] ifFalse:[
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
        self red value:aColor redByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
        self green value:aColor greenByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   657
        self blue value:aColor blueByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   658
    ]
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   659
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   660
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   661
colorName
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   662
    ^ colorNameHolder value
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   663
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   664
2574
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   665
colorNameOrColor
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   666
    |colorName|
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   667
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   668
    colorName := self colorName.
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   669
    colorName notEmptyOrNil ifTrue:[
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   670
        "/ ^ Color name:(colorName asSymbol)
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   671
        ^ colorName asSymbol
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
    ^ 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
   674
!
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   675
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   676
htmlColorName
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   677
    ^ htmlColorNameHolder value
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   678
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   679
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   680
!ColorEditDialog methodsFor:'actions'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   681
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   682
colorChanged
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   683
    |clr nm|
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   684
2574
ae2448675efb deliver a color, when asked for one !
Claus Gittinger <cg@exept.de>
parents: 2521
diff changeset
   685
    clr := self colorNameOrColor.
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   686
    clr isColor ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   687
        "not a symbol"
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   688
        self setPreview:clr.
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   689
        self htmlColorNameHolder value:(clr htmlPrintString) withoutNotifying:self.
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   690
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   691
        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
   692
        nm notNil ifTrue:[
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   693
            self colorDefinitionStringHolder value:('Color ',nm).
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   694
        ] ifFalse:[
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   695
            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
   696
        ].
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   697
        self brightnessStringHolder value:((clr brightness asFixedPoint:3) printString).
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   698
    ].
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   699
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   700
    "Modified: / 27-01-2011 / 12:54:04 / cg"
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   701
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   702
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   703
colorChangedTo:clr
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   704
    "compute rgb and hls (if possible)"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   705
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   706
    |h|
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   707
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   708
    self red   value:clr redByte withoutNotifying:self.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   709
    self green value:clr greenByte withoutNotifying:self.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   710
    self blue  value:clr blueByte withoutNotifying:self.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   712
    h := clr hue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
    h notNil ifTrue:[
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   714
        self hue        value:(h rounded) withoutNotifying:self.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
    ].
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   716
    self light      value:(clr light rounded) withoutNotifying:self.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   717
    self saturation value:(clr saturation rounded) withoutNotifying:self.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   718
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   719
    self colorChanged
2831
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   720
3dbef5687ae6 class definition
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
   721
    "Modified: / 27-01-2011 / 12:48:28 / cg"
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   722
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   723
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   724
colorNameChanged
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   725
    "compute rgb and hls (if possible)"
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|
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   728
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   729
    clr := Color name:colorNameHolder value ifIllegal:nil.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   730
    clr isNil ifTrue:[
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   731
        ^ self
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
    self colorChangedTo:clr.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   734
!
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   735
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   736
copyColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   737
    self window setClipboardObject:self color
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   738
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   739
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   740
copyColorName
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   741
    self window setClipboardText:self htmlColorName
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   742
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   743
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
hlsSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
    "compute rgb"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
    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
   748
        red    value:(r * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
        green  value:(g * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
        blue   value:(b * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
    colorNameHolder value:'' withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
    self colorChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   756
htmlColorNameChanged
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   757
    "compute rgb and hls (if possible)"
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   758
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   759
    |clr|
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   760
2417
cc89133cc041 changed #htmlColorNameChanged - ignore empty color names
Stefan Vogel <sv@exept.de>
parents: 2347
diff changeset
   761
    htmlColorNameHolder value isEmptyOrNil ifTrue:[
cc89133cc041 changed #htmlColorNameChanged - ignore empty color names
Stefan Vogel <sv@exept.de>
parents: 2347
diff changeset
   762
        ^ self.
cc89133cc041 changed #htmlColorNameChanged - ignore empty color names
Stefan Vogel <sv@exept.de>
parents: 2347
diff changeset
   763
    ].
cc89133cc041 changed #htmlColorNameChanged - ignore empty color names
Stefan Vogel <sv@exept.de>
parents: 2347
diff changeset
   764
2326
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   765
    clr := Color rgbValue:(Integer 
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   766
                                readFrom:(htmlColorNameHolder value copyFrom:2)
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   767
                                radix:16
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   768
                                onError:nil).
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   769
    clr isNil ifTrue:[
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   770
        ^ self
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   771
    ].
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   772
    self colorNameHolder value:'' withoutNotifying:self.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   773
    self colorChangedTo:clr.
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   774
!
f23fac376621 allow hexcolor to be entered;
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
   775
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   776
pasteColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   777
    |copyBufferColor|
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   778
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   779
    copyBufferColor := self window getClipboardObject.
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   780
    copyBufferColor isColor ifFalse:[
2521
5cfd5fcd7bd3 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 2417
diff changeset
   781
        UserPreferences current beepInEditor ifTrue:[                
5cfd5fcd7bd3 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 2417
diff changeset
   782
            self window beep.
5cfd5fcd7bd3 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 2417
diff changeset
   783
        ].
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   784
        ^ self
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
    self color:copyBufferColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   787
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   788
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   789
pickColor
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   790
    |color|
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   791
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   792
    color := Color fromUserWithFeedBack:[:clr | self setPreview:clr].
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   793
    color notNil ifTrue:[
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   794
        self color:color.
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   795
    ]
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   796
!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   797
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   798
rgbSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
    "compute hls"
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 g b|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   803
    r := self red value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   804
    g := self green value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
    b := self blue value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   806
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   807
    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
   808
        h isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   809
            "/ achromatic
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   810
        ] ifFalse:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   811
            self hue    value:(h rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   812
        ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   813
        self light      value:(l rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   814
        self saturation value:(s rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   816
    self colorNameHolder value:'' withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   817
    self colorChanged
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   818
!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   819
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   820
setPreview:color
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   821
    previewBox isNil ifTrue:[^ self "called before setup"].
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   822
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   823
    previewBox backgroundColor:color.
2941
15df48eba1c4 class: Color
Stefan Vogel <sv@exept.de>
parents: 2904
diff changeset
   824
    previewBox foregroundColor:color contrastingBlackOrWhite.
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
! !