VariablePanel.st
author Claus Gittinger <cg@exept.de>
Sun, 27 Aug 2000 16:49:30 +0200
changeset 2241 d9c7f1486b7a
parent 2240 c878eeeb676f
child 2242 1aea02d32c96
permissions -rw-r--r--
draw snap at very left of panel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1991 by Claus Gittinger
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
	      All Rights Reserved
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
    13
"{ Package: 'stx:libwidg' }"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
    14
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
SimpleView subclass:#VariablePanel
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
    16
	instanceVariableNames:'barHeight barWidth separatingLine shadowForm lightForm showHandle
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
		handlePosition handleColor handleStyle handleLevel noColor
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
    18
		trackLine redrawLocked orientation handleLabels knobHeight
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
    19
		realRelativeSizes snapAdornment snapHandlePosition'
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
    20
	classVariableNames:'DefaultShowHandle DefaultHandleStyle DefaultHandlePosition
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
		DefaultTrackingLine DefaultSeparatingLine DefaultHandleColor
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
    22
		DefaultHandleLevel DefaultVCursor DefaultHCursor
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
    23
		DefaultHandleImage DefaultSnapIcons DefaultSnapHandlePosition'
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
    24
	poolDictionaries:''
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
    25
	category:'Views-Layout'
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
    28
!VariablePanel class methodsFor:'documentation'!
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
copyright
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 COPYRIGHT (c) 1991 by Claus Gittinger
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	      All Rights Reserved
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 This software is furnished under a license and may be used
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
 only in accordance with the terms of that license and with the
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
 inclusion of the above copyright notice.   This software may not
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
 be provided or otherwise made available to, or used by, any
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
 other person.  No title to or ownership of the software is
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
 hereby transferred.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
documentation
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    a View to separate its subviews vertically by a movable bar;
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    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
    48
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    In order to correctly setup this kind of view, the subviews must
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    be created with a relative origin & relative corner.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    The panel does not verify the relative subview bounds; 
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    therefore, it is your responsibility to set those relative sizes to fit
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    according the orientation (see bad example below).
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    The bar-handle is either an exposed knob (style == #motif)
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    or the form defined in Scroller (style ~~ #motif)
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    or nothing.
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
    Typically creation is done as:
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    61
        p := VariablePanel in:superView.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    62
        p orientation:#vertical.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    64
        v1 := <someViewClass> origin:0.0 @ 0.0
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    65
                              corner:1.0 @ 0.5
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    66
                                  in:p.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    67
        v2 := <someViewClass> origin:0.0 @ 0.5 
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    68
                              corner:1.0 @ 0.8 
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    69
                                  in:p.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    70
        v3 := <someViewClass> origin:0.0 @ 0.8 
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    71
                              corner:1.0 @ 1.0
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    72
                                  in:p.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    73
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    74
    The two subclasses VariableHorizontalPanel and VariableVerticalPanel
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    75
    preset the orientation. They are a kept for backward compatibility
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    76
    (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
    77
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
    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
    79
    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
    80
    See examples.
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    81
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
    82
    [instance Variables:]
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    83
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    84
        barHeight               <Integer>       the height of the bar (for verticalPanels)
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    85
        barWidth                <Integer>       the width of the bar  (for horizontalPanels)
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    86
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    87
        separatingLine          <Boolean>       show a separating line (as in motif style)
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
        shadowForm              <Image/Form>    form (shadow part) drawn as handle - if nonNil
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    90
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    91
        lightForm               <Image/Form>    form (light part) drawn as handle - if nonNil
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    92
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    93
        showHandle              <Boolean>       if false, no handle is drawn
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    94
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    95
        handlePosition          <Symbol>        where is the handle - one of #left, #center, #right
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    96
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
    97
        handleColor             <Color>         inside color of handle - defaults to viewBackground
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
        handleStyle             <Symbol>        type of handle; one of #next, #motif or nil
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   100
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   101
        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
   102
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   103
        trackLine               <Boolean>       if true, an inverted line is drawn for tracking;
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   104
                                                otherwise, the whole bar is inverted.
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
        redrawLocked                            internal - locks redraws while tracking
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
        orientation             <Symbol>        one of #horizontal / #vertical
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
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   111
    [styleSheet values:]
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   112
        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
   113
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   114
        variablePanel.handleStyle       #next / #motif / #iris / #full / nil (special handles)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   115
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   116
        variablePanel.handlePosition    #left / #center / #right (default:#right)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   117
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   118
        variablePanel.handleLevel       3D level of heandle (default:2)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   119
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   120
        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
   121
                                        as opposed to tracking the whole bar (default:false)
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   122
                                        (obsoleted by trackingStyle)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   123
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   124
        variablePanel.trackingStyle     #solidRectangle / #solidLine / #dashedLine
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   125
                                        detailed control over how to draw tracking
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   126
                                        (obsoletes trackingLine above)
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
   127
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   128
        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
   129
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   130
        variablePanel.handleColor       color of the handle. (default:Black)
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   131
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   132
        variablePanel.handleEnteredColor 
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   133
                                        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
   134
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   135
    [see also:]
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   136
        PanelView
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   137
        
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   138
    [author:]
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
   139
        Claus Gittinger
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
examples
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
"
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   145
   example (notice that the subviews MUST have relative bounds):
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   146
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   147
        |top p v1 v2 v3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   149
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   150
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   152
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   153
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   154
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   155
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   156
        p orientation:#vertical.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   158
        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
   159
        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
   160
        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
   161
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   162
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   163
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   164
        v3 viewBackground:(Color yellow).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   166
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   167
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   171
   change the handles level:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   172
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   173
        |top p v1 v2 v3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   175
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   176
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   178
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   179
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   180
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   181
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   182
        p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   183
        p handleLevel:-1.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   185
        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
   186
        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
   187
        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
   188
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   189
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   190
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   191
        v3 viewBackground:(Color yellow).
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
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   194
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   198
   change the handles style to nil makes it invisible:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   199
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   200
        |top p v1 v2 v3|
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   201
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   202
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   203
        top extent:300@300.
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   204
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   205
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   206
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   207
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   208
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   209
        p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   210
        p handleStyle:nil.
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   211
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   212
        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
   213
        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
   214
        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
   215
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   216
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   217
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   218
        v3 viewBackground:(Color yellow).
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
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   221
                                                                        [exEnd]
397
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   222
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   223
7038c3c38ced *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   224
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   225
   define your own handle (-bitmap):
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   226
                                                                        [exBegin]
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   227
        |top p v1 v2 v3|
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   228
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   229
        top := StandardSystemView new.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   230
        top extent:300@300.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   231
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   232
        p := VariablePanel 
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   233
                 origin:0.0 @ 0.0
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   234
                 corner:1.0 @ 1.0
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   235
                 in:top.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   236
        p orientation:#vertical.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   237
        p handleImage:(Image fromFile:'bitmaps/ScrollLt.8.xbm').
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   238
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   239
        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
   240
        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
   241
        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
   242
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   243
        v1 viewBackground:(Color red).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   244
        v2 viewBackground:(Color green).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   245
        v3 viewBackground:(Color yellow).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   246
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   247
        top open
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   248
                                                                        [exEnd]
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   249
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   250
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   251
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   252
   another handle-bitmap:
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   253
                                                                        [exBegin]
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   254
        |top p v1 v2 v3|
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   255
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   256
        top := StandardSystemView new.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   257
        top extent:300@300.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   258
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   259
        p := VariablePanel 
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   260
                 origin:0.0 @ 0.0
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   261
                 corner:1.0 @ 1.0
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   262
                 in:top.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   263
        p orientation:#vertical.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   264
        p handleImage:(Form width:9
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   265
                            height:11
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   266
                            fromArray:#(
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   267
                                        2r00000000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   268
                                        2r00001000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   269
                                        2r00011100 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   270
                                        2r00111110 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   271
                                        2r01111111 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   272
                                        2r00000000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   273
                                        2r01111111 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   274
                                        2r00111110 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   275
                                        2r00011100 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   276
                                        2r00001000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   277
                                        2r00000000 2r00000000
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   278
                                       )
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   279
                      ).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   280
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   281
        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
   282
        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
   283
        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
   284
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   285
        v1 viewBackground:(Color red).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   286
        v2 viewBackground:(Color green).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   287
        v3 viewBackground:(Color yellow).
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   288
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   289
        top open
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   290
                                                                        [exEnd]
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   291
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   292
    placing scrolled and unscrolled views into a variablePanel:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   293
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   294
        |top p v1 v2 v3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   296
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   297
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   299
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   300
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   301
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   302
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   303
        p orientation:#vertical.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   305
        v1 := ScrollableView for:SelectionInListView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   306
        v1 origin:0.0 @ 0.0 corner:1.0 @ 0.5.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   307
        v1 list:(FileDirectory directoryNamed:'/etc') contents.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   308
        v1 action:[:selNr |
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   309
                |fullName stream text|
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   310
                fullName := '/etc/' , v1 selectionValue.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   311
                stream := fullName asFilename readStream.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   312
                stream notNil ifTrue:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   313
                    text := stream contents.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   314
                    v2 contents:text.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   315
                    v3 contents:text
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   316
                ]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   317
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   319
        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
   320
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   321
        v3 := ScrollableView for:TextView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   322
        v3 origin:0.0 @ 0.8 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   323
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   324
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   327
    dynamically adding/removing views:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   328
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   329
        |top p v1 v2 b|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   331
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   332
        top extent:300@300.
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
        b := Toggle label:'show' in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   335
        b showLamp:false.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   336
        b origin:0.0 @ 0.0 corner:(1.0 @ 40).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   337
        b action:[:state |
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   338
                state ifTrue:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   339
                    b label:'hide'.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   340
                    v1 origin:0.0 @ 0.0 corner:1.0 @ 0.5.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   341
                    v2 := ScrollableView for:EditTextView.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   342
                    v2 origin:0.0 @ 0.5 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   343
                    v2 contents:'another text'.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   344
                    p addSubView:v2.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   345
                    v2 realize.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   346
                ] ifFalse:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   347
                    b label:'show'.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   348
                    v2 destroy.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   349
                    v1 origin:0.0 @ 0.0 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   350
                ]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   351
            ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   353
        p := VariablePanel
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   354
                origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   355
                corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   356
                in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   357
        p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   358
        p topInset:50.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   360
        v1 := ScrollableView for:EditTextView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   361
        v1 origin:0.0 @ 0.0 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   362
        v1 contents:'some text'.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   364
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   365
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   368
    dynamically flipping orientation:
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
    Notice: you have to change the relative bounds of the subviews first.
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   370
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   371
        |top p v1 v2 b|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   373
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   374
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   376
        b := Toggle label:'flip' in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   377
        b showLamp:false.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   378
        b origin:0.0 @ 0.0 corner:(1.0 @ 40).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   379
        b action:[:state |
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   380
                state ifTrue:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   381
                    v1 origin:0.0 @ 0.0 corner:0.5 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   382
                    v2 origin:0.5 @ 0.0 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   383
                    p orientation:#horizontal.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   384
                ] ifFalse:[
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   385
                    v1 origin:0.0 @ 0.0 corner:1.0 @ 0.5.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   386
                    v2 origin:0.0 @ 0.5 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   387
                    p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   388
                ].
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   389
            ].
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
        p := VariablePanel
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   392
                origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   393
                corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   394
                in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   395
        p orientation:#vertical.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   396
        p topInset:50.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   398
        v1 := ScrollableView for:EditTextView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   399
        v1 origin:0.0 @ 0.0 corner:1.0 @ 0.5.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   400
        v1 contents:'some text'.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   402
        v2 := ScrollableView for:EditTextView in:p.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   403
        v2 origin:0.0 @ 0.5 corner:1.0 @ 1.0.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   404
        v2 contents:'another text'.
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
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   407
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   410
   combining fix-size with variable size:
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
   (need 3 extra frame-views to place the extra labels into)
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   412
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   413
        |top p v1 l1 v2 l2 v3 l3 f1 f2 f3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   415
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   416
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   418
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   419
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   420
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   421
                 in:top.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   423
        p orientation:#vertical.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   424
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   425
        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
   426
        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
   427
        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
   428
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   429
        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
   430
        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
   431
        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
   432
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   433
        l1 := Label label:'sub1' in:f1.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   434
        l2 := Label label:'sub2' in:f2.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   435
        l3 := Label label:'sub3' in:f3.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   437
        l1 origin:0.0 @ 0.0 corner:1.0 @ 0.0 ; 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   438
           bottomInset:(l1 preferredExtent y negated).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   439
        l2 origin:0.0 @ 0.0 corner:1.0 @ 0.0 ; 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   440
           bottomInset:(l2 preferredExtent y negated).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   441
        l3 origin:0.0 @ 0.0 corner:1.0 @ 0.0 ; 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   442
           bottomInset:(l3 preferredExtent y negated).
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 topInset:(l1 preferredExtent y); level:-1.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   445
        v2 topInset:(l2 preferredExtent y); level:-1.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   446
        v3 topInset:(l3 preferredExtent y); level:-1.
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
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   449
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   450
        v3 viewBackground:(Color yellow).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   452
        top open
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   453
                                                                        [exEnd]
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   454
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   455
   VerticalPansels allow a label to be associated with the
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   456
   handles; this looks much like the above, but is slightly
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   457
   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
   458
   view - it has no handle.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   459
                                                                        [exBegin]
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   460
        |top p v1 v2 v3|
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   461
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   462
        top := StandardSystemView new.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   463
        top extent:300@300.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   464
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   465
        p := VariablePanel 
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   466
                 origin:0.0 @ 0.0
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   467
                 corner:1.0 @ 1.0
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   468
                 in:top.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   469
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   470
        p orientation:#vertical.
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   471
        p handleLabels:#('ignored' 'sub2' 'sub3').
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   472
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   473
        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
   474
        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
   475
        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
   476
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   477
        v1 viewBackground:(Color red).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   478
        v2 viewBackground:(Color green).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   479
        v3 viewBackground:(Color yellow).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   480
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   481
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   482
                                                                        [exEnd]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   484
   handle labels can be more than strings ....
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   485
   (however, they should have about the same height, since
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   486
    the largest defines heights of all bars;
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   487
    retry the example below with a larger bitmap image ...)
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   488
                                                                        [exBegin]
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   489
        |top e p v1 v2 v3|
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   490
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   491
        top := StandardSystemView new.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   492
        top extent:300@300.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   493
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   494
        p := VariablePanel 
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   495
                 origin:0.0 @ 0.0
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   496
                 corner:1.0 @ 1.0
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   497
                 in:top.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   498
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   499
        p orientation:#vertical.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   500
        e := Array with:#bold
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   501
                   with:#color->Color red.
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   502
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   503
        p handleLabels:(Array with:nil
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   504
                              with:('bold and red' asText emphasizeAllWith:e)
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   505
                              with:(Image fromFile:'ScrollRt.xbm')).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   506
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   507
        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
   508
        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
   509
        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
   510
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   511
        v1 viewBackground:(Color red).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   512
        v2 viewBackground:(Color green).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   513
        v3 viewBackground:(Color yellow).
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   514
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   515
        top open
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
   516
                                                                        [exEnd]
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
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
   BAD EXAMPLE (wrong relative sizes - repaired on handle move):
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   521
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   522
        |top p v1 v2 v3|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   524
        top := StandardSystemView new.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   525
        top extent:300@300.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   527
        p := VariablePanel 
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   528
                 origin:0.0 @ 0.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   529
                 corner:1.0 @ 1.0
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   530
                 in:top.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   531
        p orientation:#vertical.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   533
        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
   534
        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
   535
        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
   536
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   537
        v1 viewBackground:(Color red).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   538
        v2 viewBackground:(Color green).
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   539
        v3 viewBackground:(Color yellow).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   541
        top open
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   542
                                                                        [exEnd]
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   543
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   544
   example with snapMode:
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   545
                                                                        [exBegin]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   546
        |top p v1 v2 v3|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   547
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   548
        top := StandardSystemView new.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   549
        top extent:300@300.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   550
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   551
        p := VariablePanel 
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   552
                 origin:0.0 @ 0.0
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   553
                 corner:1.0 @ 1.0
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   554
                 in:top.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   555
        p orientation:#vertical.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   556
        p snapMode:#min.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   557
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   558
        v1 := View origin:0.0@0.0 corner:1.0@(1/2) in:p.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   559
        v2 := View origin:0.0@(1/2) corner:1.0@(2/3) in:p.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   560
        v3 := View origin:0.0@(2/3) corner:1.0@1.0 in:p.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   561
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   562
        v1 viewBackground:(Color red).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   563
        v2 viewBackground:(Color green).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   564
        v3 viewBackground:(Color yellow).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   565
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   566
        top open
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   567
                                                                        [exEnd]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   568
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   572
!VariablePanel class methodsFor:'defaults'!
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   574
cursorForOrientation:orientation
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   575
    "return an appropriate cursor"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   576
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   577
    ^ self cursorForOrientation:orientation onDevice:Display.
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   578
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   579
    "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
   580
