This class creates a top level window. Based on the Lframe class. The Lframe
class allows the window to support borders, scrollbars, and menubars.
Supports the following attributes:
- :auto_save - applies only to Lwindow objects.
Set to true if you would have the size and position saved in the config
file for reuse the next time the window is opened, this is the default. Set
to false to not save the window’s size and position. You can override
the default by setting :gAutoSavePos in a theme.
- :title - an alias for :text.
- :otype - supports the following values:
- nil is a normal window, this is the default
- :topmost - places this window above all other non-topmost windows
- :modal - places this window above all other windows and all others windows
in the applet are disabled until this window is closed
border,
bwidth,
bwidth_window,
clientH,
clientX,
clientY,
close,
hide,
min_height=,
min_width=,
move,
on_close,
on_enter,
on_escape_key,
on_exit,
on_f1_key,
on_hide,
on_load,
on_move,
on_open,
on_resize,
on_show,
on_unload,
open,
paint_focus?,
parent_window,
prepare,
save,
screenX,
screenY,
show,
text,
text=,
title,
title=,
title_bar_height,
valid_attribute?,
windowX,
windowY,
Support the :auto_save, :title, and
:otype attributes.
Opens the window. Example:
win = Lwindow.new('TestWindow', :width=>200, :height=>100], :text=>'Test popup Window').open
Locana::event_loop # process events until all windows are closes
Sets the minimum width for this object. Forwards the new min_width to the GUI binding.
Sets the minimum height for this object. Forwards the new min_height to the GUI bindings.
Returns the title of the window. If there is a :title attribute, it is
returned. If there is no :title and there is a :text attribute, the :text
attribute is returned. Returns nil if there is no title. Alias for text()
Sets the title of the window. Alias for text=.
Saves the window and all it’s children to the LStore. If store_name does not exist, it will be
created.
- store_name - the filename name of a LStore.
Show the object or makes it visible. This is equivalent to
:object_name.state=nil. Triggers the on_show event.
Hides the object. This is equivalent to :object_name.state=:not_visible.
Triggers the on_hide event.
Returns self. The parent_window of
a window is self. This always needs to returns something because other
methods don’t check for nil.
Returns false because this object does not paint a focus.
Returns the x pixel location of the window relative to the windows left
edge (non-client area).
Returns the y pixel location of the window relative to the windows top edge
(non-client area).
Returns the x pixel location of the window client area relative to the
screens top left edge. This is not the windows x position but the windows
client area x value relative to the screen.
Returns the y pixel location of the windows client area relative to the
screens top left edge. This is not the windows y value but the windows
client area y value relative to the screen.
Returns the x pixel position of the client area of the object relative to
the window’s upper left corner.
Returns the y pixel position of the client area of the object relative to
the window’s upper left corner. Includes the height of the north
border when it exists.
Returns the pixel height of the client area of the object. Takes the height
of the title bar into consideration.
Returns nil because windows don’t support borders.
Returns border width of the native GUI window.
Returns 0. This is used when placing the objects in the one of the four
borders.
The height of the title bar as reported by the GUI Binding.
The outer frame has special needs.
Triggers just as the Lwindow begins the process
of opening. This is called before any attributes are gathered from parents
and themes and before any missing data has been filled in. This event is
only supported for Lwindow objects. Here is the
order of events:
Triggers just after the Lwindow and all
it’s children are fully prepared and ready to open and just before
the Lwindow is opened and displayed. This event
is only supported for Lwindow objects. Here is
the order of events:
Triggers just after the Lwindow and all
it’s children are opened and displayed. Also triggered when show() is
called and when setting :state=nil. This event is only supported for Lwindow objects. Here is the order of events:
Triggers just before the window starts the closing process. Also triggered
when hide() is called and when setting :state = :not_visible. This event is
only supported for Lwindow objects. Here is the
order of events:
Triggers just as the Lwindow begins the process
of closing. You can safely cancel this event by calling raise CancelEvent. This event is only supported for
Lwindow objects. Here is the order of events:
Triggers after the Lwindow and it’s
children have been closed. This event is only supported for Lwindow objects. Here is the order of events:
Cancels the balloon help timer. Triggers the on_enter event for any child object
that needs to get the focus.
Cancels the balloon help timer. Triggers the on_exit event of any child object
with the focus is called first. Also closes any open popup windows.
Track when the window is moved in an internal attribute so the new position
can be saved when the window closes. This is triggered by the GUI when a
window is moved.
Track if the window is resized in an internal attribute so the new size can
be saved when the window closes. This is triggered by the GUI when a window
is resized.
For window objects, the default action is to do nothing.
Retrieves the window’s position from the config file first then
prepares the object. By default, the size and position of windows are
stored in the config file and the window is always reopened where you last
left it. Use :auto_save attribute to disable this feature.
Thank you for taking the time to visit this web page. I trust you found the information contained in this page useful.
Please email any questions, concerns, or issues with this web site to webmaster@sevasoftware.com.
Please remember Seva Software when your company would benefit from an experienced database architect and software engineer.