1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
7 <meta name=
"Generator" content=
"Cocoa HTML Writer">
8 <meta name=
"CocoaVersion" content=
"949.43">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica
}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica
; min-height: 17.0px}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
; min-height: 14.0px}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica
}
18 p
.p9
{margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica
; min-height: 14.0px}
19 p
.p10
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
}
20 p
.p11
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
; color: #356f14}
21 p
.p12
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
; min-height: 12.0px}
22 span
.s1
{font: 18.0px Helvetica
}
23 span
.s2
{color: #6d7187}
24 span
.s3
{text-decoration: underline
; color: #5e648c}
25 span
.s4
{text-decoration: underline
; color: #5b6291}
26 span
.s5
{color: #636a99}
27 span
.s6
{text-decoration: underline
; color: #5d638e}
28 span
.s7
{color: #3e54c5}
29 span
.s8
{color: #5461ad}
30 span
.s9
{color: #505fb1}
31 span
.s10
{color: #6f7183}
32 span
.s11
{font: 14.0px Helvetica
}
33 span
.s12
{color: #6f7185}
34 span
.s13
{color: #000000}
35 span
.s14
{color: #696f8e}
36 span
.Apple-tab-span
{white-space:pre
}
40 <p class=
"p1"><span class=
"s1"><b>SCStaticTextBase
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>An abstract superclass for classes that store and display objects as strings
</b><span class=
"s1"><b><span class=
"Apple-tab-span"> </span></b></span></p>
41 <p class=
"p2"><br></p>
42 <p class=
"p1"><b>Inherits from:
</b><a href=
"../../Core/Object.html"><span class=
"s2"><b>Object
</b></span></a><b> :
</b><a href=
"SCView.html"><span class=
"s2"><b>SCView
</b></span></a></p>
43 <p class=
"p2"><br></p>
44 <p class=
"p1"><b>See also:
</b> <a href=
"SCNumberBox.html"><span class=
"s3">SCNumberBox
</span></a> ,
<a href=
"SCTextField.html"><span class=
"s4">SCTextField
</span></a><span class=
"s5">,
<a href=
"SCStaticText.html"><span class=
"s6">SCStaticText
</span></a></span><span class=
"s6">,
</span> <a href=
"SCDragView.html"><span class=
"s7">SCDragView
</span></a></p>
45 <p class=
"p2"><br></p>
46 <p class=
"p1">Users will not normally directly create instances of SCStaticTextBase, but only use it through its subclasses. It provides methods for the storage of objects, and their display as a text string or number. Its subclasses include editable and non-editable displays, such as static text, numbers boxes, or drag and drop objects.
</span></p>
47 <p class=
"p3"><br></p>
48 <p class=
"p4"><b>Accessing Instance and Class Variables
</b></p>
49 <p class=
"p5"><br></p>
50 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>string
</b></p>
51 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>string_ (argString)
</b></p>
52 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b></p>
53 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>The displayed
<a href=
"../../Collections/String.html"><span class=
"s2">String
</span></a> of the static text. If the string needs to represent a type other than String, e.g. a Float, then you need to use the
<b>object
</b> method to set the content.
</span></p>
54 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>argString
</b>- An instance of
<a href=
"../../Collections/String.html"><span class=
"s2">String
</span></a>.
</p>
55 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
56 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>object
</b></p>
57 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>object_ (obj)
</b></p>
58 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b></p>
59 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Allows you to store an object, which is displayed as a string. If
<b>setBoth
</b>==true (the default), then setting
<b>object
</b> will automatically set the
<b>string
</b> as well, using
<b>obj
</b>.asString(
80). Subclasses, e.g.
<a href=
"SCNumberBox.html"><span class=
"s2">SCNumberBox
</span></a> or
<a href=
"SCDragBoth.html"><span class=
"s8">SCDragBoth
</span></a>, us this to display their value as a string.
</p>
60 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>obj
</b>- Any
<a href=
"../../Core/Object.html"><span class=
"s9">Object
</span></a>. Most likely one which makes sense to display as a string, such as a
<a href=
"../../Math/Float.html"><span class=
"s2">Float
</span></a><span class=
"s2">.
</span></p>
61 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
62 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>setBoth
</b></p>
63 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>setBoth_(arg1)
</b></p>
64 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
65 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>arg1
</b>- An instance of
<a href=
"../../Core/Boolean.html"><span class=
"s2">Boolean
</span></a>. Default is true. See the method description for
<b>object
</b>above.
</p>
66 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
67 <p class=
"p4"><b>Customizing Appearance
</b></p>
68 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
69 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>font
</b></p>
70 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>font_ (argFont)
</b></p>
71 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b></p>
72 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Sets the Font of the static text. Default value is the default font: Font.default .
</p>
73 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>argFont
</b>- An instance of
<a href=
"../Main-GUI/Font.html"><span class=
"s10">Font
</span></a>.
</p>
74 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
75 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>align_ (align)
</b></p>
76 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b></p>
77 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Sets the alignment of the string.
</p>
78 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>align
</b>- An instance of
<a href=
"../../Core/Symbol.html"><span class=
"s2">Symbol
</span></a>. \centered, \left, or \right.
</p>
79 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
80 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>stringColor
</b></p>
81 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>stringColor_ (color)
</b></p>
82 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b></p>
83 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Sets the color of the displayed String.
</p>
84 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>color
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>.
</p>
85 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
86 <p class=
"p4"><b>Subclassing and Internal Methods
</span></b></p>
87 <p class=
"p5"><br></p>
88 <p class=
"p6"><span class=
"s11"><span class=
"Apple-tab-span"> </span></span>The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these as needed. SCStaticTextBase functions by storing any instance of
<a href=
"../../Core/Object.html"><span class=
"s7">Object
</span></a> in the instance variable,
<b>object
</b>, and then representing it visually using
<b>string
</b>. This string can either be directly related to the object or not, depending on the flag,
<b>setBoth
</b>. By default,
<b>object
</b> is represented in
<b>string
</b> using the top level instance method, asString(
80). Subclasses can override this.
</p>
89 <p class=
"p7"><br></p>
90 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span>properties
</b></p>
91 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b></p>
92 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>A list of properties to which this view responds. See
<a href=
"SCView.html"><span class=
"s12">SCView
</span></a>.
</span></p>
93 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
94 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>returns:
</p>
95 <p class=
"p11"><span class=
"s13"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>[
</span>\bounds
<span class=
"s13">,
</span>\visible
<span class=
"s13">,
</span>\enabled
<span class=
"s13">,
</span>\canFocus
<span class=
"s13">,
</span>\resize
<span class=
"s13">,
</span>\background
<span class=
"s13">,
</span>\minWidth
<span class=
"s13">,
</span>\maxWidth
<span class=
"s13">,
</span>\minHeight
<span class=
"s13">,
</span>\maxHeight
<span class=
"s13">,
</span>\value
<span class=
"s13">,
</span>\font
<span class=
"s13">,
</span>\items
<span class=
"s13">,
</span>\stringColor
<span class=
"s13"> ]
</span></p>
96 <p class=
"p12"><br></p>
97 <p class=
"p4"><b>Examples
</b></p>
98 <p class=
"p6">See the help files for subclasses such as
<a href=
"SCStaticText.html"><span class=
"s14">SCStaticText
</span></a> or
<a href=
"SCNumberBox.html"><span class=
"s14">SCNumberBox
</span></a>.
</p>
99 <p class=
"p5"><br></p>