!
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   581
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   582
cursorForOrientation:orientation onDevice:device
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   583
    "return an appropriate cursor"
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   584
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   585
    |cursor|
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   586
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   587
    orientation == #vertical ifTrue:[
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   588
        DefaultVCursor notNil ifTrue:[
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   589
            cursor := DefaultVCursor
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   590
        ] ifFalse:[
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   591
            device platformName = 'WIN32' ifFalse:[
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   592
                cursor := Cursor 
2073
40873b6d96bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
   593
                            sourceForm:(Smalltalk imageFromFileNamed:'VVPanel.xbm' forClass:self)
40873b6d96bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
   594
                            maskForm:(Smalltalk imageFromFileNamed:'VVPanel_m.xbm' forClass:self)
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   595
                            hotX:8
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   596
                            hotY:8.
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   597
            ].
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   598
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   599
            "
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   600
             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
   601
             use a standard cursor
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   602
            "
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   603
            cursor isNil ifTrue:[
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   604
                "which one looks better ?"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   605
                cursor := Cursor upDownArrow
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   606
                "cursor := Cursor upLimitArrow"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   607
            ].
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   608
            DefaultVCursor := cursor
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   609
        ]
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   610
    ] ifFalse:[
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   611
        DefaultHCursor notNil ifTrue:[
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   612
            cursor := DefaultHCursor
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   613
        ] ifFalse:[
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   614
            device platformName = 'WIN32' ifFalse:[
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   615
                cursor := Cursor 
2073
40873b6d96bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
   616
                            sourceForm:(Smalltalk imageFromFileNamed:'VHPanel.xbm' forClass:self)
40873b6d96bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
   617
                            maskForm:(Smalltalk imageFromFileNamed:'VHPanel_m.xbm' forClass:self)
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   618
                            hotX:8
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   619
                            hotY:8.
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   620
            ].
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   621
            "
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   622
             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
   623
             use a standard cursor
1158
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   624
            "
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   625
            cursor isNil ifTrue:[
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   626
                "which one looks better ?"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   627
                cursor := Cursor leftRightArrow
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   628
                "cursor := Cursor leftLimitArrow"
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   629
            ].
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   630
            DefaultHCursor := cursor
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   631
        ]
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   632
    ].
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   633
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   634
    ^ cursor
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   635
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   636
    "
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   637
     DefaultVCursor := DefaultHCursor := nil.
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   638
    "
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   639
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
   640
    "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
   641
    "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
   642
