|
Class: ComboView
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--ComboView
|
+--ComboBoxView
|
+--ComboListView
- Package:
- stx:libwidg2
- Category:
- Views-Interactors
- Version:
- rev:
1.138
date: 2019/08/15 09:44:29
- user: cg
- file: ComboView.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
- Author:
- Claus Gittinger
A ComboView combines some field (typically an enterField or Label)
with a drop down list of default inputs;
ComboView is abstract, providing protocol common to ComboBoxView and
ComboListView. See documentation & examples there.
[instance variables:]
currentIndex Integer index into the list, that is currently selected
PopUpList
ComboListView
ComboBoxView
ExtendedComboBox
PullDownMenu
Label
EntryField
defaults
-
activeForm
-
-
buttonForm
-
return the pull-buttons image
-
comboButtonFor: aComboView
-
-
defaultFont
-
for now - should come from the styleSheet
usage example(s):
^ SelectionInListView defaultFont.
|
-
defaultListMessage
-
-
disabledForm
-
-
enteredForm
-
-
updateStyleCache
-
flush the forms cache
image specs
-
defaultButtonForm
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
self defaultButtonForm inspect
ImageEditor openOnClass:self andSelector:#defaultButtonForm
Icon flushCachedIcons
|
private
-
formForKey: key styleFormKey: styleFormKey styleFilenameKey: styleFilenameKey
-
queries
-
isAbstract
-
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.
accessing-behavior
-
action: aBlock
-
specify, a block, which is evaluated when the lists selection changes.
This is an additional hook - normally, you would communicate with the model
alone
-
enabled
-
return true, if it is enabled
-
enabled: aBoolean
-
enable/disable components
-
resizableMenu
-
return true, if the menu is to be resizable.
This feature is as yet unimplemented.
-
resizableMenu: aBoolean
-
enable/disable, if the menu is to be resizable.
This feature is as yet unimplemented.
accessing-channels
-
enableChannel
-
return a valueHolder for enable/disable
accessing-components
-
field
-
return the field (input or label) component.
For knowledgable users only.
-
menuButton
-
return the menuButton component
-
shownMenu
-
returns the currently shown menu, or nil.
(only valid while the menu is pulled)
accessing-contents
-
contents
-
get the contents of my field
-
contents: something
-
set the contents of my field; questionable
-
list
-
return the list
-
list: aList
-
set the list explicitely; used internally or
to be send from the outside if no model/listHolder is used.
accessing-look
-
backgroundColor
-
-
backgroundColor: aColor
-
-
font: aFont
-
-
foregroundColor
-
-
foregroundColor: aColor
-
accessing-mvc
-
comboMenuHolder
-
-
comboMenuHolder: aMenuHolder
-
allows for arbitrary menus to be opened via the combo button
-
comboMenuHolder: aMenuHolder comboMenuMessage: aSelectorToTheHolder
-
allows for arbitrary menus to be opened via the combo button
-
comboMenuMessage
-
-
comboMenuMessage: aSelectorToTheHolder
-
allows for arbitrary menus to be opened via the combo button
-
currentIndex
-
-
listHolder: aValueHolder
-
set the listHolder.
If not set, the list is supposed to be set explicitely
-
listMessage: aSymbol
-
define the message selector sent to the model, to fetch
the list. If not defined, #list is used
-
model: aModel
-
set the model, which is supposed to provide the boxes value.
If a listMessage was defined, it is also responsible for providing
the list
change & update
-
update: something with: aParameter from: changedObject
-
event handling
-
enableStateChanged
-
the enable state has changed - pass this to my field and pullDownButton
-
handlesMouseWheelMotion: event inView: aView
-
we handle delegated mousewheel events
-
keyPress: key x: x y: y
-
pull the menu on space and return keys
-
mouseWheelMotion: buttonState x: x y: y amount: amount deltaTime: dTime view: delegatingView
-
scroll through the list items
-
processEvent: anEvent
-
only care for buttonpress in my field...
initialization & release
-
destroy
-
-
initStyle
-
-
initialize
-
what a hack...
-
initializeButton
-
-
initializeField
-
concrete subclass is responsible to instantiate
a field widget here.
For comboList, this will be a label;
for comboBox, this will be an editfield
** This method raises an error - it must be redefined in concrete classes **
-
realize
-
-
release
-
menu interaction
-
createPullDownMenuForList: aList
-
pull the menu - triggered from the button
-
deltaSelect: delta
-
change selection by delta. Wrap at start/end
-
pullMenu
-
pull the menu - triggered from the button
returns false if the menu cannot be opened
-
select: anIndex
-
sent from the popped menu, when an item was selected
** This method raises an error - it must be redefined in concrete classes **
message delegation
-
doesNotUnderstand: aMessage
-
delegate to my field
-
flash
-
delegate to my field
-
flash: messageOrNil withColor: flashColor
-
delegate to my field
-
respondsTo: aSymbol
-
return true, if the receiver responds to a message.
Possibly delegated to my field
private
-
getListFromModel
-
fetch the list - either from the listHolder, or
from the model. If no listMessage was defined, fetch it
using #list.
-
getValueFromModel
-
-
setFieldsFont: aFont
-
queries
-
computePreferredExtent
-
compute & return the boxes preferredExtent from the components' preferrences
testing
-
isComboView
-
see examples in ComboListView and ComboBoxView
|