VariablePanel.st
author Stefan Vogel <sv@exept.de>
Tue, 10 Mar 2020 15:19:04 +0100
changeset 6844 235a4c848100
parent 6784 8d089e3f3df5
permissions -rw-r--r--
#QUALITY by stefan class: Label changed: #layout: only obsolte with symbol argument
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6633
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
     1
"{ Encoding: utf8 }"
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
     2
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
 COPYRIGHT (c) 1991 by Claus Gittinger
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
	      All Rights Reserved
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 This software is furnished under a license and may be used
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
 hereby transferred.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
    14
"{ Package: 'stx:libwidg' }"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
    15
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
    16
"{ NameSpace: Smalltalk }"
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
    17
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
SimpleView subclass:#VariablePanel
2623
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
    19
	instanceVariableNames:'barHeight barWidth barLevel separatingLine shadowForm lightForm
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
    20
		showHandle showHandleWhenEntered handlePosition handleColor
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
    21
		handleStyle handleLevel noColor trackLine redrawLocked
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
    22
		orientation handleLabels knobHeight realRelativeSizes
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
    23
		snapAdornment barSideLineColor'
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
    24
	classVariableNames:'DefaultShowHandle DefaultHandleStyle DefaultHandlePosition
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
		DefaultTrackingLine DefaultSeparatingLine DefaultHandleColor
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
    26
		DefaultHandleLevel DefaultVCursor DefaultHCursor
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
    27
		DefaultHandleImage DefaultSnapIcons DefaultSnapHandlePosition
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
    28
		DefaultShowHandleWhenEntered DefaultSideLineColor DefaultBarWidth
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
    29
		DefaultBackgroundColor'
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
    30
	poolDictionaries:''
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
    31
	category:'Views-Layout'
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
    34
Object subclass:#SnapAdornment
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
    35
	instanceVariableNames:'level mode selectedLevel enterLevel selectedBgColor enterBgColor
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
    36
		iconLeftRight iconUpDown iconLeft iconRight iconUp iconDown width
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
    37
		height'
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
    38
	classVariableNames:''
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
    39
	poolDictionaries:''
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
    40
	privateIn:VariablePanel
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
    41
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
    42
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
    43
!VariablePanel class methodsFor:'documentation'!
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
copyright
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
 COPYRIGHT (c) 1991 by Claus Gittinger
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
	      All Rights Reserved
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
 This software is furnished under a license and may be used
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
 only in accordance with the terms of that license and with the
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
 inclusion of the above copyright notice.   This software may not
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
 be provided or otherwise made available to, or used by, any
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
 other person.  No title to or ownership of the software is
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
 hereby transferred.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
documentation
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    a View to separate its subviews vertically by a movable bar;
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    the size-ratios of the subviews can be changed by moving this bar.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    In order to correctly setup this kind of view, the subviews must
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
    be created with a relative origin & relative corner.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    The panel does not verify the relative subview bounds; 
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
    therefore, it is your responsibility to set those relative sizes to fit
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    according the orientation (see bad example below).
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    The bar-handle is either an exposed knob (style == #motif)
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    or the form defined in Scroller (style ~~ #motif)
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    or nothing.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    Typically creation is done as:
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    76
        p := VariablePanel in:superView.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    77
        p orientation:#vertical.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    79
        v1 := <someViewClass> origin:0.0 @ 0.0
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    80
                              corner:1.0 @ 0.5
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    81
                                  in:p.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    82
        v2 := <someViewClass> origin:0.0 @ 0.5 
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    83
                              corner:1.0 @ 0.8 
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    84
                                  in:p.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    85
        v3 := <someViewClass> origin:0.0 @ 0.8 
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    86
                              corner:1.0 @ 1.0
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    87
                                  in:p.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    88
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    89
    The two subclasses VariableHorizontalPanel and VariableVerticalPanel
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    90
    preset the orientation. They are a kept for backward compatibility
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    91
    (in previous versions, there used to be no common VariablePanel (super-) class).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
    Notice: if it is required to insert a fixed-size view in the panel,
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    use an extra view & insets, and place the subview into that extra view.
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
    95
    See examples.
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    96
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
    97
    [instance Variables:]
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    98
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    99
        barHeight               <Integer>       the height of the bar (for verticalPanels)
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   100
        barWidth                <Integer>       the width of the bar  (for horizontalPanels)
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   101
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   102
        separatingLine          <Boolean>       show a separating line (as in motif style)
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   103
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   104
        shadowForm              <Image/Form>    form (shadow part) drawn as handle - if nonNil
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   105
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   106
        lightForm               <Image/Form>    form (light part) drawn as handle - if nonNil
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   107
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   108
        showHandle              <Boolean>       if false, no handle is drawn
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   109
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   110
        handlePosition          <Symbol>        where is the handle - one of #left, #center, #right
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   111
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   112
        handleColor             <Color>         inside color of handle - defaults to viewBackground
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   113
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   114
        handleStyle             <Symbol>        type of handle; one of #next, #motif or nil
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   115
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   116
        handleLevel             <Integer>       3D level of handle (only valid if no form is given)
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   117
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   118
        trackLine               <Boolean>       if true, an inverted line is drawn for tracking;
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   119
                                                otherwise, the whole bar is inverted.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   120
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   121
        redrawLocked                            internal - locks redraws while tracking
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   122
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   123
        orientation             <Symbol>        one of #horizontal / #vertical
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   124
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   125
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   126
    [styleSheet values:]
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   127
        variablePanel.showHandle        true/false - should a handle be shown (default:true)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   128
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   129
        variablePanel.handleStyle       #next / #motif / #iris / #full / nil (special handles)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   130
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   131
        variablePanel.handlePosition    #left / #center / #right (default:#right)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   132
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   133
        variablePanel.handleLevel       3D level of heandle (default:2)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   134
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   135
        variablePanel.trackingLine      when moved, track an inverted line (as in motif)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   136
                                        as opposed to tracking the whole bar (default:false)
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   137
                                        (obsoleted by trackingStyle)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   138
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   139
        variablePanel.trackingStyle     #solidRectangle / #solidLine / #dashedLine
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   140
                                        detailed control over how to draw tracking
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   141
                                        (obsoletes trackingLine above)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   142
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   143
        variablePanel.separatingLine    draw a separating line in the bar as in motif (default:false)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   144
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   145
        variablePanel.handleColor       color of the handle. (default:Black)
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   146
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   147
        variablePanel.handleEnteredColor 
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   148
                                        color of the handle when the pointer is in the bar (default:nil)
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   149
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   150
    [see also:]
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   151
        PanelView
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   152
        
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   153
    [author:]
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   154
        Claus Gittinger
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
examples
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
"
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   160
   example (notice that the subviews MUST have relative bounds):
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   161
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   162
        |top p v1 v2 v3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   164
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   165
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   167
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   168
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   169
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   170
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   171
        p orientation:#vertical.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   173
        v1 := View origin:0.0@0.0 corner:1.0@(1/2) in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   174
        v2 := View origin:0.0@(1/2) corner:1.0@(2/3) in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   175
        v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   177
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   178
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   179
        v3 viewBackground:(Color yellow).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   181
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   182
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   186
   change the handles level:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   187
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   188
        |top p v1 v2 v3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   190
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   191
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   193
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   194
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   195
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   196
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   197
        p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   198
        p handleLevel:-1.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   200
        v1 := View origin:0.0@0.0 corner:1.0@(1/3) in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   201
        v2 := View origin:0.0@(1/3) corner:1.0@(2/3) in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   202
        v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   204
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   205
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   206
        v3 viewBackground:(Color yellow).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   208
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   209
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   213
   change the handles style to nil makes it invisible:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   214
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   215
        |top p v1 v2 v3|
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   216
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   217
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   218
        top extent:300@300.
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   219
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   220
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   221
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   222
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   223
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   224
        p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   225
        p handleStyle:nil.
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   226
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   227
        v1 := View origin:0.0@0.0 corner:1.0@(1/3) in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   228
        v2 := View origin:0.0@(1/3) corner:1.0@(2/3) in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   229
        v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   230
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   231
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   232
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   233
        v3 viewBackground:(Color yellow).
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   234
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   235
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   236
                                                                        [exEnd]
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   237
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   238
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   239
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   240
   define your own handle (-bitmap):
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   241
                                                                        [exBegin]
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   242
        |top p v1 v2 v3|
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   243
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   244
        top := StandardSystemView new.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   245
        top extent:300@300.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   246
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   247
        p := VariablePanel 
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   248
                 origin:0.0 @ 0.0
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   249
                 corner:1.0 @ 1.0
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   250
                 in:top.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   251
        p orientation:#vertical.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   252
        p handleImage:(Image fromFile:'bitmaps/ScrollLt.8.xbm').
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   253
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   254
        v1 := View origin:0.0@0.0 corner:1.0@(1/3) in:p.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   255
        v2 := View origin:0.0@(1/3) corner:1.0@(2/3) in:p.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   256
        v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   257
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   258
        v1 viewBackground:(Color red).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   259
        v2 viewBackground:(Color green).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   260
        v3 viewBackground:(Color yellow).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   261
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   262
        top open
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   263
                                                                        [exEnd]
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   264
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   265
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   266
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   267
   another handle-bitmap:
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   268
                                                                        [exBegin]
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   269
        |top p v1 v2 v3|
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   270
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   271
        top := StandardSystemView new.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   272
        top extent:300@300.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   273
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   274
        p := VariablePanel 
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   275
                 origin:0.0 @ 0.0
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   276
                 corner:1.0 @ 1.0
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   277
                 in:top.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   278
        p orientation:#vertical.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   279
        p handleImage:(Form width:9
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   280
                            height:11
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   281
                            fromArray:#(
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   282
                                        2r00000000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   283
                                        2r00001000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   284
                                        2r00011100 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   285
                                        2r00111110 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   286
                                        2r01111111 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   287
                                        2r00000000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   288
                                        2r01111111 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   289
                                        2r00111110 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   290
                                        2r00011100 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   291
                                        2r00001000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   292
                                        2r00000000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   293
                                       )
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   294
                      ).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   295
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   296
        v1 := View origin:0.0@0.0 corner:1.0@(1/3) in:p.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   297
        v2 := View origin:0.0@(1/3) corner:1.0@(2/3) in:p.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   298
        v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   299
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   300
        v1 viewBackground:(Color red).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   301
        v2 viewBackground:(Color green).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   302
        v3 viewBackground:(Color yellow).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   303
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   304
        top open
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   305
                                                                        [exEnd]
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   306
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   307
    placing scrolled and unscrolled views into a variablePanel:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   308
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   309
        |top p v1 v2 v3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   311
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   312
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   314
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   315
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   316
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   317
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   318
        p orientation:#vertical.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   320
        v1 := ScrollableView for:SelectionInListView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   321
        v1 origin:0.0 @ 0.0 corner:1.0 @ 0.5.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   322
        v1 list:(FileDirectory directoryNamed:'/etc') contents.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   323
        v1 action:[:selNr |
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   324
                |fullName stream text|
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   325
                fullName := '/etc/' , v1 selectionValue.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   326
                stream := fullName asFilename readStream.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   327
                stream notNil ifTrue:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   328
                    text := stream contents.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   329
                    v2 contents:text.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   330
                    v3 contents:text
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   331
                ]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   332
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   334
        v2 := TextView origin:0.0 @ 0.5 corner:1.0 @ 0.8 in:p.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   336
        v3 := ScrollableView for:TextView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   337
        v3 origin:0.0 @ 0.8 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   338
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   339
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   342
    dynamically adding/removing views:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   343
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   344
        |top p v1 v2 b|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   346
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   347
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   349
        b := Toggle label:'show' in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   350
        b showLamp:false.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   351
        b origin:0.0 @ 0.0 corner:(1.0 @ 40).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   352
        b action:[:state |
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   353
                state ifTrue:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   354
                    b label:'hide'.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   355
                    v1 origin:0.0 @ 0.0 corner:1.0 @ 0.5.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   356
                    v2 := ScrollableView for:EditTextView.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   357
                    v2 origin:0.0 @ 0.5 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   358
                    v2 contents:'another text'.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   359
                    p addSubView:v2.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   360
                    v2 realize.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   361
                ] ifFalse:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   362
                    b label:'show'.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   363
                    v2 destroy.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   364
                    v1 origin:0.0 @ 0.0 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   365
                ]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   366
            ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   368
        p := VariablePanel
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   369
                origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   370
                corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   371
                in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   372
        p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   373
        p topInset:50.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   375
        v1 := ScrollableView for:EditTextView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   376
        v1 origin:0.0 @ 0.0 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   377
        v1 contents:'some text'.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   379
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   380
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   383
    dynamically flipping orientation:
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
    Notice: you have to change the relative bounds of the subviews first.
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   385
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   386
        |top p v1 v2 b|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   388
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   389
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   391
        b := Toggle label:'flip' in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   392
        b showLamp:false.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   393
        b origin:0.0 @ 0.0 corner:(1.0 @ 40).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   394
        b action:[:state |
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   395
                state ifTrue:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   396
                    v1 origin:0.0 @ 0.0 corner:0.5 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   397
                    v2 origin:0.5 @ 0.0 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   398
                    p orientation:#horizontal.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   399
                ] ifFalse:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   400
                    v1 origin:0.0 @ 0.0 corner:1.0 @ 0.5.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   401
                    v2 origin:0.0 @ 0.5 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   402
                    p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   403
                ].
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   404
            ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   406
        p := VariablePanel
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   407
                origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   408
                corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   409
                in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   410
        p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   411
        p topInset:50.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   413
        v1 := ScrollableView for:EditTextView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   414
        v1 origin:0.0 @ 0.0 corner:1.0 @ 0.5.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   415
        v1 contents:'some text'.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   417
        v2 := ScrollableView for:EditTextView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   418
        v2 origin:0.0 @ 0.5 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   419
        v2 contents:'another text'.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   421
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   422
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   425
   combining fix-size with variable size:
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
   (need 3 extra frame-views to place the extra labels into)
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   427
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   428
        |top p v1 l1 v2 l2 v3 l3 f1 f2 f3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   430
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   431
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   433
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   434
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   435
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   436
                 in:top.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   438
        p orientation:#vertical.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   439
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   440
        f1 := View origin:0.0@0.0 corner:1.0@0.3 in:p.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   441
        f2 := View origin:0.0@0.3 corner:1.0@0.6 in:p.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   442
        f3 := View origin:0.0@0.6 corner:1.0@1.0 in:p.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   444
        v1 := View origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:f1.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   445
        v2 := View origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:f2.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   446
        v3 := View origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:f3.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   448
        l1 := Label label:'sub1' in:f1.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   449
        l2 := Label label:'sub2' in:f2.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   450
        l3 := Label label:'sub3' in:f3.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   452
        l1 origin:0.0 @ 0.0 corner:1.0 @ 0.0 ; 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   453
           bottomInset:(l1 preferredExtent y negated).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   454
        l2 origin:0.0 @ 0.0 corner:1.0 @ 0.0 ; 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   455
           bottomInset:(l2 preferredExtent y negated).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   456
        l3 origin:0.0 @ 0.0 corner:1.0 @ 0.0 ; 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   457
           bottomInset:(l3 preferredExtent y negated).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   459
        v1 topInset:(l1 preferredExtent y); level:-1.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   460
        v2 topInset:(l2 preferredExtent y); level:-1.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   461
        v3 topInset:(l3 preferredExtent y); level:-1.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   463
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   464
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   465
        v3 viewBackground:(Color yellow).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   467
        top open
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   468
                                                                        [exEnd]
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   469
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   470
   VerticalPansels allow a label to be associated with the
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   471
   handles; this looks much like the above, but is slightly
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   472
   more compact. Notice, no label can be placed above the first 
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   473
   view - it has no handle.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   474
                                                                        [exBegin]
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   475
        |top p v1 v2 v3|
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   476
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   477
        top := StandardSystemView new.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   478
        top extent:300@300.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   479
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   480
        p := VariablePanel 
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   481
                 origin:0.0 @ 0.0
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   482
                 corner:1.0 @ 1.0
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   483
                 in:top.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   484
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   485
        p orientation:#vertical.
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   486
        p handleLabels:#('ignored' 'sub2' 'sub3').
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   487
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   488
        v1 := View origin:0.0@0.0 corner:1.0@0.3 in:p.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   489
        v2 := View origin:0.0@0.3 corner:1.0@0.6 in:p.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   490
        v3 := View origin:0.0@0.6 corner:1.0@1.0 in:p.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   491
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   492
        v1 viewBackground:(Color red).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   493
        v2 viewBackground:(Color green).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   494
        v3 viewBackground:(Color yellow).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   495
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   496
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   497
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   499
   handle labels can be more than strings ....
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   500
   (however, they should have about the same height, since
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   501
    the largest defines heights of all bars;
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   502
    retry the example below with a larger bitmap image ...)
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   503
                                                                        [exBegin]
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   504
        |top e p v1 v2 v3|
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   505
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   506
        top := StandardSystemView new.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   507
        top extent:300@300.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   508
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   509
        p := VariablePanel 
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   510
                 origin:0.0 @ 0.0
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   511
                 corner:1.0 @ 1.0
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   512
                 in:top.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   513
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   514
        p orientation:#vertical.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   515
        e := Array with:#bold
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   516
                   with:#color->Color red.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   517
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   518
        p handleLabels:(Array with:nil
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   519
                              with:('bold and red' asText emphasizeAllWith:e)
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   520
                              with:(Image fromFile:'ScrollRt.xbm')).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   521
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   522
        v1 := View origin:0.0@0.0 corner:1.0@0.3 in:p.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   523
        v2 := View origin:0.0@0.3 corner:1.0@0.6 in:p.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   524
        v3 := View origin:0.0@0.6 corner:1.0@1.0 in:p.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   525
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   526
        v1 viewBackground:(Color red).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   527
        v2 viewBackground:(Color green).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   528
        v3 viewBackground:(Color yellow).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   529
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   530
        top open
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   531
                                                                        [exEnd]
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   532
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   533
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
   BAD EXAMPLE (wrong relative sizes - repaired on handle move):
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   536
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   537
        |top p v1 v2 v3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   539
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   540
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   542
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   543
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   544
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   545
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   546
        p orientation:#vertical.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   548
        v1 := View origin:0.0 @ 0.0   corner:1.0 @ (1/4) in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   549
        v2 := View origin:0.0 @ (1/2) corner:1.0 @ (3/4) in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   550
        v3 := View origin:0.0 @ (3/4) corner:1.0 @ 1.0   in:p.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   552
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   553
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   554
        v3 viewBackground:(Color yellow).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   556
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   557
                                                                        [exEnd]
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   558
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   559
   example with snapMode:
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   560
                                                                        [exBegin]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   561
        |top p v1 v2 v3|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   562
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   563
        top := StandardSystemView new.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   564
        top extent:300@300.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   565
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   566
        p := VariablePanel 
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   567
                 origin:0.0 @ 0.0
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   568
                 corner:1.0 @ 1.0
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   569
                 in:top.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   570
        p orientation:#vertical.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   571
        p snapMode:#min.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   572
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   573
        v1 := View origin:0.0@0.0 corner:1.0@(1/2) in:p.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   574
        v2 := View origin:0.0@(1/2) corner:1.0@(2/3) in:p.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   575
        v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   576
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   577
        v1 viewBackground:(Color red).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   578
        v2 viewBackground:(Color green).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   579
        v3 viewBackground:(Color yellow).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   580
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   581
        top open
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   582
                                                                        [exEnd]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   583
