ST80

Arc
Arcs are an unusual implementation of splines due to Ted Kaehler. Imagine two lines that meet at a corner. Now imagine two moving points; one moves from the corner to the end on one line, the other moves from the end of the other line in to the corner. Now imagine a series of lines drawn between those moving points at each step along the way (they form a sort of spider web pattern). By connecting segments of the intersecting lines, a smooth curve is achieved that is tangent to both of the original lines. Voila.
center
Answer the point at the center of the receiver.
center:
Set aPoint to be the receiver's center.
center:radius:
The receiver is defined by a point at the center and a radius. The
quadrant is not reset.
center:radius:quadrant:
Set the receiver's quadrant to be the argument, section. The size of the
receiver is defined by the center and its radius.
computeBoundingBox
Refer to the comment in DisplayObject|computeBoundingBox.
displayOn:at:clippingBox:rule:fillColor:
Display this Path--offset by aPoint, clipped by clipRect and the form
associated with this Path will be displayedr according to one of the sixteen
functions of two logical variables (rule). Also the source form will be first
anded with aForm as a mask. Does not effect the state of the Path
displayOn:transformation:clippingBox:rule:fillColor:
Displays this path, translated and scaled by aTransformation. Get the
scaled and translated Path.
example
quadrant
Answer the part of the circle represented by the receiver.
quadrant:
Set the part of the circle represented by the receiver to be the argument,
section.
radius
Answer the receiver's radius.
radius:
Set the receiver's radius to be the argument, anInteger.
Circle
I represent a full circle. I am made from four Arcs.
computeBoundingBox
Refer to the comment in DisplayObject|computeBoundingBox.
displayOn:at:clippingBox:rule:fillColor:
Display this Path--offset by aPoint, clipped by clipRect and the form
associated with this Path will be displayedr according to one of the sixteen
functions of two logical variables (rule). Also the source form will be first
anded with aForm as a mask. Does not effect the state of the Path
displayOn:transformation:clippingBox:rule:fillColor:
Displays this path, translated and scaled by aTransformation. Get the
scaled and translated Path.
exampleOne
exampleTwo
CurveFitter
I represent a conic section determined by three points p1, p2 and p3. I interpolate p1 and p3 and am tangent to line p1, p2 at p1 and line p3, p2 at p3.
displayOn:at:clippingBox:rule:fillColor:
Display this Path--offset by aPoint, clipped by clipRect and the form
associated with this Path will be displayedr according to one of the sixteen
functions of two logical variables (rule). Also the source form will be first
anded with aForm as a mask. Does not effect the state of the Path
displayOn:transformation:clippingBox:rule:fillColor:
Displays this path, translated and scaled by aTransformation. Get the
scaled and translated Path.
example
new
CustomMenu
I am used to build menus on-the-fly. I maintain lists of menu items, actions (usually symbols to be sent as messages), and menu section dividing lines to which my clients may append new entries and lines by sending me the messages:
add: aString action: anAction
addLine
After the menu is constructed, it may be invoked with one of the following messages:
startUp: initialSelection
startUp
I am a subclass of ActionMenu, so I inherit a number of instance variables. The ones I am particularly concerned with are:
items _ an OrderedCollection of strings to appear in the menu
selectors _ an OrderedCollection of Symbols to be used as message selectors
lineArray _ an OrderedCollection of line positions
lastLine _ used to keep track of the last line to avoid making duplicate entries in lineArray
add:action:
Add the given string as the next menu item. If it is selected, the given action (usually but not necessarily a symbol) will be returned to the client.
add:subMenu:target:selector:argumentList:
Create a sub-menu with the given label. This isn't really a sub-menu the way Morphic does it; it'll just pop up another menu.
add:target:selector:argument:
Append a menu item with the given label. If the item is selected, it will send the given selector to the target object with the given argument.
add:target:selector:argumentList:
Append a menu item with the given label. If the item is selected, it will send the given selector to the target object with the given arguments. If the selector takes one more argument than the number of arguments in the given list, then the triggering event is supplied as as the last argument.
addLine
Append a line to the menu after the last entry. Suppress duplicate lines.
addList:
Add a menu item to the receiver for each tuple in the given list of the form (<what to show> <selector>). Add a line for each dash (-) in the list. The tuples may have an optional third element, providing balloon help for the item, but such an element is ignored in mvc.
addService:for:
Append a menu item with the given service. If the item is selected, it will perform the given service.
addServices2:for:extraLines:
addServices:for:extraLines:
addStayUpItem
For compatibility with MenuMorph. Here it is a no-op
addTranslatedList:
Add a menu item to the receiver for each tuple in the given list of the form (<what to show> <selector>). Add a line for each dash (-) in the list. The tuples may have an optional third element, providing balloon help for the item, but such an element is ignored in mvc.
The first element will be translated.
arguments
Answer my arguments, initializing them to an empty collection if they're found to be nil.
balloonTextForLastItem:
Vacuous backstop provided for compatibility with MorphicMenu
build
Turn myself into an invokable ActionMenu.
example
initialize
Subclasses should redefine this method to perform initializations on instance creation
invokeOn:
Pop up this menu and return the result of sending to the target object the selector corresponding to the menu item selected by the user. Return nil if no item is selected. If the chosen selector has arguments, obtain them from my arguments
invokeOn:defaultSelection:
Invoke the menu with the given default selection (i.e. one of my 'action' symbols). Answer the 'action' selector associated with the menu item chosen by the user or nil if none is chosen.
invokeOn:orSendTo:
Pop up this menu and return the result of sending to the target object the selector corresponding to the menu item selected by the user. Return nil if no item is selected. If the chosen selector has arguments, obtain appropriately. If the recipient does not respond to the resulting message, send it to the alternate object provided
labels:font:lines:
This method allows the receiver to accept old-style SelectionMenu creation messages. It should be used only for backward compatibility during the MVC-to-Morphic transition. New code should be written using the other menu construction protocol such as addList:.
labels:lines:selections:
This method allows the receiver to accept old-style SelectionMenu creation messages. It should be used only for backward compatibility during the MVC-to-Morphic transition. New code should be written using the other menu construction protocol such as addList:.
preSelect:
Pre-select and highlight the menu item associated with the given action.
startUp
Build and invoke this menu with no initial selection. Answer the selection associated with the menu item chosen by the user or nil if none is chosen.
startUp:
Build and invoke this menu with the given initial selection. Answer the selection associated with the menu item chosen by the user or nil if none is chosen.
startUp:withCaption:
Build and invoke this menu with the given initial selection and caption. Answer the selection associated with the menu item chosen by the user or nil if none is chosen.
startUp:withCaption:at:
Build and invoke this menu with the given initial selection and caption.
Answer the selection associated with the menu item chosen by the user
or nil if none is chosen.
startUpWithCaption:
Build and invoke this menu with no initial selection. Answer the selection associated with the menu item chosen by the user or nil if none is chosen; use the provided caption
startUpWithCaption:at:
Build and invoke this menu with no initial selection. Answer the
selection associated with the menu item chosen by the user or nil if
none is chosen; use the provided caption
targets
Answer my targets, initializing them to an empty collection if found to be nil
title:
FillInTheBlank
I represent a prompt for string input from the user. The user is asked to type in and edit a string. The resulting string is supplied as the argument to a client-supplied action block.
acceptOnCR
Answer whether a carriage return should cause input to be accepted.
acceptOnCR:
done
Answer whether the user has ended the interaction.
done:
fillInTheBlankMorphClass
initialize
Initialize the state of the receiver with its default contents.
multiLineRequest:centerAt:initialAnswer:answerHeight:
request:
request:initialAnswer:
request:initialAnswer:centerAt:
requestPassword:
responseUponCancel:
setResponseForCancel
Line
I represent the line segment specified by two points.
beginPoint
Answer the first end point of the receiver.
beginPoint:
Set the first end point of the receiver to be the argument, aPoint.
Answer aPoint.
displayOn:at:clippingBox:rule:fillColor:
The form associated with this Path will be displayed, according
to one of the sixteen functions of two logical variables (rule), at
each point on the Line. Also the source form will be first anded
with aForm as a mask. Does not effect the state of the Path.
displayOn:transformation:clippingBox:rule:fillColor:
Displays this path, translated and scaled by aTransformation. Get the
scaled and translated Path.
displayOnPort:at:
endPoint
Answer the last end point of the receiver.
endPoint:
Set the first end point of the receiver to be the argument, aPoint.
Answer aPoint.
example
from:to:withForm:
new
LinearFit
I represent a piece-wise linear approximation to a set of points in the plane.
displayOn:at:clippingBox:rule:fillColor:
Display this Path--offset by aPoint, clipped by clipRect and the form
associated with this Path will be displayedr according to one of the sixteen
functions of two logical variables (rule). Also the source form will be first
anded with aForm as a mask. Does not effect the state of the Path
displayOn:transformation:clippingBox:rule:fillColor:
get the scaled and translated Path.
example
ListParagraph
I represent a special type of Paragraph that is used in the list panes of a browser. I avoid all the composition done by more general Paragraphs, because I know the structure of my Text.
composeAll
No composition is necessary once the ListParagraph is created.
initialize
Subclasses should redefine this method to perform initializations on instance creation
standardListStyle
trimLinesTo:
Since ListParagraphs are not designed to be changed, we can cut back the
lines field to lastLineInteger.
withArray:
Modifies self to contain the list of strings in anArray
withArray:style:
Paragraph
I represent displayable text that has been decoraged with margin alignment, line leading, and tab settings.
asForm
Answer a Form made up of the bits that represent the receiver's displayable text.
asString
Answer the string of characters of the receiver's text.
asText
Answer the receiver's text.
backgroundColor
bottomAtLineIndex:
Answer the bottom y of given line.
boundingBox
Refer to the comment in DisplayObject|boundingBox.
caretFormForDepth:
Return a caret form for the given depth.
centered
Set the alignment for the style with which the receiver displays its text
so that text is centered in the composition rectangle.
characterBlockAtPoint:
Answer a CharacterBlock for characters in the text at point aPoint. It is
assumed that aPoint has been transformed into coordinates appropriate to
the receiver's destinationForm rectangle and the compositionRectangle.
characterBlockForIndex:
Answer a CharacterBlock for character in the text at targetIndex. The
coordinates in the CharacterBlock will be appropriate to the intersection
of the destinationForm rectangle and the compositionRectangle.
clearVisibleRectangle
Display the area in which the receiver presents its text so that the area
is all one tone--in this case, all white.
clickAt:for:controller:
Give sensitive text a chance to fire. Display flash: (100@100 extent: 100@100).
clippingRectangle
Answer the rectangle, defined in absolute coordinates, whose
intersection with the destinationForm is the area in which the characters
are constrained to display.
clippingRectangle:
composeAll
Compose a collection of characters into a collection of lines.
compositionRectangle
Answer the rectangle whose width is the dimension, modified by
indents and tabsLevels, against which line wraparound is measured. The
height of the compositionRectangle is reset each time recomposition is
required.
compositionRectangle:
Set the rectangle whose width is the dimension, modified by indents and
tabsLevels, against which line wraparound is measured.
compositionRectangle:text:style:offset:
compositionRectangleDelta
A handy number -- mostly for scrolling.
computeBoundingBox
Compute minimum enclosing rectangle around characters.
deepCopy
Don't want to copy the destForm (Display) or fonts in the TextStyle. 9/13/96 tk
defaultCharacterBlock
destinationForm
Answer the Form into which the characters are scanned.
destinationForm:
displayLines:
displayLines:affectedRectangle:
This is the first level workhorse in the display portion of the TextForm routines.
It checks to see which lines in the interval are actually visible, has the
CharacterScanner display only those, clears out the areas in which display will
occur, and clears any space remaining in the visibleRectangle following the space
occupied by lastLine.
displayOn:
Because Paragraphs cache so much information, computation is avoided
and displayAt: 0@0 is not appropriate here.
displayOn:at:
Use internal clippingRect; destination cliping is done during actual display.
displayOn:at:clippingBox:rule:fillColor:
Default display message when aDisplayPoint is in absolute screen
coordinates.
displayOn:lines:
displayOn:transformation:clippingBox:align:with:rule:fillColor:
Assumes offset has been set!!!!!
example
extendSelectionAt:endBlock:
Answer with an Array of two CharacterBlocks that represent the text
selection that the user makes.
extendSelectionMark:pointBlock:
Answer with an Array of two CharacterBlocks that represent the text
selection that the user makes.
fillColor
Answer the Form with which each character is combined by the scanner
before applying the rule for display.
fillColor:
Set the argument, maskForm, to be the form with which each character
is combined by the scanner before applying the rule for display.
fit
Make the bounding rectangle of the receiver contain all the text without
changing the width of the receiver's composition rectangle.
flash
Complement twice the visible area in which the receiver displays.
height
Answer the height of the composition rectangle.
hiliteRect:
indentationOfLineIndex:ifBlank:
Answer the number of leading tabs in the line at lineIndex. If there are
no visible characters, pass the number of tabs to aBlock and return its value.
If the line is word-wrap overflow, back up a line and recur.
justified
Set the alignment for the style with which the receiver displays its text
so that the characters in each of text end on an even border in the
composition rectangle.
leftFlush
Set the alignment for the style with which the receiver displays its text
so that the characters in each of text begin on an even border in the
composition rectangle. This is also known as ragged-right.
leftMarginForCompositionForLine:
Build the left margin for composition of a line. Depends upon
marginTabsLevel and the indent.
leftMarginForDisplayForLine:alignment:
Build the left margin for display of a line. Depends upon
leftMarginForComposition, compositionRectangle left and the alignment.
lineAt:put:
Store a line, track last, and grow lines if necessary.
lineIndexOfCharacterIndex:
Answer the line index for a given characterIndex.
lineIndexOfTop:
Answer the line index at a given top y.
lines
lines:
mask
Answer the Form with which each character is combined by the scanner
before applying the rule for display.
mouseMovedFrom:pivotBlock:showingCaret:
mouseSelect
Answer with an Array of two CharacterBlocks that represent the text
selection that the user makes. Return quickly if the button is noticed up
to make double-click more responsive.
mouseSelect:
Track text selection and answer with an Array of two CharacterBlocks.
moveBy:
new
numberOfLines
Answer the number of lines of text in the receiver.
outline
Display a border around the visible area in which the receiver presents
its text.
replaceFrom:to:with:displaying:
Replace the receiver's text starting at position start, stopping at stop, by
the characters in aText. It is expected that most requirements for
modifications to the receiver will call this code. Certainly all cut's or
paste's.
reverseFrom:to:
Reverse area between the two character blocks given as arguments.
rightFlush
Set the alignment for the style with which the receiver displays its text
so that the characters in each of text end on an even border in the
composition rectangle but the beginning of each line does not. This is
also known as ragged-left.
rightMarginForComposition
Build the right margin for a line. Depends upon compositionRectangle
width, marginTabsLevel, and right indent.
rightMarginForDisplay
Build the right margin for a line. Depends upon compositionRectangle
rightSide, marginTabsLevel, and right indent.
rule
Answer the rule according to which character display behaves. For
example, rule may equal over, under, reverse.
rule:
Set the rule according to which character display behaves.
scrollBy:
scrollBy:withSelectionFrom:to:
Translate the composition rectangle up (dy<0) by heightToMove.
Repainting text as necessary, and selection if blocks not nil.
Return true unless scrolling limits have been reached.
scrollDelta
By comparing this before and after, you know if scrolling happened
scrollUncheckedBy:withSelectionFrom:to:
Scroll by the given amount. Copy bits where possible, display the rest.
If selection blocks are not nil, then select the newly visible text as well.
selectionRectsFrom:to:
Return an array of rectangles representing the area between the two character blocks given as arguments.
setWithText:style:
Set text and adjust bounding rectangles to fit.
setWithText:style:compositionRectangle:clippingRectangle:
Set text and using supplied parameters. Answer max composition width.
setWithText:style:compositionRectangle:clippingRectangle:foreColor:backColor:
Set text and using supplied parameters. Answer max composition width.
stringAtLineNumber:
text:
Set the argument, aText, to be the text for the receiver.
toggleAlignment
Set the alignment for the style with which the receiver displays its text
so that it moves from centered to justified to leftFlush to rightFlush and
back to centered again.
topAtLineIndex:
Answer the top y of given line.
topAtLineIndex:using:and:
Answer the top y of given line.
trimLinesTo:
updateCompositionHeight
Mainly used to insure that intersections with compositionRectangle work.
visibleRectangle
May be less than the clippingRectangle if text ends part way down.
Also some fearful history includes Display intersection;
it shouldn't be necessary
withClippingRectangle:do:
withText:
withText:style:
withText:style:compositionRectangle:clippingRectangle:foreColor:backColor:
wrappingBox:clippingBox:
Set the composition rectangle for the receiver so that the lines wrap
within the rectangle, compositionRect, and the display of the text is
clipped by the rectangle, clippingRect.
Path
I am the abstract superclass of the Graphic spatial primitives. I represent an ordered sequence of Points. Spatial primitives are used to generate "trajectories" such as lines and circles.
add:
Include aPoint as one of the receiver's elements.
at:
Answer the point on the receiver's path at position index.
at:put:
Store the argument, aPoint, as the point on the receiver's path at position
index.
collect:
Evaluate aBlock with each of the receiver's elements as the argument.
Collect the resulting values into a path that is like the receiver. Answer
the new path.
computeBoundingBox
Refer to the comment in DisplayObject|computeBoundingBox.
displayOn:at:clippingBox:rule:fillColor:
Display this Path--offset by aPoint, clipped by clipRect and the form
associated with this Path will be displayedr according to one of the sixteen
functions of two logical variables (rule). Also the source form will be first
anded with aForm as a mask. Does not effect the state of the Path
displayOn:transformation:clippingBox:rule:fillColor:
Displays this path, translated and scaled by aTransformation. Get the
scaled and translated Path.
example
first
Answer the first point on the receiver's path; included to correspond to
OrderedCollection protocol.
firstPoint
Answer the first point on the receiver's path.
firstPoint:
Replace the first element of the receiver with the new value aPoint.
Answer the argument aPoint.
form
Answer the receiver's form, or, if form is nil, then answer a 1 x 1 black
form (a black dot).
form:
Make the argument, aForm, be the receiver's form.
initializeCollectionOfPoints
initializeCollectionOfPoints:
isEmpty
last
Answer the last point on the receiver's path; included to correspond to
OrderedCollection protocol.
new
new:
offset
There are basically two kinds of display objects in the system: those
that, when asked to transform themselves, create a new object; and those
that side effect themselves by maintaining a record of the transformation
request (typically an offset). Path, like Rectangle and Point, is a display
object of the first kind.
removeAllSuchThat:
Evaluate aBlock for each element of the receiver.
Remove each element for which aBlock evaluates to true.
scaleBy:
Answers a new Path scaled by aPoint. Does not affect the current data in
this Path.
secondPoint
Answer the second element of the receiver.
secondPoint:
Replace the second element of the receiver with the new value aPoint.
Answer the argument aPoint.
select:
Evaluate aBlock with each of the receiver's elements as the argument.
Collect into a new path like the receiver only those elements for which
aBlock evaluates to true. Answer the new path.
size
Answer the length of the receiver.
thirdPoint
Answer the third element of the receiver.
thirdPoint:
Replace the third element of the receiver with the new value aPoint.
Answer the argument aPoint.
translateBy:
Answers a new Path whose elements are translated by aPoint. Does not
affect the elements of this Path.
PopUpMenu
I represent a list of items. My instances are presented on the display screen in a rectangular area. The user points to an item, pressing a mouse button; the item is highlighted. When the button is released, the highlighted item indicates the selection.
alignment
alignment:
center
Answer the point at the center of the receiver's rectangular area.
computeForm
Compute and answer a Form to be displayed for
this menu.
confirm:
Put up a yes/no menu with caption queryString. Answer true if the
response is yes, false if no. This is a modal question--the user must
respond yes or no.
confirm:orCancel:
Put up a yes/no/cancel menu with caption aString. Answer true if
the response is yes, false if no. If cancel is chosen, evaluate
cancelBlock. This is a modal question--the user must respond yes or no.
confirm:trueChoice:falseChoice:
displayAt:withCaption:during:
Display the receiver just to the right of aPoint while
aBlock is evaluated. If the receiver is forced off
screen, display it just to the right.
frameHeight
Designed to avoid the entire frame computation (includes MVC form),
since the menu may well end up being displayed in Morphic anyway.
inform:
Display a message for the user to read and then dismiss. 6/9/96 sw
initialize
Subclasses should redefine this method to perform initializations on instance creation
labelArray:
labelArray:lines:
labelString
labels:
labels:font:lines:
labels:lines:
leftFlush
lineArray
manageMarker
If the cursor is inside the receiver's frame, then highlight the marked
item. Otherwise no item is to be marked.
markerOff
No item is selected. Reverse the highlight if any item has been marked
as selected.
markerOn:
The item whose bounding area contains aPoint should be marked as
selected. Highlight its area and set the selection to its index.
markerTop:
Answer aPoint, gridded to lines in the receiver.
menuForm
Answer a Form to be displayed for this menu.
menuMorphWithTitle:
Answer a MenuMorph constructed from self
The menu is build so that it is forced to return
the current selection value when an item is selected
nItems
notify:
Create and schedule a Notifier with the argument as the message in
order to request confirmation before a process can proceed.
rescan
Cause my form to be recomputed after a font change.
scrollIntoView:
selection
Answer the current selection.
setMenuFontTo:
setSelection:
startUp
Display and make a selection from the receiver as long as the button
is pressed. Answer the current selection.
startUpCenteredWithCaption:
Differs from startUpWithCaption: by appearing with cursor in the menu,
and thus ready to act on mouseUp, without requiring user tweak to confirm
startUpSegmented:withCaption:at:
startUpSegmented:withCaption:at:allowKeyboard:
This menu is too big to fit comfortably on the screen.
Break it up into smaller chunks, and manage the relative indices.
Inspired by a special-case solution by Reinier van Loon. The boolean parameter indicates whether the menu should be given keyboard focus (if in morphic)
startUpWithCaption:
Display the menu, slightly offset from the cursor,
so that a slight tweak is required to confirm any action.
startUpWithCaption:at:
Display the menu, with caption if supplied. Wait for the mouse button to go down,
then track the selection as long as the button is pressed. When the button is released,
answer the index of the current selection, or zero if the mouse is not released over
any menu item. Location specifies the desired topLeft of the menu body rectangle.
startUpWithCaption:at:allowKeyboard:
Display the menu, with caption if supplied. Wait for the mouse button to go down, then track the selection as long as the button is pressed. When the button is released,
Answer the index of the current selection, or zero if the mouse is not released over any menu item. Location specifies the desired topLeft of the menu body rectangle. The final argument indicates whether the menu should seize the keyboard focus in order to allow the user to navigate it via the keyboard.
startUpWithCaption:icon:
Display the menu, slightly offset from the cursor,
so that a slight tweak is required to confirm any action.
startUpWithCaption:icon:at:
Display the menu, with caption if supplied. Wait for the mouse button to go down,
then track the selection as long as the button is pressed. When the button is released,
answer the index of the current selection, or zero if the mouse is not released over
any menu item. Location specifies the desired topLeft of the menu body rectangle.
startUpWithCaption:icon:at:allowKeyboard:
Display the menu, with caption if supplied. Wait for the mouse button
to go down, then track the selection as long as the button is pressed.
When the button is released,
Answer the index of the current selection, or zero if the mouse is not
released over any menu item. Location specifies the desired topLeft of
the menu body rectangle. The final argument indicates whether the
menu should seize the keyboard focus in order to allow the user to
navigate it via the keyboard.
startUpWithoutKeyboard
Display and make a selection from the receiver as long as the button is pressed. Answer the current selection. Do not allow keyboard input into the menu
withCaption:chooseFrom:
SelectionMenu
A SelectionMenu is xxxxxxxxx.
Instance Variables
selections: <Object>
selections
- xxxxx
fromArray:
invokeOn:
Pop up this menu and return the result of sending
to the target object the selector corresponding to
the menu item selected by the user. Return
nil if no item is selected.
Example:
((SelectionMenu
labels: 'sin\cos\neg' withCRs
lines: #()
selections: #(sin cos negated)) invokeOn: 0.7)
invokeOn:orSendTo:
Pop up the receiver, obtaining a selector; return
the result of having the target object perform the
selector. If it dos not understand the selector, give
the alternate object a chance
labelList:
labelList:lines:
labelList:lines:selections:
labelList:selections:
labels:lines:
labels:lines:selections:
labels:selections:
selections
selections:
selections:lines:
startUpWithCaption:icon:at:allowKeyboard:
Overridden to return value returned by
manageMarker. The boolean parameter indicates
whether the menu should be given keyboard focus
Spline
I represent a collection of Points through which a cubic spline curve is fitted.
coefficients
Answer an eight-element Array of Arrays each of which is the length
of the receiver. The first four arrays are the values, first, second and
third derivatives, respectively, for the parametric spline in x. The last
four elements are for y.
computeCurve
Compute an array for the coefficients.
derivs:first:second:third:
Compute the first, second and third derivitives (in coefficients) from
the Points in this Path (coefficients at: 1 and coefficients at: 5).
displayOn:at:clippingBox:rule:fillColor:
Display the receiver, a spline curve, approximated by straight line
segments.
displayOn:transformation:clippingBox:rule:fillColor:
Get the scaled and translated path of newKnots.
example
StringHolder
I am a kind of Model that includes a piece of text. In some cases, the text can be edited, and in some the text is a method.
Categories 'code pane menu' and 'message list menu' are messages that may be called by my menus when the text is a method, and when some pane is a list of methods. Other of my subclasses may ignore these two catagories altogether.
acceptContents:
Set aString to be the contents of the receiver. Return true cuz happy
browseAllMessages
Create and schedule a message set browser on all implementors of all the messages sent by the current method.
browseClass
Open an class browser on this class and method
browseClassRefs
browseClassVarRefs
1/17/96 sw: devolve responsibility to the class, so that the code that does the real work can be shared
browseClassVariables
Browse the class variables of the selected class. 2/5/96 sw
browseFullProtocol
Open up a protocol-category browser on the value of the
receiver's current selection.
browseInstVarDefs
browseInstVarRefs
1/26/96 sw: real work moved to class, so it can be shared
browseLocalImplementors
Present a menu of all messages sent by the currently selected message.
Open a message set browser of all implementors of the message chosen in or below
the selected class.
Do nothing if no message is chosen.
browseLocalSendersOfMessages
Present a menu of the currently selected message, as well as all
messages sent by it. Open a message set browser of all implementors
of the message chosen in or below the selected class
browseMessages
Present a menu of all messages sent by the currently selected message.
Open a message set browser of all implementors of the message chosen.
browseMethodFull
Create and schedule a full Browser and then select the current class and message.
browseSendersOfMessages
Present a menu of the currently selected message, as well as all messages sent by it. Open a message set browser of all senders of the selector chosen.
browseUnusedMethods
browseVersions
Create and schedule a Versions Browser, showing all versions of the
currently selected message. Answer the browser or nil.
buildMessageBrowser
Create and schedule a message browser.
buildWith:
classCommentIndicated
Answer true iff we're viewing the class comment.
classHierarchy
Create and schedule a class list browser on the receiver's hierarchy.
classListKey:from:
Respond to a Command key. I am a model with a list of classes and a
code pane, and I also have a listView that has a list of methods. The
view knows how to get the list and selection.
clearUserEditFlag
Clear the hasUnacceptedEdits flag in all my dependent views.
codePaneMenu:shifted:
Note that unless we override perform:orSendTo:,
PluggableTextController will respond to all menu items in a
text pane
codeTextMorph
completionController
contents
Answer the contents that the receiver is holding--presumably a string.
contents:
Set textOrString to be the contents of the receiver.
contentsSelection
Return the interval of text in the code pane to select when I set the pane's contents
copyName
Copy the current selector to the clipboard
copySelector
Copy the selected selector to the clipboard
createCompletionController
defaultContents
doItContext
Answer the context in which a text selection can be evaluated.
doItReceiver
Answer the object that should be informed of the result of evaluating a
text selection.
embeddedInMorphicWindowLabeled:
embeddedInMorphicWindowLabeled:wrap:
fileOutMessage
Put a description of the selected message on a file
findMethodInChangeSets
Find and open a changeSet containing the current method.
guessTypeForName:
initialize
Initialize the state of the receiver with its default contents.
initializeCompletionController
inspectInstances
Inspect all instances of the selected class.
inspectSubInstances
Inspect all instances of the selected class and all its subclasses
messageListKey:from:
Respond to a Command key. I am a model with a code pane, and I also
have a listView that has a list of methods. The view knows how to get
the list and selection.
messageListSelectorTitle
methodHierarchy
Create and schedule a method browser on the hierarchy of implementors.
noteAcceptanceOfCodeFor:
A method has possibly been submitted for the receiver with aSelector as its selector; If the receiver wishes to take soem action here is a chance for it to do so
offerDurableMenuFrom:shifted:
Pop up (morphic only) a menu whose target is the receiver and whose contents are provided by sending the menuRetriever to the receiver. The menuRetriever takes two arguments: a menu, and a boolean representing the shift state; put a stay-up item at the top of the menu.
offerMenuFrom:shifted:
Pop up a menu whose target is
the receiver and whose contents are provided by sending the
menuRetriever to the receiver. The menuRetriever takes two arguments:
a menu, and a boolean representing the shift state.
okToChange
Allows a controller to ask this of any model
open
openAsMorphLabel:
Workspace new openAsMorphLabel: 'Workspace'
openLabel:
Create a standard system view of the model, me, a StringHolder and open it. If in mvc, terminate the active controller so that the new window will immediately be activated.
openLabel:andTerminate:
Create a standard system view of the model, me, a StringHolder and open it.; do not terminate the active process if in mvc
openLabel:wrap:
Create a standard system view of the model, me, a StringHolder and open it.
openSingleMessageBrowser
Create and schedule a message list browser populated only by the currently selected message
packageListKey:from:
Respond to a Command key in the package pane in the PackageBrowser
perform:orSendTo:
Selector was just chosen from a menu by a user. If can respond, then
perform it on myself. If not, send it to otherTarget, presumably the
editPane from which the menu was invoked.
receiverClass
reformulateList
If the receiver has a way of reformulating its message list, here is a chance for it to do so
reformulateListNoting:
A method has possibly been submitted for the receiver with newSelector as its selector; If the receiver has a way of reformulating its message list, here is a chance for it to do so
removeFromCurrentChanges
Tell the changes mgr to forget that the current msg was changed.
requestor
returns the focused window's requestor
revertAndForget
Revert to the previous version of the current method, and tell the changes mgr to forget that it was ever changed. Danger! Use only if you really know what you're doing!
revertToPreviousVersion
Revert to the previous version of the current method
selectMessageAndEvaluate:
Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector. If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any
selectedClassName
I may know what class is currently selected
selectedClassOrMetaClass
selectedInterval
selectedMessageName
showBytecodes
We don't know how to do this
systemCatListKey:from:
Respond to a Command key. I am a model with a code pane, and I also have a listView that has a list of methods. The view knows how to get the list and selection.
textContents:
Set aStringOrText to be the contents of the receiver.
timeStamp
Answer the time stamp for the chosen class and method, if any, else an empty string
wantsAnnotationPane
Answer whether the receiver, seen in some browser window, would like to have the so-called annotationpane included. By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary.
wantsOptionalButtons
Answer whether the receiver, seen in some browser window, would like to have the so-called optional button pane included. By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary.
windowColorSpecification
ValueHolder
A ValueHolder is xxxxxxxxx.
Instance Variables
contents: <Object>
contents
- xxxxx
contents
contents: