Name
basewindow — base window class
Description
This abstract class provides useful methods and states for a view that is moveable
and resizeable.
The basewindow class defines methods, attributes that are used by window
subclasses.
Details
Properties (7)
-
allowdrag
-
<attribute name="allowdrag" type="boolean" value="true" />
public var allowdrag : boolean;
Attribute handles whether window can be dragged or not @keywords public
-
defaultbuttongroup
-
<attribute name="defaultbuttongroup" value="true" />
private var defaultbuttongroup;
-
haswindowfocus
-
<attribute name="haswindowfocus" value="false" />
public var haswindowfocus;
True if the window is frontmost, default: false. Set this
attribute to bring the window to the fore of its sibling
windows, and bring window focus.
-
minheight
-
<attribute name="minheight" value="50" />
public final var minheight;
Minimum height for the window, default: 50.
-
minwidth
-
<attribute name="minwidth" value="60" />
public final var minwidth;
Minimum width for the windowy, default: 60.
-
mousedel
-
<attribute name="mousedel" value="null" />
-
state
-
<attribute name="state" value="1" />
public read-only var state;
The state of the window: 1=selected (frontmost) window,
2=not-selected window, 3=dragging, 4=disabled, 5=resizing.
Default: 1
Methods (21)
-
bringToFront()
-
<method name="bringToFront" />
public function bringToFront();
-
_checkmouse()
-
<method name="_checkmouse" args="v" />
private function _checkmouse(v);
Called onmousedown when this is the frontmost window to see if
the click should bring a different window to the front.
-
close()
-
Hides the window, same as setVisible(false).
-
construct()
-
<method name="construct" args="parent, args" />
private function construct(parent, args);
-
destroy()
-
<method name="destroy" />
private function destroy();
-
init()
-
-
_mousedown()
-
<method name="_mousedown" />
private function _mousedown();
Called onmousedown, sets haswindowfocus to true and starts the
drag behavior. Subclasses may override to create different
behavior.
-
_mouseup()
-
<method name="_mouseup" />
private function _mouseup();
Called onmouseup, stops the drag behavior. Subclasses may
override to create different behavior.
-
open()
-
Shows the window, same as setVisible(true).
-
_removeFromWindowlist()
-
<method name="_removeFromWindowlist" />
private function _removeFromWindowlist();
remove this window from the windowlist
-
sendBehind()
-
<method name="sendBehind" args="v" />
public function sendBehind(v);
-
sendInFrontOf()
-
<method name="sendInFrontOf" args="v" />
public function sendInFrontOf(v);
-
sendToBack()
-
<method name="sendToBack" />
public function sendToBack();
-
setHeight()
-
<method name="setHeight" args="h" />
private function setHeight(h);
-
setVisible()
-
<method name="setVisible" args="isVisible" />
public function setVisible(isVisible : Boolean);
Setter for the visible property that also brings the window to the
front.
-
setWidth()
-
<method name="setWidth" args="w" />
private function setWidth(w);
-
setWindowFocus()
-
<method name="setWindowFocus" args="windowfocus" />
public function setWindowFocus(windowfocus : Boolean);
Brings the window to front when it has the
windowfocus and sets the 'state' to 2, the selected state.
Subclasses may override to create different behavior
-
_startDrag()
-
<method name="_startDrag" />
private function _startDrag();
May be called by subclasses to control dragging of the window
based on mouse movement. By default this is called onmousedown
anywhere on the window.
-
_startResize()
-
<method name="_startResize" />
private function _startResize();
May be called by subclasses to control resizing of the window
based on mouse movement, typically called onmousedown from a
resizer control.
-
_stopDrag()
-
<method name="_stopDrag" />
private function _stopDrag();
May be called by subclasses to control dragging of the window
based on mouse movement. By default this is called onmouseup
anywhere on the window.
-
_stopResize()
-
<method name="_stopResize" />
private function _stopResize();
May be called by subclasses to control resizing of the window based
on mouse movement, typically called onmouseup from a resizer
control.
Events (1)
-
onhaswindowfocus
-
<attribute name="onhaswindowfocus" />
private event onhaswindowfocus;
LZX Synopsis
<class name="
lz.basewindow" extends="
lz.basecomponent
">
<attribute name="
allowdrag
" type="
boolean" value="
true" />
<attribute name="
minwidth
" value="
60" />
<attribute name="
mousedel
" value="
null" />
<attribute name="
state
" value="
1" />
<method name="
close
" />
<method name="
construct
" args="
parent,
args" />
</class>
JavaScript Synopsis
public
lz.basewindow extends
lz.basecomponent
{
public read-only var
state
;
prototype public function
close
();
prototype private function
construct
(
parent,
args);
prototype private function
destroy
();
prototype private function
init
();
prototype public function
open
();
prototype public function
setVisible
(
isVisible : Boolean);
prototype private function
setWidth
(
w);
}