4043
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   584
   example with redefined handle-image:
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   585
                                                                        [exBegin]
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   586
        |top p v1 v2 v3|
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   587
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   588
        top := StandardSystemView new.
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   589
        top extent:300@300.
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   590
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   591
        p := VariablePanel 
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   592
                 origin:0.0 @ 0.0
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   593
                 corner:1.0 @ 1.0
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   594
                 in:top.
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   595
        p orientation:#vertical.
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   596
        p handleImage:(ToolbarIconLibrary barResizeVerticalIcon).
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   597
        p showHandle:true.
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   598
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   599
        v1 := View origin:0.0@0.0 corner:1.0@(1/2) in:p.
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   600
        v2 := View origin:0.0@(1/2) corner:1.0@(2/3) in:p.
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   601
        v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   602
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   603
        v1 viewBackground:(Color red).
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   604
        v2 viewBackground:(Color green).
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   605
        v3 viewBackground:(Color yellow).
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   606
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   607
        top open
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   608
                                                                        [exEnd]
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   609
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   610
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   614
!VariablePanel class methodsFor:'defaults'!
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   616
cursorForOrientation:orientation
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   617
    "return an appropriate cursor"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   618
4862
19b707a36148 Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 4632
diff changeset
   619
    ^ self cursorForOrientation:orientation onDevice:Screen current.
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   620
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   621
    "Modified: / 30.9.1998 / 18:21:10 / cg"
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   622
!
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   623
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   624
cursorForOrientation:orientation onDevice:device
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   625
    "return an appropriate cursor"
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   626
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   627
    |cursor|
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   628
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   629
    orientation == #vertical ifTrue:[
4862
19b707a36148 Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 4632
diff changeset
   630
        (DefaultVCursor notNil and:[device == Display]) ifTrue:[
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   631
            cursor := DefaultVCursor
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   632
        ] ifFalse:[
4980
7de6c3eadf49 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
   633
            device isWindowsPlatform ifFalse:[
5728
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   634
                cursor := Cursor
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   635
                            fromImage:self verticalResizeCursor
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   636
                            hotSpot:8@8.
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   637
            ].
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   638
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   639
            "
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   640
             if bitmaps are not available or under Win95, 
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   641
             use a standard cursor
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   642
            "
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   643
            cursor isNil ifTrue:[
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   644
                "which one looks better ?"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   645
                cursor := Cursor upDownArrow
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   646
                "cursor := Cursor upLimitArrow"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   647
            ].
4862
19b707a36148 Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 4632
diff changeset
   648
            device == Display ifTrue:[
19b707a36148 Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 4632
diff changeset
   649
                DefaultVCursor := cursor.
19b707a36148 Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 4632
diff changeset
   650
            ].
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   651
        ]
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   652
    ] ifFalse:[
4862
19b707a36148 Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 4632
diff changeset
   653
        (DefaultHCursor notNil and:[device == Display]) ifTrue:[      
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   654
            cursor := DefaultHCursor
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   655
        ] ifFalse:[
4980
7de6c3eadf49 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
   656
            device isWindowsPlatform ifFalse:[
5728
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   657
                cursor := Cursor
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   658
                            fromImage:self horizontalResizeCursor
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   659
                            hotSpot:8@8.
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   660
            ].
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   661
            "
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   662
             if bitmaps are not available or under Win95, 
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   663
             use a standard cursor
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   664
            "
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   665
            cursor isNil ifTrue:[
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   666
                "which one looks better ?"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   667
                cursor := Cursor leftRightArrow
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   668
                "cursor := Cursor leftLimitArrow"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   669
            ].
4862
19b707a36148 Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 4632
diff changeset
   670
            device == Display ifTrue:[
19b707a36148 Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 4632
diff changeset
   671
                DefaultHCursor := cursor
19b707a36148 Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 4632
diff changeset
   672
            ].
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   673
        ]
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   674
    ].
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   675
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   676
    ^ cursor
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   677
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   678
    "
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   679
     DefaultVCursor := DefaultHCursor := nil.
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   680
    "
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   681
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   682
    "Created: / 30.9.1998 / 18:20:41 / cg"
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   683
    "Modified: / 30.9.1998 / 18:23:07 / cg"
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   684
!
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   685
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   686
lightFormOn:aDisplay
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   687
    "use same handle as Scroller"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   688
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   689
    ^ Scroller handleLightFormOn:aDisplay
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   690
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   691
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   692
shadowFormOn:aDisplay
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   693
    "use same handle as Scroller"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   694
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   695
    ^ Scroller handleShadowFormOn:aDisplay
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   696
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   697
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   698
snapIcons
4632
475e0ac05fbb class: VariablePanel
Stefan Vogel <sv@exept.de>
parents: 4624
diff changeset
   699
    "return a dictionary of snapIcons"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   700
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   701
    DefaultSnapIcons isNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   702
        DefaultSnapIcons := IdentityDictionary new.
6423
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   703
        View defaultBackgroundColor brightness < 0.4 ifTrue:[
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   704
            DefaultSnapIcons at:#iconUp    put:self snapIconUp_dark.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   705
            DefaultSnapIcons at:#iconRight put:self snapIconRight_dark.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   706
            DefaultSnapIcons at:#iconDown  put:self snapIconDown_dark.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   707
            DefaultSnapIcons at:#iconLeft  put:self snapIconLeft_dark.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   708
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   709
            DefaultSnapIcons at:#iconUpDown    put:self snapIconUpDown_dark.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   710
            DefaultSnapIcons at:#iconLeftRight put:self snapIconLeftRight_dark.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   711
        ] ifFalse:[    
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   712
            DefaultSnapIcons at:#iconUp    put:self snapIconUp.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   713
            DefaultSnapIcons at:#iconRight put:self snapIconRight.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   714
            DefaultSnapIcons at:#iconDown  put:self snapIconDown.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   715
            DefaultSnapIcons at:#iconLeft  put:self snapIconLeft.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   716
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   717
            DefaultSnapIcons at:#iconUpDown    put:self snapIconUpDown.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   718
            DefaultSnapIcons at:#iconLeftRight put:self snapIconLeftRight.
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   719
        ]
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   720
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   721
    ^ DefaultSnapIcons
4632
475e0ac05fbb class: VariablePanel
Stefan Vogel <sv@exept.de>
parents: 4624
diff changeset
   722
475e0ac05fbb class: VariablePanel
Stefan Vogel <sv@exept.de>
parents: 4624
diff changeset
   723
    "
475e0ac05fbb class: VariablePanel
Stefan Vogel <sv@exept.de>
parents: 4624
diff changeset
   724
        DefaultSnapIcons := nil.
475e0ac05fbb class: VariablePanel
Stefan Vogel <sv@exept.de>
parents: 4624
diff changeset
   725
        self snapIcons
475e0ac05fbb class: VariablePanel
Stefan Vogel <sv@exept.de>
parents: 4624
diff changeset
   726
    "
6423
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   727
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   728
    "Modified: / 01-09-2018 / 08:50:30 / Claus Gittinger"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   729
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   730
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   731
updateStyleCache
441
e170bca66a78 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
   732
    "extract values from the styleSheet and cache them in class variables"
e170bca66a78 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
   733
6462
3c89df33aaa1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
   734
    <resource: #style (#'variablePanel.showHandle'
3c89df33aaa1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
   735
                       #'variablePanel.showHandleWhenEntered'        
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   736
                       #'variablePanel.handleStyle'
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   737
                       #'variablePanel.handleImage'
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   738
                       #'variablePanel.handlePosition' 
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   739
                       #'variablePanel.handleLevel'
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   740
                       #'variablePanel.snapHandlePosition' 
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   741
                       #'variablePanel.trackingLine'   
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   742
                       #'variablePanel.trackingStyle'
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   743
                       #'variablePanel.separatingLine' 
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
   744
                       #'variablePanel.handleColor'
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
   745
                       #'variablePanel.backgroundColor'
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
   746
                       #'variablePanel.barSideLineColor')>
441
e170bca66a78 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
   747
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   748
    |lineModeBoolean|
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   749
6424
c28a409e8649 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6423
diff changeset
   750
    DefaultSnapIcons := nil.
2084
5e2d277d82a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
   751
    DefaultVCursor := DefaultHCursor := nil.
5e2d277d82a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
   752
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   753
    DefaultShowHandle := StyleSheet at:#'variablePanel.showHandle' default:true.
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   754
    DefaultShowHandleWhenEntered := StyleSheet at:#'variablePanel.showHandleWhenEntered' default:false.
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   755
    DefaultHandleStyle := StyleSheet at:#'variablePanel.handleStyle'.
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   756
    DefaultHandlePosition := StyleSheet at:#'variablePanel.handlePosition' "default:#right".
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   757
    DefaultHandlePosition isNil ifTrue:[
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   758
        DefaultHandlePosition := ScrollableView defaultScrollBarPosition.
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   759
    ].
2252
67269562b687 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2244
diff changeset
   760
    DefaultSnapHandlePosition := StyleSheet at:#'variablePanel.snapHandlePosition' default:DefaultHandlePosition.
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   761
    DefaultHandleLevel := StyleSheet at:#'variablePanel.handleLevel' default:2.
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   762
    DefaultTrackingLine := StyleSheet at:#'variablePanel.trackingStyle'.
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   763
    DefaultTrackingLine isNil ifTrue:[
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   764
        lineModeBoolean := StyleSheet at:#'variablePanel.trackingLine' default:false.
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   765
        lineModeBoolean ifTrue:[
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   766
            DefaultTrackingLine := #solidLine
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   767
        ] ifFalse:[
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   768
            DefaultTrackingLine := #solidRectangle
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   769
        ]
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   770
    ].
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   771
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   772
    DefaultSeparatingLine := StyleSheet at:#'variablePanel.separatingLine' default:false.
4920
78c00f9e85d2 class: VariablePanel
Stefan Vogel <sv@exept.de>
parents: 4862
diff changeset
   773
    DefaultHandleColor := StyleSheet colorAt:#'variablePanel.handleColor' default:Color black.
441
e170bca66a78 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
   774
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
   775
    DefaultHandleImage := StyleSheet at:#'variablePanel.handleImage'.
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
   776
    DefaultSideLineColor := StyleSheet colorAt:#'variablePanel.barSideLineColor'.
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
   777
    DefaultBarWidth := StyleSheet at:#'variablePanel.barWidth'.
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
   778
    DefaultBackgroundColor := StyleSheet colorAt:#'variablePanel.backgroundColor'.
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   779
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   780
    "
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   781
     VariablePanel updateStyleCache
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   782
    "
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   783
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   784
    "Modified: / 19-12-2010 / 09:39:50 / cg"
