ColorEditDialog.st
author Claus Gittinger <cg@exept.de>
Tue, 26 Feb 2008 11:26:17 +0100
changeset 2300 afddc24415dc
parent 2279 f077161d5d57
child 2326 f23fac376621
permissions -rw-r--r--
initial checkin
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
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    16
		htmlColorNameHolder previewBox'
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	classVariableNames:''
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	category:'Interface-UIPainter'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!ColorEditDialog class methodsFor:'documentation'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
copyright
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
 COPYRIGHT (c) 1995 by eXept Software AG
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
              All Rights Reserved
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 This software is furnished under a license and may be used
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 other person.  No title to or ownership of the software is
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 hereby transferred.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
documentation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    An edit-dialog for colors.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
examples
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
                                                                                [exBegin]                                      
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    |editor color|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
1846
65558eb9f4d3 comments
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
    49
    editor := ColorEditDialog new.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    editor color:(Color green).
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    editor open.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    editor accepted ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
        editor color inspect.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    ]
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
                                                                                [exEnd]
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    59
!ColorEditDialog class methodsFor:'help specs'!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    60
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    61
flyByHelpSpec
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    62
    "This resource specification was automatically generated
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    63
     by the UIHelpTool of ST/X."
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    64
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    65
    "Do not manually edit this!! If it is corrupted,
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    66
     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
    67
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
     UIHelpTool openOnClass:ColorEditDialog    
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    70
    "
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
    <resource: #help>
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    73
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    74
    ^ super flyByHelpSpec addPairsFrom:#(
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    75
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    76
#pickColor
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    77
'Pick a Color from the Screen'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    78
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
helpSpec
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    83
    "This resource specification was automatically generated
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    84
     by the UIHelpTool of ST/X."
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    85
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    86
    "Do not manually edit this!! If it is corrupted,
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    87
     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
    88
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
     UIHelpTool openOnClass:ColorEditDialog    
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    91
    "
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
    <resource: #help>
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    94
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    95
    ^ super helpSpec addPairsFrom:#(
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    96
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    97
#copyToClipboard
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    98
'Copy the color to the clipboard'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
    99
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   100
#hlsMixer
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   101
'Mix color from hls (hue-light-saturation) components'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   102
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   103
#pasteFromClipboard
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   104
'Paste color from the Clipboard'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   105
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   106
#rgbMixer
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   107
'Mix color from rgb (red-green-blue) components'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   108
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
! !
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   111
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   112
!ColorEditDialog class methodsFor:'image specs'!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   113
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   114
pickColorIcon
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   115
    ^ ToolbarIconLibrary pipette16x16Icon
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   116
! !
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   117
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
!ColorEditDialog class methodsFor:'interface specs'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
    "This resource specification was automatically generated
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
     by the UIPainter of ST/X."
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
    "Do not manually edit this!! If it is corrupted,
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
     the UIPainter may not be able to read the specification."
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
    "
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   128
     UIPainter new openOnClass:ColorEditDialog andSelector:#windowSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   129
     ColorEditDialog new openInterface:#windowSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   130
     ColorEditDialog open
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
    "
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
    <resource: #canvas>
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
    ^ 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
     #(FullSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
        name: windowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
        window: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
       (WindowSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
          label: 'Define Color'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
          name: 'Define Color'
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   142
          min: (Point 440 300)
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   143
          max: (Point 440 300)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   144
          bounds: (Rectangle 0 0 440 300)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
        )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
        component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
       (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
          collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
              name: 'RGBLabelPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   151
              layout: (LayoutFrame 0 0 0 0 70 0 76 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
                    label: 'Red:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
                    name: 'RedLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
                    label: 'Green:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
                    name: 'GreenLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
                    label: 'Blue:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
                    name: 'BlueLabel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
              name: 'RGBSliderPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   186
              layout: (LayoutFrame 70 0 0 0 -177 1 76 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
                    name: 'RedSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
                    model: red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
                    backgroundColor: (Color 100.0 0.0 0.0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   202
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
                    name: 'GreenSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
                    model: green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
                    backgroundColor: (Color 0.0 100.0 0.0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   212
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
                    name: 'BlueSlider'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
                    model: blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
                    stop: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
                    backgroundColor: (Color 0.0 0.0 100.0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   222
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
              name: 'RGBFieldPanel'
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   230
              layout: (LayoutFrame -173 1 0 0 -143 1 76 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
                    name: 'RedField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
                    model: red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
                    acceptOnPointerLeave: false
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   246
                    extent: (Point 30 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
                    name: 'GreenField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
                    model: green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
                    acceptOnPointerLeave: false
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   256
                    extent: (Point 30 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
                    name: 'BlueField'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
                    model: blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
                    maxValue: 255
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
                    acceptOnPointerLeave: false
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   266
                    extent: (Point 30 20)
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   267
                  )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   268
                 )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   269
               
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   270
              )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   271
            )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   272
           (VerticalPanelViewSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   273
              name: 'RGBFieldPanelHex'
2274
e09282d74ec3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   274
              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
   275
              horizontalLayout: fit
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   276
              verticalLayout: spreadSpace
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   277
              horizontalSpace: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   278
              verticalSpace: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   279
              component: 
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   280
             (SpecCollection
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   281
                collection: (
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   282
                 (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   283
                    name: 'EntryField4'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   284
                    model: red
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   285
                    type: hexIntegerInRange
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   286
                    numChars: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   287
                    minValue: 0
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   288
                    maxValue: 255
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   289
                    acceptOnPointerLeave: false
2274
e09282d74ec3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   290
                    extent: (Point 22 20)
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   291
                  )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   292
                 (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   293
                    name: 'EntryField5'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   294
                    model: green
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   295
                    type: hexIntegerInRange
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   296
                    numChars: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   297
                    minValue: 0
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   298
                    maxValue: 255
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   299
                    acceptOnPointerLeave: false
2274
e09282d74ec3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   300
                    extent: (Point 22 20)
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   301
                  )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   302
                 (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   303
                    name: 'EntryField6'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   304
                    model: blue
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   305
                    type: hexIntegerInRange
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   306
                    numChars: 3
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   307
                    minValue: 0
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   308
                    maxValue: 255
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   309
                    acceptOnPointerLeave: false
2274
e09282d74ec3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2266
diff changeset
   310
                    extent: (Point 22 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
              name: 'HLSLabelPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   318
              layout: (LayoutFrame 0 0 86 0 70 0 163 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
                    label: 'Hue:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
                    name: 'Label1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
                    label: 'Light:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
                    name: 'Label2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
                 (LabelSpec
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   341
                    label: 'Saturation:'
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
                    name: 'Label3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
                    adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
              name: 'HLSSliderPanel'
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   353
              layout: (LayoutFrame 70 0 86 0 -177 1 163 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
                    name: 'Slider1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
                    model: hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
                    stop: 359
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
                    step: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
                    keyboardStep: 1
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   369
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
                    name: 'Slider2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
                    model: light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
                    step: 1
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   377
                    backgroundColor: (Color 66.999313344015 66.999313344015 66.999313344015)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
                    keyboardStep: 1
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   379
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
                 (SliderSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
                    name: 'Slider3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
                    tabable: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
                    model: saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
                    orientation: horizontal
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
                    step: 1
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   387
                    backgroundColor: (Color 66.999313344015 66.999313344015 66.999313344015)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
                    keyboardStep: 1
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   389
                    extent: (Point 193 16)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
           (VerticalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
              name: 'HLSFieldPanel'
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   397
              layout: (LayoutFrame -173 1 86 0 -143 1 163 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
              horizontalLayout: fit
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
              verticalLayout: spreadSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
                    name: 'EntryField1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
                    model: hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
                    maxValue: 359
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
                    acceptOnPointerLeave: false
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   413
                    extent: (Point 30 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
                    name: 'EntryField2'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
                    model: light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
                    maxValue: 100
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
                    acceptOnPointerLeave: false
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   423
                    extent: (Point 30 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
                 (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
                    name: 'EntryField3'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
                    model: saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
                    type: numberInRange
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
                    numChars: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
                    minValue: 0
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
                    maxValue: 100
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
                    acceptOnPointerLeave: false
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   433
                    extent: (Point 30 20)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
           (ViewSpec
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   440
              name: 'PreviewBoxFrame'
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
              layout: (LayoutFrame -117 1 4 0.0 -3 1.0 -39 1.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
              level: 1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
                 (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
                    label: 'Preview'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
                    name: 'PreviewBox'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
                    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
   450
                    level: -1
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
                    translateLabel: true
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   452
                    postBuildCallback: postBuildPreviewBox:
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
           (LabelSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
              label: 'Color Name:'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
              name: 'ColorNameLabel'
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   461
              layout: (LayoutFrame 0 0 176 0 106 0 198 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
              translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
              adjust: right
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
           (InputFieldSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
              name: 'ColorNameField'
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   467
              layout: (LayoutFrame 108 0 176 0 -162 1 198 0)
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
              model: colorNameHolder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
              immediateAccept: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
              acceptOnReturn: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
              acceptOnTab: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
              acceptOnLostFocus: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
              acceptOnPointerLeave: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
            )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
           (HorizontalPanelViewSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
              name: 'HorizontalPanel1'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   477
              layout: (LayoutFrame 0 0.0 -32 1 0 1.0 0 1.0)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   478
              horizontalLayout: fitSpace
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
              verticalLayout: centerMax
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   480
              horizontalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   481
              verticalSpace: 3
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   482
              reverseOrderIfOKAtLeft: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
              component: 
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   484
             (SpecCollection
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
                collection: (
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   486
                 (ActionButtonSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
                    label: 'Cancel'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
                    name: 'CancelButton'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   489
                    translateLabel: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   490
                    resizeForLabel: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
                    tabable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
                    model: cancel
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
                 (ActionButtonSpec
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
                    label: 'OK'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
                    name: 'OKButton'
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
                    resizeForLabel: false
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
                    tabable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
                    model: accept
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
                    isDefault: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
                    defaultable: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
                    useDefaultExtent: true
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
                  )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
                 )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
               
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
              )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
            )
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   510
           (LabelSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   511
              label: 'HTML Color Name:'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   512
              name: 'HTMLColorNameLabel'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   513
              layout: (LayoutFrame 4 0 204 0 110 0 226 0)
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   514
              translateLabel: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   515
              adjust: right
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   516
            )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   517
           (InputFieldSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   518
              name: 'MLHTColorNameFieldField'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   519
              layout: (LayoutFrame 108 0 204 0 -162 1 226 0)
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   520
              model: htmlColorNameHolder
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   521
              immediateAccept: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   522
              acceptOnReturn: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   523
              acceptOnTab: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   524
              acceptOnLostFocus: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   525
              acceptOnPointerLeave: false
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   526
            )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   527
           (ActionButtonSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   528
              label: 'Copy Color'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   529
              name: 'CopyColor'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   530
              layout: (LayoutFrame 12 0 236 0 100 0 258 0)
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   531
              activeHelpKey: hlsMixer
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   532
              translateLabel: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   533
              resizeForLabel: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   534
              tabable: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   535
              model: copyColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   536
            )
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   537
           (ActionButtonSpec
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   538
              label: 'Paste Color'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   539
              name: 'PasteColor'
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   540
              layout: (LayoutFrame 108 0 236 0 196 0 258 0)
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   541
              translateLabel: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   542
              resizeForLabel: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   543
              tabable: true
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   544
              model: pasteColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   545
            )
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   546
           (ActionButtonSpec
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   547
              label: 'pickColorIcon'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   548
              name: 'Button1'
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   549
              layout: (LayoutFrame 285 0 236 0 312 0 263 0)
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   550
              activeHelpKey: pickColor
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   551
              hasCharacterOrientedLabel: false
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   552
              translateLabel: true
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   553
              resizeForLabel: true
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   554
              tabable: true
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   555
              model: pickColor
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   556
            )
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
           )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
         
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
        )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
      )
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
!ColorEditDialog methodsFor:'accessing'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
color
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   566
    |colorName|
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   567
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   568
    colorName := self colorName.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   569
    colorName notEmptyOrNil ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   570
        ^ colorName asSymbol
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   571
    ].
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
    ^Color redByte:(red value) greenByte:(green value) blueByte:(blue value)
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   575
color:aColor
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   576
    aColor isNil ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   577
        ^ self
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   578
    ].
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   579
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   580
    aColor isSymbol ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   581
        self colorNameHolder value:aColor
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   582
    ] ifFalse:[
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
        self red value:aColor redByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
        self green value:aColor greenByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
        self blue value:aColor blueByte.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
    ]
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
colorName
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
    ^ colorNameHolder value
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   591
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   592
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   593
htmlColorName
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   594
    ^ htmlColorNameHolder value
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
!ColorEditDialog methodsFor:'actions'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
colorChanged
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   600
    |clr|
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
    clr := self color.
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   603
    clr isColor ifTrue:[
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   604
        "not a symbol"
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   605
        self setPreview:clr.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   606
        self htmlColorNameHolder value:(clr htmlPrintString).
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   607
    ].
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
colorNameChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
    "compute rgb and hls (if possible)"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
    |clr h|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615
    clr := Color name:colorNameHolder value ifIllegal:nil.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
    clr isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   617
        ^ self
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   618
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   620
    self red   value:clr redByte withoutNotifying:self.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   621
    self green value:clr greenByte withoutNotifying:self.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   622
    self blue  value:clr blueByte withoutNotifying:self.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   623
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   624
    h := clr hue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   625
    h notNil ifTrue:[
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   626
        self hue        value:(h rounded) withoutNotifying:self.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   627
    ].
2279
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   628
    self light      value:(clr light rounded) withoutNotifying:self.
f077161d5d57 symbolic colors
Stefan Vogel <sv@exept.de>
parents: 2274
diff changeset
   629
    self saturation value:(clr saturation rounded) withoutNotifying:self.
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   630
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   631
    self colorChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   632
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   633
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   634
copyColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   635
    self window setClipboardObject:self color
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   636
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   637
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   638
copyColorName
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   639
    self window setClipboardText:self htmlColorName
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   640
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   641
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   642
hlsSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   643
    "compute rgb"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   644
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   645
    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
   646
        red    value:(r * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   647
        green  value:(g * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   648
        blue   value:(b * 255 / 100) rounded withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   649
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   650
    colorNameHolder value:'' withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   651
    self colorChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   652
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   653
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   654
pasteColor
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   655
    |copyBufferColor|
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   656
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   657
    copyBufferColor := self window getClipboardObject.
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   658
    copyBufferColor isColor ifFalse:[
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   659
        self window beep.
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   660
        ^ self
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   661
    ].
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   662
    self color:copyBufferColor
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
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   665
pickColor
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   666
    |color|
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   667
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   668
    color := Color fromUserWithFeedBack:[:clr | self setPreview:clr].
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   669
    color notNil ifTrue:[
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   670
        self color:color.
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   671
    ]
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   672
!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   673
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   674
rgbSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   675
    "compute hls"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   676
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   677
    |r g b|
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   678
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   679
    r := self red value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   680
    g := self green value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   681
    b := self blue value.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   682
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   683
    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
   684
        h isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   685
            "/ achromatic
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   686
        ] ifFalse:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   687
            self hue    value:(h rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   688
        ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   689
        self light      value:(l rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   690
        self saturation value:(s rounded) withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   691
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   692
    self colorNameHolder value:'' withoutNotifying:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   693
    self colorChanged
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   694
!
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   695
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   696
setPreview:color
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   697
    previewBox isNil ifTrue:[^ self "called before setup"].
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   698
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   699
    previewBox backgroundColor:color.
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   700
    previewBox foregroundColor:(color brightness < 0.5 
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   701
                            ifTrue:[Color white] 
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   702
                            ifFalse:[Color black]).
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   703
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   704
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   705
!ColorEditDialog methodsFor:'aspects'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   706
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   707
blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   708
    blue isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   709
        blue := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   710
        blue addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   712
    ^blue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   714
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
colorNameHolder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   716
    colorNameHolder isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   717
        colorNameHolder := '' asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   718
        colorNameHolder addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   719
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
    ^colorNameHolder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   721
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   722
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   723
green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   724
    green isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   725
        green := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   726
        green addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   727
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   728
    ^green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   729
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   730
2224
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   731
htmlColorNameHolder
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   732
    htmlColorNameHolder isNil ifTrue:[
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   733
        htmlColorNameHolder := '' asValue.
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   734
    ].
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   735
    ^htmlColorNameHolder
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   736
!
6ec083adc6bf hex input; hex-name; copy & paste
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   737
1840
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   738
hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   739
    hue isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   740
        hue := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   741
        hue addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   742
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
    ^hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
    light isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
        light := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
        light addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
    ^light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
    red isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
        red := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   757
        red addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   758
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   759
    ^red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   760
!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   761
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   762
saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   763
    saturation isNil ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   764
        saturation := 0 asValue.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   765
        saturation addDependent:self.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   766
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   767
    ^saturation
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   768
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   769
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   770
!ColorEditDialog methodsFor:'change & update'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   771
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
update:something with:aParameter from:changedObject
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
    (changedObject == red
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   774
    or:[changedObject == green
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   775
    or:[changedObject == blue]]) ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   776
        ^ self rgbSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   777
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   778
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   779
    (changedObject == hue
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   780
    or:[changedObject == light
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   781
    or:[changedObject == saturation]]) ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   782
        ^ self hlsSliderChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   783
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   784
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   785
    (changedObject == colorNameHolder) ifTrue:[
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   786
        ^ self colorNameChanged
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   787
    ].
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   788
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   789
    ^ super update:something with:aParameter from:changedObject
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   790
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   791
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   792
!ColorEditDialog methodsFor:'startup & release'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   793
2266
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   794
postBuildPreviewBox:aView
0234d226a06a added pick (pipette) and feedback
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   795
    previewBox := aView
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
postBuildWith:aBuilder
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
    super postBuildWith:aBuilder.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
    self colorChanged.
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   801
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
    "Modified: / 6.9.1998 / 22:55:25 / cg"
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   803
! !
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   804
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
!ColorEditDialog class methodsFor:'documentation'!
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   806
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   807
version
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   808
    ^ '$Header$'
57c23d1beb53 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   809
! !