ComboView.st
author convert-repo
Fri, 21 Dec 2018 04:37:53 +0000
changeset 5976 63b4e85a9445
parent 5949 10935e855698
child 5983 023c539cad97
permissions -rw-r--r--
update tags
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5949
10935e855698 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 5923
diff changeset
     1
"{ Encoding: utf8 }"
10935e855698 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 5923
diff changeset
     2
1301
93a3ec8c339c OOPS - stefan what happened to your checkin (garbage)
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
     3
"
332
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
     4
 COPYRIGHT (c) 1996 by eXept Software AG / Claus Gittinger
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
     5
              All Rights Reserved
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
     6
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
     7
 This software is furnished under a license and may be used
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
     8
 only in accordance with the terms of that license and with the
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    10
 be provided or otherwise made available to, or used by, any
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    11
 other person.  No title to or ownership of the software is
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    12
 hereby transferred.
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    13
"
1884
bf33562ea53b use rootWindowId (save a message send)
Claus Gittinger <cg@exept.de>
parents: 1696
diff changeset
    14
"{ Package: 'stx:libwidg2' }"
bf33562ea53b use rootWindowId (save a message send)
Claus Gittinger <cg@exept.de>
parents: 1696
diff changeset
    15
4824
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
    16
"{ NameSpace: Smalltalk }"
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
    17
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
View subclass:#ComboView
3312
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
    19
	instanceVariableNames:'field pullDownButton list listHolder listMsg action resizableMenu
4187
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
    20
		currentIndex comboMenuHolder comboMenuMessage'
2950
431dafff127d cash comboButtonForms
ca
parents: 2892
diff changeset
    21
	classVariableNames:'DefaultButtonForm ComboButtonForms'
1306
56e90a9e5da1 renambe #enableStateChange to #enableStateChanged
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
    22
	poolDictionaries:''
56e90a9e5da1 renambe #enableStateChange to #enableStateChanged
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
    23
	category:'Views-Interactors'
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
263
865b7d99d3f5 added an example for a menu-pull-hook
Claus Gittinger <cg@exept.de>
parents: 247
diff changeset
    26
!ComboView class methodsFor:'documentation'!
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
332
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    28
copyright
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    29
"
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    30
 COPYRIGHT (c) 1996 by eXept Software AG / Claus Gittinger
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    31
              All Rights Reserved
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    32
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    33
 This software is furnished under a license and may be used
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    34
 only in accordance with the terms of that license and with the
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    35
 inclusion of the above copyright notice.   This software may not
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    36
 be provided or otherwise made available to, or used by, any
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    37
 other person.  No title to or ownership of the software is
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    38
 hereby transferred.
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    39
"
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    40
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    41
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    42
!
78dcd3cacbfd documentation
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
    43
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
documentation
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
"
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    A ComboView combines some field (typically an enterField or Label)
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    with a drop down list of default inputs;
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    ComboView is abstract, providing protocol common to ComboBoxView and
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    ComboListView. See documentation & examples there.
274
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
    50
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
    51
    [author:]
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
    52
        Claus Gittinger
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
    53
3312
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
    54
    [instance variables:]
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
    55
        currentIndex    Integer     index into the list, that is currently selected
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
    56
274
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
    57
    [see also:]
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
    58
        PopUpList
1281
94b22cb9c19f documentation
Claus Gittinger <cg@exept.de>
parents: 1210
diff changeset
    59
        ComboListView ComboBoxView ExtendedComboBox
274
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
    60
        PullDownMenu Label EntryField
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
"
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
!
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
examples
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
"
308
922a96deba3e examples removed; cleanup
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    66
  see examples in ComboListView and ComboBoxView
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
"
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
! !
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
263
865b7d99d3f5 added an example for a menu-pull-hook
Claus Gittinger <cg@exept.de>
parents: 247
diff changeset
    70
!ComboView class methodsFor:'defaults'!
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
5889
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
    72
activeForm
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
    73
    <resource: #style (#'comboView.activeDownForm' 
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
    74
                       #'comboView.activeDownFormFile')>
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
    75
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
    76
    ^ self formForKey:#activeLogo styleFormKey:#'comboView.activeDownForm' styleFilenameKey:#'comboView.activeDownFormFile'
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
    77
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
    78
    "Created: / 17-08-2018 / 17:21:52 / Claus Gittinger"
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
    79
!
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
    80
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
buttonForm
282
95209b20eaca commentary
Claus Gittinger <cg@exept.de>
parents: 280
diff changeset
    82
    "return the pull-buttons image"
95209b20eaca commentary
Claus Gittinger <cg@exept.de>
parents: 280
diff changeset
    83
1344
100e4d309847 support for disabled-image in pull-button
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
    84
    <resource: #style (#'comboView.downForm' 
100e4d309847 support for disabled-image in pull-button
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
    85
                       #'comboView.downFormFile')>
274
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
    86
276
8f90ed6c37bc allow either fileName or form to be given by styleSheet
Claus Gittinger <cg@exept.de>
parents: 274
diff changeset
    87
    |fileName form|
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
525
d0731a41d19f cache the pull-button image
Claus Gittinger <cg@exept.de>
parents: 512
diff changeset
    89
    DefaultButtonForm notNil ifTrue:[
d0731a41d19f cache the pull-button image
Claus Gittinger <cg@exept.de>
parents: 512
diff changeset
    90
        ^ DefaultButtonForm
d0731a41d19f cache the pull-button image
Claus Gittinger <cg@exept.de>
parents: 512
diff changeset
    91
    ].
d0731a41d19f cache the pull-button image
Claus Gittinger <cg@exept.de>
parents: 512
diff changeset
    92
1334
cc79acaebf00 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1325
diff changeset
    93
    form := StyleSheet at:#'comboView.downForm'.
274
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
    94
    form isNil ifTrue:[
1334
cc79acaebf00 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1325
diff changeset
    95
        fileName := StyleSheet at:#'comboView.downFormFile' "default:'ComboDn.14.xbm'".
1622
ea4d9baf568f try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
    96
        fileName notNil ifTrue:[
1633
e3b4e18f4545 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1622
diff changeset
    97
            form := Smalltalk imageFromFileNamed:fileName forClass:self.
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
    98
            form isNil ifTrue:[
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
    99
                form := Smalltalk imageFromFileNamed:fileName inPackage:'stx:libwidg'.
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   100
            ]
1622
ea4d9baf568f try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   101
        ].
274
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   102
    ].
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   103
    form isNil ifTrue:[
5383
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   104
        form  := self defaultButtonForm.
274
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   105
    ].
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   106
    form notNil ifTrue:[
525
d0731a41d19f cache the pull-button image
Claus Gittinger <cg@exept.de>
parents: 512
diff changeset
   107
        form := DefaultButtonForm := form onDevice:Display.
d0731a41d19f cache the pull-button image
Claus Gittinger <cg@exept.de>
parents: 512
diff changeset
   108
        ^ form
274
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   109
    ].
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   110
    ^ nil
92b51554b1d7 allow form to be specified by styleSheet
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   111
1344
100e4d309847 support for disabled-image in pull-button
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   112
    "Modified: / 28.4.1999 / 12:49:42 / cg"
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   113
!
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   114
3839
d269a10c33c9 comment/format in: #comboButtonFor:
Claus Gittinger <cg@exept.de>
parents: 3836
diff changeset
   115
comboButtonFor:aComboView
5889
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   116
    <resource: #style (#'comboView.button.activeForegroundColor'
2176
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   117
                       #'comboView.button.activeBackgroundColor'
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   118
                       #'comboView.button.activeLevel'
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   119
                       #'comboView.button.passiveLevel'  )>
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   120
5889
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   121
    |pullDownButton logo disabledLogo activeLogo enteredLogo lvl clr|
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   122
3839
d269a10c33c9 comment/format in: #comboButtonFor:
Claus Gittinger <cg@exept.de>
parents: 3836
diff changeset
   123
    pullDownButton := ComboBoxButton in:aComboView.
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   124
    pullDownButton controller beTriggerOnDown.
