Index...
Centrallix Documentation
|
widget/childwindow
childwindow :: A dialog or application window which is a lightweight movable container.
Metadata:
type: | widget/childwindow |
visual: | yes |
container: | yes |
form element: | no |
Overview:
The childwindow provides the capability of creating a popup dialog or application window within a web page. The window is not actually a separate browser window, but rather a movable container that can appear "floating" above the rest of the Centrallix application.They can take on one of two styles;"dialog" and "window", which currently relate only to how the window border and titlebar are drawn. The windows support windowshading (double-clicking on the titlebar to "rollup" or "rolldown" the window contents).
These "windows" currently do not support multiple instantiation.
Usage:
Childwindows are normally coded at the top-level of an application, since if they are placed within containers, the container limits where the window can be moved (the window is clipped by its container). However, if the "toplevel" property is enabled, then the window floats at the top level of other widgets regardless of the size and location of its container in the application or component (thus the window is not clipped by its container).
These windows can contain other visual and nonvisual widgets.
Properties:
Property | Type | Description |
background |
string |
A background image for the body of the window. |
bgcolor |
string |
A color, RGB or named, to be used as the window body's background.If neither transparent. |
hdr_background |
string |
A background image for the titlebar of the window. |
hdr_bgcolor |
string |
A color, RGB or named, for the titlebar of the window. |
height |
integer |
height, in pixels, of the window. |
icon |
string |
A pathname to an icon to be used in the upper left corner of the window. If unspecified, the default "CX" ichthus icon is used instead. |
style |
string |
Either "dialog" or "window", and determines the style of the window's border. |
modal |
yes/no |
If "yes", the window is modal (and IsModal need not be passed to "Open"). A modal window will force the user to close the window before anything else in the application can be accessed. |
toplevel |
yes/no |
If "yes", the window will float above all other widgets in the application, otherwise it will be clipped by its own container. |
textcolor |
string |
The color for the titlebar's text (window title). Default "black". |
titlebar |
yes/no |
whether the window will have a titlebar (and the close "X" in the upper right corner of the window). Default "yes". |
title |
string |
The window's title. |
visible |
boolean |
the window is initially visible on screen. The window has an action which can "true". |
width |
integer |
width, in pixels, of the window. |
x |
integer |
x-coordinate of the upper left corner of the window, relative to its container. |
y |
integer |
y-coordinate of the upper left corner of the window, relative to its container. |
Actions:
Action | Description |
SetVisibility |
one parameter, "is_visible", which is set to 0 or 1 to hide or show the window, respectively. |
ToggleVisibility |
If the window is visible, this closes it. If it is closed, this opens it. |
Open |
Opens the window. If the parameter IsModal is set to 1, then the window becomes modal (only the window's contents are accessible to the user until the window is closed). If the parameter NoClose is set to 1, then the close button in the upper right corner of the window becomes inactive and the window will only close via the Close, SetVisibility, and ToggleVisibility actions. |
Close |
Closes the window. Note that widgets inside the window may choose to veto the Close operation: for example, if there is unsaved data in a form. |
Events:
Event | Description |
Load |
This event is triggered the first time the window is opened. If the window is visible by default, then this event is triggered when the application loads. |
Open |
This event is triggered each time the window is opened (becomes visible). |
Close |
This event is triggered each time the window is closed (becomes invisible). |
Sample Code:
$Version=2$
MyWindow "widget/childwindow"
{
x = 10; y = 10;
width = 200; height = 200;
style = "dialog";
bgcolor = "#c0c0c0";
hdr_background = "/sys/images/grey_gradient2.png";
title = "An HTML Window";
textcolor = "black";
}
Comments...
(none yet)
Add a Comment...
|