6462
3c89df33aaa1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
   785
    "Modified: / 22-10-2018 / 23:23:22 / Claus Gittinger"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   786
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   787
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   788
!VariablePanel class methodsFor:'image specs'!
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   789
5728
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   790
horizontalResizeCursor
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   791
    "This resource specification was automatically generated
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   792
     by the ImageEditor of ST/X."
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   793
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   794
    "Do not manually edit this!! If it is corrupted,
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   795
     the ImageEditor may not be able to read the specification."
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   796
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   797
    "
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   798
     self horizontalResizeCursor inspect
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   799
     ImageEditor openOnClass:self andSelector:#horizontalResizeCursor
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   800
     Icon flushCachedIcons
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   801
    "
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   802
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   803
    <resource: #image>
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   804
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   805
    ^Icon
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   806
        constantNamed:'VariablePanel horizontalResizeCursor'
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   807
        ifAbsentPut:[(Depth1Image width:16 height:16) bits:(ByteArray fromPackedString:'@X@A @F@@X@!!!!AFHBYC=/0&PDX !!!!@F@@X@A @F@@@@b')
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   808
            colorMapFromArray:#[255 255 255 0 0 0]
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   809
            mask:((ImageMask width:16 height:16) bits:(ByteArray fromPackedString:'@<@C0@O@X<Y33#/\????????N=133&OF@<@C0@O@@@@b'); yourself); yourself]
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   810
!
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
   811
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   812
snapIconDown
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   813
    <resource: #image>
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   814
    "This resource specification was automatically generated
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   815
     by the ImageEditor of ST/X."
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   816
    "Do not manually edit this!! If it is corrupted,
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   817
     the ImageEditor may not be able to read the specification."
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   818
    "
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   819
     self snapIconDown inspect
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   820
     ImageEditor openOnClass:self andSelector:#snapIconDown"
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   821
    
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   822
    ^ Icon constantNamed:#'VariablePanel class snapIconDown'
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   823
        ifAbsentPut:[
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   824
            (Depth2Image new)
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   825
                width:62;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   826
                height:5;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   827
                photometric:(#palette);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   828
                bitsPerSample:(#( 2 ));
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   829
                samplesPerPixel:(1);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   830
                bits:(ByteArray 
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   831
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B(J *F(Z!!*F(Z!!*@@@@@@@!!BDHQ!!FDXQ!!FDXP@@H@@@EPUATEPUATEPUAT@@@@@@@@@@@@@@@@@@@@@@@@@b');
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   832
                colorMapFromArray:#[ 0 0 0 68 68 68 255 255 255 ];
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   833
                mask:((ImageMask new)
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   834
                            width:62;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   835
                            height:5;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   836
                            bits:(ByteArray 
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   837
                                        fromPackedString:'@@@@@@@@@@A?LX1#FLX3>C8)R%JT)R''0GA#FLX1#FN@H@@@@@@@@P@@a');
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   838
                            yourself);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   839
                yourself
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   840
        ]
2482
b499b4a10907 fixed removeSubView
martin
parents: 2305
diff changeset
   841
!
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   842
6423
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   843
snapIconDown_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   844
    "This resource specification was automatically generated
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   845
     by the ImageEditor of ST/X."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   846
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   847
    "Do not manually edit this!! If it is corrupted,
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   848
     the ImageEditor may not be able to read the specification."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   849
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   850
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   851
     self snapIconDown_dark inspect
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   852
     ImageEditor openOnClass:self andSelector:#snapIconDown_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   853
     Icon flushCachedIcons
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   854
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   855
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   856
    <resource: #image>
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   857
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   858
    ^Icon
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   859
        constantNamed:'VariablePanel class snapIconDown_dark'
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   860
        ifAbsentPut:[(Depth2Image width:62 height:5) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@C??C8O >G8_!!>G8_!!>O?<@O?@1CDLQ1GD\Q1GD\P?<H@?@EPUATEPUATEPUATC<@@C@@@@@@@@@@@@@@@@@L@@b')
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   861
            colorMapFromArray:#[0 0 0 68 68 68 255 255 255 191 191 191]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   862
            mask:((ImageMask width:62 height:5) bits:(ByteArray fromPackedString:'@@@@@@@@@@A?LX1#FLX3>C8)R%JT)R''0GA#FLX1#FN@H@@@@@@@@P@@a'); yourself); yourself]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   863
!
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   864
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   865
snapIconLeft
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   866
    <resource: #image>
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   867
    "This resource specification was automatically generated
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   868
     by the ImageEditor of ST/X."
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   869
    "Do not manually edit this!! If it is corrupted,
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   870
     the ImageEditor may not be able to read the specification."
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   871
    "
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   872
     self snapIconLeft inspect
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   873
     ImageEditor openOnClass:self andSelector:#snapIconLeft"
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   874
    
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   875
    ^ Icon constantNamed:#'VariablePanel class snapIconLeft'
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   876
        ifAbsentPut:[
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   877
            (Depth2Image new)
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   878
                width:5;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   879
                height:62;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   880
                photometric:(#palette);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   881
                bitsPerSample:(#( 2 ));
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   882
                samplesPerPixel:(1);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   883
                bits:(ByteArray 
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   884
                            fromPackedString:'
2590
9e2e11f928f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2533
diff changeset
   885
@C @B@@@@@@@@@@@@@@@@@@P@C@)@BD@IP@@@@@BJP@!!@BT@@@@@@B$HHP %@@@@AP@)@BD@IP@@D@T0JP@!!@BT@@@@ED2$@HP@%@@@@AP@)ARDHIP@@@@T@
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   886
JP@!!@BT@@A@ELB @HP@E@@@@@C\@@@@@@@@@@@@@@@T@B@@a');
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   887
                colorMapFromArray:#[ 0 0 0 68 68 68 255 255 255 ];
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   888
                mask:((ImageMask new)
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   889
                            width:5;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   890
                            height:62;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   891
                            bits:(ByteArray 
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   892
                                        fromPackedString:'@A@0\OA0LA@D@6UPL@@@XE@0@@A TC@@@FAPL@@@XE@0@@A UCLD@FAPL@@@XE@0@@A TC@@DCA0=''T0D@@b');
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   893
                            yourself);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   894
                yourself
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   895
        ]
2482
b499b4a10907 fixed removeSubView
martin
parents: 2305
diff changeset
   896
!
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   897
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   898
snapIconLeftRight
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   899
    "This resource specification was automatically generated
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   900
     by the ImageEditor of ST/X."
6371
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   901
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   902
    "Do not manually edit this!! If it is corrupted,
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   903
     the ImageEditor may not be able to read the specification."
6371
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   904
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   905
    "
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   906
     self snapIconLeftRight inspect
6371
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   907
     ImageEditor openOnClass:self andSelector:#snapIconLeftRight
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   908
     Icon flushCachedIcons
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   909
    "
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   910
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   911
    <resource: #image>
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   912
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   913
    ^Icon
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   914
        constantNamed:'VariablePanel class snapIconLeftRight'
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   915
        ifAbsentPut:[(Depth2Image width:5 height:62) bits:(ByteArray fromPackedString:'
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   916
@@@@@@@K@AH@@@@@@AX@L@@@@@@(@BD@AQD@B@@FJ#@!!@AT@@@@@@@@@@@B*$P@H@AD*LBD@EP@@@@@@J"\!!B1T@@@@@E"(0HP@U@@@@@@B*$P@H*(X@L@@@
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   917
J @!!@AT@@@@@@B(RHP UDP@0@@@@@@@@@@@@I0@K@@@@@@@a')
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   918
            colorMapFromArray:#[0 0 0 68 68 68 255 255 255]
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
   919
            mask:((ImageMask width:5 height:62) bits:(ByteArray fromPackedString:' LC <NK@ @@A@&QPLP@@XE@0@@@D?? A@VAPL@@@XE@0@@A TCL@@@C8>@@BXE@0@PY$TCD@@A@0\OA0LAXb'); yourself); yourself]
2482
b499b4a10907 fixed removeSubView
martin
parents: 2305
diff changeset
   920
!
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   921
6423
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   922
snapIconLeftRight_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   923
    "This resource specification was automatically generated
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   924
     by the ImageEditor of ST/X."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   925
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   926
    "Do not manually edit this!! If it is corrupted,
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   927
     the ImageEditor may not be able to read the specification."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   928
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   929
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   930
     self snapIconLeftRight_dark inspect
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   931
     ImageEditor openOnClass:self andSelector:#snapIconLeftRight_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   932
     Icon flushCachedIcons
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   933
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   934
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   935
    <resource: #image>
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   936
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   937
    ^Icon
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   938
        constantNamed:'VariablePanel class snapIconLeftRight_dark'
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   939
        ifAbsentPut:[(Depth2Image width:5 height:62) bits:(ByteArray fromPackedString:'
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   940
 @B @J K*!!J(@J@@ AX@L@@@@@@(@BD@AQD@B@@FJ#@!!@AT@@@@@@@@@@@B*$P@H@AD*LBD@EP@@@@@@J"\!!B1T@@@@@E"(0HP@U@@@@@@B*$P@H*(X@L@@@
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   941
J @!!@AT@@@@@@B(RHP UDP@0@@@B@@(@J B*I2(KB @B@@@a')
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   942
            colorMapFromArray:#[0 0 0 68 68 68 191 191 191]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   943
            mask:((ImageMask width:5 height:62) bits:(ByteArray fromPackedString:' LC <NK@ @@A@&QPLP@@XE@0@@@D?? A@VAPL@@@XE@0@@A TCL@@@C8>@@BXE@0@PY$TCD@@A@0\OA0LAXb'); yourself); yourself]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   944
!
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   945
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   946
snapIconLeft_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   947
    "This resource specification was automatically generated
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   948
     by the ImageEditor of ST/X."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   949
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   950
    "Do not manually edit this!! If it is corrupted,
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   951
     the ImageEditor may not be able to read the specification."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   952
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   953
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   954
     self snapIconLeft_dark inspect
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   955
     ImageEditor openOnClass:self andSelector:#snapIconLeft_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   956
     Icon flushCachedIcons
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   957
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   958
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   959
    <resource: #image>
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   960
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   961
    ^Icon
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   962
        constantNamed:'VariablePanel class snapIconLeft_dark'
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   963
        ifAbsentPut:[(Depth2Image width:5 height:62) bits:(ByteArray fromPackedString:'
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   964
@C BB@(@J B*@B(@B @B@@@P@C@)@BD@IP@@@@@BJP@!!@BT@@@@@@B$HHP %@@@@AP@)@BD@IP@@D@T0JP@!!@BT@@@@ED2$@HP@%@@@@AP@)ARDHIP@@@@T@
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   965
JP@!!@BT@@A@ELB @HP@E@@@@@#\J@B(@* @*@@(@@ T@B@@a')
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   966
            colorMapFromArray:#[0 0 0 68 68 68 191 191 191]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   967
            mask:((ImageMask width:5 height:62) bits:(ByteArray fromPackedString:'@A@0\OA0LA@D@6UPL@@@XE@0@@A TC@@@FAPL@@@XE@0@@A UCLD@FAPL@@@XE@0@@A TC@@DCA0=''T0D@@b'); yourself); yourself]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   968
!
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
   969
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   970
snapIconRight
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   971
    <resource: #image>
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   972
    "This resource specification was automatically generated
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   973
     by the ImageEditor of ST/X."
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   974
    "Do not manually edit this!! If it is corrupted,
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   975
     the ImageEditor may not be able to read the specification."
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   976
    "
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
   977
     self snapIconRight inspect
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   978
     ImageEditor openOnClass:self andSelector:#snapIconRight"
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   979
    
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   980
    ^ Icon constantNamed:#'VariablePanel class snapIconRight'
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   981
        ifAbsentPut:[
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   982
            (Depth2Image new)
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   983
                width:5;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   984
                height:62;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   985
                photometric:(#palette);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   986
                bitsPerSample:(#( 2 ));
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   987
                samplesPerPixel:(1);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   988
                bits:(ByteArray 
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   989
                            fromPackedString:'
2590
9e2e11f928f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2533
diff changeset
   990
@@L@@@@@@@@@@@@@@AT@B@@@J@@!!@@T@E@@@@B(QHS@U@AP@@@@*@BD@EP@T@@@@J L!!@AT@E@@@DB(0HP@U@AP@@@@*J"D@EP@T@@@@J @!!B!!TH@@@@@B(@
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   991
HP@U@@@@@A@*LBD@EP@@@@@@@@X@@@@@@@@@@@@@@@ @B@@a');
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   992
                colorMapFromArray:#[ 0 0 0 68 68 68 255 255 255 ];
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   993
                mask:((ImageMask new)
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   994
                            width:5;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   995
                            height:62;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   996
                            bits:(ByteArray 
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   997
                                        fromPackedString:'@4A \G%2X4@AXE@0@@A TC@E@6AQL@@@XE@0@@A TC@@@6APL@@@XEL0@@A UC\@@VAPL@@@PFA0^''M PP@b');
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   998
                            yourself);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
   999
                yourself
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1000
        ]
2482
b499b4a10907 fixed removeSubView
martin
parents: 2305
diff changeset
  1001
!
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1002
6423
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1003
snapIconRight_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1004
    "This resource specification was automatically generated
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1005
     by the ImageEditor of ST/X."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1006
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1007
    "Do not manually edit this!! If it is corrupted,
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1008
     the ImageEditor may not be able to read the specification."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1009
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1010
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1011
     self snapIconRight_dark inspect
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1012
     ImageEditor openOnClass:self andSelector:#snapIconRight_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1013
     Icon flushCachedIcons
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1014
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1015
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1016
    <resource: #image>
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1017
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1018
    ^Icon
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1019
        constantNamed:'VariablePanel class snapIconRight_dark'
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1020
        ifAbsentPut:[(Depth2Image width:5 height:62) bits:(ByteArray fromPackedString:'
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1021
@@L @B @J @* B(@JAT B@@@J@@!!@@T@E@@@@B(QHS@U@AP@@@@*@BD@EP@T@@@@J L!!@AT@E@@@DB(0HP@U@AP@@@@*J"D@EP@T@@@@J @!!B!!TH@@@@@B(@
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1022
HP@U@@@@@A@*LBD@EP@@@@@@H@X(@B(@J(@*@B @H@ @B@@a')
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1023
            colorMapFromArray:#[0 0 0 68 68 68 191 191 191]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1024
            mask:((ImageMask width:5 height:62) bits:(ByteArray fromPackedString:'@4A \G%2X4@AXE@0@@A TC@E@6AQL@@@XE@0@@A TC@@@6APL@@@XEL0@@A UC\@@VAPL@@@PFA0^''M PP@b'); yourself); yourself]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1025
!
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1026
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1027
snapIconUp
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1028
    <resource: #image>
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1029
    "This resource specification was automatically generated
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1030
     by the ImageEditor of ST/X."
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1031
    "Do not manually edit this!! If it is corrupted,
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1032
     the ImageEditor may not be able to read the specification."
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1033
    "
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1034
     self snapIconUp inspect
5038
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1035
     ImageEditor openOnClass:self andSelector:#snapIconUp"
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1036
    
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1037
    ^ Icon constantNamed:#'VariablePanel class snapIconUp'
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1038
        ifAbsentPut:[
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1039
            (Depth2Image new)
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1040
                width:62;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1041
                height:5;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1042
                photometric:(#palette);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1043
                bitsPerSample:(#( 2 ));
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1044
                samplesPerPixel:(1);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1045
                bits:(ByteArray 
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1046
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@J *B(J *B(J (B @@@@@@BEHT!!REHT!!RDHP!!@@@@@@@EPUATEPUATE@TAP@@@@@@@@@@@@@@@@@@@@@@@@@b');
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1047
                colorMapFromArray:#[ 0 0 0 68 68 68 255 255 255 ];
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1048
                mask:((ImageMask new)
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1049
                            width:62;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1050
                            height:5;
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1051
                            bits:(ByteArray 
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1052
                                        fromPackedString:'B@@@@@@@@D@\X1#FLX1 8C9R%JT)R%G0_3FLX1#FL? @@@@@@@@@@@@a');
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1053
                            yourself);
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1054
                yourself
72bac0ffb15f Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 4980
diff changeset
  1055
        ]
2482
b499b4a10907 fixed removeSubView
martin
parents: 2305
diff changeset
  1056
!
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1057
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1058
snapIconUpDown
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1059
    "This resource specification was automatically generated
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1060
     by the ImageEditor of ST/X."
6371
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1061
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1062
    "Do not manually edit this!! If it is corrupted,
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1063
     the ImageEditor may not be able to read the specification."
6371
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1064
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1065
    "
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1066
     self snapIconUpDown inspect
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1067
     ImageEditor openOnClass:self andSelector:#snapIconUpDown
6371
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1068
     Icon flushCachedIcons
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1069
    "
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1070
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1071
    <resource: #image>
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1072
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1073
    ^Icon
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1074
        constantNamed:'VariablePanel class snapIconUpDown'
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1075
        ifAbsentPut:[(Depth2Image width:62 height:5) bits:(ByteArray fromPackedString:'@@@@@@@H@@@@@@ @@@@@@@@@B J@BB J@(@HJ@(@@@@@@@!!BDE !!BDHPFBDHP@@@@@@APE@HAPE@T@ E@T@@@@@@@@@@B@@@@@@H@@@@@@@b')
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1076
            colorMapFromArray:#[0 0 0 68 68 68 255 255 255]
9a8eccb381fe #UI_ENHANCEMENT by Lukas Vogel
lukas
parents: 6335
diff changeset
  1077
            mask:((ImageMask width:62 height:5) bits:(ByteArray fromPackedString:'@@@F@@A @@@PLXY#FFX1?C )Q%JTYR#8_A#FLX1#FGC>@@X@@F@@H@@a'); yourself); yourself]
5728
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1078
!
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1079
6423
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1080
snapIconUpDown_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1081
    "This resource specification was automatically generated
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1082
     by the ImageEditor of ST/X."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1083
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1084
    "Do not manually edit this!! If it is corrupted,
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1085
     the ImageEditor may not be able to read the specification."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1086
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1087
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1088
     self snapIconUpDown_dark inspect
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1089
     ImageEditor openOnClass:self andSelector:#snapIconUpDown_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1090
     Icon flushCachedIcons
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1091
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1092
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1093
    <resource: #image>
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1094
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1095
    ^Icon
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1096
        constantNamed:'VariablePanel class snapIconUpDown_dark'
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1097
        ifAbsentPut:[(Depth2Image width:62 height:5) bits:(ByteArray fromPackedString:'@@@@@@@H@@@@@@ @@@@@@@H@B J@BB J@(@HJ@(B**@J @!!BDE !!BDHPFBDHPJ*@J*@APE@HAPE@T@ E@T@*@J*(@@@@B@@@@@@H@@@@B@@b')
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1098
            colorMapFromArray:#[0 0 0 68 68 68 191 191 191]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1099
            mask:((ImageMask width:62 height:5) bits:(ByteArray fromPackedString:'@@@F@@A @@@PLXY#FFX1?C )Q%JTYR#8_A#FLX1#FGC>@@X@@F@@H@@a'); yourself); yourself]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1100
!
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1101
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1102
snapIconUp_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1103
    "This resource specification was automatically generated
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1104
     by the ImageEditor of ST/X."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1105
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1106
    "Do not manually edit this!! If it is corrupted,
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1107
     the ImageEditor may not be able to read the specification."
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1108
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1109
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1110
     self snapIconUp_dark inspect
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1111
     ImageEditor openOnClass:self andSelector:#snapIconUp_dark
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1112
     Icon flushCachedIcons
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1113
    "
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1114
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1115
    <resource: #image>
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1116
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1117
    ^Icon
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1118
        constantNamed:'VariablePanel class snapIconUp_dark'
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1119
        ifAbsentPut:[(Depth2Image width:62 height:5) bits:(ByteArray fromPackedString:'@H@@@@@@@@@@@@@@@@@ @@J J *B(J *B(J (B @*@@J*BEHT!!REHT!!RDHP!!@*(@J*(EPUATEPUATE@TAP** @@@@@@@@@@@@@@@@@@@@@@b')
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1120
            colorMapFromArray:#[0 0 0 68 68 68 191 191 191]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1121
            mask:((ImageMask width:62 height:5) bits:(ByteArray fromPackedString:'B@@@@@@@@D@\X1#FLX1 8C9R%JT)R%G0_3FLX1#FL? @@@@@@@@@@@@a'); yourself); yourself]
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1122
!
7b941de05551 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  1123
5728
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1124
verticalResizeCursor
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1125
    "This resource specification was automatically generated
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1126
     by the ImageEditor of ST/X."
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1127
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1128
    "Do not manually edit this!! If it is corrupted,
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1129
     the ImageEditor may not be able to read the specification."
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1130
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1131
    "
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1132
     self verticalResizeCursor inspect
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1133
     ImageEditor openOnClass:self andSelector:#verticalResizeCursor
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1134
     Icon flushCachedIcons
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1135
    "
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1136
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1137
    <resource: #image>
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1138
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1139
    ^Icon
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1140
        constantNamed:'VariablePanel verticalResizeCursor'
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1141
        ifAbsentPut:[(Depth1Image width:16 height:16) bits:(ByteArray fromPackedString:'@P@A@@$ AT@C @D@@@C??/?>@@@A@@N@AT@IH@D@@P@b')
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1142
            colorMapFromArray:#[255 255 255 0 0 0]
ae8ed1215e4d #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5632
diff changeset
  1143
            mask:((ImageMask width:16 height:16) bits:(ByteArray fromPackedString:'@8@[,A?0C>@G0@N@??;??/?>??8C @_@C>@_<A.0@8@b'); yourself); yourself]
2482
b499b4a10907 fixed removeSubView
martin
parents: 2305
diff changeset
  1144
! !
2269
4f1c764f1e53 icons beautified
Claus Gittinger <cg@exept.de>
parents: 2252
diff changeset
  1145
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1146
!VariablePanel methodsFor:'accessing-look'!
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1147
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1148
barHeight
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1149
    "return the height of the separating bar"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1150
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1151
    ^ barHeight
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1152
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1153
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1154
barHeight:nPixel
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1155
    "set the height of the separating bar"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1156
2108
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1157
    |bH|
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1158
5350
a2b284cfe6c3 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5261
diff changeset
  1159
    "make certain bar is visible and catchable (not smaller than 4 pixels)"
a2b284cfe6c3 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5261
diff changeset
  1160
    bH := nPixel max:4.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1161
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1162
    "make it even, so spacing is equally spreadable among subviews"
2108
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1163
    bH odd ifTrue:[
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1164
        bH := bH + 1
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1165
    ].
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1166
    self setBarHeight:bH
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1167
2108
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1168
    "Modified: / 28.4.1997 / 14:30:33 / dq"
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1169
    "Modified: / 30.1.2000 / 22:31:32 / cg"
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1170
!
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1171
2623
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1172
barLevel:level
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1173
    "set the 3D level of the separating bar"
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1174
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1175
    barLevel ~~ level ifTrue:[
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1176
        barLevel := level.
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1177
        self redrawIfShown.    
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1178
    ]
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1179
!
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1180
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1181
handleImage:aBitmapOrImage
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1182
    "define the handles image"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1183
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1184
    shadowForm := aBitmapOrImage.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1185
    lightForm := nil.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1186
    self computeBarHeight.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1187
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1188
    "Created: 7.11.1996 / 20:21:10 / cg"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1189
    "Modified: 7.11.1996 / 20:27:22 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1190
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1191
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1192
handleLabels:aCollectionOfLabels
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1193
    "define special handle labels - typically a collection of
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1194
     bitmap images. Notice, that the first handle is not
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1195
     drawn, that is, the first element if the argument is useless."
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1196
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1197
    orientation == #horizontal ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1198
        self error:'not allowed for horizontal panels'
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1199
    ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1200
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1201
    handleLabels := aCollectionOfLabels.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1202
    self computeBarHeight.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1203
    self resizeSubviews.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1204
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1205
    "
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1206
     |top panel v1 v2|
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1207
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1208
     top := StandardSystemView new.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1209
     panel := VariableVerticalPanel origin:0.0@0.0 corner:1.0@1.0 in:top.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1210
     panel add:(EditTextView origin:0.0@0.0 corner:1.0@0.5).
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1211
     panel add:(EditTextView origin:0.0@0.5 corner:1.0@1.0).
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1212
     panel handleStyle:nil.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1213
     panel handleLabels:#('foo' 'bar').
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1214
     top open
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1215
    "
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1216
!
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1217
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1218
handleLevel:aNumber
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1219
    "define the 3D level of the handle (only with some styles).
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1220
     Normally, this is defined via styleSheet files, but this entry allows
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1221
     individual views to be manipulated."
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1222
2244
9366bda63514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2243
diff changeset
  1223
    handleLevel ~~ aNumber ifTrue:[
9366bda63514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2243
diff changeset
  1224
        handleLevel := aNumber.
2623
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1225
        self redrawIfShown.    
2242
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1226
    ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1227
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1228
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1229
handlePosition
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1230
    "return the position of the handle"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1231
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1232
    ^ handlePosition
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1233
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1234
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1235
handlePosition:aSymbol
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1236
    "define the position of the handle; the argument aSymbol
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1237
     may be one of #left, #right or #center.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1238
     If never set by the program, the position is controlled by the styleSheet."
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1239
2244
9366bda63514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2243
diff changeset
  1240
    handlePosition ~~ aSymbol ifTrue:[
9366bda63514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2243
diff changeset
  1241
        handlePosition := aSymbol ? DefaultHandlePosition.
2623
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1242
        self redrawIfShown.    
2242
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1243
    ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1244
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1245
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1246
handleShadowImage:shadowImage lightImage:lightImage
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1247
    "define the handles image; both shadow and light parts"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1248
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1249
    shadowForm := shadowImage.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1250
    lightForm := lightImage.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1251
    self computeBarHeight.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1252
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1253
    "Created: 7.11.1996 / 20:21:51 / cg"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1254
    "Modified: 7.11.1996 / 20:27:26 / cg"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1255
!
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1256
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1257
handleStyle:styleSymbol
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1258
    "define the style of the handle;
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1259
     styleSymbol may be #motif to draw a little knob or
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1260
     anything else to draw scrollBars handleForm.
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1261
     Normally, this is defined via styleSheet files, but this entry allows
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1262
     individual views to be manipulated."
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1263
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1264
    (styleSymbol ~~ handleStyle) ifTrue:[
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1265
        handleStyle := styleSymbol.
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1266
        handleStyle == #next ifTrue:[
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  1267
            shadowForm := self class shadowFormOn:device.
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  1268
            lightForm := self class lightFormOn:device.
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1269
        ] ifFalse:[
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1270
            shadowForm := lightForm := nil
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1271
        ].
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1272
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1273
        shadowForm notNil ifTrue:[
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1274
            (self is3D and:[handleStyle ~~ #motif]) ifTrue:[
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1275
                self barHeight:(shadowForm height + 2).
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1276
                barWidth := shadowForm width
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1277
            ]
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1278
        ].
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1279
        shown ifTrue:[
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1280
            self resizeSubviews.
2623
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1281
            self redrawIfShown.    
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1282
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1283
    ]
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1284
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1285
    "Created: 24.2.1996 / 19:04:07 / cg"
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1286
    "Modified: 29.5.1996 / 16:22:24 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1287
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1288
4433
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1289
orientation
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1290
    "return my orientation; either #horizontal or #vertical"
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1291
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1292
    ^ orientation
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1293
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1294
    "Modified: 6.3.1996 / 18:08:45 / cg"
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1295
!
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1296
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1297
orientation:aSymbol
5473
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1298
    "change my orientation; aSymbol must be one of #horizontal or #vertical.
4433
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1299
     Changing implies a resize of my subViews."
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1300
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1301
    aSymbol ~~ orientation ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1302
        orientation := aSymbol.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1303
        self initCursor.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1304
        self anyNonRelativeSubviews ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1305
            self setupSubviews
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1306
        ].
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1307
        shown ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1308
            self cursor:cursor.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1309
            self sizeChanged:nil.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1310
            self redrawIfShown.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1311
        ]
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1312
    ]
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1313
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1314
    "Modified: 29.5.1996 / 16:22:35 / cg"
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1315
!
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1316
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1317
relativeCorners
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1318
    "the returned collection gives the corner-fractional value for each component;
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1319
     i.e. for a 20-40-40 look, it would be #(0.2 0.6 1.0)"
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1320
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1321
    ^ self subViews 
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1322
        collect:[:eachView | 
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1323
                self isHorizontal ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1324
                    eachView relativeCorner x
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1325
                ] ifFalse:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1326
                    eachView relativeCorner y
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1327
                ]
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1328
        ]
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1329
!
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1330
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1331
relativeCorners:aCollectionOfRelativeCornerPositions
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1332
    "the argument gives the corner-fractional value for each component;
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1333
     i.e. for a 20-40-40 look, it would be #(0.2 0.6 1.0)"
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1334
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1335
    |pos|
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1336
5563
Claus Gittinger <cg@exept.de>
parents: 5535
diff changeset
  1337
    aCollectionOfRelativeCornerPositions size == self subViews size ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 5535
diff changeset
  1338
        'VariablePanel [info]: size mismatch in relativeCorners' infoPrintCR.
Claus Gittinger <cg@exept.de>
parents: 5535
diff changeset
  1339
        ^ self 
Claus Gittinger <cg@exept.de>
parents: 5535
diff changeset
  1340
    ].
4433
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1341
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1342
    pos := 0.0.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1343
    self subViews with:aCollectionOfRelativeCornerPositions 
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1344
        do:[:eachView :eachCorner |
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1345
            self isHorizontal ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1346
                eachView origin:(pos @ 0.0) corner:(eachCorner @ 1.0)
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1347
            ] ifFalse:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1348
                eachView origin:(0.0 @ pos) corner:(1.0 @ eachCorner)
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1349
            ].
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1350
            pos := eachCorner
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1351
        ].
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1352
    self realized ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1353
        self resizeSubviews
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1354
    ].
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1355
!
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1356
1948
e92d1005d6a3 direct access to barHeight
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
  1357
setBarHeight:nPixel
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1358
    "check whether snap matches to extent of bar otherwise disable snap"
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1359
5473
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1360
    |newBarHeight|
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1361
    
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1362
    snapAdornment notNil ifTrue:[
5473
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1363
        newBarHeight := nPixel max:(snapAdornment height ? 0)
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1364
    ] ifFalse:[
5473
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1365
        newBarHeight := nPixel max:0
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1366
    ].
5473
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1367
    newBarHeight := newBarHeight max:(styleSheet at:#'variablePanel.minBarHeight' default:newBarHeight).
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1368
    newBarHeight ~= barHeight ifTrue:[
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1369
        barHeight := newBarHeight.
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1370
        realized ifTrue:[
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1371
            self resizeSubviews
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1372
        ]
2108
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
  1373
    ]
1948
e92d1005d6a3 direct access to barHeight
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
  1374
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1375
    "Modified: / 31-10-2010 / 13:00:06 / cg"
1948
e92d1005d6a3 direct access to barHeight
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
  1376
!
e92d1005d6a3 direct access to barHeight
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
  1377
2114
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1378
showHandle
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1379
    "handle-drawing enabled/disable; a Boolean"
2114
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1380
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1381
    ^ showHandle
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1382
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1383
    "Modified: / 19-12-2010 / 09:28:31 / cg"
2114
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1384
!
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1385
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1386
showHandle:aBoolean
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1387
    "enabled/disable the handle-drawing"
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1388
2244
9366bda63514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2243
diff changeset
  1389
    showHandle ~~ aBoolean ifTrue:[
9366bda63514 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2243
diff changeset
  1390
        showHandle := aBoolean ? DefaultShowHandle.
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1391
        self invalidate. "/ redrawIfShown
2242
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1392
    ]
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1393
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1394
    "Modified: / 19-12-2010 / 09:30:49 / cg"
6463
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  1395
    "Modified: / 22-10-2018 / 23:50:25 / Claus Gittinger"
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1396
!
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1397
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1398
showHandleWhenEntered
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1399
    "return aBoolean"
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1400
6463
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  1401
    ^ showHandleWhenEntered ? false
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1402
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1403
    "Created: / 19-12-2010 / 09:27:40 / cg"
6463
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  1404
    "Modified: / 22-10-2018 / 23:40:21 / Claus Gittinger"
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1405
!
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1406
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1407
showHandleWhenEntered:aBoolean
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1408
    "enabled/disable the handle-drawing"
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1409
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1410
    showHandleWhenEntered ~~ aBoolean ifTrue:[
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1411
        showHandleWhenEntered := aBoolean ? DefaultShowHandleWhenEntered.
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1412
        self invalidate. "/ redrawIfShown
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1413
    ]
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1414
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  1415
    "Created: / 19-12-2010 / 09:28:04 / cg"
2114
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1416
!
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
  1417
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1418
snapHandlePosition
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1419
    "return the position of the snap-handle"
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1420
2242
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1421
    ^ self handlePosition. "/ ^ snapHandlePosition
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1422
!
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1423
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1424
snapHandlePosition:aSymbol
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1425
    "define the position of the snap-handle; the argument aSymbol
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1426
     may be one of #left, #right or #center.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1427
     If never set by the program, the position is controlled by the styleSheet."
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1428
2242
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1429
    self handlePosition:aSymbol.
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1430
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1431
"/    snapHandlePosition := aSymbol.
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1432
"/    realized ifTrue:[
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1433
"/        self invalidate
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  1434
"/    ]
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1435
!
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1436
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1437
snapMode
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1438
    "allowed modes are:
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1439
        nil             no snap
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1440
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1441
        #max            on press the view is increased to bottom(vertical) or right(horizontal)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1442
        #min            on press the view is decreased to top   (vertical) or left (horizontal)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1443
        #maxMin         on press the view is increased or decreased dependent on its current extent
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1444
        #minMax         on press the view is increased or decreased dependent on its current extent
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1445
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1446
    snapAdornment notNil ifTrue:[
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1447
        ^ snapAdornment mode
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1448
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1449
    ^ nil
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1450
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1451
    "Modified: / 31-10-2010 / 13:00:16 / cg"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1452
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1453
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1454
snapMode:aMode
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1455
    "allowed modes are:
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1456
        nil             no snap
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1457
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1458
        #max            on press the view is increased to bottom(vertical) or right(horizontal)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1459
        #min            on press the view is decreased to top   (vertical) or left (horizontal)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1460
        #maxMin         on press the view is increased or decreased dependent on its current extent
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1461
        #minMax         on press the view is increased or decreased dependent on its current extent
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1462
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1463
    |oldHeight oldMode|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1464
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1465
    aMode notNil ifTrue:[
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1466
        ( #( max min maxMin minMax both) includes:aMode) ifFalse:[
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1467
            ^ self error:('unknown snapMode: ', aMode printString).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1468
        ]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1469
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1470
    (oldMode := self snapMode) == aMode ifTrue:[^ self].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1471
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1472
    (snapAdornment notNil and:[aMode notNil]) ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1473
        "must only redraw"
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1474
        snapAdornment mode:aMode
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1475
    ] ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1476
        "must recompute barHeight and redraw"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1477
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1478
        aMode isNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1479
            snapAdornment := nil
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1480
        ] ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1481
            self initSnapAdornment.
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1482
            snapAdornment mode:aMode.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1483
        ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1484
        oldHeight := barHeight.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1485
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1486
        self computeBarHeight.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1487
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1488
        oldHeight ~~ barHeight ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1489
            "must recompute subViews"
5473
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1490
"/            realized ifFalse:[
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1491
"/                needResize := true.
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1492
"/                ^ self.
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  1493
"/            ].
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1494
            self setupSubviews.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1495
            self resizeSubviews.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1496
        ]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1497
    ].
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1498
    self redrawIfShown.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1499
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1500
    "Modified: / 31-10-2010 / 13:00:39 / cg"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1501
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1502
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1503
style:styleSymbol
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1504
    "define the style of the handle;
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1505
     styleSymbol may be #motif to draw a little knob or
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1506
     anything else to draw scrollBars handleForm.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1507
     Normally, this is defined via styleSheet files, but this entry allows
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1508
     individual views to be manipulated."
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1509
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1510
    self handleStyle:styleSymbol
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1511
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1512
    "Modified: 24.2.1996 / 19:04:19 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1513
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1514
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1515
!VariablePanel methodsFor:'adding & removing components'!
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1516
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1517
addSubView:aView
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1518
    "a view is added; adjust other subviews sizes"
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1519
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1520
    super addSubView:aView.
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1521
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1522
    realized ifTrue:[
2482
b499b4a10907 fixed removeSubView
martin
parents: 2305
diff changeset
  1523
        self setupSubviews.
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1524
        self resizeSubviews.
2483
94560abb05ce fixed removeSubView
martin
parents: 2482
diff changeset
  1525
        aView beVisible.
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1526
    ]
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1527
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1528
    "Created: 17.1.1996 / 22:41:00 / cg"
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1529
    "Modified: 24.2.1996 / 19:05:05 / cg"
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1530
!
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1531
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1532
removeSubView:aView
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1533
    "a view is removed; adjust other subviews sizes"
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1534
2483
94560abb05ce fixed removeSubView
martin
parents: 2482
diff changeset
  1535
    aView beInvisible.
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1536
    super removeSubView:aView.
2483
94560abb05ce fixed removeSubView
martin
parents: 2482
diff changeset
  1537
    shown ifTrue:[             
94560abb05ce fixed removeSubView
martin
parents: 2482
diff changeset
  1538
        realized 
94560abb05ce fixed removeSubView
martin
parents: 2482
diff changeset
  1539
        "/ (superView isNil or:[superView shown]) 
94560abb05ce fixed removeSubView
martin
parents: 2482
diff changeset
  1540
        ifTrue:[
5535
Claus Gittinger <cg@exept.de>
parents: 5476
diff changeset
  1541
            self isBeingDestroyed ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 5476
diff changeset
  1542
                self setupSubviews.
Claus Gittinger <cg@exept.de>
parents: 5476
diff changeset
  1543
                self resizeSubviews.
Claus Gittinger <cg@exept.de>
parents: 5476
diff changeset
  1544
            ]
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1545
        ]
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1546
    ]
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1547
! !
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  1548
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1549
!VariablePanel methodsFor:'drawing'!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1550
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  1551
clearAndInvalidate
5997
3bfbd15008fe #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 5952
diff changeset
  1552
    realized ifTrue:[ self clear ].
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  1553
    self invalidate.
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  1554
!
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  1555
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1556
drawHandle:hIndex atX:hx y:hy
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1557
    "draw a single handle at hx/hy"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1558
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1559
    |h w x y m xm ym lbl maxKnob
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1560
     mar           "{ Class: SmallInteger }"
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1561
     barWidthInt   "{ Class: SmallInteger }"
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1562
     barHeightInt  "{ Class: SmallInteger }" |
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1563
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1564
    ((handleStyle isNil or:[handleStyle == #none])
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1565
    and:[handleLabels isNil]) ifTrue:[^ self].
396
973d4a9fa32c setting handleStyle to nil disables handleDrawing
Claus Gittinger <cg@exept.de>
parents: 395
diff changeset
  1566
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1567
    mar := margin.
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1568
    barHeightInt := barHeight.
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1569
    barWidthInt := barWidth.
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1570
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1571
    shadowForm notNil ifTrue:[
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1572
        h := shadowForm height.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1573
        w := shadowForm width .
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1574
        maxKnob := h min:barHeightInt.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1575
    ] ifFalse:[
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1576
        maxKnob := knobHeight min: barHeightInt.
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1577
        maxKnob := maxKnob max:4.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1578
        handleStyle == #full ifTrue:[
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1579
            w := h := maxKnob
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1580
        ] ifFalse:[
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1581
            w := h := maxKnob - 4.
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1582
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1583
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1584
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1585
    gc paint:viewBackground.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1586
    gc lineStyle:#solid.
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1587
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1588
    orientation == #vertical ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1589
        gc fillRectangleX:mar y:hy width:(width - mar - mar) height:barHeightInt.
2623
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1590
        (handleStyle notNil
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1591
        and:[handleStyle ~~ #none]) ifTrue:[
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1592
            (handleStyle ~~ #normal 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1593
            and:[handleStyle ~~ #mswindows]) ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1594
                m := (maxKnob - h) // 2.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1595
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1596
                shadowForm isNil ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1597
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1598
                    y := hy + (barHeightInt // 2).   "/ center of the bar
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1599
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1600
                    separatingLine ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1601
                        gc paint:shadowColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1602
                        gc displayLineFromX:mar y:y toX:(width - mar) y:y.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1603
                        y := y + 1.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1604
                        gc paint:lightColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1605
                        gc displayLineFromX:mar y:y toX:(width - mar) y:y.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1606
                        gc paint:viewBackground.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1607
                    ].
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1608
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1609
                    gc fillRectangleX:(hx - barWidthInt) y:hy 
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1610
                       width:(barWidthInt + barWidthInt) height:h.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1611
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1612
                    handleStyle == #line ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1613
                        gc paint:handleColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1614
                        gc displayLineFromX:hx - barWidthInt y:y toX:hx + barWidthInt y:y
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1615
                    ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1616
                        y := hy.   
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1617
                        handleStyle == #st80 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1618
                            y := y - 1
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1619
                        ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1620
                        ym := y + m.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1621
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1622
                        handleStyle == #full ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1623
                            handleLevel ~~ 0 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1624
                                self 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1625
                                    drawEdgesForX:0 "/ -(handleLevel abs)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1626
                                    y:ym "/-1
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1627
                                    width:width "/+(handleLevel+handleLevel)abs
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1628
                                    height:h-2 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1629
                                    level:handleLevel
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1630
                                    shadow:shadowColor 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1631
                                    light:lightColor
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1632
                                    halfShadow:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1633
                                    halfLight:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1634
                                    style:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1635
                            ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1636
                        ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1637
                            handleLevel ~~ 0 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1638
                                self drawEdgesForX:(hx - barWidthInt)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1639
                                                 y:ym
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1640
                                             width:(barWidthInt + barWidthInt)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1641
                                            height:h 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1642
                                             level:handleLevel.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1643
                            ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1644
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1645
                            handleStyle == #iris ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1646
                                gc paint:handleColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1647
                                gc fillDeviceRectangleX:(hx - barWidthInt + 2) y:(ym + 2)
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1648
                                   width:(barWidthInt + barWidthInt - 4) height:h - 4
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1649
                            ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1650
                        ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1651
                    ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1652
                ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1653
                    y := hy.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1654
                    (shadowForm notNil or:[lightForm notNil]) ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1655
                        self drawHandleFormAtX:hx y:(y + m)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1656
                    ]
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1657
                ].
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1658
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1659
                handleStyle == #st80 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1660
                    y := hy - 1.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1661
                    gc paint:lightColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1662
                    gc displayLineFromX:mar y:y toX:(width - mar - mar - 1) y:y.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1663
                    gc displayLineFromX:0 y:hy toX:0 y:(hy + knobHeight - 1).
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1664
                    y := hy + knobHeight - 2.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1665
                    gc paint:shadowColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1666
                    gc displayLineFromX:mar y:y toX:(width - mar) y:y.
5952
cee3905f1661 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 5821
diff changeset
  1667
                        "uncomment the -1 if you don't like the notch at the right end"
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1668
                        "                            VVV"
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1669
                    gc displayLineFromX:width-1 y:hy" "-1" " toX:width-1 y:(hy + knobHeight - 1 - 1).
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1670
                ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1671
            ] ifFalse:[
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1672
                y := hy + barHeightInt - 1.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1673
                gc paint:handleColor.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1674
                separatingLine ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1675
                    gc displayLineFromX:0 y:hy+1 toX:width y:hy+1.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1676
                    gc displayLineFromX:0 y:y toX:width y:y.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1677
                ].
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1678
                gc fillRectangleX:hx y:hy width:barWidthInt height:barHeightInt.
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1679
            ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1680
        ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1681
        lbl := self handleLabelAt:hIndex.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1682
        lbl notNil ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1683
            hIndex ~~ 1 ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1684
                gc paint:self blackColor.
2734
ba7f56186e88 correct use of ascentOn: for display
Claus Gittinger <cg@exept.de>
parents: 2650
diff changeset
  1685
                lbl displayOn:self x:mar y:hy + (lbl ascentOn:self)
ba7f56186e88 correct use of ascentOn: for display
Claus Gittinger <cg@exept.de>
parents: 2650
diff changeset
  1686
"/                lbl isImageOrForm ifTrue:[
ba7f56186e88 correct use of ascentOn: for display
Claus Gittinger <cg@exept.de>
parents: 2650
diff changeset
  1687
"/                    lbl displayOn:self x:mar y:hy
ba7f56186e88 correct use of ascentOn: for display
Claus Gittinger <cg@exept.de>
parents: 2650
diff changeset
  1688
"/                ] ifFalse:[
ba7f56186e88 correct use of ascentOn: for display
Claus Gittinger <cg@exept.de>
parents: 2650
diff changeset
  1689
"/                    lbl displayOn:self x:mar y:hy + font ascent + 1
ba7f56186e88 correct use of ascentOn: for display
Claus Gittinger <cg@exept.de>
parents: 2650
diff changeset
  1690
"/                ]
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1691
            ]
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1692
        ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1693
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1694
    ] ifFalse:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1695
        gc fillRectangleX:hx y:mar width:barHeightInt height:(height - mar - mar).
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1696
2623
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1697
        (handleStyle notNil
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  1698
        and:[handleStyle ~~ #none]) ifTrue:[
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1699
            (handleStyle ~~ #normal
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1700
            and:[handleStyle ~~ #mswindows]) ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1701
                "/ m := (barHeightInt - w) // 2.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1702
                m := (maxKnob - w) // 2.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1703
                shadowForm isNil ifTrue:[
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1704
                    x := hx + (barHeightInt // 2).
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1705
                    separatingLine ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1706
                        gc paint:shadowColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1707
                        gc displayLineFromX:x y:mar toX:x y:(height - mar).
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1708
                        x := x + 1.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1709
                        gc paint:lightColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1710
                        gc displayLineFromX:x y:mar toX:x y:(height - mar).
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1711
                        gc paint:viewBackground.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1712
                    ].
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1713
                    gc fillRectangleX:hx y:(hy - barWidthInt) 
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1714
                       width:w height:(barWidthInt + barWidthInt).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1715
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1716
                    handleStyle == #line ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1717
                        gc paint:handleColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1718
                        gc displayLineFromX:x y:hy - barWidthInt toX:x y:hy + barWidthInt.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1719
                    ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1720
                        x := hx.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1721
                        handleStyle == #st80 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1722
                            x := x - 1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1723
                        ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1724
                        xm := x + m.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1725
                        handleStyle == #full ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1726
                            handleLevel ~~ 0 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1727
                                self 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1728
                                    drawEdgesForX:xm "/-1
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1729
                                    y:0 "/ -handleLevel
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1730
                                    width:w-2
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1731
                                    height:height "/ +handleLevel+handleLevel 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1732
                                    level:handleLevel
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1733
                                    shadow:shadowColor 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1734
                                    light:lightColor
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1735
                                    halfShadow:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1736
                                    halfLight:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1737
                                    style:nil
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1738
                            ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1739
                        ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1740
                            handleLevel ~~ 0 ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1741
                                self drawEdgesForX:xm y:(hy - barWidthInt)
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1742
                                     width:w height:(barWidthInt + barWidthInt)
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1743
                                     level:handleLevel.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1744
                            ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1745
                            handleStyle == #iris ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1746
                                gc paint:handleColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1747
                                gc fillDeviceRectangleX:(xm + 2) y:(hy - barWidthInt + 2)
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1748
                                   width:w - 4 height:(barWidthInt + barWidthInt - 4)
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1749
                            ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1750
                        ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1751
                    ]
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1752
                ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1753
                    x := hx.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1754
                    (shadowForm notNil or:[lightForm notNil]) ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1755
                        self drawHandleFormAtX:(x + m) y:hy
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1756
                    ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1757
                ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1758
                handleStyle == #st80 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1759
                    x := hx - 1.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1760
                    gc paint:lightColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1761
                    gc displayLineFromX:x y:mar toX:x y:(height - mar).
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1762
                    gc displayLineFromX:hx y:0 toX:(hx + barHeightInt - 1) y:0.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1763
                    x := hx + barHeightInt - 2.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1764
                    gc paint:shadowColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1765
                    gc displayLineFromX:x y:mar toX:x y:(height - mar).
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1766
                        "uncomment the -1 if you dont like the notch at the bottom end"
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1767
                        "                   VVV"
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1768
                    gc displayLineFromX:hx" "-1" " y:height-1 toX:(hx + barHeightInt - 1) y:height-1.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1769
                ].
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1770
            ] ifFalse:[
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1771
                x := hx + barHeightInt - 1.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1772
                gc paint:handleColor.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1773
                separatingLine ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1774
                    gc displayLineFromX:hx+1 y:0 toX:hx+1 y:height.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1775
                    gc displayLineFromX:x y:0 toX:x y:height.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1776
                ].
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1777
                gc fillRectangleX:hx y:hy width:barHeightInt height:barWidthInt
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1778
            ]
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1779
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1780
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1781
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1782
    "Modified: / 29.7.1998 / 22:48:33 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1783
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1784
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1785
drawHandleFormAtX:hx y:hy
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1786
    "draw a handle's bitmap at hx/hy"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1787
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1788
    shadowForm notNil ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1789
        gc paint:shadowColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1790
        gc displayForm:shadowForm x:hx y:hy.
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1791
    ].
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1792
    lightForm notNil ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1793
        gc paint:lightColor.
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1794
        gc displayForm:lightForm x:hx y:hy.
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1795
    ].
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1796
    gc paint:viewBackground
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1797
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1798
    "Modified: 7.11.1996 / 20:25:33 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1799
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1800
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1801
drawSnapAt:anIndex
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1802
    "draw the snap for a handle at an index"
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1803
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1804
    |snapLayout icon level offLevel paint canChangeExtent
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1805
     left   "{ Class:SmallInteger }"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1806
     top    "{ Class:SmallInteger }"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1807
     width  "{ Class:SmallInteger }"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1808
     height "{ Class:SmallInteger }"
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1809
     snapMode leftEdge wEdge topEdge hEdge part wPart hPart|
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1810
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1811
    (snapLayout := self snapLayoutAt:anIndex) isNil ifTrue:[
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1812
        "snap disabled"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1813
        ^ self
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1814
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1815
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1816
    left   := snapLayout left.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1817
    top    := snapLayout top.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1818
    width  := snapLayout width.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1819
    height := snapLayout height.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1820
    snapMode := self snapMode.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1821
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1822
    offLevel := level := (snapAdornment level ? 0).
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1823
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1824
    canChangeExtent := self canChangeExtentOfViewAt:anIndex.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1825
    canChangeExtent ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1826
        (controller isSnapEntered:anIndex) ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1827
            controller isSnapPressed ifTrue:[
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1828
                level := snapAdornment selectedLevel ? 0.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1829
                paint := snapAdornment selectedBgColor.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1830
            ] ifFalse:[
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1831
                level := snapAdornment enterLevel ? 0.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1832
                paint := snapAdornment enterBgColor.
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1833
            ].
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1834
        ]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1835
    ].
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1836
    paint isNil ifTrue:[
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1837
        paint := viewBackground.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1838
    ].
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1839
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1840
    gc paint:paint.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1841
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1842
"/    level == 0 ifTrue:[
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1843
"/    ].
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1844
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1845
    gc fillRectangleX:left+1 y:top+1 width:width-2 height:height-2.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1846
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1847
    level ~~ 0 ifTrue:[
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1848
        leftEdge := left + 1.
2240
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1849
        wEdge := wPart := width - 2.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1850
        topEdge := top + 1.
2240
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1851
        hEdge := hPart := height - 2.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1852
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1853
        orientation == #vertical ifTrue:[
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1854
            wPart := width // 3.
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1855
        ] ifFalse:[
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1856
            hPart := height // 3.
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1857
        ].
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1858
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1859
        level < 0 ifTrue:[
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1860
            part := (self subViews at:anIndex) objectAttributeAt:#snapPart.
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1861
            part == #left ifTrue:[
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1862
                self drawEdgesForX:leftEdge y:topEdge width:wEdge height:hEdge level:offLevel.
2243
c2a288b3b73e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
  1863
                wPart := wPart + 1.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1864
            ] ifFalse:[
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1865
                part == #middle ifTrue:[
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1866
                    self drawEdgesForX:leftEdge y:topEdge width:wEdge height:hEdge level:offLevel.
2240
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1867
                    orientation == #vertical ifTrue:[
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1868
                        leftEdge := leftEdge + wPart.
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1869
                    ] ifFalse:[
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1870
                        topEdge := topEdge + hPart.
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1871
                    ]
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1872
                ] ifFalse:[
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1873
                    part == #right ifTrue:[
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1874
                        self drawEdgesForX:leftEdge y:topEdge width:wEdge height:hEdge level:offLevel.
2240
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1875
                        orientation == #vertical ifTrue:[
2243
c2a288b3b73e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
  1876
                            leftEdge := leftEdge + (width - wPart - 1).
2240
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1877
                        ] ifFalse:[
2243
c2a288b3b73e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
  1878
                            topEdge := topEdge + (height - hPart - 1).
c2a288b3b73e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
  1879
                        ].
c2a288b3b73e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
  1880
                        wPart := wPart - 1.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1881
                    ]
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1882
                ]
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1883
            ].
2240
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1884
            wEdge := wPart.
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1885
            hEdge := hPart.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1886
        ].
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1887
        self drawEdgesForX:leftEdge y:topEdge width:wEdge height:hEdge level:level.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1888
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1889
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1890
    canChangeExtent ifFalse:[^ self].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1891
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1892
    snapMode == #both ifTrue:[
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1893
        icon := (orientation == #vertical) 
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1894
                    ifTrue:[snapAdornment iconUpDown] 
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1895
                    ifFalse:[snapAdornment iconLeftRight]
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1896
    ] ifFalse:[
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1897
        (self snapAtIndexWillGrow:anIndex) ifTrue:[
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1898
            icon := (orientation == #vertical) 
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1899
                        ifTrue:[snapAdornment iconDown] 
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1900
                        ifFalse:[snapAdornment iconRight]
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1901
        ] ifFalse:[
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1902
            icon := (orientation == #vertical) 
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1903
                        ifTrue:[snapAdornment iconUp]   
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1904
                        ifFalse:[snapAdornment iconLeft]
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1905
        ].
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1906
    ].
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1907
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1908
    icon displayOn:self x:(left + ((width - icon width) // 2))
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1909
                        y:(top  + ((height - icon height) // 2)).
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1910
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1911
    "Modified: / 31-10-2010 / 12:58:27 / cg"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1912
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1913
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1914
invertHandleBarAtX:hx y:hy
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1915
    |doLine oldStyle|
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1916
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1917
    doLine := (trackLine == #solidLine 
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1918
               or:[trackLine == #dashedLine
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1919
               or:[trackLine == #dottedLine]]).
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1920
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1921
    trackLine == #dashedLine ifTrue:[
4960
570e9c18fe4e Use message sends to access the lineStyle
Stefan Vogel <sv@exept.de>
parents: 4957
diff changeset
  1922
        oldStyle := gc lineStyle.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1923
        gc lineStyle:#dashed.
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1924
    ] ifFalse:[
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1925
        trackLine == #dottedLine ifTrue:[
4920
78c00f9e85d2 class: VariablePanel
Stefan Vogel <sv@exept.de>
parents: 4862
diff changeset
  1926
            oldStyle := gc lineStyle.
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1927
            gc lineStyle:#dotted.
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1928
        ]
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1929
    ].
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1930
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1931
    gc clippedByChildren:false.
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1932
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1933
    self xoring:[
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1934
        |yL xL halfHeight|
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1935
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1936
        halfHeight := (barHeight // 2) - 1.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1937
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1938
        orientation == #vertical ifTrue:[
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1939
            yL := hy + halfHeight.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1940
            doLine ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1941
                gc displayLineFromX:0 y:yL toX:width y:yL.
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1942
            ] ifFalse:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1943
                gc fillRectangleX:0 y:hy width:width height:barHeight
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1944
            ]
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1945
        ] ifFalse:[
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1946
            xL := hx + halfHeight.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1947
            doLine ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1948
                gc displayLineFromX:xL y:0 toX:xL y:height.
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1949
            ] ifFalse:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1950
                gc fillRectangleX:hx y:0 width:barHeight height:height
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1951
            ]
1130
3c9a9961d225 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1129
diff changeset
  1952
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1953
    ].
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1954
    gc clippedByChildren:true.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1955
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1956
    oldStyle notNil ifTrue:[
6061
b93fe69702df #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  1957
        gc lineStyle:oldStyle.
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1958
    ].
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1959
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1960
    "Modified: / 28.4.1997 / 14:56:26 / dq"
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1961
    "Modified: / 3.5.1999 / 18:49:04 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1962
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1963
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1964
lockRedraw
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1965
    redrawLocked := true
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1966
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1967
4433
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1968
redraw
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1969
    "redraw all of the handles"
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1970
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1971
    redrawLocked ~~ true ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1972
        "/ self clear.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1973
        self redrawHandlesFrom:1 to:(self subViews size)
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1974
    ]
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1975
6633
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  1976
    "Modified: / 28-01-1997 / 17:54:15 / cg"
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  1977
    "Modified: / 15-07-2019 / 19:45:23 / Claus Gittinger"
4433
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1978
!
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  1979
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1980
redrawHandlesFrom:start to:stop
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1981
    "redraw some handles and snaps"
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  1982
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1983
    subViews size ~~ 0 ifTrue:[
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  1984
        (showHandle or:[barSideLineColor notNil]) ifTrue:[
6633
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  1985
            self handleOriginsWithIndexFrom:start to:stop do:[:hPoint :hIndex |
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  1986
                |hx hy|
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  1987
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  1988
                hx := hPoint x.
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  1989
                hy := hPoint y.
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  1990
6633
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  1991
                barLevel notNil ifTrue:[
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  1992
                    self drawEdgesForX:0 y:hy width:width height:barHeight level:barLevel.
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  1993
                ] ifFalse:[
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  1994
                    barSideLineColor notNil ifTrue:[
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  1995
                        self paint:barSideLineColor.
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  1996
                        self isHorizontal ifTrue:[
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  1997
                            self displayLineFromX:0 y:0 toX:width-1 y:0. 
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  1998
                            self displayLineFromX:0 y:barHeight-1 toX:width-1 y:barHeight-1. 
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  1999
                        ] ifFalse:[
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2000
                            self displayLineFromX:0 y:0 toX:0 y:height-1. 
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2001
                            self displayLineFromX:width-1 y:0 toX:width-1 y:height-1. 
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2002
                        ].
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2003
                    ].
6633
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  2004
                ].
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  2005
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  2006
                "/ do not draw handle, if there is a snapper ...
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  2007
                self hasSnapHandle ifTrue:[
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  2008
                    self drawSnapAt:hIndex-1
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  2009
                ] ifFalse:[
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2010
                    self drawHandle:hIndex atX:hx y:hy.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2011
                ].
2623
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  2012
            ].
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2013
        ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2014
    ].
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2015
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2016
    "Modified: / 31-10-2010 / 12:43:33 / cg"
6633
b86193ed635b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6518
diff changeset
  2017
    "Modified: / 15-07-2019 / 19:47:28 / Claus Gittinger"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2018
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2019
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2020
unlockRedraw
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2021
    redrawLocked := false
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2022
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2023
1159
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2024
!VariablePanel methodsFor:'enumerating subviews'!
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2025
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2026
changeSequenceOrderFor:aSubView to:anIndex
3884
15b8ddf523b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3864
diff changeset
  2027
    "change a subview's position in the subviews collection."
15b8ddf523b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3864
diff changeset
  2028
1159
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2029
    |success|
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2030
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2031
    success := super changeSequenceOrderFor:aSubView to:anIndex.
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2032
    success ifTrue:[
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2033
        self setupSubviews.
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2034
        self resizeSubviews.
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2035
    ].
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2036
    ^ success
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2037
! !
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  2038
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2039
!VariablePanel methodsFor:'event handling'!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2040
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2041
pointerEnter:buttonState x:x y:y
6463
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  2042
    "/ not called - see controller
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2043
    showHandleWhenEntered ifTrue:[
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2044
        self showHandle:true
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2045
    ].
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2046
    super pointerEnter:buttonState x:x y:y.
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2047
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2048
    "Created: / 19-12-2010 / 09:29:51 / cg"
6463
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  2049
    "Modified (comment): / 22-10-2018 / 23:39:46 / Claus Gittinger"
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2050
!
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2051
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2052
pointerLeave:buttonState
6463
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  2053
    "/ not called - see controller
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2054
    showHandleWhenEntered ifTrue:[
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2055
        self showHandle:false
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2056
    ].
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2057
    super pointerLeave:buttonState.
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2058
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2059
    "Created: / 19-12-2010 / 09:30:20 / cg"
6463
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  2060
    "Modified (comment): / 22-10-2018 / 23:39:54 / Claus Gittinger"
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2061
!
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2062
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2063
sizeChanged:how
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2064
    "my size has changed; resize my subviews"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2065
2123
33fda8594eee must resize children if realized;
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  2066
    realized ifTrue:[
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2067
        (how == #smaller) ifTrue:[
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2068
            self resizeSubviews
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2069
        ] ifFalse:[
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2070
            "/
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2071
            "/ do it in reverse order, to avoid some redraws
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2072
            "/
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2073
            self resizeSubviewsFrom:(self subViews size) to:1
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2074
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2075
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2076
    self changed:#sizeOfView with:how.
3670
10c6c46e16c2 dont forget the super-sizeChanged
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  2077
    superView notNil ifTrue:[
10c6c46e16c2 dont forget the super-sizeChanged
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  2078
        superView subViewChangedSize
10c6c46e16c2 dont forget the super-sizeChanged
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  2079
    ]
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2080
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2081
    "Modified: 28.1.1997 / 17:56:30 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2082
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2083
1821
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2084
!VariablePanel methodsFor:'focus handling'!
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2085
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2086
wantsFocusWithButtonPress
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2087
    "no, do not catch the keyboard focus on button click"
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2088
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2089
    ^ false
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2090
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2091
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2092
! !
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  2093
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2094
!VariablePanel methodsFor:'initialization & release'!
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2095
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2096
computeBarHeight
958
b75025112346 commentary
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
  2097
    "compute the height if the separating bar from either the
b75025112346 commentary
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
  2098
     form or an explicit height given in the styleSheet"
b75025112346 commentary
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
  2099
1550
f0297a144983 clear view when resizing
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
  2100
    <resource: #style (#'variablePanel.barHeight'
f0297a144983 clear view when resizing
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
  2101
                       #'variablePanel.barHeightMM')>
924
81f3ca4512bd allow barHeight to be set in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2102
5821
fd8b7742fe2c #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5792
diff changeset
  2103
    |bH h lvl|
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2104
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  2105
    shadowForm notNil ifTrue:[
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2106
        bH := shadowForm height + 2.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2107
    ] ifFalse:[
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
  2108
        bH := styleSheet at:#'variablePanel.barHeight'.
924
81f3ca4512bd allow barHeight to be set in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2109
        bH isNil ifTrue:[
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
  2110
            h := styleSheet at:#'variablePanel.barHeightMM' default:2.
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2111
            bH := (h * device verticalPixelPerMillimeter) rounded.
924
81f3ca4512bd allow barHeight to be set in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2112
        ].
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2113
    ].
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
  2114
    lvl := styleSheet at:#'variablePanel.barLevel' default:0.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  2115
    lvl ~~ 0 ifTrue:[
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  2116
        bH := bH + (lvl abs * 2).
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  2117
    ].
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  2118
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  2119
    self barHeight:bH.
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2120
    knobHeight := bH.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2121
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2122
    handleLabels notNil ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2123
        bH := handleLabels inject:bH into:[:maxSoFar :thisLabel |
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  2124
                                           thisLabel isNil ifTrue:[
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  2125
                                                maxSoFar
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  2126
                                           ] ifFalse:[
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  2127
                                                maxSoFar max:(thisLabel heightOn:self)
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  2128
                                           ]
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  2129
                                          ].
5821
fd8b7742fe2c #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 5792
diff changeset
  2130
        bH := bH + gc deviceFont descent - 1
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2131
    ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2132
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2133
    self barHeight:bH.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2134
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  2135
    "Modified: / 29.7.1998 / 14:47:21 / cg"
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2136
!
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2137
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2138
defaultControllerClass
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2139
    ^ VariablePanelController
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2140
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2141
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2142
initCursor
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2143
    "set the cursor - a double arrow"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2144
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
  2145
    cursor := self class 
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
  2146
                cursorForOrientation:orientation
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2147
                onDevice:device
900
0541b96dd173 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
  2148
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
  2149
    "Modified: / 30.9.1998 / 18:20:35 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2150
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2151
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2152
initStyle
966
824e0ecc0e6f comments
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2153
    "setup viewStyle specifics"
824e0ecc0e6f comments
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2154
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2155
    |mm computedBarWidth|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2156
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2157
    super initStyle.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2158
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2159
    viewBackground := DefaultBackgroundColor ? viewBackground.
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2160
    handleColor := DefaultHandleColor onDevice:device.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2161
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2162
    DefaultHandleStyle isNil ifTrue:[
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  2163
        handleStyle := styleSheet name
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2164
    ] ifFalse:[
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  2165
        handleStyle := DefaultHandleStyle
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2166
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2167
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  2168
    handleLevel := DefaultHandleLevel.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  2169
    showHandle := DefaultShowHandle.
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2170
    showHandleWhenEntered := DefaultShowHandleWhenEntered ? false.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2171
    handlePosition := DefaultHandlePosition.
2242
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  2172
    "/ snapHandlePosition := DefaultSnapHandlePosition.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2173
    trackLine := DefaultTrackingLine.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2174
    separatingLine := DefaultSeparatingLine.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2175
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  2176
    DefaultHandleImage notNil ifTrue:[
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2177
        shadowForm := DefaultHandleImage onDevice:device.
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2178
        computedBarWidth := shadowForm width.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2179
    ] ifFalse:[
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  2180
        handleStyle == #next ifTrue:[
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  2181
            DefaultHandleImage notNil ifTrue:[
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2182
                shadowForm := DefaultHandleImage onDevice:device.
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  2183
            ] ifFalse:[
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2184
                shadowForm := self class shadowFormOn:device.
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2185
                lightForm := self class lightFormOn:device.
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  2186
            ].
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2187
            computedBarWidth := shadowForm width.
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  2188
        ] ifFalse:[
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  2189
            shadowForm := lightForm := nil.
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  2190
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2191
            mm := device verticalPixelPerMillimeter.
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2192
            computedBarWidth := (1.5 * mm) rounded. "motif style width"
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  2193
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2194
    ].
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2195
    barWidth := DefaultBarWidth ? computedBarWidth.
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2196
    barSideLineColor := DefaultSideLineColor.
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2197
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2198
    self computeBarHeight.
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  2199
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2200
    handleStyle == #mswindows ifTrue:[
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  2201
        barWidth := (ArrowButton new direction:#up) width + 1 
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2202
    ].
6784
8d089e3f3df5 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6633
diff changeset
  2203
    showHandleWhenEntered ifTrue:[
6463
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  2204
        self enableEnterLeaveEvents
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  2205
    ].
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  2206
4206
570f1a1e587e preps for dynamic handle visibility
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
  2207
    "Modified: / 19-12-2010 / 09:31:29 / cg"
6463
0523d60b95a1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6462
diff changeset
  2208
    "Modified: / 22-10-2018 / 23:32:10 / Claus Gittinger"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2209
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2210
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2211
initialize
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  2212
    orientation isNil ifTrue:[orientation := #vertical].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2213
    super initialize.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  2214
    self bitGravity:nil.
5471
dadc66355380 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 5465
diff changeset
  2215
5473
5723b596e1cf #BUGFIX
Claus Gittinger <cg@exept.de>
parents: 5471
diff changeset
  2216
    
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  2217
    "Modified: / 29.7.1998 / 16:07:23 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2218
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2219
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2220
!VariablePanel methodsFor:'private'!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2221
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2222
anyNonRelativeSubviews
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2223
    "return true, if any of my subviews has no relative origin/extent"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2224
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2225
    self subViews do:[:aComponent |
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2226
        aComponent relativeCorner isNil ifTrue:[^ true].
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2227
        aComponent relativeOrigin isNil ifTrue:[^ true]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2228
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2229
    ^ false
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2230
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2231
    "Modified: 28.1.1997 / 17:57:26 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2232
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2233
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2234
expandSubView:expandedView
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2235
    "expand one of my subviews to full size"
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2236
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2237
    |pos subViews|
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2238
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2239
    realRelativeSizes notNil ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2240
        "/ already expanded ..
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2241
        ^ self
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2242
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2243
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2244
    pos := 0.0. 
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2245
    subViews := self subViews.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2246
6518
7250c2e67839 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6463
diff changeset
  2247
    (subViews conform:[:v | v relativeCorner notNil]) ifFalse:[
7250c2e67839 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6463
diff changeset
  2248
        self setupSubviews.
7250c2e67839 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6463
diff changeset
  2249
    ].        
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2250
    orientation == #vertical ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2251
        realRelativeSizes := subViews collect:[:v | v relativeCorner y - v relativeOrigin y].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2252
    ] ifFalse:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2253
        realRelativeSizes := subViews collect:[:v | v relativeCorner x - v relativeOrigin x].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2254
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2255
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2256
    subViews do:[:aSubView |
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2257
        aSubView == expandedView ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2258
            aSubView origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2259
            pos := 1.0
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2260
        ] ifFalse:[
3463
8408a4c800db focus handling
ca
parents: 3278
diff changeset
  2261
            aSubView beInvisible.
8408a4c800db focus handling
ca
parents: 3278
diff changeset
  2262
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2263
            orientation == #vertical ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2264
                aSubView origin:(0.0 @ pos) corner:(1.0 @ pos)
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2265
            ] ifFalse:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2266
                aSubView origin:(pos @ 0.0) corner:(pos @ 1.0)
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2267
            ]
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2268
        ]
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2269
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2270
    self resizeSubviews.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2271
6518
7250c2e67839 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6463
diff changeset
  2272
    "Modified: / 28-01-1997 / 17:56:20 / cg"
7250c2e67839 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 6463
diff changeset
  2273
    "Modified: / 12-01-2019 / 15:24:29 / Claus Gittinger"
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2274
!
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2275
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2276
handleLabelAt:hIndex
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2277
    handleLabels notNil ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2278
        ^ handleLabels at:hIndex ifAbsent:nil
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2279
    ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2280
    ^ nil
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2281
!
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2282
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2283
handleOriginsWithIndexDo:aBlock
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2284
    "evaluate the argument block for every handle-origin"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2285
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2286
    self handleOriginsWithIndexFrom:1 to:(self subViews size) do:aBlock
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2287
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2288
    "Modified: 28.1.1997 / 17:53:44 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2289
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2290
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2291
handleOriginsWithIndexFrom:start to:stop do:aBlock
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2292
    "evaluate the argument block for some handle-origins"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2293
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2294
    |x y hw hh hDelta vDelta subViews
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2295
     first "{ Class: SmallInteger }"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2296
     last  "{ Class: SmallInteger }"|
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2297
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2298
    (subViews := self subViews) notNil ifTrue:[
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2299
        shadowForm notNil ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2300
            hw := shadowForm width.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2301
            hh := shadowForm height.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2302
        ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2303
            hw := hh := barWidth
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2304
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2305
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2306
        (handleStyle ~~ #normal and:[handleStyle ~~ #mswindows]) ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2307
            hDelta := barWidth // 2.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2308
            vDelta := barWidth // 2.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2309
        ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2310
            hDelta := vDelta := 0
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2311
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2312
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2313
        (handlePosition == #left) ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2314
            x := hDelta. 
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2315
            y := vDelta.
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2316
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2317
            orientation == #vertical ifTrue:[
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2318
                x := x + barWidth
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2319
            ] ifFalse:[
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2320
                y := y + barWidth
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2321
            ].
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2322
            margin ~~ 0 ifTrue:[
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2323
                x := x + 2
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2324
            ].
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2325
        ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2326
            (handlePosition == #right) ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2327
                x := width - hw - margin - hDelta.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2328
                y := height - hh - margin - vDelta.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2329
            ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2330
                x := width - barWidth // 2.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2331
                y := height - barWidth // 2
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2332
            ]
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2333
        ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2334
        first := start + 1.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2335
        last := stop.
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2336
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2337
        first to:last do:[:index |
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2338
            |view|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2339
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2340
            view := subViews at:index.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2341
            orientation == #vertical ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2342
                y := view top "origin y" - barHeight + 1.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2343
            ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2344
                x := view left "origin x" - barHeight + 1.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2345
            ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2346
            aBlock value:(x @ y) value:index
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2347
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2348
    ]
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2349
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2350
    "Modified: / 1.11.1997 / 11:53:40 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2351
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2352
2623
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  2353
redrawIfShown
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  2354
    shown ifTrue:[
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  2355
        self clear.
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  2356
    ].
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  2357
    self invalidate
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  2358
!
fdc67970afc9 barLevel added
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
  2359
2026
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2360
resizeSubViewsTo:relativeSizeList
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2361
    "change subviews sizes as defined in the argument list
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2362
     (a collection of relative sizes)"
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2363
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2364
    |pos subViews|
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2365
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2366
    subViews := self subViews.
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2367
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2368
    pos := 0.0.
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2369
    subViews with:relativeSizeList do:[:aSubView :relSize |
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2370
        orientation == #vertical ifTrue:[
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2371
            aSubView origin:(0.0 @ pos) corner:(1.0 @ (pos + relSize))
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2372
        ] ifFalse:[
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2373
            aSubView origin:(pos @ 0.0) corner:((pos + relSize) @ 1.0)
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2374
        ].
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2375
        pos := pos + relSize.
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2376
    ].
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2377
    self resizeSubviews.
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2378
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2379
!
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  2380
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2381
resizeSubviews
1151
94aff1c7b0aa Fix comments, eliminate common message sends.
Stefan Vogel <sv@exept.de>
parents: 1131
diff changeset
  2382
    "readjust size of all subviews"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2383
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2384
    self resizeSubviewsFrom:1 to:(self subViews size)
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2385
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2386
    "Modified: 28.1.1997 / 17:54:42 / cg"
1151
94aff1c7b0aa Fix comments, eliminate common message sends.
Stefan Vogel <sv@exept.de>
parents: 1131
diff changeset
  2387
    "Modified: 22.3.1997 / 01:01:31 / stefan"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2388
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2389
6334
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2390
resizeSubviews:subViews from:start to:stop
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2391
    "readjust size of some subviews"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2392
6334
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2393
    |step nSubviews bhHalf|
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2394
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2395
    nSubviews := subViews size.
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2396
    nSubviews == 0 ifTrue:[ ^ self ].
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2397
5476
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2398
    bhHalf := barHeight // 2.
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2399
    "/ Transcript showCR:barHeight.    
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2400
    (start <= stop) ifTrue:[
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2401
        step := 1
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2402
    ] ifFalse:[
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2403
        step := -1
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2404
    ].
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2405
    start to:stop by:step do:[:index |
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2406
        |bw view o1 o2 newOrg newCorner newExt|
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2407
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2408
        view := subViews at:index.
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2409
        bw := view borderWidth.
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2410
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2411
        index == 1 ifTrue:[
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2412
            o1 := 0.
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2413
        ] ifFalse:[
5476
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2414
            barHeight odd ifTrue:[
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2415
                o1 := bhHalf + 1 - bw
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2416
            ] ifFalse:[    
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2417
                o1 := bhHalf - bw
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2418
            ].
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2419
        ].
5476
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2420
        index == nSubviews ifTrue:[
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2421
            o2 := 0.
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2422
        ] ifFalse:[
5476
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2423
            o2 := (barHeight-bhHalf) - bw
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2424
        ].
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2425
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2426
        newOrg := view computeOrigin.
5476
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2427
        "/ Transcript showCR:newOrg.
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2428
        newOrg notNil ifTrue:[
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2429
            (index ~~ 1) ifTrue:[
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2430
                orientation == #vertical ifTrue:[
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2431
                    newOrg y:(newOrg y + o1)
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2432
                ] ifFalse:[
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2433
                    newOrg x:(newOrg x + o1)
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2434
                ]
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2435
            ].
1550
f0297a144983 clear view when resizing
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
  2436
        ].
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2437
        newExt := view computeExtent.
5476
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2438
        "/ Transcript show:view layout;show:' -> '.
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2439
        "/ Transcript show:view relativeExtent;show:' -> '.
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2440
        "/ Transcript showCR:newExt.
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2441
        newExt notNil ifTrue:[
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2442
            orientation == #vertical ifTrue:[
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2443
                newExt y:(newExt y - o2 - o1)
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2444
            ] ifFalse:[
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2445
                newExt x:(newExt x - o2 - o1)
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2446
            ]
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2447
        ].
5476
bc85eb26e166 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5473
diff changeset
  2448
        "/ Transcript showCR:(newOrg extent:newExt).
5261
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2449
        view pixelOrigin:newOrg extent:newExt.
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2450
    ].
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2451
    shown ifTrue:[
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2452
        "/ must clear, since handles are copied automatically (by bitGravity)
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2453
        "/ self clearAndInvalidate.
ef0c874b4053 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 5051
diff changeset
  2454
        self sensor pushUserEvent:#clearAndInvalidate for:self withArguments:#()
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2455
    ]
873
d1274f0256a6 removed transcript message
Claus Gittinger <cg@exept.de>
parents: 871
diff changeset
  2456
6334
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2457
    "Created: / 10-06-2018 / 22:34:53 / Claus Gittinger"
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2458
!
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2459
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2460
resizeSubviewsFrom:start to:stop
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2461
    "readjust size of some subviews"
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2462
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2463
    self resizeSubviews:self subViews from:start to:stop
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2464
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2465
    "Modified: / 22-03-1997 / 01:02:21 / stefan"
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2466
    "Modified: / 23-02-2000 / 18:32:37 / cg"
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2467
    "Modified: / 10-06-2018 / 22:35:14 / Claus Gittinger"
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2468
!
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2469
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2470
resizeVisibleSubviews
6335
2cb9f5e54da6 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6334
diff changeset
  2471
    "readjust size of all visible subviews"
6334
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2472
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2473
    |visibleViews|
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2474
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2475
    visibleViews := self subViews select:[:v | v realized].
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2476
    self resizeSubviews:visibleViews from:1 to:(visibleViews size)
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2477
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2478
    "Created: / 10-06-2018 / 22:37:17 / Claus Gittinger"
679bee283b70 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6240
diff changeset
  2479
    "Modified: / 11-06-2018 / 08:56:52 / Claus Gittinger"
6335
2cb9f5e54da6 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 6334
diff changeset
  2480
    "Modified (comment): / 11-06-2018 / 09:59:04 / Claus Gittinger"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2481
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2482
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2483
restoreSubViewRatios
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2484
    "restore my subviews sizes to the state before the full-expand"
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2485
3463
8408a4c800db focus handling
ca
parents: 3278
diff changeset
  2486
    |pos|
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2487
4624
e3867912ecd4 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  2488
    realRelativeSizes isNil ifTrue:[
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2489
        "/ not expanded - ignore
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2490
        ^ self
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2491
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2492
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2493
    pos := 0.0.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2494
    self subViews with:realRelativeSizes do:[:aSubView :aRelativeSize |
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2495
        orientation == #vertical ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2496
            aSubView origin:(0.0 @ pos) corner:(1.0 @ (pos+aRelativeSize))
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2497
        ] ifFalse:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2498
            aSubView origin:(pos @ 0.0) corner:((pos+aRelativeSize) @ 1.0)
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2499
        ].
3463
8408a4c800db focus handling
ca
parents: 3278
diff changeset
  2500
        pos := pos + aRelativeSize.
8408a4c800db focus handling
ca
parents: 3278
diff changeset
  2501
8408a4c800db focus handling
ca
parents: 3278
diff changeset
  2502
        aSubView shown ifFalse:[
8408a4c800db focus handling
ca
parents: 3278
diff changeset
  2503
            aSubView hiddenOnRealize:false.
8408a4c800db focus handling
ca
parents: 3278
diff changeset
  2504
            shown ifTrue:[aSubView beVisible].
8408a4c800db focus handling
ca
parents: 3278
diff changeset
  2505
        ].
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2506
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2507
    realRelativeSizes := nil.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2508
    self resizeSubviews.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2509
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2510
    "Modified: 28.1.1997 / 17:56:20 / cg"
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2511
!
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  2512
4433
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2513
setupSubviewOrigins
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2514
    "setup subviews origins 
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2515
     if we only have relative extents 
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2516
     (Variable Panels need relative origins and corners!!) (SV 16.1.95)"
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2517
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2518
    |x y e eX eY subViews n "{ Class: SmallInteger }"|
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2519
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2520
    x := y := 0.0.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2521
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2522
    subViews := self subViews.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2523
    n := subViews size.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2524
    1 to:n do:[:index |
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2525
        |view|
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2526
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2527
        view := subViews at:index.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2528
        e := view relativeExtent.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2529
        e notNil ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2530
            view relativeExtent:nil.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2531
            eX := e x.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2532
            eY := e y.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2533
            index == n ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2534
                view origin:(x @ y) corner:(1.0 @ 1.0)
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2535
            ] ifFalse:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2536
                orientation == #vertical ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2537
                    view origin:(x @ y) corner:(1.0 @ (y+eY))
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2538
                ] ifFalse:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2539
                    view origin:(x @ y) corner:((x+eX) @ 1.0)
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2540
                ].
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2541
            ].
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2542
            orientation == #vertical ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2543
                y := y + eY.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2544
            ] ifFalse:[    
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2545
                x := x + eX.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2546
            ]
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2547
        ] ifFalse: [
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2548
            view origin:(x @ y).
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2549
            orientation == #vertical ifTrue:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2550
                y := view relativeCorner y.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2551
            ] ifFalse:[
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2552
                x := view relativeCorner x.
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2553
            ]
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2554
        ].
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2555
    ]
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2556
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2557
    "Modified: 21.8.1996 / 10:01:29 / stefan"
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2558
    "Modified: 28.1.1997 / 17:55:21 / cg"
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2559
!
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2560
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2561
setupSubviews
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2562
    "setup subviews sizes (in case of non-relative sizes)"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2563
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2564
    |pos delta subViews nSubViews "{ Class: SmallInteger }"|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2565
300
0823ef38e629 adding/removing views to Panels
ah
parents: 299
diff changeset
  2566
    "/ setup all subviews to spread evenly ...
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2567
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2568
    subViews := self subViews.
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2569
    nSubViews := subViews size.
1043
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
  2570
    nSubViews == 0 ifTrue:[^ self].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2571
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2572
    pos := 0.0. 
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2573
    delta := 1.0 / nSubViews.
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2574
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2575
    1 to:nSubViews do:[:index |
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  2576
        |view org corn|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2577
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2578
        view := subViews at:index.
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2579
        orientation == #vertical ifTrue:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  2580
            org := (0.0 @ pos). 
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2581
            index == subViews size ifTrue:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  2582
                corn := (1.0 @ 1.0)
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2583
            ] ifFalse:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  2584
                corn := (1.0 @ (pos + delta))
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2585
            ].
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2586
        ] ifFalse:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  2587
            org := (pos @ 0.0).
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2588
            index == subViews size ifTrue:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  2589
                corn := (1.0 @ 1.0)
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2590
            ] ifFalse:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  2591
                corn := ((pos + delta) @ 1.0)
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2592
            ].
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2593
        ].
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  2594
        view origin:org corner:corn.
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2595
        pos := pos + delta
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2596
    ]
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2597
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  2598
    "Modified: / 23.2.2000 / 18:14:01 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2599
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2600
2743
65b5445cb984 method category rename
Claus Gittinger <cg@exept.de>
parents: 2734
diff changeset
  2601
!VariablePanel methodsFor:'private-snap queries'!
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2602
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2603
canChangeExtentOfViewAt:anIndex
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2604
    "returns true if extent at an index is changable
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2605
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2606
    |view|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2607
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2608
    view := subViews at:anIndex ifAbsent:[^ false].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2609
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2610
    orientation == #vertical ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2611
        view height > 2 ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2612
            view := subViews at:(anIndex + 1) ifAbsent:[^ false].
2598
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2613
            ^ view height > 2
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2614
        ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2615
        ^ true
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2616
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2617
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2618
    view width > 2 ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2619
        view := subViews at:(anIndex + 1) ifAbsent:[^ false].
2598
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2620
        ^ view width > 2
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2621
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2622
    ^ true
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2623
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2624
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2625
initSnapAdornment
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2626
    |num icon level enterLevel selectedLevel color|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2627
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2628
    snapAdornment isNil ifTrue:[
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2629
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2630
        snapAdornment := SnapAdornment "IdentityDictionary" new.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2631
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2632
        level         := styleSheet at:#'variablePanel.snapLevel'      default:1.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2633
        enterLevel    := styleSheet at:#'variablePanel.snapEnterLevel' default:level.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2634
        selectedLevel := styleSheet at:#'variablePanel.selectedLevel'  default:(level negated).
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2635
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2636
        snapAdornment level:level.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2637
        snapAdornment enterLevel:enterLevel.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2638
        snapAdornment selectedLevel:selectedLevel.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2639
        snapAdornment mode:#min.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2640
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2641
        color := styleSheet 
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2642
                    colorAt:#'variablePanel.snapSelectedBgColor'
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2643
                    default:(StyleSheet colorAt:#'button.activeBackgroundColor').
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2644
        color notNil ifTrue:[
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2645
            snapAdornment selectedBgColor:(color onDevice:device)
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2646
        ].
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2647
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2648
        color := StyleSheet 
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2649
                    colorAt:#'variablePanel.snapEnterBgColor'
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2650
                    default:(StyleSheet colorAt:#'button.enteredBackgroundColor').
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2651
        color notNil ifTrue:[
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2652
            snapAdornment enterBgColor:(color onDevice:device)
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2653
        ].
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2654
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2655
        self class snapIcons keysAndValuesDo:[:aKey :anIcon|
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2656
            anIcon device == device ifTrue:[
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2657
                icon := anIcon
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2658
            ] ifFalse:[
5632
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2659
                icon := anIcon copy onDevice:device.
bacbc9c526b2 device access
Claus Gittinger <cg@exept.de>
parents: 5563
diff changeset
  2660
                device == Display ifTrue:[
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2661
                    self class snapIcons at:aKey put:icon.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2662
                ]
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2663
            ].
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2664
            snapAdornment at:aKey put:icon
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2665
        ].
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2666
        "compute required snap extent including level and margins ..."
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2667
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2668
        num  := level abs max:(enterLevel abs).
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2669
        num  := num max:(selectedLevel abs).
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2670
        num  := (num + 2) "margin into handle := 1" * 2.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2671
        icon := snapAdornment iconUp.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2672
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2673
        snapAdornment height:(icon height + num).
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2674
        snapAdornment width:(icon width  + num).
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2675
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2676
2598
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2677
    ^ snapAdornment
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2678
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2679
    "Modified: / 31-10-2010 / 12:59:39 / cg"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2680
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2681
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2682
snapAtIndexWillGrow:anIndex
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2683
    "returns true if the view assigned to the snap at an index will grow
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2684
     if pressing the snap
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2685
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2686
    |view mode|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2687
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2688
    (mode := self snapMode) notNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2689
        (mode == #max or:[mode == #maxMin]) ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2690
            "on press the view is increased to bottom(vertical) or right(horizontal)"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2691
            view := subViews at:(anIndex + 1) ifAbsent:[^ false].
2598
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2692
            ^ orientation == #vertical ifTrue:[view height > 2] ifFalse:[view width  > 2]
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2693
        ].    
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2694
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2695
        (mode == #min or:[mode == #minMax]) ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2696
            "on press the view is decreased to top(vertical) or left (horizontal)"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2697
            view := subViews at:anIndex ifAbsent:[^ false].
2598
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2698
            ^ orientation == #vertical ifTrue:[view height <= 2] ifFalse:[view width  <= 2]
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  2699
        ].
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  2700
6161
6763327fd155 #OTHER by mawalch
mawalch
parents: 6061
diff changeset
  2701
        self error:'unexpected snapMode state'.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2702
    ].    
2598
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2703
    ^ false     "snap is disabled"
6161
6763327fd155 #OTHER by mawalch
mawalch
parents: 6061
diff changeset
  2704
6763327fd155 #OTHER by mawalch
mawalch
parents: 6061
diff changeset
  2705
    "Modified: / 29-05-2017 / 15:28:25 / mawalch"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2706
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2707
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2708
snapLayoutAt:anIndex
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2709
    "returns the layout of the snap at an index
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2710
     or nil if snaps are disabled
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2711
    "
2598
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2712
    |v1 v2 left top right bot w snapX snapY|
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2713
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2714
    self hasSnapHandle ifFalse:[^ nil].         "snap disabled"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2715
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2716
    v1 := subViews at:anIndex     ifAbsent:[^ nil].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2717
    v2 := subViews at:anIndex + 1 ifAbsent:[^ nil].
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2718
    w  := snapAdornment width ? 0.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2719
2242
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  2720
    handlePosition "snapHandlePosition" == #left ifTrue:[
2241
d9c7f1486b7a draw snap at very left of panel
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
  2721
        snapX := snapY := margin. "/ ViewSpacing.
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2722
    ] ifFalse:[
2242
1aea02d32c96 snapHandlePosition is same as handlePosition
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  2723
        handlePosition "snapHandlePosition" == #right ifTrue:[
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2724
            snapX := width - w.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2725
            snapY := height - w.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2726
        ] ifFalse:[
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2727
            snapX := (width - w) // 2.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2728
            snapY := (height - w) // 2.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2729
        ].
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2730
    ].
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2731
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2732
    orientation == #vertical ifTrue:[
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2733
        left := snapX. "/ v1 width - w // 2.
2598
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2734
        top := v1 bottom + 1.
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2735
        right := left + w.
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2736
        bot := v2 top.
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2737
    ] ifFalse:[
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2738
        top := snapY. "/ v1 height - w // 2.
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2739
        left := v1 right + 1.
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2740
        right := v2 left.
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2741
        bot := top + w.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2742
    ].
2598
6817bf076dc9 beautified CAs UGLY indent style
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  2743
    ^ Rectangle left:left top:top right:right bottom:bot
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2744
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2745
    "Modified: / 31-10-2010 / 12:47:16 / cg"
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2746
! !
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2747
3864
3b8f1fe89d48 UIPainter can now resize subviews of PanelViews
Stefan Vogel <sv@exept.de>
parents: 3670
diff changeset
  2748
!VariablePanel methodsFor:'queries'!
3b8f1fe89d48 UIPainter can now resize subviews of PanelViews
Stefan Vogel <sv@exept.de>
parents: 3670
diff changeset
  2749
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2750
hasSnapHandle
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2751
    ^ snapAdornment notNil
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2752
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2753
    "Created: / 31-10-2010 / 12:43:21 / cg"
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2754
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2755
4433
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2756
isHorizontal
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2757
    ^ orientation == #horizontal
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2758
!
d8b26708a2ba category of:7 methods
Claus Gittinger <cg@exept.de>
parents: 4260
diff changeset
  2759
3864
3b8f1fe89d48 UIPainter can now resize subviews of PanelViews
Stefan Vogel <sv@exept.de>
parents: 3670
diff changeset
  2760
isLayoutWrapper
3b8f1fe89d48 UIPainter can now resize subviews of PanelViews
Stefan Vogel <sv@exept.de>
parents: 3670
diff changeset
  2761
    "answer true, if this view defines the layout of it's subviews"
3b8f1fe89d48 UIPainter can now resize subviews of PanelViews
Stefan Vogel <sv@exept.de>
parents: 3670
diff changeset
  2762
3b8f1fe89d48 UIPainter can now resize subviews of PanelViews
Stefan Vogel <sv@exept.de>
parents: 3670
diff changeset
  2763
    ^ true
3b8f1fe89d48 UIPainter can now resize subviews of PanelViews
Stefan Vogel <sv@exept.de>
parents: 3670
diff changeset
  2764
! !
3b8f1fe89d48 UIPainter can now resize subviews of PanelViews
Stefan Vogel <sv@exept.de>
parents: 3670
diff changeset
  2765
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2766
!VariablePanel methodsFor:'realization'!
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2767
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2768
fixSize 
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2769
    super fixSize.
2305
f2850e54b0ab only access originChanged, extentChanged and cornerChanged
Claus Gittinger <cg@exept.de>
parents: 2288
diff changeset
  2770
    self extentChangedFlag ifTrue:[
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2771
        self resizeSubviews
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2772
    ].
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2773
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2774
    "Modified: 22.3.1997 / 01:19:55 / stefan"
2531
6fc09f6a83dd fix relative sizes when realized
Claus Gittinger <cg@exept.de>
parents: 2483
diff changeset
  2775
!
6fc09f6a83dd fix relative sizes when realized
Claus Gittinger <cg@exept.de>
parents: 2483
diff changeset
  2776
6fc09f6a83dd fix relative sizes when realized
Claus Gittinger <cg@exept.de>
parents: 2483
diff changeset
  2777
realize
6fc09f6a83dd fix relative sizes when realized
Claus Gittinger <cg@exept.de>
parents: 2483
diff changeset
  2778
    super realize.
5471
dadc66355380 #BUGFIX
Stefan Vogel <sv@exept.de>
parents: 5465
diff changeset
  2779
    self anyNonRelativeSubviews ifTrue:[
2533
0da5e1d49faa size computation fixed
Claus Gittinger <cg@exept.de>
parents: 2531
diff changeset
  2780
        self setupSubviews.
0da5e1d49faa size computation fixed
Claus Gittinger <cg@exept.de>
parents: 2531
diff changeset
  2781
        self sizeChanged:nil.   "/ force recomputation of subviews
2531
6fc09f6a83dd fix relative sizes when realized
Claus Gittinger <cg@exept.de>
parents: 2483
diff changeset
  2782
    ].
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2783
! !
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2279
diff changeset
  2784
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2785
!VariablePanel::SnapAdornment methodsFor:'accessing'!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2786
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2787
enterBgColor
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2788
    ^ enterBgColor
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2789
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2790
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2791
enterBgColor:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2792
    enterBgColor := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2793
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2794
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2795
enterLevel
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2796
    ^ enterLevel
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2797
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2798
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2799
enterLevel:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2800
    enterLevel := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2801
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2802
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2803
height
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2804
    ^ height
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2805
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2806
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2807
height:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2808
    height := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2809
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2810
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2811
iconDown
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2812
    ^ iconDown
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2813
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2814
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2815
iconDown:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2816
    iconDown := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2817
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2818
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2819
iconLeft
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2820
    ^ iconLeft
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2821
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2822
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2823
iconLeft:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2824
    iconLeft := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2825
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2826
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2827
iconLeftRight
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2828
    ^ iconLeftRight
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2829
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2830
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2831
iconLeftRight:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2832
    iconLeftRight := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2833
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2834
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2835
iconRight
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2836
    ^ iconRight
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2837
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2838
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2839
iconRight:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2840
    iconRight := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2841
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2842
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2843
iconUp
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2844
    ^ iconUp
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2845
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2846
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2847
iconUp:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2848
    iconUp := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2849
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2850
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2851
iconUpDown
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2852
    ^ iconUpDown
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2853
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2854
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2855
iconUpDown:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2856
    iconUpDown := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2857
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2858
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2859
level
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2860
    ^ level
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2861
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2862
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2863
level:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2864
    level := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2865
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2866
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2867
mode
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2868
    ^ mode
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2869
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2870
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2871
mode:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2872
    mode := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2873
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2874
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2875
selectedLevel
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2876
    ^ selectedLevel
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2877
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2878
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2879
selectedLevel:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2880
    selectedLevel := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2881
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2882
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2883
width
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2884
    ^ width
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2885
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2886
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2887
width:something
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2888
    width := something.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2889
! !
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2890
6240
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2891
!VariablePanel::SnapAdornment methodsFor:'accessing-color & font'!
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2892
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2893
selectedBgColor
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2894
    ^ selectedBgColor
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2895
!
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2896
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2897
selectedBgColor:something
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2898
    selectedBgColor := something.
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2899
! !
7b9e4c7a90e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 6161
diff changeset
  2900
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2901
!VariablePanel::SnapAdornment methodsFor:'backward compatibility'!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2902
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2903
at:key 
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2904
    ^ self perform:key
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2905
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2906
    "Created: / 31-10-2010 / 12:38:58 / cg"
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2907
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2908
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2909
at:key ifAbsent:default
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2910
    |value|
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2911
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2912
    value := self perform:key.
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2913
    ^ value ? default
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2914
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2915
    "Created: / 31-10-2010 / 12:41:10 / cg"
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2916
!
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2917
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2918
at:key put:aValue
4942
a6899e1944b3 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 4920
diff changeset
  2919
    self perform:key asMutator with:aValue
4187
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2920
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2921
    "Created: / 31-10-2010 / 12:38:48 / cg"
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2922
! !
16652b9859a7 snapAdornment stuff cleanup
Claus Gittinger <cg@exept.de>
parents: 4043
diff changeset
  2923
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2924
!VariablePanel class methodsFor:'documentation'!
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2925
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2926
version
5465
04d76a5e92aa #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5350
diff changeset
  2927
    ^ '$Header$'
4043
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  2928
!
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  2929
9e0d97fd4b21 changed: #examples
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  2930
version_CVS
5465
04d76a5e92aa #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 5350
diff changeset
  2931
    ^ '$Header$'
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2932
! !
4624
e3867912ecd4 class: VariablePanel
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  2933