|
Class: ComboView
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--ComboView
|
+--ComboBoxView
|
+--ComboListView
- Package:
- stx:libwidg2
- Category:
- Views-Interactors
- Version:
- rev:
1.145
date: 2024/02/25 13:15:50
- user: cg
- file: ComboView.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
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
copyrightCOPYRIGHT (c) 1996 by eXept Software AG / Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
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 sent from the outside if no model/listHolder is used.
accessing-look
-
backgroundColor
-
(comment from inherited method)
return the background color of the contents -
here, (since there is no contents), the viewBackground is returned.
-
backgroundColor: aColor
-
(comment from inherited method)
set the background color of the contents -
here, (since there is no contents), the viewBackground is changed.
-
font: aFont
-
(comment from inherited method)
set the font for drawing if it has changed.
This should be redefined in some widget to perform an automatic
redraw/invalidate. See also: #basicFont:
-
foregroundColor
-
(comment from inherited method)
return the foreground color of the contents -
here, (since there is no contents), some default is returned.
-
foregroundColor: aColor
-
(comment from inherited method)
set the foreground color of the contents -
ignored here, since there is no contents.
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
-
care for buttonpress in my field.
Return true, if I have eaten the event
initialization & release
-
destroy
-
(comment from inherited method)
unmap & destroy - make me invisible, destroy subviews then
make me unknown to the device
-
initStyle
-
(comment from inherited method)
this method sets up all style dependent things.
If redefined, make sure that super initStyle is sent
-
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 must be redefined in concrete classes (subclassResponsibility) **
-
realize
-
(comment from inherited method)
realize - make visible;
realizing is done very late (after layout is fixed) to avoid
visible rearranging of windows on the screen
-
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 must be redefined in concrete classes (subclassResponsibility) **
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
-
yes, I am a comboBox-like widget
see examples in ComboListView and ComboBoxView
|