Floater

The Floater acts as a "floating" window--like a dialog box, it clips graphics so that it obscures whatever it is drawn over.

This is a "primitive" component type; it doesn't do much on its own. It's been left plain so that you may customize its behavior.

Floater Properties

Standard Properties:
borderBottom, borderLeft, borderRight, borderTop, children, class, height, left, numChildren, parent, proto, sizeHControl, sizeVControl, tile, tileLayout, tileSpacing, tileHAlign, tileHInset, tileVInset, tileVAlign, top, version, visible, width.
enabled: If the Floater is disabled and holds the system focus, the window itself will become the system focus.
sizeHControl, sizeVControl: Only SIZE_AS_NEEDED and SIZE_AS_SPECIFIED are supported. SIZE_AS_NEEDED is partially supported: when the component becomes visible and their height or width is zero, the component will size itself to a default value.
parent: The only valid parent for a Floater is the null component, also known as "app."
visible: Setting a Floater visible not only makes it visible, but also brings it to the front, as if you had invoked the BringToFront() action.

focus component (must be a child or descendant of the Floater (or a null component))
This property holds the component that the window will set as the active system focus when the window becomes active. The property will hold the component with the system focus as long as the system focus remains within the window.

If the value of the focus property is the null component and the window is becoming visible or becoming active, then the window will set the system focus to the first child component that will accept it.

When the system focus is in the window, setting the focus property will also set the system focus.

Note that a popped-up Popup window, though a child of the window, will not show up in its focus property. This is because the popped-up Popup is a window itself, and keeps track of its own focus.

type integer (0-5)
If the floater's parent is "app," then this property determines the floater's modality and placement relative to other windows. This property cannot be changed while the floater is visible.
Floater Events

0 NON_MODAL:

Non-modal floaters are normal windows.

1 TOOL_BOX:

Toolbox floaters appear above Non-modal windows and also never get the focus (and so never become active). Children of this type of floater will never become the active selection (the user can not copy their data to the clipboard).

2 MODAL:

Modal windows will not allow keyboard input to be sent to components that are not either children of the dialog or of "On-top" windows. This means that components attempting to grab the mouse and attempts to set the focus will fail if the component is not either a child of the modal window or of an On-top window. Modal windows clear the mouse grab and pop down any Popup windows before becoming active.

3 SYS_MODAL:

System-modal floaters behave similarly to Modal floaters, but always appear above other System-modal windows.

4 ON_TOP:

"On-top" floaters behave like Toolbox windows but appear above everything but Popup windows, and have the special ability to receive input even when a modal window is active. Because they are like Toolbox windows, they will never get the focus. Children of this type of floater will never become the active selection (the user can not copy their data to the clipboard).

5 POPUP:

Popup floaters go away whenever the user clicks on anything inside or outside them. They go away as soon as the user lifts the mouse. They also go away whenever a Modal or System-modal window becomes visible. Children of this type of floater will never become the active selection (the user can not copy their data to the clipboard).

_aboutToClose()

_aboutToClose( self AS floater )

This event is generated when the Floater is about to go away (when visible has changed from one to zero).

Pass:

self floater
The Floater experiencing the event.

_aboutToOpen()

_aboutToOpen( self AS floater )

This event is generated when the Floater is about to appear (when visible has changed from zero to one).

Pass:

self floater
The Floater experiencing the event.

_activeChanged()

_activeChanged( self As floater, gained AS integer )

This event is generated when a different window becomes an active window: this floater has just become (or just ceased to be) the active non-modal, modal, or system-modal window.

Passed:

self floater
The component experiencing the event.

gained integer
If this argument is non-zero, then this floater has just become the active window of its type (non-modal or modal/system-modal). Otherwise, the floater just ceased to be the active window.

Floater Actions

BringToFront()

BringToFront()

This action causes the floater to come to the front, appearing on top of other floaters and dialogs with the same or lesser priority. This may result in the floater becoming the active window.

Pass:

Nothing.

RedoGeometry()

RedoGeometry()

This action causes the floater to re-compute the positions of all its children, their children, etc.

Pass:

Nothing.