|
|
Class: NoteBookView
Object
|
+--GraphicsContext
|
+--DeviceGraphicsContext
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--NoteBookView
|
+--TabView
- Package:
- stx:libwidg2
- Category:
- Views-Layout
- Version:
- rev:
1.167
date: 2010/03/19 13:33:07
- user: ca
- file: NoteBookView.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
- Author:
- Claus Atzkern
implements the noteBook.
TabView
defaults
-
defaultFont
-
-
updateStyleCache
-
extract values from the styleSheet and cache them in class variables
image specs
-
tabBackgroundVista
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
accepting-items
-
tabAtIndex: tabIndex put: newLabelOrTabItem
-
called if the contents of a tab changed; test whether the old layout can
be reused otherwise we must recompute the whole list
accessing
-
canvas
-
returns the canvas; the containter view
-
canvas: newCanvas
-
change the canvas; the container view
-
hierarchicalIndexOfChild: aView
-
-
lastUserSelection
-
-
lastUserSelection: something
-
-
list
-
return the list of Tabs or Labels
-
list: newTabItemListOrNil
-
set the tab-list
-
listIndexOf: something
-
convert something to an index into the list;
returns the index or nil if not found
-
numberOfLines
-
-
useIndex
-
use index instead of tab name
-
useIndex: aBoolean
-
set/clear the useIndex flag. If set, both actionBlock and change-messages
are passed the index(indices) of the selection as argument.
If clear, the value(s) (i.e. the selected string) is passed.
Default is false.
accessing-actions
-
accessTabMenuAction
-
callback to retrieve the menu for a specific tab.
the argument to the block is the index of the tab
-
accessTabMenuAction: aOneArgAction
-
callback to retrieve the menu for a specific tab.
the argument to the block is the index of the tab
-
action
-
get the action block to be performed on select; the argument to
the block is the selected index or nil in case of no selection.
-
action: oneArgBlock
-
set the action block to be performed on select; the argument to
the block is the selected index or nil in case of no selection.
accessing-behavior
-
destroyTabAction
-
-
destroyTabAction: aOneArgBlock
-
-
disableDestroyButtonOfInactiveTabs
-
-
enabled
-
returns true if tabs are enabled
-
enabled: aState
-
set the enabled state of tabs
-
isEnabled
-
returns the enabled state
-
keepCanvas: aBoolean
-
if false (the default), the previous canvas is destroyed, whenever
a new canvas is set.
if true, it is unmapped and kept.
Set this flag, if the application changes the canvas but wants
them to be kept for fast switching.
-
selectConditionBlock
-
get the conditionBlock; this block is evaluated before a selection
change is performed; the change will not be done, if the evaluation
returns false. The argument to the block is the selection index.
-
selectConditionBlock: aOneArgBlock
-
get the conditionBlock; this block is evaluated before a selection
change is performed; the change will not be done, if the evaluation
returns false. The argument to the block is the selection index.
-
showDestroyButtonOfInactiveTabs
-
-
translateLabel
-
true if labels are translated
-
translateLabel: aBoolean
-
set to true if labels should be translated
-
translateToDisplayLabel: aString
-
translate the label
accessing-colors
-
activeBackgroundColor
-
returns the bg color used when drawing the active tabs label
-
activeBackgroundColor: aColor
-
set the bg color used when drawing the active tabs label
-
activeForegroundColor
-
returns the color used when drawing the active tabs label
-
activeForegroundColor: aColor
-
set the color used when drawing the active tabs label
-
activeTabMarkerColor
-
win-XP style marker
-
activeTabMarkerColor: something
-
-
activeTabMarkerFgColor
-
win-XP style marker
-
backgroundColor
-
return the backgroundColor of the notebook view
-
destroyTabForegroundColor
-
returns the color used to draw the destroy button
-
disabledDestroyTabForegroundColor
-
returns the color used to draw a disabled destroy button
-
disabledForegroundColor
-
returns the color used when drawing disabled tab labels
-
drawLightColor
-
get the color to be used for lighted edges; bug fix caused by common drawEdge
-
foregroundColor
-
return the color used for drawing text
-
foregroundColor: aColor
-
set the color to be used for drawing text
-
halfLightColor
-
-
halfShadowColor
-
-
viewBackground: aColor
-
accessing-dimension
-
activeTabMarkerHeight
-
-
destroyButtonFrameForTab: aTab
-
-
destroyButtonHeight
-
-
destroyButtonSepX
-
separating space between tabs right and the destroyButton
-
destroyButtonSepY
-
separating space between tabs top and the destroyButton
-
destroyButtonUsedWidth
-
returns the additional width used for a destroy button
-
destroyButtonWidth
-
-
preferredExtent
-
compute max extent x/y based on one line
-
preferredExtentForTab: aTab
-
returns the preferred extent of a specific tab
accessing-mvc
-
canvasHolder
-
get the model, which keeps the canvas, a kind of SimpleView
-
canvasHolder: aValueHolder
-
set the model, which keeps the canvas, a kind of SimpleView
-
listHolder
-
get the model, which keeps the list of Tabs or Labels
-
listHolder: aValueHolder
-
set the model, which keeps the list of Tabs or Labels
-
model: aValueHolder
-
set the model, which keeps the selection
accessing-style
-
canvasInset
-
inset of the canvas relative to my frame
tabLevel + canvasInset == origin of canvas
-
canvasInset: anInset
-
inset of the canvas relative to my frame
tabLevel + canvasInset == origin of canvas
-
direction
-
returns the direction of tabs as symbol. On default the value is
set to #top. Valid symbols are:
#top arrange tabs to be on top of a view
#bottom arrange tabs to be on bottom of a view
#left arrange tabs to be on left of a view
#right arrange tabs to be on right of a view
-
direction: aDirection
-
change the direction of tabs. On default the value is set to #top.
Valid symbols are:
#top arrange tabs to be on top of a view
#bottom arrange tabs to be on bottom of a view
#left arrange tabs to be on left of a view
#right arrange tabs to be on right of a view
-
fitLastRow
-
in case of true, the last row is expanded to the view size like all
other raws. In case of false all the tabs in the last raw keep their
preferred extent (x or y) dependant on the direction.
-
fitLastRow: aBool
-
in case of true, the last row is expanded to the view size like all
other raws. In case of false all the tabs in the last raw keep their
preferred extent (x or y) dependant on the direction.
-
hasScrollButtons
-
-
hasScrollButtons: aBoolean
-
-
isHorizontal
-
returns true in case of direction is #top or #bottom
-
minimumTabWidth
-
answer the minimum required width of a tab or nil (use extent of tab only)
-
minimumTabWidth: aWidthOrNil
-
set the minimum required width of a tab or nil (use extent of tab only)
-
showDestroyTabButton
-
-
showDestroyTabButton: aBoolean
-
-
tabBottomMargin
-
returns the margin between the tabs and the canvas
-
tabBottomMargin: aMargin
-
set the margin between the tabs and the canvas
-
tabLabelInset
-
inset (a point) of the label relative to its frame
preferredExtent of Tab: label extent + tabLabelInset
-
tabLabelInset: aPoint
-
inset (a point) of the label relative to its frame
preferredExtent of Tab: label extent + tabLabelInset
-
tabLeftMargin
-
margin to the first visible tab or scroller button
-
tabLeftMargin: aMargin
-
margin to the first visible tab or scroller button
-
tabLevel
-
the level of the tabs and noteBook frame
-
tabLevel: aLevel
-
the level of the tabs and noteBook frame
-
tabRightMargin
-
margin from the last visible tab or scroller button to the view
-
tabRightMargin: aMargin
-
margin from the last visible tab or scroller button to the view
-
tabTopMargin
-
returns the margin between the tabs and the widget (not canvas)
-
tabTopMargin: aMargin
-
set the margin between the tabs and the widget (not canvas)
change & update
-
styleChanged
-
called if the tab style changed
list must be recomputed
-
update: something with: aParameter from: changedObject
-
one of my models changed its value
drawing
-
computeDrawingClipX: x y: y width: w height: h
-
-
drawActiveTabMarker: aTab
-
draw a tabs focus-rectangle
-
drawBorderEdges
-
-
drawDestroyButtonForTab: aTab
-
redraw a tabs destroy button
-
drawTabEdgesFor: aTab
-
-
drawTabFocus: aTab
-
draw a tabs focus-rectangle
-
invalidateSelectedTab
-
-
invalidateTab: aTab
-
invalidate a tab (i.e. force it to be redrawn)
-
redrawTab: aTab
-
redraw a tab
-
redrawX: x y: y width: w height: h
-
a region must be redrawn
event handling
-
buttonMotion: buttonState x: x y: y
-
-
buttonPress: button x: x y: y
-
a button is pressed; find tab under point and set the selection
-
buttonRelease: button x: x y: y
-
a button is released; see if its the destroyTab button
-
keyPress: aKey x: x y: y
-
selection might change; look for corresponding list entry
-
pointerLeave: state
-
-
processCursorKey: aKey x: x y: y
-
selection might change; look for corresponding list entry
-
processShortcutKeyEvent: event
-
-
sizeChanged: how
-
size of my view changed
focus handling
-
canTab
-
if the list of tabLabels is empty, we do not need the focus
by tabing - give the focus to my included subviews.
-
showFocus: explicit
-
got the keyboard focus
-
showNoFocus: explicit
-
lost the keyboard focus
-
supportsFocusOnTab
-
return true if the keyboard focus can ever be on the tab area
-
updateFocusIdOnSelectedTab
-
update the lastFocusId for the current selected tab
-
updateFocusView
-
called when updating the focusView within my canvas
-
wantsFocusWithButtonPress
-
never wants the focus by button press
help
-
flyByHelpTextAt: srcPoint
-
-
helpText
-
return the helpText for the currently selected item (empty if none)
-
helpTextAt: srcPoint
-
return the helpText for aPoint (i.e. when mouse-pointer is moved over an item).
-
helpTextForItemAt: anIndex
-
-
helpTextForTab: aTab
-
initialization & release
-
destroy
-
remove dependencies
-
initStyle
-
setup style attributes
-
initialize
-
-
mapped
-
-
postRealize
-
automatically set the initially selected notebook tab;
unless it has been set already (by setup code)
-
realize
-
layout
-
computeBorderLayout
-
returns the layout of the frame araound the canvas
-
computeLayoutForTab: aTab
-
calculate the effective bounds of a tab.
This includes any size changes for the active tab (overlap etc.).
-
makeToBaseLine: aLnNr
-
rotate lines to make the line #aLnNr be the new base line (i.e.
subtract (aLnNr-1) from all lines and take modulu the number of lines
-
recomputeList
-
recompute list
-
recomputeListHorizontal
-
compute layouts for all tabs
-
recomputeListVertical
-
compute layouts for all tabs
-
resizeCanvas
-
obsolete
-
canvasFrameLevel
-
ignorred
-
canvasFrameLevel: anInteger
-
ignorred
-
labels
-
return the list of labels
-
labels: aListOfLabels
-
set the list of labels
-
labelsHolder
-
get the model, which keeps the list of Tabs or Labels
-
labelsHolder: aValueHolder
-
set the model, which keeps the list of Tabs or Labels
private
-
indexOfTab: aTab
-
-
processAccessCharacter: aKey
-
a character is pressed; check for tab identified y the character
select the tab and return true or if no tab detected return false
-
processShortcutKey: aKey
-
if there is a short-key for that character, process it
and return true. Otherwise, return false.
-
tabContainingPointX: x y: y
-
private-buttons
-
buttonLayoutUpdate
-
-
buttonWidth
-
returns the button extent x or y dependent on the layout
-
hideButton: aButton
-
-
makeVisible: aTab
-
setup transformation to make the selection visible;
returns true if the transformation has changed otherwise false.
-
makeVisibleHorizontal: aTab
-
setup transformation to make the horizontal selection visible
-
makeVisibleVertical: aTab
-
setup transformation to make the vertical selection visible
-
scrollButtonPressed: whichButton
-
queries
-
hasTabSelected: aTab
-
-
isDestroyTabButtonShownFor: aTab
-
returns true if the destraoyButton for a tab is shown
-
isFirstTabInLine: aTab
-
returns true if the tab is the first tab in the line
used by drawing
-
isLastTabInLine: aTab
-
returns true if the tab is the last tab in the line
used by drawing
selection
-
isSelectable: anIndex
-
returns true if tab at an index is selectable
-
nextSelectableAfter: anIndex wrapAtEnd: wrapAtEnd
-
return the index of the next selectable entry after the index;
wrap at end if the wrapAtEnd flag is set to true.
-
previousSelectableBefore: anIndex wrapAtBegin: wrapAtBegin
-
return the index of the previous selectable entry before the index;
wrap at begin if the wrapAtBegin flag is set to true.
-
selectTab: aTab
-
select aTab - which may be a tab label or a TabItem
-
selectedTab
-
returns the selected tab or nil
-
selection
-
return the selection or nil/o; caring for the useIndex setting.
-
selection: anIndexOrNil
-
change the selection to index or nil. The model and/or actionBlock is notified
-
selectionChanged
-
selection has changed; update the model and evaluate change action
-
setSelection: anIndexOrNil
-
change the selection to anIndexOrNil. No notifications are raised
-
userSelection: anIndexOrNil
-
user changed the selection to index or nil. The model and/or actionBlock is notified
-
validateVisibleCanvas
-
Tab
tabs at top & bottom
|top tab1 tab2|
top := StandardSystemView extent:300@100.
tab1 := NoteBookView origin:0.0 @ 0.0 corner:1.0 @ 0.5 in:top.
tab1 direction:#top.
tab1 list:#( 'Foo' 'Bagr' 'Baz' 'Bgar' 'Baqz' ).
tab2 := NoteBookView origin:0.0 @ 0.5 corner:1.0 @ 1.0 in:top.
tab2 direction:#bottom.
tab2 list:#( 'Foo' 'Bagr' 'Baz' 'Bgar' 'Baqz' ).
top open.
|
tabs at left & right
|top tab1 tab2|
top := StandardSystemView extent:100@300.
tab1 := NoteBookView origin:0.0 @ 0.0 corner:0.5 @ 01.0 in:top.
tab1 direction:#left.
tab1 list:#( 'Foo' 'Bagr' 'Baz' 'Bgar' 'Baqz' ).
tab2 := NoteBookView origin:0.5 @ 0.0 corner:1.0 @ 1.0 in:top.
tab2 direction:#right.
tab2 list:#( 'Foo' 'Bagr' 'Baz' 'Bgar' 'Baqz' ).
top open.
|
|