2785
3c705bdd5792 Do not use obsolete message #logo:
Stefan Vogel <sv@exept.de>
parents: 2750
diff changeset
   125
    pullDownButton label:(logo := self buttonForm).
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   126
2950
431dafff127d cash comboButtonForms
ca
parents: 2892
diff changeset
   127
    ComboButtonForms isNil ifTrue:[
431dafff127d cash comboButtonForms
ca
parents: 2892
diff changeset
   128
        ComboButtonForms := IdentityDictionary new.
431dafff127d cash comboButtonForms
ca
parents: 2892
diff changeset
   129
    ].
431dafff127d cash comboButtonForms
ca
parents: 2892
diff changeset
   130
5889
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   131
    disabledLogo := self disabledForm.
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   132
    activeLogo := self activeForm.
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   133
    enteredLogo := self enteredForm.
2950
431dafff127d cash comboButtonForms
ca
parents: 2892
diff changeset
   134
2176
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   135
    disabledLogo notNil ifTrue:[
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   136
        pullDownButton passiveLogo:logo.
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   137
        pullDownButton activeLogo:logo.
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   138
        pullDownButton disabledLogo:disabledLogo.
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   139
    ].
2950
431dafff127d cash comboButtonForms
ca
parents: 2892
diff changeset
   140
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   141
    pullDownButton showLamp:false.
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   142
2176
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   143
    activeLogo notNil ifTrue:[
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   144
        pullDownButton activeLogo:activeLogo.
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   145
        pullDownButton passiveLogo:logo.
2785
3c705bdd5792 Do not use obsolete message #logo:
Stefan Vogel <sv@exept.de>
parents: 2750
diff changeset
   146
        pullDownButton label:logo.
2176
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   147
    ].
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   148
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   149
    enteredLogo notNil ifTrue:[
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   150
        pullDownButton enteredLogo:enteredLogo.
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   151
    ].
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   152
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   153
    (lvl := StyleSheet at:#'comboView.button.activeLevel') notNil ifTrue:[
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   154
        pullDownButton activeLevel:lvl
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   155
    ].
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   156
    (lvl := StyleSheet at:#'comboView.button.passiveLevel') notNil ifTrue:[
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   157
        pullDownButton passiveLevel:lvl
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   158
    ].
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   159
2176
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   160
    (clr := StyleSheet colorAt:#'comboView.button.activeForegroundColor') notNil ifTrue:[
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   161
        pullDownButton activeForegroundColor:clr
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   162
    ].
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   163
    (clr := StyleSheet colorAt:#'comboView.button.activeBackgroundColor') notNil ifTrue:[
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   164
        pullDownButton activeBackgroundColor:clr
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   165
    ].
a4ddd3e25bee background from styleSheet
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
   166
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   167
    pullDownButton activeLevel == pullDownButton passiveLevel ifTrue:[
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   168
        pullDownButton activeLevel:0.
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   169
    ].
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   170
    ^ pullDownButton.
5889
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   171
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   172
    "Modified: / 17-08-2018 / 17:23:38 / Claus Gittinger"
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   173
!
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   174
415
82d22b1ce5f5 defaultFont
Claus Gittinger <cg@exept.de>
parents: 411
diff changeset
   175
defaultFont
82d22b1ce5f5 defaultFont
Claus Gittinger <cg@exept.de>
parents: 411
diff changeset
   176
    "/ for now - should come from the styleSheet
82d22b1ce5f5 defaultFont
Claus Gittinger <cg@exept.de>
parents: 411
diff changeset
   177
4567
797d6ef51905 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4564
diff changeset
   178
    ^ EditField defaultFont.
797d6ef51905 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4564
diff changeset
   179
    "/ ^ SelectionInListView defaultFont.
415
82d22b1ce5f5 defaultFont
Claus Gittinger <cg@exept.de>
parents: 411
diff changeset
   180
82d22b1ce5f5 defaultFont
Claus Gittinger <cg@exept.de>
parents: 411
diff changeset
   181
    "Created: 4.6.1997 / 15:44:17 / cg"
82d22b1ce5f5 defaultFont
Claus Gittinger <cg@exept.de>
parents: 411
diff changeset
   182
!
82d22b1ce5f5 defaultFont
Claus Gittinger <cg@exept.de>
parents: 411
diff changeset
   183
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   184
defaultListMessage
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   185
    ^ #list
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   186
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   187
    "Created: 26.2.1997 / 19:34:50 / cg"
605
a8da1eb4e180 smaller button
Claus Gittinger <cg@exept.de>
parents: 581
diff changeset
   188
!
a8da1eb4e180 smaller button
Claus Gittinger <cg@exept.de>
parents: 581
diff changeset
   189
5889
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   190
disabledForm
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   191
    <resource: #style (#'comboView.disabledDownForm' 
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   192
                       #'comboView.disabledDownFormFile')>
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   193
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   194
    ^ self formForKey:#disabledLogo styleFormKey:#'comboView.disabledDownForm' styleFilenameKey:#'comboView.disabledDownFormFile'
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   195
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   196
    "Created: / 17-08-2018 / 17:20:34 / Claus Gittinger"
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   197
!
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   198
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   199
enteredForm
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   200
    <resource: #style (#'comboView.enteredDownForm' 
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   201
                       #'comboView.enteredDownFormFile')>
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   202
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   203
    ^ self formForKey:#enteredLogo styleFormKey:#'comboView.enteredDownForm' styleFilenameKey:#'comboView.enteredDownFormFile'
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   204
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   205
    "Created: / 17-08-2018 / 17:22:43 / Claus Gittinger"
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   206
!
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   207
605
a8da1eb4e180 smaller button
Claus Gittinger <cg@exept.de>
parents: 581
diff changeset
   208
updateStyleCache
3842
7356371ac6b8 changed: #updateStyleCache
Claus Gittinger <cg@exept.de>
parents: 3839
diff changeset
   209
    "flush the forms cache"
7356371ac6b8 changed: #updateStyleCache
Claus Gittinger <cg@exept.de>
parents: 3839
diff changeset
   210
2950
431dafff127d cash comboButtonForms
ca
parents: 2892
diff changeset
   211
    DefaultButtonForm := ComboButtonForms := nil.
605
a8da1eb4e180 smaller button
Claus Gittinger <cg@exept.de>
parents: 581
diff changeset
   212
a8da1eb4e180 smaller button
Claus Gittinger <cg@exept.de>
parents: 581
diff changeset
   213
    "Created: / 3.11.1997 / 15:28:48 / cg"
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   214
! !
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   215
5383
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   216
!ComboView class methodsFor:'image specs'!
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   217
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   218
defaultButtonForm
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   219
    "This resource specification was automatically generated
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   220
     by the ImageEditor of ST/X."
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   221
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   222
    "Do not manually edit this!! If it is corrupted,
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   223
     the ImageEditor may not be able to read the specification."
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   224
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   225
    "
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   226
     self defaultButtonForm inspect
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   227
     ImageEditor openOnClass:self andSelector:#defaultButtonForm
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   228
     Icon flushCachedIcons
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   229
    "
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   230
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   231
    <resource: #image>
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   232
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   233
    ^Icon
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   234
        constantNamed:'ComboView class defaultButtonForm'
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   235
        ifAbsentPut:[(Depth1Image width:12 height:12) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@')
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   236
            colorMapFromArray:#[0 0 0]
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   237
            mask:((ImageMask width:12 height:12) bits:(ByteArray fromPackedString:'@@<OC0<OC0=?;3?OG8<OC0XO@@=?;0@O'); yourself); yourself]
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   238
! !
738829c844c8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 5352
diff changeset
   239
5889
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   240
!ComboView class methodsFor:'private'!
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   241
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   242
formForKey:key styleFormKey:styleFormKey styleFilenameKey:styleFilenameKey
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   243
    ComboButtonForms isNil ifTrue:[
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   244
        ComboButtonForms := IdentityDictionary new.
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   245
    ].
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   246
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   247
    ^ ComboButtonForms 
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   248
        at:key 
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   249
        ifAbsentPut:[
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   250
            |logo fn|
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   251
            logo := StyleSheet at:styleFormKey.
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   252
            logo isNil ifTrue:[
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   253
                fn := StyleSheet at:styleFilenameKey.
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   254
                fn notNil ifTrue:[
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   255
                    logo := Smalltalk imageFromFileNamed:fn forClass:self.
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   256
                    logo isNil ifTrue:[
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   257
                        logo := Smalltalk imageFromFileNamed:fn inPackage:'stx:libwidg'.
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   258
                    ]
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   259
                ]
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   260
            ].
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   261
            logo
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   262
        ].
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   263
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   264
    "Created: / 17-08-2018 / 17:25:10 / Claus Gittinger"
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   265
! !
42b2e8de59ef #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 5661
diff changeset
   266
4972
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   267
!ComboView class methodsFor:'queries'!
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   268
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   269
isAbstract
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   270
    "Return if this class is an abstract class.
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   271
     True is returned here for myself only; false for subclasses.
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   272
     Abstract subclasses must redefine this again."
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   273
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   274
    ^ self == ComboView.
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   275
! !
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   276
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   277
!ComboView methodsFor:'accessing-behavior'!
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   278
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   279
action:aBlock
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   280
    "specify, a block, which is evaluated when the lists selection changes.
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   281
     This is an additional hook - normally, you would communicate with the model
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   282
     alone"
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   283
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   284
    action := aBlock.
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   285
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   286
    "Created: 26.7.1996 / 17:44:18 / cg"
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   287
    "Modified: 26.2.1997 / 19:37:18 / cg"
411
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   288
!
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   289
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   290
enabled
4663
b63155a28428 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4567
diff changeset
   291
    "return true, if it is enabled"
2892
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   292
    
1207
9019fe235f32 do not share my enableChannel with my buttons channel
tm
parents: 1183
diff changeset
   293
    enableChannel isNil ifTrue:[^ true].
4663
b63155a28428 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4567
diff changeset
   294
    ^ enableChannel value ? true
1294
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   295
!
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   296
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   297
enabled:aBoolean
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   298
    "enable/disable components"
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   299
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   300
    self enableChannel value:aBoolean.
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   301
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   302
    "Modified: / 30.3.1999 / 14:56:18 / stefan"
2892
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   303
!
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   304
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   305
resizableMenu
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   306
    "return true, if the menu is to be resizable.
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   307
     This feature is as yet unimplemented."
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   308
    
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   309
    ^ resizableMenu ? false
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   310
!
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   311
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   312
resizableMenu:aBoolean
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   313
    "enable/disable, if the menu is to be resizable.
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   314
     This feature is as yet unimplemented."
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   315
    
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   316
    resizableMenu := aBoolean
411
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   317
! !
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   318
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   319
!ComboView methodsFor:'accessing-channels'!
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   320
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   321
enableChannel 
2892
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   322
    "return a valueHolder for enable/disable"
42ba7f03313b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2868
diff changeset
   323
1207
9019fe235f32 do not share my enableChannel with my buttons channel
tm
parents: 1183
diff changeset
   324
    enableChannel isNil ifTrue:[
1294
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   325
        self enableChannel:(true asValue).
411
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   326
    ].
1207
9019fe235f32 do not share my enableChannel with my buttons channel
tm
parents: 1183
diff changeset
   327
    ^ enableChannel
411
5a32b4247011 delegate font:
ca
parents: 332
diff changeset
   328
1294
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   329
    "Modified: / 30.3.1999 / 16:20:25 / stefan"
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
! !
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
!ComboView methodsFor:'accessing-components'!
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
1560
8abb4de4f8f5 added access to field.
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   334
field
8abb4de4f8f5 added access to field.
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   335
    "return the field (input or label) component.
8abb4de4f8f5 added access to field.
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   336
     For knowledgable users only."
8abb4de4f8f5 added access to field.
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   337
8abb4de4f8f5 added access to field.
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   338
    ^ field
8abb4de4f8f5 added access to field.
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   339
8abb4de4f8f5 added access to field.
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   340
    "Created: / 26.9.1999 / 13:33:15 / cg"
8abb4de4f8f5 added access to field.
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   341
!
8abb4de4f8f5 added access to field.
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   342
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
menuButton
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
    "return the menuButton component"
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
    ^ pullDownButton
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
    "Created: 28.2.1996 / 15:03:14 / cg"
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
! !
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
!ComboView methodsFor:'accessing-contents'!
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
181
31e8f8ab2fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 166
diff changeset
   353
contents
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   354
    "get the contents of my field"
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   355
4115
6af2a4dea174 changed: #contents
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
   356
    |m|
181
31e8f8ab2fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 166
diff changeset
   357
4115
6af2a4dea174 changed: #contents
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
   358
    (m := field model) isNil ifTrue:[
6af2a4dea174 changed: #contents
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
   359
        ^ field contents
6af2a4dea174 changed: #contents
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
   360
    ].
6af2a4dea174 changed: #contents
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
   361
    ^ m value
6af2a4dea174 changed: #contents
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
   362
6af2a4dea174 changed: #contents
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
   363
    "Created: / 14-05-1996 / 13:05:16 / cg"
6af2a4dea174 changed: #contents
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
   364
    "Modified: / 21-03-2012 / 12:06:42 / cg"
181
31e8f8ab2fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 166
diff changeset
   365
!
31e8f8ab2fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 166
diff changeset
   366
31e8f8ab2fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 166
diff changeset
   367
contents:something
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   368
    "set the contents of my field; questionable"
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   369
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   370
    |m|
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   371
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   372
    (m := field model) notNil ifTrue:[
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   373
        m value:something
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   374
    ]
181
31e8f8ab2fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 166
diff changeset
   375
31e8f8ab2fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 166
diff changeset
   376
    "Created: 14.5.1996 / 13:05:33 / cg"
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   377
    "Modified: 26.2.1997 / 16:56:08 / cg"
181
31e8f8ab2fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 166
diff changeset
   378
!
31e8f8ab2fb8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 166
diff changeset
   379
889
7879fffb4810 oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   380
list
7879fffb4810 oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   381
    "return the list"
7879fffb4810 oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   382
7879fffb4810 oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   383
    ^ list
7879fffb4810 oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   384
7879fffb4810 oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   385
    "Created: / 18.5.1998 / 18:58:08 / cg"
7879fffb4810 oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   386
!
7879fffb4810 oops #list returned wrong list
Claus Gittinger <cg@exept.de>
parents: 869
diff changeset
   387
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
list:aList
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   389
    "set the list explicitely; used internally or 
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   390
     to be send from the outside if no model/listHolder is used."
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   391
3312
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   392
    list ~~ aList ifTrue:[
5661
42def1c75b04 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5630
diff changeset
   393
        self assert:(aList isNil or:[aList isSequenceable]).
3369
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   394
        currentIndex := 1.
3312
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   395
        list := aList.
2474
173a07117f56 trap if assigned list is not sequenceable
martin
parents: 2406
diff changeset
   396
    ].
3315
5bbfd49857a2 changed #list:
Stefan Vogel <sv@exept.de>
parents: 3312
diff changeset
   397
    "maybe some values have been added to / removed from list"
5bbfd49857a2 changed #list:
Stefan Vogel <sv@exept.de>
parents: 3312
diff changeset
   398
    self enableStateChanged.
1294
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   399
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   400
    "Modified: / 30.3.1999 / 14:17:38 / stefan"
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
! !
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
853
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   403
!ComboView methodsFor:'accessing-look'!
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   404
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   405
backgroundColor
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   406
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   407
    ^field backgroundColor
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   408
!
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   409
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   410
backgroundColor:aColor
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   411
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   412
    field backgroundColor:aColor
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   413
!
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   414
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   415
font:aFont
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   416
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   417
    super font:aFont.
1183
667132091c2f ComboBox's inputField ought to use its default font.
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   418
    self setFieldsFont:aFont.
853
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   419
!
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   420
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   421
foregroundColor
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   422
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   423
    ^field foregroundColor
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   424
!
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   425
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   426
foregroundColor:aColor
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   427
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   428
    field foregroundColor:aColor
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   429
! !
e7e1c2bbd6f1 color selectors
tz
parents: 683
diff changeset
   430
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   431
!ComboView methodsFor:'accessing-mvc'!
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   432
4187
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   433
comboMenuHolder
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   434
    ^ comboMenuHolder
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   435
!
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   436
4225
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   437
comboMenuHolder:aMenuHolder
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   438
    "allows for arbitrary menus to be opened via the combo button"
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   439
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   440
    comboMenuHolder := aMenuHolder.
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   441
!
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   442
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   443
comboMenuHolder:aMenuHolder comboMenuMessage:aSelectorToTheHolder
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   444
    "allows for arbitrary menus to be opened via the combo button"
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   445
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   446
    comboMenuHolder := aMenuHolder.
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   447
    comboMenuMessage := aSelectorToTheHolder.
4187
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   448
!
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   449
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   450
comboMenuMessage
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   451
    ^ comboMenuMessage
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   452
!
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   453
4225
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   454
comboMenuMessage:aSelectorToTheHolder
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   455
    "allows for arbitrary menus to be opened via the combo button"
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   456
565906233a1d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4187
diff changeset
   457
    comboMenuMessage := aSelectorToTheHolder.
4187
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   458
!
b658d1a5ac5d class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4186
diff changeset
   459
5592
bdb957272782 #FEATURE by Maren
matilk
parents: 5383
diff changeset
   460
currentIndex
bdb957272782 #FEATURE by Maren
matilk
parents: 5383
diff changeset
   461
    ^ currentIndex
bdb957272782 #FEATURE by Maren
matilk
parents: 5383
diff changeset
   462
!
bdb957272782 #FEATURE by Maren
matilk
parents: 5383
diff changeset
   463
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   464
listHolder:aValueHolder
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   465
    "set the listHolder.
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   466
     If not set, the list is supposed to be set explicitely"
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   467
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   468
    listHolder notNil ifTrue:[
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   469
        listHolder removeDependent:self.
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   470
    ].
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   471
    listHolder := aValueHolder.
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   472
    listHolder notNil ifTrue:[
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   473
        aValueHolder addDependent:self.
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   474
    ].
3274
e162e9218179 must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents: 3247
diff changeset
   475
e162e9218179 must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents: 3247
diff changeset
   476
    "/ cg: either fetch it here or when realized;
5180
afe1add1fcec #OTHER by mawalch
mawalch
parents: 4994
diff changeset
   477
    "/ (otherwise we'd never fetch the list if it won't change later)
3274
e162e9218179 must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents: 3247
diff changeset
   478
"/    realized ifTrue:[
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   479
        self getListFromModel.
3274
e162e9218179 must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents: 3247
diff changeset
   480
"/    ]
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   481
3274
e162e9218179 must fetch the lists value when the listHilder is set.
Claus Gittinger <cg@exept.de>
parents: 3247
diff changeset
   482
    "Modified: / 09-11-2007 / 15:59:18 / cg"
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   483
!
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   484
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   485
listMessage:aSymbol
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   486
    "define the message selector sent to the model, to fetch
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   487
     the list. If not defined, #list is used"
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   488
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   489
    listMsg := aSymbol
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   490
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   491
    "Created: 14.2.1997 / 19:16:52 / cg"
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   492
    "Modified: 26.2.1997 / 19:33:09 / cg"
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   493
!
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   494
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   495
model:aModel
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   496
    "set the model, which is supposed to provide the boxes value.
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   497
     If a listMessage was defined, it is also responsible for providing
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   498
     the list"
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   499
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   500
    super model:aModel.
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   501
3596
cc15fa1bdb45 *** empty log message ***
sr
parents: 3573
diff changeset
   502
    listHolder isNil ifTrue:[
cc15fa1bdb45 *** empty log message ***
sr
parents: 3573
diff changeset
   503
        self getListFromModel.
cc15fa1bdb45 *** empty log message ***
sr
parents: 3573
diff changeset
   504
    ].
314
6ff49c930c71 fetch models value when a model is assigned;
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   505
    self getValueFromModel.
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   506
314
6ff49c930c71 fetch models value when a model is assigned;
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   507
    "Modified: 28.2.1997 / 19:08:45 / cg"
310
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   508
! !
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   509
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   510
!ComboView methodsFor:'change & update'!
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   511
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   512
update:something with:aParameter from:changedObject
1207
9019fe235f32 do not share my enableChannel with my buttons channel
tm
parents: 1183
diff changeset
   513
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   514
    changedObject == model ifTrue:[
310
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   515
        listHolder isNil ifTrue:[
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   516
            self getListFromModel.
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   517
        ].
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   518
        self getValueFromModel.
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   519
        ^ self
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   520
    ].
310
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   521
    changedObject == listHolder ifTrue:[
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   522
        self getListFromModel.
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   523
        ^ self
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   524
    ].
15ef4f52f8cf comments
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
   525
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   526
    super update:something with:aParameter from:changedObject
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   527
1294
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   528
    "Created: / 15.7.1996 / 12:26:49 / cg"
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   529
    "Modified: / 28.2.1997 / 13:48:51 / cg"
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   530
    "Modified: / 30.3.1999 / 14:17:55 / stefan"
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   531
! !
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   532
869
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   533
!ComboView methodsFor:'event handling'!
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   534
1306
56e90a9e5da1 renambe #enableStateChange to #enableStateChanged
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
   535
enableStateChanged
1294
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   536
    "the enable state has changed - pass this to my field and pullDownButton"
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   537
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   538
    |msg|
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   539
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   540
    (enableChannel isNil or:[enableChannel value]) ifTrue:[
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   541
        msg := #enable
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   542
    ] ifFalse:[
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   543
        msg := #disable
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   544
    ].
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   545
    field perform:msg ifNotUnderstood:nil.
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   546
3755
dca9622d2aa9 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3596
diff changeset
   547
    list isEmptyOrNil ifTrue:[
4186
0087947b1b29 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4180
diff changeset
   548
        "/ may only do this, if the list is static or a valueModel. 
0087947b1b29 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4180
diff changeset
   549
        "/ If it is a block, we do not know what value will be returned the next
0087947b1b29 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4180
diff changeset
   550
        "/ time.
0087947b1b29 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4180
diff changeset
   551
        listHolder isBlock ifFalse:[
0087947b1b29 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4180
diff changeset
   552
            msg := #disable
0087947b1b29 class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4180
diff changeset
   553
        ].
1294
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   554
    ].
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   555
    pullDownButton perform:msg ifNotUnderstood:nil.
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   556
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   557
    "Modified: / 22.2.1999 / 00:47:46 / cg"
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   558
    "Modified: / 30.3.1999 / 14:17:10 / stefan"
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   559
!
36a0e9dcd813 Move common channels to View.
Stefan Vogel <sv@exept.de>
parents: 1291
diff changeset
   560
3312
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   561
handlesMouseWheelMotion:event inView:aView
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   562
    "we handle delegated mousewheel events"
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   563
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   564
    ^ true
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   565
!
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   566
869
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   567
keyPress:key x:x y:y
2868
0050e38370ed comment
Claus Gittinger <cg@exept.de>
parents: 2785
diff changeset
   568
    "pull the menu on space and return keys"
0050e38370ed comment
Claus Gittinger <cg@exept.de>
parents: 2785
diff changeset
   569
2025
cf30d2acc776 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2023
diff changeset
   570
    <resource: #keyboard (#Return)>
cf30d2acc776 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2023
diff changeset
   571
2868
0050e38370ed comment
Claus Gittinger <cg@exept.de>
parents: 2785
diff changeset
   572
    (key == Character space or:[key == #Return]) ifTrue:[
869
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   573
        self pullMenu.
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   574
        ^ self.
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   575
    ].
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   576
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   577
    ^ super keyPress:key x:x y:y
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   578
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   579
    "Modified: / 21.4.1998 / 20:10:05 / cg"
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   580
!
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   581
3312
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   582
mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime view:delegatingView
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   583
    "scroll through the list items"
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   584
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   585
    self enableChannel value ifFalse:[
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   586
        ^ self.
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   587
    ].
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   588
    
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   589
    list isNil ifTrue:[
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   590
        self getListFromModel.
3365
06a46f12cb2e changed #mouseWheelMotion:x:y:amount:deltaTime:view:
Stefan Vogel <sv@exept.de>
parents: 3327
diff changeset
   591
        list isEmptyOrNil ifTrue:[
06a46f12cb2e changed #mouseWheelMotion:x:y:amount:deltaTime:view:
Stefan Vogel <sv@exept.de>
parents: 3327
diff changeset
   592
            "nothing to scroll"
06a46f12cb2e changed #mouseWheelMotion:x:y:amount:deltaTime:view:
Stefan Vogel <sv@exept.de>
parents: 3327
diff changeset
   593
            ^ self
06a46f12cb2e changed #mouseWheelMotion:x:y:amount:deltaTime:view:
Stefan Vogel <sv@exept.de>
parents: 3327
diff changeset
   594
        ].
3312
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   595
    ].
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   596
3369
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   597
    self deltaSelect:amount sign negated.
3312
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   598
!
ad1dcdaa7ba7 Support for selection via mouse wheel
Stefan Vogel <sv@exept.de>
parents: 3290
diff changeset
   599
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   600
processEvent:anEvent
3290
d6fafe560ade bugfix - processEvents should have a look for which button is pressed
ca
parents: 3281
diff changeset
   601
    |evView point x y button|
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   602
3495
33b88650f7e1 focus frame drawing
Claus Gittinger <cg@exept.de>
parents: 3429
diff changeset
   603
    "/ only care for buttonpress in my field...
33b88650f7e1 focus frame drawing
Claus Gittinger <cg@exept.de>
parents: 3429
diff changeset
   604
    anEvent isButtonPressEvent ifFalse:[^ false].
33b88650f7e1 focus frame drawing
Claus Gittinger <cg@exept.de>
parents: 3429
diff changeset
   605
    evView := anEvent view.
33b88650f7e1 focus frame drawing
Claus Gittinger <cg@exept.de>
parents: 3429
diff changeset
   606
    evView isNil ifTrue:[^ false].
33b88650f7e1 focus frame drawing
Claus Gittinger <cg@exept.de>
parents: 3429
diff changeset
   607
3290
d6fafe560ade bugfix - processEvents should have a look for which button is pressed
ca
parents: 3281
diff changeset
   608
    button := anEvent state.
d6fafe560ade bugfix - processEvents should have a look for which button is pressed
ca
parents: 3281
diff changeset
   609
    ((button == 1) or:[button == #select]) ifFalse:[
d6fafe560ade bugfix - processEvents should have a look for which button is pressed
ca
parents: 3281
diff changeset
   610
        ^ false
d6fafe560ade bugfix - processEvents should have a look for which button is pressed
ca
parents: 3281
diff changeset
   611
    ].
d6fafe560ade bugfix - processEvents should have a look for which button is pressed
ca
parents: 3281
diff changeset
   612
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   613
    (field isNil or:[field shown not]) ifTrue:[
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   614
        ^ false
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   615
    ].
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   616
    (field isKeyboardConsumer and:[field isEnabled]) ifTrue:[
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   617
        ^ false
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   618
    ].
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   619
3755
dca9622d2aa9 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3596
diff changeset
   620
    x := anEvent x.
dca9622d2aa9 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3596
diff changeset
   621
    y := anEvent y.
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   622
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   623
    evView ~~ field ifTrue:[
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   624
        (evView isSameOrComponentOf:field) ifFalse:[
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   625
            ^ false
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   626
        ].
3755
dca9622d2aa9 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3596
diff changeset
   627
        point := x @ y.
4994
7d232a2752db device access
Claus Gittinger <cg@exept.de>
parents: 4972
diff changeset
   628
        point := device translatePoint:point fromView:evView toView:field.
3755
dca9622d2aa9 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3596
diff changeset
   629
        x := point x.
dca9622d2aa9 code cleanup
Claus Gittinger <cg@exept.de>
parents: 3596
diff changeset
   630
        y := point y.
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   631
    ].
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   632
    (x between:0 and:field width) ifFalse:[^ false].
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   633
    (y between:0 and:field height) ifFalse:[^ false].
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   634
3281
75391e011897 *** empty log message ***
ca
parents: 3274
diff changeset
   635
    self pullMenu == false ifTrue:[ ^ false ].
3495
33b88650f7e1 focus frame drawing
Claus Gittinger <cg@exept.de>
parents: 3429
diff changeset
   636
33b88650f7e1 focus frame drawing
Claus Gittinger <cg@exept.de>
parents: 3429
diff changeset
   637
    "/ although eaten, we still must care for the focus !!
33b88650f7e1 focus frame drawing
Claus Gittinger <cg@exept.de>
parents: 3429
diff changeset
   638
    self wantsFocusWithButtonPress ifTrue:[
3503
f14e20004081 changed #processEvent:
Michael Beyl <mb@exept.de>
parents: 3495
diff changeset
   639
        self windowGroup notNil ifTrue:[
f14e20004081 changed #processEvent:
Michael Beyl <mb@exept.de>
parents: 3495
diff changeset
   640
            self windowGroup focusView:self.
f14e20004081 changed #processEvent:
Michael Beyl <mb@exept.de>
parents: 3495
diff changeset
   641
"/ Transcript showCR:self windowGroup focusCameByTab.
f14e20004081 changed #processEvent:
Michael Beyl <mb@exept.de>
parents: 3495
diff changeset
   642
        ]
3495
33b88650f7e1 focus frame drawing
Claus Gittinger <cg@exept.de>
parents: 3429
diff changeset
   643
    ].
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   644
    ^ true
869
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   645
! !
a1838cce9641 popup menu on space or return
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
   646
2499
a2b676b9292c method category rename
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
   647
!ComboView methodsFor:'initialization & release'!
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   648
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   649
destroy
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   650
    |wgrp|
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   651
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   652
    (wgrp := self windowGroup) notNil ifTrue:[
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   653
       wgrp removePreEventHook:self.
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   654
    ].
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   655
    super destroy.
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   656
!
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   657
3825
f5fe434e1cf7 border a la vista
Claus Gittinger <cg@exept.de>
parents: 3824
diff changeset
   658
initStyle
f5fe434e1cf7 border a la vista
Claus Gittinger <cg@exept.de>
parents: 3824
diff changeset
   659
    super initStyle.
f5fe434e1cf7 border a la vista
Claus Gittinger <cg@exept.de>
parents: 3824
diff changeset
   660
f5fe434e1cf7 border a la vista
Claus Gittinger <cg@exept.de>
parents: 3824
diff changeset
   661
    self borderWidth:(EditField defaultBorderWidth).
f5fe434e1cf7 border a la vista
Claus Gittinger <cg@exept.de>
parents: 3824
diff changeset
   662
    self borderColor:(EditField defaultBorderColor).
f5fe434e1cf7 border a la vista
Claus Gittinger <cg@exept.de>
parents: 3824
diff changeset
   663
!
f5fe434e1cf7 border a la vista
Claus Gittinger <cg@exept.de>
parents: 3824
diff changeset
   664
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   665
initialize
2750
4e0f6fde1ae8 more xp style
Claus Gittinger <cg@exept.de>
parents: 2499
diff changeset
   666
    |prefExt leftInset rightInset prefWidth halfSpacing nm lvl|
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   667
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   668
    super initialize.
308
922a96deba3e examples removed; cleanup
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   669
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   670
    listMsg := self class defaultListMessage.
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   671
    aspectMsg := self class defaultAspectMessage.
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   672
    changeMsg := self class defaultChangeMessage.
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   673
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   674
    self initializeField.
3825
f5fe434e1cf7 border a la vista
Claus Gittinger <cg@exept.de>
parents: 3824
diff changeset
   675
    field origin:margin@margin corner:1.0@1.0.
2136
6e2d9f16e7e3 shadowColor setup fixed
Claus Gittinger <cg@exept.de>
parents: 2131
diff changeset
   676
    self shadowColor:(field shadowColor).
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   677
331
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   678
    self initializeButton.
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   679
    pullDownButton pressAction:[self pullMenu].
280
3936f0839b64 nicer spacing
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   680
    prefExt := pullDownButton preferredExtent.
3936f0839b64 nicer spacing
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   681
    prefWidth := prefExt x.
3936f0839b64 nicer spacing
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   682
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   683
    pullDownButton origin:1.0@0.0 corner:1.0@1.0.
217
82971d8b3938 care for 2D styles
Claus Gittinger <cg@exept.de>
parents: 214
diff changeset
   684
    styleSheet is3D ifTrue:[
280
3936f0839b64 nicer spacing
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   685
        halfSpacing := ViewSpacing // 2.
3936f0839b64 nicer spacing
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   686
        leftInset := rightInset := prefWidth + halfSpacing.
2750
4e0f6fde1ae8 more xp style
Claus Gittinger <cg@exept.de>
parents: 2499
diff changeset
   687
        (lvl := styleSheet at:#'comboView.level' default:nil) notNil ifTrue:[
4e0f6fde1ae8 more xp style
Claus Gittinger <cg@exept.de>
parents: 2499
diff changeset
   688
            self level:lvl.
319
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   689
            field level:0.
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   690
            field rightInset:margin.
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   691
        ] ifFalse:[
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   692
            pullDownButton rightInset:halfSpacing.
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   693
            field leftInset:halfSpacing
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   694
        ].
217
82971d8b3938 care for 2D styles
Claus Gittinger <cg@exept.de>
parents: 214
diff changeset
   695
    ] ifFalse:[
280
3936f0839b64 nicer spacing
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   696
        leftInset := prefWidth + pullDownButton borderWidth.
3936f0839b64 nicer spacing
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   697
        rightInset := prefWidth.
217
82971d8b3938 care for 2D styles
Claus Gittinger <cg@exept.de>
parents: 214
diff changeset
   698
    ].
1125
6bb8029bbc29 geometry beautified
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   699
3836
f8a3a65f1d78 changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 3825
diff changeset
   700
    "/ what a hack...
1696
f1bae6d68ffe eliminated styleSheet name = win95 queries
Claus Gittinger <cg@exept.de>
parents: 1633
diff changeset
   701
    nm := styleSheet name.
3836
f8a3a65f1d78 changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 3825
diff changeset
   702
    (nm = #win95 or:[nm = #win98 or:[nm = #winXP or:[nm = #st80 or:[nm = #winVista]]]]) ifTrue:[
1125
6bb8029bbc29 geometry beautified
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   703
        field level:0.
2750
4e0f6fde1ae8 more xp style
Claus Gittinger <cg@exept.de>
parents: 2499
diff changeset
   704
        lvl isNil ifTrue:[self level:-1].
1125
6bb8029bbc29 geometry beautified
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   705
        pullDownButton rightInset:0.
1696
f1bae6d68ffe eliminated styleSheet name = win95 queries
Claus Gittinger <cg@exept.de>
parents: 1633
diff changeset
   706
        nm ~= #st80 ifTrue:[
3429
f2b4b84cd477 added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents: 3369
diff changeset
   707
            leftInset := (ArrowButton new preferredWidth).
1126
dc790a73ac4d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1125
diff changeset
   708
            rightInset := leftInset.
1125
6bb8029bbc29 geometry beautified
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   709
        ].
6bb8029bbc29 geometry beautified
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   710
        field origin:0.0@0.0.
2750
4e0f6fde1ae8 more xp style
Claus Gittinger <cg@exept.de>
parents: 2499
diff changeset
   711
        field leftInset:0.
1125
6bb8029bbc29 geometry beautified
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   712
"/        field topInset:1; bottomInset:1.
2750
4e0f6fde1ae8 more xp style
Claus Gittinger <cg@exept.de>
parents: 2499
diff changeset
   713
"/        nm = #winXP ifTrue:[
4e0f6fde1ae8 more xp style
Claus Gittinger <cg@exept.de>
parents: 2499
diff changeset
   714
"/            self borderWidth:1.
4e0f6fde1ae8 more xp style
Claus Gittinger <cg@exept.de>
parents: 2499
diff changeset
   715
"/            self borderColor:(Color blue lightened).
4e0f6fde1ae8 more xp style
Claus Gittinger <cg@exept.de>
parents: 2499
diff changeset
   716
"/        ].
1125
6bb8029bbc29 geometry beautified
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   717
    ].
1126
dc790a73ac4d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1125
diff changeset
   718
    field rightInset:rightInset.
280
3936f0839b64 nicer spacing
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   719
    pullDownButton leftInset:leftInset negated.
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
3429
f2b4b84cd477 added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents: 3369
diff changeset
   721
    self initialHeight:field preferredHeight + ViewSpacing.
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   722
    "
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   723
     |b|
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   724
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   725
     b := ComboBoxView new.
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   726
     b list:#('hello' 'world' 'this' 'is' 'st/x').
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   727
     b open
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   728
    "
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   729
1125
6bb8029bbc29 geometry beautified
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   730
    "Created: / 28.2.1996 / 15:03:17 / cg"
6bb8029bbc29 geometry beautified
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   731
    "Modified: / 8.9.1998 / 20:33:22 / cg"
331
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   732
!
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   733
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   734
initializeButton
2174
ab242e29da64 button init code made publicly available
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   735
    pullDownButton := self class comboButtonFor:self.
331
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   736
    pullDownButton disable.
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   737
!
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   738
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   739
initializeField
4972
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   740
    "concrete subclass is responsible to instantiate
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   741
     a field widget here.
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   742
     For comboList, this will be a label;
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   743
     for comboBox, this will be an editfield"
9914ef4a84fc #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
   744
     
331
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   745
    self subclassResponsibility
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   746
d6fad4b27a9a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 321
diff changeset
   747
    "Created: 29.3.1997 / 11:17:14 / cg"
2157
6cfdf247519a destroy - release
Claus Gittinger <cg@exept.de>
parents: 2136
diff changeset
   748
!
6cfdf247519a destroy - release
Claus Gittinger <cg@exept.de>
parents: 2136
diff changeset
   749
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   750
realize
3238
c3834ec3a914 test for unspecified windowGroup
ca
parents: 3236
diff changeset
   751
    |pullMenuIfClickedOnField wgrp|
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   752
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   753
    super realize.
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   754
3824
5d7e67f50bb5 comment/format in: #realize
Claus Gittinger <cg@exept.de>
parents: 3777
diff changeset
   755
    pullMenuIfClickedOnField := 
5d7e67f50bb5 comment/format in: #realize
Claus Gittinger <cg@exept.de>
parents: 3777
diff changeset
   756
            styleSheet 
5d7e67f50bb5 comment/format in: #realize
Claus Gittinger <cg@exept.de>
parents: 3777
diff changeset
   757
                at:#'comboView.pullMenuIfClickedOnField'
5d7e67f50bb5 comment/format in: #realize
Claus Gittinger <cg@exept.de>
parents: 3777
diff changeset
   758
                default:[ OperatingSystem isMSWINDOWSlike ].
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   759
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   760
    pullMenuIfClickedOnField == true ifTrue:[
3238
c3834ec3a914 test for unspecified windowGroup
ca
parents: 3236
diff changeset
   761
        wgrp := self windowGroup.
c3834ec3a914 test for unspecified windowGroup
ca
parents: 3236
diff changeset
   762
        wgrp notNil ifTrue:[ wgrp addPreEventHook:self ].
3236
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   763
    ].
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   764
!
4e8b01660a5c comboView.pullMenuIfClickedOnField
ca
parents: 3231
diff changeset
   765
2157
6cfdf247519a destroy - release
Claus Gittinger <cg@exept.de>
parents: 2136
diff changeset
   766
release
6cfdf247519a destroy - release
Claus Gittinger <cg@exept.de>
parents: 2136
diff changeset
   767
    listHolder notNil ifTrue:[
6cfdf247519a destroy - release
Claus Gittinger <cg@exept.de>
parents: 2136
diff changeset
   768
        listHolder removeDependent:self.
6cfdf247519a destroy - release
Claus Gittinger <cg@exept.de>
parents: 2136
diff changeset
   769
        listHolder := nil.
6cfdf247519a destroy - release
Claus Gittinger <cg@exept.de>
parents: 2136
diff changeset
   770
    ].
6cfdf247519a destroy - release
Claus Gittinger <cg@exept.de>
parents: 2136
diff changeset
   771
    super release
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
! !
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
2406
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   774
!ComboView methodsFor:'menu interaction'!
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   775
4564
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   776
createPullDownMenuForList:aList
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   777
    "pull the menu - triggered from the button"
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   778
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   779
    |menu index|
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   780
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   781
    comboMenuHolder notNil ifTrue:[
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   782
        menu := (comboMenuHolder perform:comboMenuMessage ? #value). 
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   783
        (menu isKindOf:Menu) ifTrue:[
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   784
            menu := MenuPanel new menu:menu.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   785
        ]
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   786
    ] ifFalse:[
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   787
        menu := MenuPanel new.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   788
        menu doAccessCharacterTranslation:false.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   789
        menu labels:aList.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   790
        menu hideOnRelease:false.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   791
        menu backgroundColor: field backgroundColor. 
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   792
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   793
        index := 1.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   794
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   795
        menu do:[:el |
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   796
            el value:#select: argument:index.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   797
            index := index + 1.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   798
        ].
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   799
        menu receiver:self.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   800
    ].
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   801
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   802
    menu font:self font.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   803
    menu preferredWidth:self width.
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   804
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   805
    ^ menu
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   806
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   807
    "Modified: / 25-03-2014 / 01:21:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   808
!
be449e47ce4b Fix in ComboView>>createPullDownMenuForList:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4563
diff changeset
   809
3369
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   810
deltaSelect:delta
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   811
    "change selection by delta. Wrap at start/end"
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   812
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   813
    |newIndex|
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   814
3556
e7d87b5b3cf7 care for mouse-wheel deltaSelect: if list is empty
Claus Gittinger <cg@exept.de>
parents: 3503
diff changeset
   815
    list size == 0 ifTrue:[^ self].
e7d87b5b3cf7 care for mouse-wheel deltaSelect: if list is empty
Claus Gittinger <cg@exept.de>
parents: 3503
diff changeset
   816
3369
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   817
    newIndex := currentIndex + delta.
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   818
    newIndex > list size ifTrue:[
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   819
        newIndex := 1.
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   820
    ] ifFalse:[
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   821
        newIndex <= 0 ifTrue:[
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   822
            newIndex := list size.
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   823
        ].
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   824
    ].
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   825
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   826
    self select:newIndex.
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   827
!
9f8f7c5d328f Correct selection behavior (start with line 1)
Stefan Vogel <sv@exept.de>
parents: 3365
diff changeset
   828
2406
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   829
pullMenu
3281
75391e011897 *** empty log message ***
ca
parents: 3274
diff changeset
   830
    "pull the menu - triggered from the button
75391e011897 *** empty log message ***
ca
parents: 3274
diff changeset
   831
     returns false if the menu cannot be opened"
2406
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   832
3281
75391e011897 *** empty log message ***
ca
parents: 3274
diff changeset
   833
    |menu origin opensMenu|
2406
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   834
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   835
    self getListFromModel.
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   836
4227
693706272bcb class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4225
diff changeset
   837
    opensMenu := ((list notEmptyOrNil or:[comboMenuHolder notNil])
693706272bcb class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4225
diff changeset
   838
                and:[self enableChannel value]).
3281
75391e011897 *** empty log message ***
ca
parents: 3274
diff changeset
   839
75391e011897 *** empty log message ***
ca
parents: 3274
diff changeset
   840
    opensMenu ifTrue:[
2406
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   841
        menu := self createPullDownMenuForList:list.
4994
7d232a2752db device access
Claus Gittinger <cg@exept.de>
parents: 4972
diff changeset
   842
        origin := device translatePoint:(0 @ self height) fromView:self toView:nil.
4227
693706272bcb class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4225
diff changeset
   843
        "/ menu extentChangedFlag:false.
693706272bcb class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4225
diff changeset
   844
        "/ menu originChangedFlag:false.
693706272bcb class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4225
diff changeset
   845
        menu showAt:origin resizing:false.
2406
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   846
    ].
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   847
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   848
    pullDownButton turnOff.
3281
75391e011897 *** empty log message ***
ca
parents: 3274
diff changeset
   849
    ^ opensMenu
2406
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   850
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   851
    "Created: / 10.10.2001 / 14:47:25 / cg"
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   852
    "Modified: / 10.10.2001 / 15:04:44 / cg"
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   853
!
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   854
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   855
select:anIndex
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   856
    "sent from the popped menu, when an item was selected"
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   857
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   858
    self subclassResponsibility
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   859
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   860
    "Modified: 27.2.1997 / 15:19:07 / cg"
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   861
! !
2ea7cf110e58 category change
penk
parents: 2405
diff changeset
   862
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   863
!ComboView methodsFor:'message delegation'!
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   864
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   865
doesNotUnderstand:aMessage
4824
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   866
    "delegate to my field"
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   867
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   868
    (field respondsTo:aMessage selector) ifTrue:[
1207
9019fe235f32 do not share my enableChannel with my buttons channel
tm
parents: 1183
diff changeset
   869
        ^ aMessage sendTo:field
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   870
    ].
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   871
    ^ super doesNotUnderstand:aMessage
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   872
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   873
    "Created: 28.2.1996 / 15:03:17 / cg"
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   874
    "Modified: 28.2.1996 / 15:06:09 / cg"
166
19f08c13b299 Forward respondsTo: message.
Stefan Vogel <sv@exept.de>
parents: 129
diff changeset
   875
!
19f08c13b299 Forward respondsTo: message.
Stefan Vogel <sv@exept.de>
parents: 129
diff changeset
   876
2300
c3d1ba5c884e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2176
diff changeset
   877
flash
4824
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   878
    "delegate to my field"
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   879
2300
c3d1ba5c884e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2176
diff changeset
   880
    field flash
c3d1ba5c884e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2176
diff changeset
   881
!
c3d1ba5c884e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2176
diff changeset
   882
5630
fa152610de50 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   883
flash:messageOrNil withColor:flashColor
4824
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   884
    "delegate to my field"
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   885
5630
fa152610de50 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   886
    field flash:messageOrNil withColor:flashColor
fa152610de50 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   887
fa152610de50 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   888
    "Modified (format): / 21-10-2017 / 23:13:39 / cg"
4824
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   889
!
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   890
166
19f08c13b299 Forward respondsTo: message.
Stefan Vogel <sv@exept.de>
parents: 129
diff changeset
   891
respondsTo:aSymbol
4824
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   892
    "delegate to my field"
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   893
166
19f08c13b299 Forward respondsTo: message.
Stefan Vogel <sv@exept.de>
parents: 129
diff changeset
   894
    ^ (field respondsTo:aSymbol) or:[super respondsTo:aSymbol]
19f08c13b299 Forward respondsTo: message.
Stefan Vogel <sv@exept.de>
parents: 129
diff changeset
   895
19f08c13b299 Forward respondsTo: message.
Stefan Vogel <sv@exept.de>
parents: 129
diff changeset
   896
    "Created: 2.5.1996 / 16:57:34 / stefan"
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   897
! !
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   898
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   899
!ComboView methodsFor:'private'!
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   900
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   901
getListFromModel
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   902
    "fetch the list - either from the listHolder, or
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   903
     from the model. If no listMessage was defined, fetch it
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   904
     using #list."
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   905
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   906
    listHolder notNil ifTrue:[
5352
af74e6a10e4f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 5180
diff changeset
   907
        "/ should blocks be evaluated when the pull-down list is actually needed?    
af74e6a10e4f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 5180
diff changeset
   908
        "/ listHolder isBlock ifFalse:[
af74e6a10e4f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 5180
diff changeset
   909
            self list:listHolder value
af74e6a10e4f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 5180
diff changeset
   910
        "/ ]
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   911
    ] ifFalse:[
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   912
        (model notNil and:[listMsg notNil]) ifTrue:[
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   913
            (model respondsTo:listMsg) ifTrue:[
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   914
                self list:(model perform:listMsg)
277
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   915
            ]
44eadbccc2b7 added support for a separate listHolder
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   916
        ]
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   917
    ].
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   918
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   919
    "Created: 15.7.1996 / 12:22:56 / cg"
304
7ee03df31561 cleaned up model interface
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   920
    "Modified: 26.2.1997 / 19:40:58 / cg"
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   921
!
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   922
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   923
getValueFromModel
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   924
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   925
    "Modified: 15.7.1996 / 12:28:59 / cg"
1183
667132091c2f ComboBox's inputField ought to use its default font.
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   926
!
667132091c2f ComboBox's inputField ought to use its default font.
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   927
1210
55f2c4209f94 oops - only pull-button is disabled with empty list;
Claus Gittinger <cg@exept.de>
parents: 1207
diff changeset
   928
setFieldsFont:aFont
55f2c4209f94 oops - only pull-button is disabled with empty list;
Claus Gittinger <cg@exept.de>
parents: 1207
diff changeset
   929
    field font:aFont.
214
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   930
! !
328a09259794 get list from model
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   931
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   932
!ComboView methodsFor:'queries'!
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   933
5949
10935e855698 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 5923
diff changeset
   934
computePreferredExtent
285
a33d83de3849 commentary
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   935
    "compute & return the boxes preferredExtent from the components' preferrences"
a33d83de3849 commentary
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   936
683
a2593b4a3ce1 fixed preferredExtent to also look into the menus list
ca
parents: 605
diff changeset
   937
    |fieldPref buttonPref m menuPrefX menuPrefY w h|
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   938
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   939
    list isNil ifTrue:[
308
922a96deba3e examples removed; cleanup
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   940
        self getListFromModel
922a96deba3e examples removed; cleanup
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   941
    ].
922a96deba3e examples removed; cleanup
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   942
922a96deba3e examples removed; cleanup
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   943
    list isNil ifTrue:[
683
a2593b4a3ce1 fixed preferredExtent to also look into the menus list
ca
parents: 605
diff changeset
   944
        menuPrefX := menuPrefY := 0
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   945
    ] ifFalse:[
4503
10c4fb447777 class: ComboView
Stefan Vogel <sv@exept.de>
parents: 4495
diff changeset
   946
        |graphicsDevice|
10c4fb447777 class: ComboView
Stefan Vogel <sv@exept.de>
parents: 4495
diff changeset
   947
4994
7d232a2752db device access
Claus Gittinger <cg@exept.de>
parents: 4972
diff changeset
   948
        graphicsDevice := device ? Screen current.
4503
10c4fb447777 class: ComboView
Stefan Vogel <sv@exept.de>
parents: 4495
diff changeset
   949
        m := (MenuView onDevice:graphicsDevice) labels:list.
3429
f2b4b84cd477 added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents: 3369
diff changeset
   950
        menuPrefX := m preferredWidth.
1348
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   951
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   952
        "/ the menuView returns rubbish ...
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   953
"/        menuPrefY := (m preferredExtentForLines:1 cols:10) y
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   954
        
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   955
        "/ any non-strings ?
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   956
        menuPrefY := list 
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   957
            inject:('X' heightOn:self) 
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   958
            into:[:max :el | el isString ifTrue:[
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   959
                                max
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   960
                              ] ifFalse:[
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   961
                                max max:(el heightOn:self) 
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   962
                              ]
b4bf740ec2fc fixed pref. extent
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   963
                 ].
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   964
    ].
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   965
302
8af5f51ce7a5 preferredExtent is sum of menu + button
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
   966
    fieldPref := field preferredExtent.
8af5f51ce7a5 preferredExtent is sum of menu + button
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
   967
    buttonPref := pullDownButton preferredExtent.
8af5f51ce7a5 preferredExtent is sum of menu + button
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
   968
319
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   969
    w := ((fieldPref x max:menuPrefX) max:50) + buttonPref x.
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   970
    w := w + margin + margin.
683
a2593b4a3ce1 fixed preferredExtent to also look into the menus list
ca
parents: 605
diff changeset
   971
    h := (fieldPref y max:buttonPref y) max:menuPrefY.
319
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   972
    h := h + margin + margin.
920ef16160ae w95 style fixes
Claus Gittinger <cg@exept.de>
parents: 314
diff changeset
   973
    ^ w @ h
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   974
5949
10935e855698 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 5923
diff changeset
   975
    "Created: / 09-11-2018 / 19:49:42 / Claus Gittinger"
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   976
! !
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   977
4832
083a1522f3cd class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
   978
!ComboView methodsFor:'testing'!
083a1522f3cd class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
   979
083a1522f3cd class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
   980
isComboView
083a1522f3cd class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
   981
    ^ true
083a1522f3cd class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
   982
! !
083a1522f3cd class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
   983
263
865b7d99d3f5 added an example for a menu-pull-hook
Claus Gittinger <cg@exept.de>
parents: 247
diff changeset
   984
!ComboView class methodsFor:'documentation'!
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   985
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   986
version
4824
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   987
    ^ '$Header$'
3777
83c52227471d changed: #createPullDownMenuForList:
Claus Gittinger <cg@exept.de>
parents: 3755
diff changeset
   988
!
83c52227471d changed: #createPullDownMenuForList:
Claus Gittinger <cg@exept.de>
parents: 3755
diff changeset
   989
83c52227471d changed: #createPullDownMenuForList:
Claus Gittinger <cg@exept.de>
parents: 3755
diff changeset
   990
version_CVS
4824
98d9c12ab96f class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   991
    ^ '$Header$'
129
a680f0b7508f intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   992
! !
4180
71610b2b34fa class: ComboView
Claus Gittinger <cg@exept.de>
parents: 4115
diff changeset
   993