DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Attributes
GUI::TransientWindow Class Reference

A floating temporary window that is not restricted by it's parent's area. More...

#include <gui_tk.h>

Inheritance diagram for GUI::TransientWindow:
GUI::Window GUI::Window_Callback GUI::ToplevelWindow_Callback GUI::Menu

List of all members.

Public Member Functions

virtual void focusChanged (bool gained)
 Handle automatic hiding.
void windowClosed (ToplevelWindow *win)
 Handle automatic delete.
bool windowClosing (ToplevelWindow *win)
 No-op.
 TransientWindow (Window *parent, int x, int y, int w, int h)
 Create a transient window with given position and size.
virtual void move (int x, int y)
 Move this window to the given position relative to the parent window's origin.
virtual int getX () const
 Return this window's X position relative to the parent's top left corner.
virtual int getY () const
 Return this window's Y position relative to the parent's top left corner.
virtual void setVisible (bool v)
 Show or hide this window.
virtual void windowMoved (Window *src, int x, int y)
 Called whenever this window changes position.
virtual bool raise ()
 Put window on top of all other windows without changing their relative order.

Protected Attributes

Windowrealparent
 The true parent window.
int relx
 User selected position relative to logical parent.
int rely

Detailed Description

A floating temporary window that is not restricted by it's parent's area.

They have a parent which displays them, but that parent is not their real parent in the window hierarchy: They are always top-level elements, thus they are not clipped to their logical parent's area, they can freely overlay any part of the screen. As another consequence, they are not automatically deleted when their logical parent is deleted.

You should observe the following points:

Definition at line 1688 of file gui_tk.h.


Constructor & Destructor Documentation

GUI::TransientWindow::TransientWindow ( Window parent,
int  x,
int  y,
int  w,
int  h 
) [inline]

Create a transient window with given position and size.

parent is the logical parent. The true parent object is always the screen the logical parent resides on.

Definition at line 1718 of file gui_tk.h.

References GUI::Window::addWindowHandler(), GUI::Window::getParent(), and realparent.


Member Function Documentation

virtual void GUI::TransientWindow::move ( int  x,
int  y 
) [inline, virtual]

Move this window to the given position relative to the parent window's origin.

If that would move part of the window outside of this window's area, the outside area will silently be clipped while drawing.

Reimplemented from GUI::Window.

Definition at line 1742 of file gui_tk.h.

References GUI::Window::getScreenX(), GUI::Window::getScreenY(), realparent, relx, GUI::Window::x, and GUI::Window::y.

Referenced by windowMoved().

virtual void GUI::TransientWindow::setVisible ( bool  v) [inline, virtual]

Show or hide this window.

By default, most windows are shown when created. Hidden windows do not receive any events.

Reimplemented from GUI::Window.

Reimplemented in GUI::Menu.

Definition at line 1746 of file gui_tk.h.

Referenced by focusChanged().


The documentation for this class was generated from the following file: