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 0.0px; font: 12.0px Helvetica
; color: #001ee6}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica
}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
; min-height: 14.0px}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
}
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: 14.0px Helvetica
; min-height: 17.0px}
20 p
.p11
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #1e34a1}
21 p
.p12
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
22 p
.p13
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
; min-height: 12.0px}
23 span
.s1
{font: 18.0px Helvetica
}
24 span
.s2
{color: #636a99}
25 span
.s3
{color: #000000}
26 span
.s4
{text-decoration: underline
}
27 span
.s5
{color: #0020f6}
28 span
.s6
{color: #2040df}
29 span
.s7
{color: #515362}
30 span
.s8
{color: #6f7184}
31 span
.s9
{color: #4357c0}
32 span
.s10
{color: #4c5db6}
33 span
.s11
{color: #3e54c5}
34 span
.Apple-tab-span
{white-space:pre
}
38 <p class=
"p1"><span class=
"s1"><b>EZGui
<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 EZ widget wrappers
</b><span class=
"s1"><b><span class=
"Apple-tab-span"> </span></b></span></p>
39 <p class=
"p2"><br></p>
40 <p class=
"p1"><b>Inherits from:
</b><a href=
"../../Core/Object.html"><span class=
"s2"><b>Object
</b></span></a></p>
41 <p class=
"p3"><br></p>
42 <p class=
"p1">Users will not normally directly create instances of EZGui, but only use it through its subclasses. It provides the basic mechanisms for various EZ widget wrappers. It also provides a standard for EZ GUI Classes, and new EZ Classes should subclass EZGUI to help keep a consistent user interface .
</p>
43 <p class=
"p2"><br></p>
44 <p class=
"p4"><span class=
"s3"><b>See also:
</b><a href=
"EZListView.html"><span class=
"s4">EZListView
</span></a>,
<a href=
"EZPopUpMenu.html"><span class=
"s4">EZPopUpMenu
</span></a>,
<a href=
"EZSlider.html"><span class=
"s4">EZSlider
</span></a>,
<a href=
"EZNumber.html"><span class=
"s4">EZNumber
</span></a>,
<a href=
"EZRanger.html"><span class=
"s4">EZRanger
</span></a>,
<a href=
"EZKnob.html"><span class=
"s5">EZKnob
</span></a></span></p>
45 <p class=
"p2"><br></p>
46 <p class=
"p5"><b>Accessing Instance and Class Variables
</b></p>
47 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
48 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>view
</b></p>
49 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
50 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span>Returns the enclosing
<a href=
"../Main-GUI/CompositeView.html"><span class=
"s6">CompositeView
</span></a>.
</p>
51 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
52 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>bounds
</b></p>
53 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
54 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span>Returns the bounds of the enclosing
<a href=
"../Main-GUI/CompositeView.html"><span class=
"s6">CompositeView
</span></a>.
</p>
55 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
56 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>label
</b></p>
57 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>label_(string)
</b></p>
58 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
59 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Sets/gets it the label. Will add the label view if none was initially created.
</p>
60 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>string
</b>- An Instance of
<a href=
"../../Collections/String.html"><span class=
"s7">String
</span></a>.
</p>
61 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
62 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>window
</b></p>
63 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span>Returns the window if you used the popUp window function.
</p>
64 <p class=
"p6"><br></p>
65 <p class=
"p5"><b>Accessing GUI options
</b></p>
66 <p class=
"p10"><br></p>
67 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>alwaysOnTop_(bool)
</b></p>
68 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>alwaysOnTop
</b></p>
69 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span></p>
70 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Makes the popup window always on top, if there is one
</p>
71 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>bool
</b>- An Instance of
<a href=
"../../Core/Boolean.html"><span class=
"s8">Boolean
</span></a>. Default is false;
</p>
72 <p class=
"p6"><br></p>
73 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>visible
</b></p>
74 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>visible_(bool)
</b></p>
75 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
76 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Sets/gets it the component views are visible.
</p>
77 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>bool
</b>- An Instance of
<a href=
"../../Core/Boolean.html"><span class=
"s8">Boolean
</span></a>. Default is true;
</p>
78 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
79 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>enabled
</b></p>
80 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>enabled_(bool)
</b></p>
81 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
82 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Sets/gets if the list is enabled.
</p>
83 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>bool
</b>- An Instance of
<a href=
"../../Core/Boolean.html"><span class=
"s8">Boolean
</span></a>. Default is true;
<span class=
"Apple-tab-span"> </span></p>
84 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
85 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>onClose
</b></p>
86 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>onClose_(func)
</b></p>
87 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
88 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Sets/gets the onClose function of either
<b>view
</b> or
<b>window
</b>, depending on whether the EZ view used a popup window.
</p>
89 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>func
</b>- An Instance of
<a href=
"../../Core/Kernel/Function.html"><span class=
"s9">Function
</span></a> or
<a href=
"../../Core/Kernel/FunctionList.html"><span class=
"s9">FunctionList
</span></a>.
</p>
90 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
91 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>font_(font)
</b></p>
92 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
93 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>font
</b>- An Instance of
<a href=
"../Main-GUI/Font.html"><span class=
"s10">Font
</span></a>;
<span class=
"Apple-tab-span"> </span></p>
94 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
95 <p class=
"p5"><b>Subclassing
</b></p>
96 <p class=
"p10"><br></p>
97 <p class=
"p1">EZGui provides a standard and basic tools for most EZ classes. If you make a new EZ class, then subclass EZGui, and override the necessary methods. If your class only has a label and a widget, chances are, you need to overide nothing, but only need to write the
<span class=
"Apple-converted-space"> </span>new and init class methods. See existing subclasses of EZGui for examples of this. You may also want to override the following:
</p>
98 <p class=
"p2"><br></p>
99 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>widget
</b></p>
100 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span>returns the active widget.
</p>
101 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>subclasses will typically refer to it or ignor it, e.g.:
</p>
102 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
103 <p class=
"p11"><span class=
"s3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>MyEZClass
<span class=
"s3">{
</span></p>
104 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>myOtherMethods{}
</p>
105 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>....
</p>
106 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>listView{^widget}
</p>
107 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>}
</p>
108 <p class=
"p2"><br></p>
109 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>action
</b></p>
110 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>action_(func)
</b></p>
111 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
112 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span>Gets/sets the action of the EZclass instance.
</p>
113 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>fund
</b>- An Instance of
<a href=
"../../Core/Kernel/Function.html"><span class=
"s11">Function
</span></a> or
<a href=
"../../Core/Kernel/FunctionList.html"><span class=
"s11">FunctionList
</span></a>.
</p>
114 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
115 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>value
</b></p>
116 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>value_ (val)
</b></p>
117 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
118 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Gets/sets the value of the
<b>widget
</b>. Does not perform the action.
</p>
119 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>val
</b>- An integer.
</p>
120 <p class=
"p13"><br></p>
121 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>valueAction_ (val)
</b></p>
122 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
123 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Gets/sets thevalue of the widget. Performs do action
</p>
124 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>val
</b>- An integer.
</p>
125 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
126 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>doAction
</b></p>
127 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
128 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Performs this.action.value(this) .
</p>
129 <p class=
"p10"><br></p>
130 <p class=
"p5"><b>Internal Utilities
</b></p>
131 <p class=
"p10"><br></p>
132 <p class=
"p7"><span class=
"Apple-tab-span"> </span><b>prSubViewBounds(rect, hasLabel)
</b></p>
133 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>This calculates the bounds of the subviews and the gaps. It returns an array of Rects, which depends on how many subview there are. Subclasses override this if they have more than one widget.
</p>
134 <p class=
"p6"><b><span class=
"Apple-tab-span"> </span></b></p>
135 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>prMakeView(parentView,bounds);
</b></p>
136 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Called by init . Returns s
<span class=
"Apple-converted-space"> </span><b>[view,bounds]
</b>. The container is either the enclosing Container,
<span class=
"Apple-converted-space"> </span>or a popUpWindow with a container.
</p>
137 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
138 <p class=
"p7"><span class=
"Apple-tab-span"> </span><b>prSetViewParams
</b></p>
139 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Only defined by some subclassses. Sets the
<b>resize
</b><span class=
"Apple-converted-space"> </span>and
<b>align
</b> of all the views, according to the state of
<b>layout
</b><span class=
"Apple-converted-space"> </span></p>
140 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
141 <p class=
"p7"><span class=
"Apple-tab-span"> </span><b>prMakeMarginGap(parentView, argMargin, argGap)
</b></p>
142 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Called in the
<span class=
"Apple-converted-space"> </span>init method of all subclasses.
<span class=
"Apple-converted-space"> </span>Sets the margin and gap of
<span class=
"Apple-converted-space"> </span><b>view
</b>. By default, it tries to get its parent's gap, otherwise it defaults to
2@
2. Setting argGap
<span class=
"Apple-converted-space"> </span>overrides these.
</p>
143 <p class=
"p6"><br></p>