Name

basewindow — base window class

Synopsis

LZX: basewindow
JavaScript: lz.basewindow
Type: Class
Access: public
Topic: Components.Base Components
Declared in: lps/components/base/basewindow.lzx

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.

Superclass Chain

node (LzNode) » view (LzView) » basecomponent » basewindow

Known 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" />
private var mousedel;
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()
<method name="close" />
public function 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()
<method name="init" />
private function 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()
<method name="open" />
public function 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=" defaultbuttongroup " value="true" />
  <attribute name=" haswindowfocus " value="false" />
  <attribute name=" minheight " value="50" />
  <attribute name=" minwidth " value="60" />
  <attribute name=" mousedel " value="null" />
  <attribute name=" state " value="1" />
  <method name=" bringToFront " />
  <method name=" _checkmouse " args="v" />
  <method name=" close " />
  <method name=" construct " args="parent, args" />
  <method name=" destroy " />
  <method name=" init " />
  <method name=" _mousedown " />
  <method name=" _mouseup " />
  <event name=" onhaswindowfocus " />
  <method name=" open " />
  <method name=" _removeFromWindowlist " />
  <method name=" sendBehind " args="v" />
  <method name=" sendInFrontOf " args="v" />
  <method name=" sendToBack " />
  <method name=" setHeight " args="h" />
  <method name=" setVisible " args="isVisible" />
  <method name=" setWidth " args="w" />
  <method name=" setWindowFocus " args="windowfocus" />
  <method name=" _startDrag " />
  <method name=" _startResize " />
  <method name=" _stopDrag " />
  <method name=" _stopResize " />
</class>

JavaScript Synopsis

public lz.basewindow extends  lz.basecomponent  {
  public var allowdrag  : boolean;
  private var defaultbuttongroup ;
  public var haswindowfocus ;
  public final var minheight ;
  public final var minwidth ;
  private var mousedel ;
  public read-only var state ;
  prototype public function bringToFront ();
  prototype private function _checkmouse (v);
  prototype public function close ();
  prototype private function construct (parent, args);
  prototype private function destroy ();
  prototype private function init ();
  prototype private function _mousedown ();
  prototype private function _mouseup ();
  prototype private event onhaswindowfocus ;
  prototype public function open ();
  prototype private function _removeFromWindowlist ();
  prototype public function sendBehind (v);
  prototype public function sendInFrontOf (v);
  prototype public function sendToBack ();
  prototype private function setHeight (h);
  prototype public function setVisible (isVisible : Boolean);
  prototype private function setWidth (w);
  prototype public function setWindowFocus (windowfocus : Boolean);
  prototype private function _startDrag ();
  prototype private function _startResize ();
  prototype private function _stopDrag ();
  prototype private function _stopResize ();
}