!
225c0d52068d cursor default is now a class method.
Claus Gittinger <cg@exept.de>
parents: 1151
diff changeset
   643
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   644
lightFormOn:aDisplay
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   645
    "use same handle as Scroller"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   646
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   647
    ^ Scroller handleLightFormOn:aDisplay
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   648
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   649
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   650
shadowFormOn:aDisplay
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   651
    "use same handle as Scroller"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   652
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   653
    ^ Scroller handleShadowFormOn:aDisplay
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   654
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   656
snapIconUp
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   657
    "This resource specification was automatically generated
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   658
     by the ImageEditor of ST/X."
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   659
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   660
    "Do not manually edit this!! If it is corrupted,
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   661
     the ImageEditor may not be able to read the specification."
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   662
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   663
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   664
     self snapIconUp inspect
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   665
     ImageEditor openOnClass:self andSelector:#snapIconUp
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   666
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   667
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   668
    <resource: #image>
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   669
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   670
    ^Icon
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   671
        constantNamed:#'VariablePanel snapIconUp'
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   672
        ifAbsentPut:[(Depth4Image new) width: 62; height: 5; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   673
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0@@L@@C@@@0@@L@@C@@@0@C@@@0@@@@@@@@@@@@@B@0@ L@HC@B@0@ L@HC@B@0HC@B@0@@
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   674
@@@@@@@@@@@B@@@ @@H@@B@@@ @@H@@B@@H@@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 141 141 141 68 68 68 202 202 202]; mask:((Depth1Image new) width: 62; height: 5; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'B@@@@@@@@D@\DHP!!BDP 8C8)R%JT*%G0_1BDHP!!DH? @@@@@@@@@@@@a') ; yourself); yourself]!
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   675
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   676
snapIconUpDown
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   677
    "This resource specification was automatically generated
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   678
     by the ImageEditor of ST/X."
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   679
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   680
    "Do not manually edit this!! If it is corrupted,
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   681
     the ImageEditor may not be able to read the specification."
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   682
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   683
    "
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   684
     self snapIconUpDown inspect
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   685
     ImageEditor openOnClass:self andSelector:#snapIconUpDown
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   686
    "
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   687
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   688
    <resource: #image>
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   689
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   690
    ^Icon
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   691
        constantNamed:#'VariablePanel snapIconUpDown'
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   692
        ifAbsentPut:[(Depth4Image new) width: 62; height: 5; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   693
@@@@@@@@@@@@@@L@@@@@@@@@@@@@L@@@@@@@@@@@@@@@@@@@@0@@L@@C@@@0@@L@@C@@@C@C@@@0@@@@@@@@@@@@@B@0@ L@H0@B@0@ L@HC@@@0HC@B@0@@
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   694
@@@@@@@@@@@B@@@ @@L@@B@@@ @@H@@@L@H@@B@@@@@@@@@@@@@@@@@@@@@C@@@@@@@@@@@C@C@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 141 141 141 68 68 68 202 202 202]; mask:((Depth1Image new) width: 62; height: 5; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@L@@A @@@PDH0!!BFP!!?C )SEJTZ%C8_ABLHP!!$HGC>@@0@@V@@H@@a') ; yourself); yourself]!
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   695
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   696
snapIcons
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   697
    "returns dictionary of snapIcons
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   698
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   699
    |upIcon snapIcons|
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.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   703
        upIcon    := self snapIconUp.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   704
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   705
        DefaultSnapIcons at:#iconUp    put:upIcon.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   706
        DefaultSnapIcons at:#iconRight put:(upIcon rotated:90).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   707
        DefaultSnapIcons at:#iconDown  put:(upIcon rotated:180).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   708
        DefaultSnapIcons at:#iconLeft  put:(upIcon rotated:270).
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   709
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   710
        DefaultSnapIcons at:#iconUpDown    put:self snapIconUpDown.
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   711
        DefaultSnapIcons at:#iconLeftRight put:(self snapIconUpDown rotated:90).
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   712
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   713
    ^ DefaultSnapIcons
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   714
"
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   715
DefaultSnapIcons := nil.
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
   716
self snapIcons
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   717
"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   718
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   719
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
updateStyleCache
441
e170bca66a78 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
   721
    "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
   722
1388
ac52d9b7c8dc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
   723
    <resource: #style (#'variablePanel.showHandle' 
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   724
                       #'variablePanel.handleStyle'
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   725
                       #'variablePanel.handleImage'
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   726
                       #'variablePanel.handlePosition' 
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   727
                       #'variablePanel.handleLevel'
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   728
                       #'variablePanel.snapHandlePosition' 
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   729
                       #'variablePanel.trackingLine'   
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   730
                       #'variablePanel.trackingStyle'
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   731
                       #'variablePanel.separatingLine' 
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   732
                       #'variablePanel.handleColor')>
441
e170bca66a78 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
   733
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   734
    |lineModeBoolean|
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   735
2084
5e2d277d82a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
   736
    DefaultVCursor := DefaultHCursor := nil.
5e2d277d82a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
   737
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   738
    DefaultShowHandle := StyleSheet at:#'variablePanel.showHandle' default:true.
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   739
    DefaultHandleStyle := StyleSheet at:#'variablePanel.handleStyle'.
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   740
    DefaultHandlePosition := StyleSheet at:#'variablePanel.handlePosition' "default:#right".
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   741
    DefaultHandlePosition isNil ifTrue:[
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   742
        DefaultHandlePosition := ScrollableView defaultScrollBarPosition.
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
   743
    ].
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   744
    DefaultSnapHandlePosition := StyleSheet at:#'variablePanel.snapHandlePosition'.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   745
    DefaultSnapHandlePosition isNil ifTrue:[
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   746
        DefaultSnapHandlePosition := DefaultHandlePosition
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   747
    ].
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   748
    DefaultHandleLevel := StyleSheet at:#'variablePanel.handleLevel' default:2.
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   749
    DefaultTrackingLine := StyleSheet at:#'variablePanel.trackingStyle'.
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   750
    DefaultTrackingLine isNil ifTrue:[
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   751
        lineModeBoolean := StyleSheet at:#'variablePanel.trackingLine' default:false.
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   752
        lineModeBoolean ifTrue:[
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   753
            DefaultTrackingLine := #solidLine
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   754
        ] ifFalse:[
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   755
            DefaultTrackingLine := #solidRectangle
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   756
        ]
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   757
    ].
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   758
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   759
    DefaultSeparatingLine := StyleSheet at:#'variablePanel.separatingLine' default:false.
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   760
    DefaultHandleColor := StyleSheet colorAt:#'variablePanel.handleColor' default:Black.
441
e170bca66a78 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
   761
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
   762
    DefaultHandleImage := StyleSheet at:#'variablePanel.handleImage'
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   763
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   764
    "
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   765
     VariablePanel updateStyleCache
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   766
    "
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   767
2084
5e2d277d82a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
   768
    "Modified: / 13.12.1999 / 12:08:33 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   769
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   770
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   771
!VariablePanel methodsFor:'accessing'!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
addSubView:aView
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   774
    "a view is added; adjust other subviews sizes"
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   775
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   776
    super addSubView:aView.
1043
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   777
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   778
"/    (aView relativeOrigin isNil 
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   779
"/    or:[aView relativeExtent isNil and:[aView relativeCorner isNil]]) ifTrue:[
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   780
"/        aView geometryLayout:nil.
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   781
"/        aView origin:0.0@0.0.
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   782
"/        aView extent:1.0@0.5.
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   783
"/        self setupSubviews
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   784
"/    ].
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   785
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   786
    realized ifTrue:[
1043
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   787
        self resizeSubviews.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   788
    ]
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   789
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   790
    "Created: 17.1.1996 / 22:41:00 / cg"
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   791
    "Modified: 24.2.1996 / 19:05:05 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   792
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   793
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   794
orientation
485
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   795
    "return my orientation; either #horizontal or #vertical"
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   796
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
    ^ orientation
485
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   798
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   799
    "Modified: 6.3.1996 / 18:08:45 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   801
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
orientation:aSymbol
485
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   803
    "change  my orientation; aSymbol must be one of #horizontal or #vertical.
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   804
     Changing implies a resize of my subViews."
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   805
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   806
    aSymbol ~~ orientation ifTrue:[
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   807
        orientation := aSymbol.
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   808
        self initCursor.
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   809
        self anyNonRelativeSubviews ifTrue:[
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   810
            self setupSubviews
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   811
        ].
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   812
        shown ifTrue:[
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   813
            self cursor:cursor.
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   814
            self sizeChanged:nil.
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   815
            self invalidate.
485
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   816
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   817
    ]
485
50cbbe748ac9 commentary
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   818
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   819
    "Modified: 29.5.1996 / 16:22:35 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   820
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   821
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   822
removeSubView:aView
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   823
    "a view is removed; adjust other subviews sizes"
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   824
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   825
    super removeSubView:aView.
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   826
    shown ifTrue:[
1043
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   827
        (superView isNil or:[superView shown]) ifTrue:[
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   828
            self setupSubviews.
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   829
            self resizeSubviews.
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
   830
        ]
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   831
    ]
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   832
! !
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   833
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   834
!VariablePanel methodsFor:'accessing-look'!
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   835
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   836
barHeight
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   837
    "return the height of the separating bar"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   838
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   839
    ^ barHeight
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   840
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   841
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
barHeight:nPixel
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   843
    "set the height of the separating bar"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
2108
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   845
    |bH|
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   846
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   847
    bH := nPixel.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   848
1207
2668cd0caee7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1159
diff changeset
   849
    "make certain bar is visible and catchable"
2108
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   850
    (bH < 4) ifTrue:[
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   851
        bH := 4
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   852
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   853
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   854
    "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
   855
    bH odd ifTrue:[
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   856
        bH := bH + 1
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   857
    ].
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   858
    self setBarHeight:bH
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   859
2108
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   860
    "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
   861
    "Modified: / 30.1.2000 / 22:31:32 / cg"
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   862
!
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   863
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   864
handleImage:aBitmapOrImage
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   865
    "define the handles image"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   866
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   867
    shadowForm := aBitmapOrImage.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   868
    lightForm := nil.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   869
    self computeBarHeight.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   870
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   871
    "Created: 7.11.1996 / 20:21:10 / cg"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   872
    "Modified: 7.11.1996 / 20:27:22 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   873
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   874
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   875
handleLabels:aCollectionOfLabels
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   876
    "define special handle labels - typically a collection of
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   877
     bitmap images. Notice, that the first handle is not
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   878
     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
   879
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   880
    orientation == #horizontal ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   881
        self error:'not allowed for horizontal panels'
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   882
    ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   883
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   884
    handleLabels := aCollectionOfLabels.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   885
    self computeBarHeight.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   886
    self resizeSubviews.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   887
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   888
    "
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   889
     |top panel v1 v2|
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   890
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   891
     top := StandardSystemView new.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   892
     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
   893
     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
   894
     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
   895
     panel handleStyle:nil.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   896
     panel handleLabels:#('foo' 'bar').
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   897
     top open
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
   898
    "
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   899
!
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
   900
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   901
handleLevel:aNumber
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   902
    "define the 3D level of the handle (only with some styles).
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   903
     Normally, this is defined via styleSheet files, but this entry allows
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   904
     individual views to be manipulated."
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   905
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   906
    handleLevel := aNumber
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   907
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   908
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   909
handlePosition
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   910
    "return the position of the handle"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   911
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   912
    ^ handlePosition
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   913
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   914
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   915
handlePosition:aSymbol
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   916
    "define the position of the handle; the argument aSymbol
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   917
     may be one of #left, #right or #center.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   918
     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
   919
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   920
    handlePosition := aSymbol
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   921
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   922
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   923
handleShadowImage:shadowImage lightImage:lightImage
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   924
    "define the handles image; both shadow and light parts"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   925
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   926
    shadowForm := shadowImage.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   927
    lightForm := lightImage.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   928
    self computeBarHeight.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   929
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   930
    "Created: 7.11.1996 / 20:21:51 / cg"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   931
    "Modified: 7.11.1996 / 20:27:26 / cg"
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   932
!
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
   933
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   934
handleStyle:styleSymbol
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   935
    "define the style of the handle;
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   936
     styleSymbol may be #motif to draw a little knob or
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   937
     anything else to draw scrollBars handleForm.
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   938
     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
   939
     individual views to be manipulated."
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   940
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   941
    (styleSymbol ~~ handleStyle) ifTrue:[
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   942
        handleStyle := styleSymbol.
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   943
        handleStyle == #next ifTrue:[
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   944
            shadowForm := self class shadowFormOn:device.
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   945
            lightForm := self class lightFormOn:device.
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   946
        ] ifFalse:[
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   947
            shadowForm := lightForm := nil
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   948
        ].
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   949
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   950
        shadowForm notNil ifTrue:[
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   951
            (self is3D and:[handleStyle ~~ #motif]) ifTrue:[
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   952
                self barHeight:(shadowForm height + 2).
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   953
                barWidth := shadowForm width
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   954
            ]
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   955
        ].
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   956
        shown ifTrue:[
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   957
            self resizeSubviews.
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   958
            self invalidate
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   959
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   960
    ]
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   961
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
   962
    "Created: 24.2.1996 / 19:04:07 / cg"
722
3f297a438fec use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   963
    "Modified: 29.5.1996 / 16:22:24 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   964
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   965
1948
e92d1005d6a3 direct access to barHeight
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   966
setBarHeight:nPixel
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   967
    "check whether snap matches to extent of bar otherwise disable snap
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   968
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   969
    snapAdornment notNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   970
        barHeight := nPixel max:(snapAdornment at:#height ifAbsent:0)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   971
    ] ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   972
        barHeight := nPixel max:0
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   973
    ].
1948
e92d1005d6a3 direct access to barHeight
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   974
2108
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   975
    realized ifTrue:[
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
   976
        self resizeSubviews
2108
b9322a905330 resize when the barWidth is changed while already visible.
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   977
    ]
1948
e92d1005d6a3 direct access to barHeight
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   978
e92d1005d6a3 direct access to barHeight
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   979
!
e92d1005d6a3 direct access to barHeight
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   980
2114
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   981
showHandle
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   982
    "return the the handle-drawing flag; aBoolean"
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   983
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   984
    ^ showHandle
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   985
!
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   986
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   987
showHandle:aBoolean
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   988
    "enabled/disable the handle-drawing"
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   989
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   990
    showHandle := aBoolean
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   991
!
54afdc74da11 access to showHandle flag
Claus Gittinger <cg@exept.de>
parents: 2108
diff changeset
   992
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   993
snapHandlePosition
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   994
    "return the position of the snap-handle"
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   995
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   996
    ^ snapHandlePosition
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   997
!
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   998
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
   999
snapHandlePosition:aSymbol
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1000
    "define the position of the snap-handle; the argument aSymbol
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1001
     may be one of #left, #right or #center.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1002
     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
  1003
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1004
    snapHandlePosition := aSymbol
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1005
!
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1006
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1007
snapMode
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1008
    "allowed modes are:
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1009
        nil             no snap
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1010
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1011
        #max            on press the view is increased to bottom(vertical) or right(horizontal)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1012
        #min            on press the view is decreased to top   (vertical) or left (horizontal)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1013
        #maxMin         on press the view is increased or decreased dependent on its current extent
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1014
        #minMax         on press the view is increased or decreased dependent on its current extent
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1015
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1016
    snapAdornment notNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1017
        ^ snapAdornment at:#mode ifAbsent:nil
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1018
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1019
    ^ nil
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1020
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1021
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1022
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1023
snapMode:aMode
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1024
    "allowed modes are:
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1025
        nil             no snap
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1026
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1027
        #max            on press the view is increased to bottom(vertical) or right(horizontal)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1028
        #min            on press the view is decreased to top   (vertical) or left (horizontal)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1029
        #maxMin         on press the view is increased or decreased dependent on its current extent
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1030
        #minMax         on press the view is increased or decreased dependent on its current extent
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1031
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1032
    |oldHeight oldMode|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1033
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1034
    aMode notNil ifTrue:[
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1035
        ( #( max min maxMin minMax both) includes:aMode) ifFalse:[
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1036
            ^ self error:('unknown snapMode: ', aMode printString).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1037
        ]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1038
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1039
    (oldMode := self snapMode) == aMode ifTrue:[^ self].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1040
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1041
    (snapAdornment notNil and:[aMode notNil]) ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1042
        "must only redraw"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1043
        snapAdornment at:#mode put:aMode
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1044
    ] ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1045
        "must recompute barHeight and redraw"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1046
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1047
        aMode isNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1048
            snapAdornment := nil
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1049
        ] ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1050
            self initSnapAdornment.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1051
            snapAdornment at:#mode put:aMode.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1052
        ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1053
        oldHeight := barHeight.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1054
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1055
        self computeBarHeight.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1056
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1057
        oldHeight ~~ barHeight ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1058
            "must recompute subViews"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1059
            self setupSubviews.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1060
            self resizeSubviews.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1061
        ]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1062
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1063
    shown ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1064
        self invalidate
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1065
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1066
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1067
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1068
style:styleSymbol
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1069
    "define the style of the handle;
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1070
     styleSymbol may be #motif to draw a little knob or
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1071
     anything else to draw scrollBars handleForm.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1072
     Normally, this is defined via styleSheet files, but this entry allows
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1073
     individual views to be manipulated."
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1074
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1075
    self handleStyle:styleSymbol
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1076
395
db172e0f3d56 renamed #style: to #handleStyle:
Claus Gittinger <cg@exept.de>
parents: 300
diff changeset
  1077
    "Modified: 24.2.1996 / 19:04:19 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1078
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1079
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1080
!VariablePanel methodsFor:'drawing'!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1081
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1082
drawHandle:hIndex atX:hx y:hy
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1083
    "draw a single handle at hx/hy"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1084
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1085
    |h w x y m xm ym lbl maxKnob
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1086
     mar           "{ Class: SmallInteger }"
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1087
     barWidthInt   "{ Class: SmallInteger }"
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1088
     barHeightInt  "{ Class: SmallInteger }" |
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1089
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1090
    ((handleStyle isNil or:[handleStyle == #none])
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1091
    and:[handleLabels isNil]) ifTrue:[^ self].
396
973d4a9fa32c setting handleStyle to nil disables handleDrawing
Claus Gittinger <cg@exept.de>
parents: 395
diff changeset
  1092
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1093
    mar := margin.
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1094
    barHeightInt := barHeight.
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1095
    barWidthInt := barWidth.
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1096
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1097
    shadowForm notNil ifTrue:[
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1098
        h := shadowForm height.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1099
        w := shadowForm width .
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1100
        maxKnob := h min:barHeightInt.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1101
    ] ifFalse:[
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1102
        maxKnob := knobHeight min: barHeightInt.
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1103
        maxKnob := maxKnob max:4.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1104
        handleStyle == #full ifTrue:[
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1105
            w := h := maxKnob
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1106
        ] ifFalse:[
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1107
            w := h := maxKnob - 4.
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1108
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1109
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1110
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1111
    self paint:viewBackground.
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1112
    self lineStyle:#solid.
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1113
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1114
    orientation == #vertical ifTrue:[
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1115
        self fillRectangleX:mar y:hy 
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1116
                      width:(width - mar - mar) 
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1117
                     height:barHeightInt.
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1118
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1119
        (handleStyle isNil
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1120
        or:[handleStyle == #none]) ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1121
            (handleStyle ~~ #normal 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1122
            and:[handleStyle ~~ #mswindows]) ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1123
                m := (maxKnob - h) // 2.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1124
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1125
                shadowForm isNil ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1126
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1127
                    y := hy + (barHeightInt // 2).   "/ center of the bar
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1128
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1129
                    separatingLine ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1130
                        self paint:shadowColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1131
                        self displayLineFromX:mar y:y toX:(width - mar) y:y.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1132
                        y := y + 1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1133
                        self paint:lightColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1134
                        self displayLineFromX:mar y:y toX:(width - mar) y:y.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1135
                        self paint:viewBackground.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1136
                    ].
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1137
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1138
                    self fillRectangleX:(hx - barWidthInt) 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1139
                                      y:hy 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1140
                                  width:(barWidthInt + barWidthInt) 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1141
                                 height:h.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1142
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1143
                    handleStyle == #line ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1144
                        self paint:handleColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1145
                        self displayLineFromX:hx - barWidthInt y:y toX:hx + barWidthInt y:y
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1146
                    ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1147
                        y := hy.   
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1148
                        handleStyle == #st80 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1149
                            y := y - 1
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1150
                        ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1151
                        ym := y + m.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1152
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1153
                        handleStyle == #full ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1154
                            handleLevel ~~ 0 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1155
                                self 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1156
                                    drawEdgesForX:0 "/ -(handleLevel abs)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1157
                                    y:ym "/-1
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1158
                                    width:width "/+(handleLevel+handleLevel)abs
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1159
                                    height:h-2 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1160
                                    level:handleLevel
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1161
                                    shadow:shadowColor 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1162
                                    light:lightColor
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1163
                                    halfShadow:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1164
                                    halfLight:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1165
                                    style:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1166
                            ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1167
                        ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1168
                            handleLevel ~~ 0 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1169
                                self drawEdgesForX:(hx - barWidthInt)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1170
                                                 y:ym
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1171
                                             width:(barWidthInt + barWidthInt)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1172
                                            height:h 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1173
                                             level:handleLevel.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1174
                            ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1175
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1176
                            handleStyle == #iris ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1177
                                self paint:handleColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1178
                                self fillDeviceRectangleX:(hx - barWidthInt + 2)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1179
                                                        y:(ym + 2)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1180
                                                    width:(barWidthInt + barWidthInt - 4)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1181
                                                   height:h - 4
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1182
                            ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1183
                        ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1184
                    ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1185
                ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1186
                    y := hy.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1187
                    (shadowForm notNil or:[lightForm notNil]) ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1188
                        self drawHandleFormAtX:hx y:(y + m)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1189
                    ]
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1190
                ].
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1191
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1192
                handleStyle == #st80 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1193
                    y := hy - 1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1194
                    self paint:lightColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1195
                    self displayLineFromX:mar y:y toX:(width - mar - mar - 1) y:y.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1196
                    self displayLineFromX:0 y:hy toX:0 y:(hy + knobHeight - 1).
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1197
                    y := hy + knobHeight - 2.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1198
                    self paint:shadowColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1199
                    self displayLineFromX:mar y:y toX:(width - mar) y:y.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1200
                        "uncomment the -1 if you dont like the notch at the right end"
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1201
                        "                            VVV"
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1202
                    self 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
  1203
                ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1204
            ] ifFalse:[
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1205
                y := hy + barHeightInt - 1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1206
                self paint:handleColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1207
                separatingLine ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1208
                    self displayLineFromX:0 y:hy+1 toX:width y:hy+1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1209
                    self displayLineFromX:0 y:y toX:width y:y.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1210
                ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1211
                self fillRectangleX:hx y:hy width:barWidthInt height:barHeightInt
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1212
            ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1213
        ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1214
        lbl := self handleLabelAt:hIndex.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1215
        lbl notNil ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1216
            hIndex ~~ 1 ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1217
                self paint:Color black.
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  1218
                lbl isImageOrForm ifTrue:[
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1219
                    lbl displayOn:self x:mar y:hy
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  1220
                ] ifFalse:[
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1221
                    lbl displayOn:self x:mar y:hy + font ascent + 1
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  1222
                ]
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1223
            ]
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1224
        ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1225
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1226
    ] ifFalse:[
1096
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1227
        self fillRectangleX:hx y:mar 
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1228
                      width:barHeightInt
e17800280f82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  1229
                     height:(height - mar - mar).
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1230
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1231
        (handleStyle isNil
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1232
        or:[handleStyle == #none]) ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1233
            (handleStyle ~~ #normal
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1234
            and:[handleStyle ~~ #mswindows]) ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1235
                 m := (barHeightInt - w) // 2.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1236
                m := (maxKnob - w) // 2.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1237
                 shadowForm isNil ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1238
                    x := hx + (barHeightInt // 2).
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1239
                    separatingLine ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1240
                        self paint:shadowColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1241
                        self displayLineFromX:x y:mar toX:x y:(height - mar).
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1242
                        x := x + 1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1243
                        self paint:lightColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1244
                        self displayLineFromX:x y:mar toX:x y:(height - mar).
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1245
                        self paint:viewBackground.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1246
                    ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1247
                    self fillRectangleX:hx y:(hy - barWidthInt) 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1248
                                  width:w 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1249
                                 height:(barWidthInt + barWidthInt).
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1250
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1251
                    handleStyle == #line ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1252
                        self paint:handleColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1253
                        self displayLineFromX:x y:hy - barWidthInt toX:x y:hy + barWidthInt.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1254
                    ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1255
                        x := hx.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1256
                        handleStyle == #st80 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1257
                            x := x - 1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1258
                        ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1259
                        xm := x + m.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1260
                        handleStyle == #full ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1261
                            handleLevel ~~ 0 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1262
                                self 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1263
                                    drawEdgesForX:xm "/-1
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1264
                                    y:0 "/ -handleLevel
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1265
                                    width:w-2
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1266
                                    height:height "/ +handleLevel+handleLevel 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1267
                                    level:handleLevel
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1268
                                    shadow:shadowColor 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1269
                                    light:lightColor
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1270
                                    halfShadow:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1271
                                    halfLight:nil 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1272
                                    style:nil
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1273
                            ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1274
                        ] ifFalse:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1275
                            handleLevel ~~ 0 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1276
                                self drawEdgesForX:xm
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1277
                                                 y:(hy - barWidthInt)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1278
                                             width:w 
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1279
                                            height:(barWidthInt + barWidthInt)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1280
                                             level:handleLevel.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1281
                            ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1282
                            handleStyle == #iris ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1283
                                self paint:handleColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1284
                                self fillDeviceRectangleX:(xm + 2)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1285
                                                        y:(hy - barWidthInt + 2)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1286
                                                    width:w - 4
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1287
                                                   height:(barWidthInt + barWidthInt - 4)
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1288
                            ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1289
                        ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1290
                    ]
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1291
                ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1292
                    x := hx.
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1293
                    (shadowForm notNil or:[lightForm notNil]) ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1294
                        self drawHandleFormAtX:(x + m) y:hy
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1295
                    ]
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1296
                ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1297
                handleStyle == #st80 ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1298
                    x := hx - 1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1299
                    self paint:lightColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1300
                    self displayLineFromX:x y:mar toX:x y:(height - mar).
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1301
                    self displayLineFromX:hx y:0 toX:(hx + barHeightInt - 1) y:0.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1302
                    x := hx + barHeightInt - 2.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1303
                    self paint:shadowColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1304
                    self displayLineFromX:x y:mar toX:x y:(height - mar).
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1305
                        "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
  1306
                        "                   VVV"
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1307
                    self displayLineFromX:hx" "-1" " y:height-1 toX:(hx + barHeightInt - 1) y:height-1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1308
                ].
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1309
            ] ifFalse:[
1981
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1310
                x := hx + barHeightInt - 1.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1311
                self paint:handleColor.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1312
                separatingLine ifTrue:[
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1313
                    self displayLineFromX:hx+1 y:0 toX:hx+1 y:height.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1314
                    self displayLineFromX:x y:0 toX:x y:height.
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1315
                ].
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1316
                self fillRectangleX:hx y:hy width:barHeightInt height:barWidthInt
15a646f9e4fb error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1317
            ]
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1318
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1319
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1320
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1321
    "Modified: / 29.7.1998 / 22:48:33 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1322
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1323
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1324
drawHandleFormAtX:hx y:hy
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1325
    "draw a handles bitmap at hx/hy"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1326
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1327
    shadowForm notNil ifTrue:[
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1328
        self paint:shadowColor.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1329
        self displayForm:shadowForm x:hx y:hy.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1330
    ].
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1331
    lightForm notNil ifTrue:[
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1332
        self paint:lightColor.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1333
        self displayForm:lightForm x:hx y:hy.
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1334
    ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1335
    self paint:viewBackground
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1336
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1337
    "Modified: 7.11.1996 / 20:25:33 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1338
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1339
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1340
drawSnapAt:anIndex
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1341
    "draw the snap for a handle at an index
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1342
    "
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1343
    |layout icon level offLevel paint canChangeExtent
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1344
     left   "{ Class:SmallInteger }"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1345
     top    "{ Class:SmallInteger }"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1346
     width  "{ Class:SmallInteger }"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1347
     height "{ Class:SmallInteger }"
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1348
     snapMode leftEdge wEdge topEdge hEdge part wPart hPart
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1349
    |
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1350
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1351
    (layout := self snapLayoutAt:anIndex) isNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1352
        "snap disabled"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1353
        ^ self
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1354
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1355
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1356
    left   := layout left.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1357
    top    := layout top.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1358
    width  := layout width.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1359
    height := layout height.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1360
    snapMode := self snapMode.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1361
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1362
    offLevel := level := snapAdornment at:#level ifAbsent:0.
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1363
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1364
    canChangeExtent := self canChangeExtentOfViewAt:anIndex.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1365
    canChangeExtent ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1366
        (controller isSnapEntered:anIndex) ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1367
            controller isSnapPressed ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1368
                level := #selectedLevel.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1369
                paint := #selectedBgColor.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1370
            ] ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1371
                level := #enterLevel.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1372
                paint := #enterBgColor.
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1373
            ].
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1374
            level := snapAdornment at:level ifAbsent:0.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1375
        ]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1376
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1377
    paint notNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1378
        paint := snapAdornment at:paint ifAbsent:viewBackground
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1379
    ] ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1380
        paint := viewBackground
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1381
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1382
    self paint:paint.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1383
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1384
    level == 0 ifTrue:[
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1385
    ].
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1386
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1387
    self fillRectangleX:left+1 y:top+1 width:width-2 height:height-2.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1388
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1389
    level ~~ 0 ifTrue:[
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1390
        leftEdge := left + 1.
2240
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1391
        wEdge := wPart := width - 2.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1392
        topEdge := top + 1.
2240
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1393
        hEdge := hPart := height - 2.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1394
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1395
        orientation == #vertical ifTrue:[
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1396
            wPart := width // 3.
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1397
        ] ifFalse:[
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1398
            hPart := height // 3.
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1399
        ].
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1400
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1401
        level < 0 ifTrue:[
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1402
            part := (self subViews at:anIndex) objectAttributeAt:#snapPart.
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1403
            part == #left ifTrue:[
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1404
                self drawEdgesForX:leftEdge y:topEdge width:wEdge height:hEdge level:offLevel.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1405
            ] ifFalse:[
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1406
                part == #middle ifTrue:[
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1407
                    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
  1408
                    orientation == #vertical ifTrue:[
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1409
                        leftEdge := leftEdge + wPart.
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1410
                    ] ifFalse:[
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1411
                        topEdge := topEdge + hPart.
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1412
                    ]
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1413
                ] ifFalse:[
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1414
                    part == #right ifTrue:[
2238
397f5d6d59c5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  1415
                        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
  1416
                        orientation == #vertical ifTrue:[
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1417
                            leftEdge := leftEdge + (width - wPart).
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1418
                        ] ifFalse:[
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1419
                            topEdge := topEdge + (height - hPart).
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1420
                        ]
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1421
                    ]
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1422
                ]
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1423
            ].
2240
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1424
            wEdge := wPart.
c878eeeb676f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1425
            hEdge := hPart.
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1426
        ].
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1427
        self drawEdgesForX:leftEdge y:topEdge width:wEdge height:hEdge level:level.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1428
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1429
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1430
    canChangeExtent ifFalse:[^ self].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1431
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1432
    snapMode == #both ifTrue:[
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1433
        icon := orientation == #vertical ifTrue:[#iconUpDown] ifFalse:[#iconLeftRight]
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1434
    ] ifFalse:[
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1435
        (self snapAtIndexWillGrow:anIndex) ifTrue:[
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1436
            icon := orientation == #vertical ifTrue:[#iconDown] ifFalse:[#iconRight]
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1437
        ] ifFalse:[
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1438
            icon := orientation == #vertical ifTrue:[#iconUp]   ifFalse:[#iconLeft]
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1439
        ].
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1440
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1441
    icon := snapAdornment at:icon ifAbsent:nil.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1442
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1443
    icon displayOn:self x:(left + (width - icon width // 2))
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1444
                        y:(top  + (height - icon height // 2)).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1445
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1446
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1447
invertHandleBarAtX:hx y:hy
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1448
    |doLine oldStyle|
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1449
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1450
    doLine := (trackLine == #solidLine 
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1451
               or:[trackLine == #dashedLine
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1452
               or:[trackLine == #dottedLine]]).
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1453
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1454
    trackLine == #dashedLine ifTrue:[
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1455
        oldStyle := lineStyle.
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1456
        self lineStyle:#dashed.
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1457
    ] ifFalse:[
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1458
        trackLine == #dottedLine ifTrue:[
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1459
            oldStyle := lineStyle.
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1460
            self lineStyle:#dotted.
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1461
        ]
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1462
    ].
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1463
1220
9bc6add9aa54 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1207
diff changeset
  1464
    self clippedByChildren:false.
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1465
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1466
    self xoring:[
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1467
        |yL xL halfHeight|
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1468
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1469
        halfHeight := (barHeight // 2) - 1.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1470
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1471
        orientation == #vertical ifTrue:[
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1472
            yL := hy + halfHeight.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1473
            doLine ifTrue:[
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1474
                self displayLineFromX:0 y:yL toX:width y:yL.
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1475
            ] ifFalse:[
1130
3c9a9961d225 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1129
diff changeset
  1476
                self fillRectangleX:0 y:hy width:width height:barHeight
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1477
            ]
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1478
        ] ifFalse:[
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1479
            xL := hx + halfHeight.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1480
            doLine ifTrue:[
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1481
                self displayLineFromX:xL y:0 toX:xL y:height.
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1482
            ] ifFalse:[
1130
3c9a9961d225 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1129
diff changeset
  1483
                self fillRectangleX:hx y:0 width:barHeight height:height
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1484
            ]
1130
3c9a9961d225 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1129
diff changeset
  1485
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1486
    ].
1220
9bc6add9aa54 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1207
diff changeset
  1487
    self clippedByChildren:true.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1488
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1489
    oldStyle notNil ifTrue:[
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1490
        self lineStyle:oldStyle.
1131
98922cb07e5b allow handleStyle of #none
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
  1491
    ].
1129
17a77892f180 added support for dashed-LineTrack
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
  1492
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1493
    "Modified: / 28.4.1997 / 14:56:26 / dq"
1894
abf63db59265 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1869
diff changeset
  1494
    "Modified: / 3.5.1999 / 18:49:04 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1495
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1496
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1497
lockRedraw
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1498
    redrawLocked := true
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1499
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1500
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1501
redraw
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1502
    "redraw all of the handles"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1503
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1504
    redrawLocked ~~ true ifTrue:[
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1505
        self redrawHandlesFrom:1 to:(self subViews size)
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1506
    ]
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1507
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1508
    "Modified: 28.1.1997 / 17:54:15 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1509
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1510
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1511
redrawHandlesFrom:start to:stop
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1512
    "redraw some handles and snaps
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1513
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1514
    subViews size ~~ 0 ifTrue:[
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1515
        "/ do not draw handle, if there is a snapper ...
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  1516
        (showHandle and:[snapAdornment isNil]) ifTrue:[
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1517
            self handleOriginsWithIndexFrom:start to:stop do:[:hPoint :hIndex |
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1518
                self drawHandle:hIndex atX:(hPoint x) y:(hPoint y).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1519
            ]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1520
        ].
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1521
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1522
        snapAdornment notNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1523
            start to:stop do:[:i| self drawSnapAt:i ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1524
        ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1525
    ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1526
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1527
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1528
unlockRedraw
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1529
    redrawLocked := false
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1530
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1531
1159
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1532
!VariablePanel methodsFor:'enumerating subviews'!
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1533
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1534
changeSequenceOrderFor:aSubView to:anIndex
1416
b915d4f7709c comment
Claus Gittinger <cg@exept.de>
parents: 1388
diff changeset
  1535
    "change a subview's position in the subviews collection.
1159
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1536
    "
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1537
    |success|
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1538
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1539
    success := super changeSequenceOrderFor:aSubView to:anIndex.
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1540
    success ifTrue:[
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1541
        self setupSubviews.
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1542
        self resizeSubviews.
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1543
    ].
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1544
    ^ success
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1545
! !
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1158
diff changeset
  1546
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1547
!VariablePanel methodsFor:'event handling'!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1548
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1549
sizeChanged:how
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1550
    "my size has changed; resize my subviews"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1551
2123
33fda8594eee must resize children if realized;
Claus Gittinger <cg@exept.de>
parents: 2114
diff changeset
  1552
    realized ifTrue:[
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1553
        (how == #smaller) ifTrue:[
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1554
            self resizeSubviews
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1555
        ] ifFalse:[
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1556
            "/
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1557
            "/ 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
  1558
            "/
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1559
            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
  1560
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1561
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1562
    self changed:#sizeOfView with:how.
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1563
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1564
    "Modified: 28.1.1997 / 17:56:30 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1565
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1566
1821
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1567
!VariablePanel methodsFor:'focus handling'!
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1568
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1569
wantsFocusWithButtonPress
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1570
    "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
  1571
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1572
    ^ false
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1573
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1574
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1575
! !
b57cc9dc2c08 changed request-focus-with-Button press
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  1576
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1577
!VariablePanel methodsFor:'initializing'!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1578
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1579
computeBarHeight
958
b75025112346 commentary
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
  1580
    "compute the height if the separating bar from either the
b75025112346 commentary
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
  1581
     form or an explicit height given in the styleSheet"
b75025112346 commentary
Claus Gittinger <cg@exept.de>
parents: 924
diff changeset
  1582
1550
f0297a144983 clear view when resizing
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
  1583
    <resource: #style (#'variablePanel.barHeight'
f0297a144983 clear view when resizing
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
  1584
                       #'variablePanel.barHeightMM')>
924
81f3ca4512bd allow barHeight to be set in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1585
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1586
    |bH h lvl|
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1587
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1588
    shadowForm notNil ifTrue:[
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1589
        bH := shadowForm height + 2.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1590
    ] ifFalse:[
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
  1591
        bH := styleSheet at:#'variablePanel.barHeight'.
924
81f3ca4512bd allow barHeight to be set in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1592
        bH isNil ifTrue:[
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
  1593
            h := styleSheet at:#'variablePanel.barHeightMM' default:2.
924
81f3ca4512bd allow barHeight to be set in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1594
            bH := (h * device verticalPixelPerMillimeter) rounded.
81f3ca4512bd allow barHeight to be set in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1595
        ].
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1596
    ].
1869
b435e03cf803 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1821
diff changeset
  1597
    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
  1598
    lvl ~~ 0 ifTrue:[
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1599
        bH := bH + (lvl abs * 2).
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1600
    ].
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1601
876
9766a5eda233 examples
Claus Gittinger <cg@exept.de>
parents: 874
diff changeset
  1602
    self barHeight:bH.
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1603
    knobHeight := bH.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1604
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1605
    handleLabels notNil ifTrue:[
1987
599825bed176 #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 1981
diff changeset
  1606
        font := font onDevice:device.
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1607
        bH := handleLabels inject:bH into:[:maxSoFar :thisLabel |
874
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  1608
                                           thisLabel isNil ifTrue:[
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  1609
                                                maxSoFar
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  1610
                                           ] ifFalse:[
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  1611
                                                maxSoFar max:(thisLabel heightOn:self)
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  1612
                                           ]
f79d88b92c1b example & fix for images
Claus Gittinger <cg@exept.de>
parents: 873
diff changeset
  1613
                                          ].
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1614
        bH := bH + font descent - 1
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1615
    ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1616
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1617
    self barHeight:bH.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1618
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1619
    "Modified: / 29.7.1998 / 14:47:21 / cg"
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1620
!
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1621
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1622
defaultControllerClass
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1623
    ^ VariablePanelController
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1624
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1625
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1626
fixSize 
1151
94aff1c7b0aa Fix comments, eliminate common message sends.
Stefan Vogel <sv@exept.de>
parents: 1131
diff changeset
  1627
    super fixSize.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1628
    extentChanged ifTrue:[
1151
94aff1c7b0aa Fix comments, eliminate common message sends.
Stefan Vogel <sv@exept.de>
parents: 1131
diff changeset
  1629
        self resizeSubviews
94aff1c7b0aa Fix comments, eliminate common message sends.
Stefan Vogel <sv@exept.de>
parents: 1131
diff changeset
  1630
    ].
94aff1c7b0aa Fix comments, eliminate common message sends.
Stefan Vogel <sv@exept.de>
parents: 1131
diff changeset
  1631
94aff1c7b0aa Fix comments, eliminate common message sends.
Stefan Vogel <sv@exept.de>
parents: 1131
diff changeset
  1632
    "Modified: 22.3.1997 / 01:19:55 / stefan"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1633
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1634
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1635
initCursor
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1636
    "set the cursor - a double arrow"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1637
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
  1638
    cursor := self class 
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
  1639
                cursorForOrientation:orientation
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
  1640
                onDevice:device
900
0541b96dd173 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
  1641
1698
cab69c6081a8 use windows-like cursors if running on windows
Claus Gittinger <cg@exept.de>
parents: 1655
diff changeset
  1642
    "Modified: / 30.9.1998 / 18:20:35 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1643
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1644
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1645
initStyle
966
824e0ecc0e6f comments
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1646
    "setup viewStyle specifics"
824e0ecc0e6f comments
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1647
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1648
    |mm|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1649
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1650
    super initStyle.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1651
1987
599825bed176 #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 1981
diff changeset
  1652
    handleColor := DefaultHandleColor onDevice:device.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1653
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1654
    DefaultHandleStyle isNil ifTrue:[
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1655
        handleStyle := styleSheet name
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1656
    ] ifFalse:[
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1657
        handleStyle := DefaultHandleStyle
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1658
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1659
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1660
    handleLevel := DefaultHandleLevel.
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1661
    showHandle := DefaultShowHandle.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1662
    handlePosition := DefaultHandlePosition.
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  1663
    snapHandlePosition := DefaultSnapHandlePosition.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1664
    trackLine := DefaultTrackingLine.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1665
    separatingLine := DefaultSeparatingLine.
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1666
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1667
    DefaultHandleImage notNil ifTrue:[
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1668
        shadowForm := DefaultHandleImage onDevice:device.
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1669
        barWidth := shadowForm width.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1670
    ] ifFalse:[
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1671
        handleStyle == #next ifTrue:[
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1672
            DefaultHandleImage notNil ifTrue:[
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1673
                shadowForm := DefaultHandleImage onDevice:device.
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1674
            ] ifFalse:[
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1675
                shadowForm := self class shadowFormOn:device.
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1676
                lightForm := self class lightFormOn:device.
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1677
            ].
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1678
            barWidth := shadowForm width.
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1679
        ] ifFalse:[
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1680
            shadowForm := lightForm := nil.
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1681
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1682
            mm := device verticalPixelPerMillimeter.
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1683
            barWidth := (1.5 * mm) rounded. "motif style width"
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1684
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1685
    ].
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1686
    self computeBarHeight.
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1687
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1688
    handleStyle == #mswindows ifTrue:[
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1689
        barWidth := (ArrowButton new direction:#up) width + 1 
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1690
    ].
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1691
1529
509edab0a08b allow handleImage to be specified in styleSheet
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
  1692
    "Modified: / 19.5.1998 / 16:21:02 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1693
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1694
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1695
initialize
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1696
    orientation isNil ifTrue:[orientation := #vertical].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1697
    super initialize.
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1698
    self bitGravity:nil.
496
f22ac16a5093 commentary & code cleanup
Claus Gittinger <cg@exept.de>
parents: 485
diff changeset
  1699
1628
d5065006e796 fixed / beautified #full handleStyle (used with win95 style)
Claus Gittinger <cg@exept.de>
parents: 1551
diff changeset
  1700
    "Modified: / 29.7.1998 / 16:07:23 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1701
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1702
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1703
!VariablePanel methodsFor:'private'!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1704
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1705
anyNonRelativeSubviews
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1706
    "return true, if any of my subviews has no relative origin/extent"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1707
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1708
    self subViews do:[:aComponent |
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1709
        aComponent relativeCorner isNil ifTrue:[^ true].
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1710
        aComponent relativeOrigin isNil ifTrue:[^ true]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1711
    ].
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1712
    ^ false
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1713
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1714
    "Modified: 28.1.1997 / 17:57:26 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1715
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1716
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1717
expandSubView:expandedView
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1718
    "expand one of my subviews to full size"
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1719
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1720
    |pos subViews|
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1721
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1722
    realRelativeSizes notNil ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1723
        "/ already expanded ..
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1724
        ^ self
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1725
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1726
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1727
    pos := 0.0. 
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1728
    subViews := self subViews.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1729
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1730
    orientation == #vertical ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1731
        realRelativeSizes := subViews collect:[:v | v relativeCorner y - v relativeOrigin y].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1732
    ] ifFalse:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1733
        realRelativeSizes := subViews collect:[:v | v relativeCorner x - v relativeOrigin x].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1734
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1735
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1736
    subViews do:[:aSubView |
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1737
        aSubView == expandedView ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1738
            aSubView origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1739
            pos := 1.0
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1740
        ] ifFalse:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1741
            orientation == #vertical ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1742
                aSubView origin:(0.0 @ pos) corner:(1.0 @ pos)
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1743
            ] ifFalse:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1744
                aSubView origin:(pos @ 0.0) corner:(pos @ 1.0)
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1745
            ]
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1746
        ]
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1747
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1748
    self resizeSubviews.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1749
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1750
    "Modified: 28.1.1997 / 17:56:20 / cg"
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1751
!
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1752
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1753
handleLabelAt:hIndex
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1754
    handleLabels notNil ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1755
        ^ handleLabels at:hIndex ifAbsent:nil
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1756
    ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1757
    ^ nil
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1758
!
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1759
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1760
handleOriginsWithIndexDo:aBlock
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1761
    "evaluate the argument block for every handle-origin"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1762
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1763
    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
  1764
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1765
    "Modified: 28.1.1997 / 17:53:44 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1766
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1767
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1768
handleOriginsWithIndexFrom:start to:stop do:aBlock
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1769
    "evaluate the argument block for some handle-origins"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1770
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1771
    |x y hw hh hDelta vDelta subViews
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1772
     first "{ Class: SmallInteger }"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1773
     last  "{ Class: SmallInteger }"|
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1774
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1775
    (subViews := self subViews) notNil ifTrue:[
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1776
        shadowForm notNil ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1777
            hw := shadowForm width.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1778
            hh := shadowForm height.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1779
        ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1780
            hw := hh := barWidth
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1781
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1782
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1783
        (handleStyle ~~ #normal and:[handleStyle ~~ #mswindows]) ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1784
            hDelta := barWidth // 2.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1785
            vDelta := barWidth // 2.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1786
        ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1787
            hDelta := vDelta := 0
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1788
        ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1789
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1790
        (handlePosition == #left) ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1791
            x := hDelta. 
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1792
            y := vDelta.
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1793
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1794
            orientation == #vertical ifTrue:[
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1795
                x := x + barWidth
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1796
            ] ifFalse:[
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1797
                y := y + barWidth
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1798
            ].
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1799
            margin ~~ 0 ifTrue:[
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1800
                x := x + 2
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1801
            ].
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1802
        ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1803
            (handlePosition == #right) ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1804
                x := width - hw - margin - hDelta.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1805
                y := height - hh - margin - vDelta.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1806
            ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1807
                x := width - barWidth // 2.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1808
                y := height - barWidth // 2
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1809
            ]
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1810
        ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1811
        first := start + 1.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1812
        last := stop.
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1813
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1814
        first to:last do:[:index |
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1815
            |view|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1816
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1817
            view := subViews at:index.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1818
            orientation == #vertical ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1819
                y := view top "origin y" - barHeight + 1.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1820
            ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1821
                x := view left "origin x" - barHeight + 1.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1822
            ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1823
            aBlock value:(x @ y) value:index
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1824
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1825
    ]
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1826
1381
d69604d4bbb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1827
    "Modified: / 1.11.1997 / 11:53:40 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1828
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1829
2026
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1830
resizeSubViewsTo:relativeSizeList
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1831
    "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
  1832
     (a collection of relative sizes)"
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1833
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1834
    |pos subViews|
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1835
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1836
    subViews := self subViews.
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1837
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1838
    pos := 0.0.
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1839
    subViews with:relativeSizeList do:[:aSubView :relSize |
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1840
        orientation == #vertical ifTrue:[
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1841
            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
  1842
        ] ifFalse:[
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1843
            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
  1844
        ].
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1845
        pos := pos + relSize.
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1846
    ].
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1847
    self resizeSubviews.
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1848
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1849
!
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1850
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1851
resizeSubviews
1151
94aff1c7b0aa Fix comments, eliminate common message sends.
Stefan Vogel <sv@exept.de>
parents: 1131
diff changeset
  1852
    "readjust size of all subviews"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1853
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1854
    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
  1855
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1856
    "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
  1857
    "Modified: 22.3.1997 / 01:01:31 / stefan"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1858
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1859
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1860
resizeSubviewsFrom:start to:stop
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1861
    "readjust size of some subviews"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1862
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1863
    |step nSubviews subViews|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1864
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1865
    (subViews := self subViews) size > 0 ifTrue:[
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1866
        (start <= stop) ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1867
            step := 1
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1868
        ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1869
            step := -1
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1870
        ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1871
        nSubviews := subViews size.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1872
        start to:stop by:step do:[:index |
2026
9876789dfba7 added interface to change the subViews sizes programmatically.
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
  1873
            |bw view o1 o2 newOrg newCorner newExt|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1874
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1875
            view := subViews at:index.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1876
            bw := view borderWidth.
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1877
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1878
            index == 1 ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1879
                o1 := 0.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1880
            ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1881
                o1 := barHeight // 2 - bw
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1882
            ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1883
            index ==  nSubviews ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1884
                o2 := 0.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1885
            ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1886
                o2 := barHeight // 2 - bw
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1887
            ].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1888
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1889
            newOrg := view computeOrigin.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1890
            newOrg notNil ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1891
                (index ~~ 1) ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1892
                    orientation == #vertical ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1893
                        newOrg y:(newOrg y + o1)
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1894
                    ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1895
                        newOrg x:(newOrg x + o1)
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1896
                    ]
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1897
                ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1898
            ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1899
            newExt := view computeExtent.
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1900
            newExt notNil ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1901
                orientation == #vertical ifTrue:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1902
                    newExt y:(newExt y - o2 - o1)
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1903
                ] ifFalse:[
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1904
                    newExt x:(newExt x - o2 - o1)
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1905
                ]
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1906
            ].
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  1907
            view pixelOrigin:newOrg extent:newExt.
1550
f0297a144983 clear view when resizing
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
  1908
        ].
1551
1b9a8a925fe7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  1909
        shown ifTrue:[
1b9a8a925fe7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  1910
            "/ must clear, since handles are copied automatically (by bitGravity)
1b9a8a925fe7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  1911
            self clear.
1b9a8a925fe7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  1912
            self invalidate.
1b9a8a925fe7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  1913
        ]
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1914
    ]
873
d1274f0256a6 removed transcript message
Claus Gittinger <cg@exept.de>
parents: 871
diff changeset
  1915
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1916
    "Modified: / 22.3.1997 / 01:02:21 / stefan"
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1917
    "Modified: / 23.2.2000 / 18:32:37 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1918
!
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1919
1655
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1920
restoreSubViewRatios
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1921
    "restore my subviews sizes to the state before the full-expand"
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1922
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1923
    |pos subViews |
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1924
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1925
    realRelativeSizes == nil ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1926
        "/ not expanded - ignore
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1927
        ^ self
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1928
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1929
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1930
    pos := 0.0.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1931
    self subViews with:realRelativeSizes do:[:aSubView :aRelativeSize |
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1932
        orientation == #vertical ifTrue:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1933
            aSubView origin:(0.0 @ pos) corner:(1.0 @ (pos+aRelativeSize))
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1934
        ] ifFalse:[
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1935
            aSubView origin:(pos @ 0.0) corner:((pos+aRelativeSize) @ 1.0)
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1936
        ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1937
        pos := pos + aRelativeSize
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1938
    ].
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1939
    realRelativeSizes := nil.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1940
    self resizeSubviews.
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1941
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1942
    "Modified: 28.1.1997 / 17:56:20 / cg"
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1943
!
2928bb99f774 added #expand & #restore
Claus Gittinger <cg@exept.de>
parents: 1628
diff changeset
  1944
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1945
setupSubviews
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1946
    "setup subviews sizes (in case of non-relative sizes)"
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1947
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1948
    |pos delta subViews nSubViews "{ Class: SmallInteger }"|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1949
300
0823ef38e629 adding/removing views to Panels
ah
parents: 299
diff changeset
  1950
    "/ setup all subviews to spread evenly ...
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1951
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1952
    subViews := self subViews.
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1953
    nSubViews := subViews size.
1043
f0eeb4035bb8 re-setup subViews when removing a subview;
ca
parents: 980
diff changeset
  1954
    nSubViews == 0 ifTrue:[^ self].
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1955
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1956
    pos := 0.0. 
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1957
    delta := 1.0 / nSubViews.
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1958
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1959
    1 to:nSubViews do:[:index |
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1960
        |view org corn|
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1961
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1962
        view := subViews at:index.
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1963
        orientation == #vertical ifTrue:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1964
            org := (0.0 @ pos). 
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1965
            index == subViews size ifTrue:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1966
                corn := (1.0 @ 1.0)
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1967
            ] ifFalse:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1968
                corn := (1.0 @ (pos + delta))
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1969
            ].
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1970
        ] ifFalse:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1971
            org := (pos @ 0.0).
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1972
            index == subViews size ifTrue:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1973
                corn := (1.0 @ 1.0)
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1974
            ] ifFalse:[
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1975
                corn := ((pos + delta) @ 1.0)
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1976
            ].
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1977
        ].
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1978
        view origin:org corner:corn.
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1979
        pos := pos + delta
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1980
    ]
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  1981
2160
a750dda8205b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
  1982
    "Modified: / 23.2.2000 / 18:14:01 / cg"
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1983
! !
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1984
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1985
!VariablePanel methodsFor:'private snap queries'!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1986
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1987
canChangeExtentOfViewAt:anIndex
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1988
    "returns true if extent at an index is changable
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1989
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1990
    |view|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1991
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1992
    view := subViews at:anIndex ifAbsent:[^ false].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1993
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1994
    orientation == #vertical ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1995
        view height > 2 ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1996
            view := subViews at:(anIndex + 1) ifAbsent:[^ false].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1997
          ^ view height > 2
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1998
        ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  1999
        ^ true
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2000
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2001
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2002
    view width > 2 ifFalse:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2003
        view := subViews at:(anIndex + 1) ifAbsent:[^ false].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2004
      ^ view width > 2
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2005
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2006
    ^ true
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2007
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2008
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2009
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2010
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2011
initSnapAdornment
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2012
    |num icon level enterLevel selectedLevel color|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2013
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2014
    snapAdornment notNil ifTrue:[^ snapAdornment ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2015
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2016
    snapAdornment := IdentityDictionary new.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2017
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2018
    level         := styleSheet at:#'variablePanel.snapLevel'      default:1.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2019
    enterLevel    := styleSheet at:#'variablePanel.snapEnterLevel' default:level.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2020
    selectedLevel := styleSheet at:#'variablePanel.selectedLevel'  default:(level negated).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2021
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2022
    snapAdornment at:#level         put:level.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2023
    snapAdornment at:#enterLevel    put:enterLevel.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2024
    snapAdornment at:#selectedLevel put:selectedLevel.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2025
    snapAdornment at:#mode          put:#min.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2026
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2027
    color := styleSheet colorAt:#'variablePanel.snapSelectedBgColor'
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2028
                                      default:(StyleSheet colorAt:#'button.activeBackgroundColor').
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2029
    color notNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2030
        snapAdornment at:#selectedBgColor put:(color onDevice:device)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2031
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2032
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2033
    color := StyleSheet colorAt:#'variablePanel.snapEnterBgColor'
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2034
                        default:(StyleSheet colorAt:#'button.enteredBackgroundColor').
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2035
    color notNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2036
        snapAdornment at:#enterBgColor put:(color onDevice:device)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2037
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2038
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2039
    self class snapIcons keysAndValuesDo:[:aKey :anIcon|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2040
        icon := anIcon copy onDevice:device.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2041
        icon clearMaskedPixels.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2042
        snapAdornment at:aKey put:icon
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2043
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2044
    "compute required snap extent including level and margins ..."
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2045
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2046
    num  := level abs max:(enterLevel abs).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2047
    num  := num max:(selectedLevel abs).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2048
    num  := num + 2 "margin into handle := 1" * 2.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2049
    icon := snapAdornment at:#iconUp.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2050
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2051
    snapAdornment at:#height put:(icon height + num).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2052
    snapAdornment at:#width  put:(icon width  + num).
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2053
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2054
  ^ snapAdornment
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2055
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2056
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2057
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2058
snapAtIndexWillGrow:anIndex
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2059
    "returns true if the view assigned to the snap at an index will grow
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2060
     if pressing the snap
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2061
    "
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2062
    |view mode|
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2063
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2064
    (mode := self snapMode) notNil ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2065
        (mode == #max or:[mode == #maxMin]) ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2066
            "on press the view is increased to bottom(vertical) or right(horizontal)"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2067
            view := subViews at:(anIndex + 1) ifAbsent:[^ false].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2068
          ^ orientation == #vertical ifTrue:[view height > 2] ifFalse:[view width  > 2]
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2069
        ].    
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2070
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2071
        (mode == #min or:[mode == #minMax]) ifTrue:[
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2072
            "on press the view is decreased to top(vertical) or left (horizontal)"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2073
            view := subViews at:anIndex ifAbsent:[^ false].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2074
          ^ orientation == #vertical ifTrue:[view height <= 2] ifFalse:[view width  <= 2]
2236
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  2075
        ].
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  2076
cd77d04c9a0a snapMode: #both
Claus Gittinger <cg@exept.de>
parents: 2228
diff changeset
  2077
self halt.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2078
    ].    
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2079
    ^ false     "snap is diasbled"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2080
!
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2081
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2082
snapLayoutAt:anIndex
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2083
    "returns the layout of the snap at an index
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2084
     or nil if snaps are disabled
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2085
    "
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2086
    |v1 v2 left top w snapX snapY|
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2087
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2088
    snapAdornment isNil ifTrue:[^ nil].         "snap disabled"
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2089
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2090
    v1 := subViews at:anIndex     ifAbsent:[^ nil].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2091
    v2 := subViews at:anIndex + 1 ifAbsent:[^ nil].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2092
    w  := snapAdornment at:#width ifAbsent:0.
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2093
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2094
    snapHandlePosition == #left ifTrue:[
2241
d9c7f1486b7a draw snap at very left of panel
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
  2095
        snapX := snapY := margin. "/ ViewSpacing.
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2096
    ] ifFalse:[
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2097
        snapHandlePosition == #right ifTrue:[
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2098
            snapX := width - w.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2099
            snapY := height - w.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2100
        ] ifFalse:[
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2101
            snapX := (width - w) // 2.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2102
            snapY := (height - w) // 2.
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2103
        ].
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2104
    ].
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2105
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2106
    orientation == #vertical ifTrue:[
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2107
        left := snapX. "/ v1 width - w // 2.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2108
      ^ Rectangle left:left top:(v1 bottom + 1) right:(left + w) bottom:(v2 top)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2109
    ].
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2110
2228
d74b093fe48d snapHandlePosition adjustable
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
  2111
    top := snapY. "/ v1 height - w // 2.
2179
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2112
  ^ Rectangle left:(v1 right + 1) top:top right:(v2 left) bottom:(top + w)
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2113
! !
ae22ac1e068e support snap
ca
parents: 2160
diff changeset
  2114
299
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2115
!VariablePanel methodsFor:'private tableView protocol'!
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2116
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2117
setupSubviewOrigins
826
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2118
    "setup subviews origins 
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2119
     if we only have relative extents 
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2120
     (Variable Panels need relative origins and corners!!) (SV 16.1.95)"
299
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2121
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2122
    |x y e eX eY subViews n "{ Class: SmallInteger }"|
299
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2123
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2124
    x := y := 0.0.
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2125
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2126
    subViews := self subViews.
299
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2127
    n := subViews size.
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2128
    1 to:n do:[:index |
826
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2129
        |view|
299
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2130
826
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2131
        view := subViews at:index.
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2132
        e := view relativeExtent.
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2133
        e notNil ifTrue:[
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2134
            view relativeExtent:nil.
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2135
            eX := e x.
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2136
            eY := e y.
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2137
            index == n ifTrue:[
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2138
                view origin:(x @ y) corner:(1.0 @ 1.0)
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2139
            ] ifFalse:[
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2140
                orientation == #vertical ifTrue:[
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2141
                    view origin:(x @ y) corner:(1.0 @ (y+eY))
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2142
                ] ifFalse:[
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2143
                    view origin:(x @ y) corner:((x+eX) @ 1.0)
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2144
                ].
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2145
            ].
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2146
            orientation == #vertical ifTrue:[
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2147
                y := y + eY.
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2148
            ] ifFalse:[    
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2149
                x := x + eX.
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2150
            ]
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2151
        ] ifFalse: [
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2152
            view origin:(x @ y).
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2153
            orientation == #vertical ifTrue:[
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2154
                y := view relativeCorner y.
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2155
            ] ifFalse:[
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2156
                x := view relativeCorner x.
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2157
            ]
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2158
        ].
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2159
    ]
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2160
138bc07c873b Add comment.
Stefan Vogel <sv@exept.de>
parents: 722
diff changeset
  2161
    "Modified: 21.8.1996 / 10:01:29 / stefan"
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 966
diff changeset
  2162
    "Modified: 28.1.1997 / 17:55:21 / cg"
299
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2163
! !
d2f955840ad5 oops - tableViews private interface was lost - reintroduced
ah
parents: 295
diff changeset
  2164
871
541b8f9e8237 add label to vertical panel
ca
parents: 826
diff changeset
  2165
!VariablePanel class methodsFor:'documentation'!
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
version
2241
d9c7f1486b7a draw snap at very left of panel
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
  2168
    ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.64 2000-08-27 14:49:30 cg Exp $'
295
aa5887bff1b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2169
! !