#include <LgiClasses.h>
Inheritance diagram for GWindow:
Public Member Functions | |
virtual void | Pour () |
Lays out the child views into the client area. | |
GMenu * | GetMenu () |
Returns the current menu object. | |
void | SetMenu (GMenu *m) |
Set the menu object. | |
bool | GetQuitOnClose () |
Gets the "quit on close" setting. | |
void | SetQuitOnClose (bool i) |
Sets the "quit on close" setting. | |
GWindowZoom | GetZoom () |
Gets the current zoom setting. | |
void | SetZoom (GWindowZoom i) |
Sets the current zoom. | |
void | Raise () |
Raises the window to the top of the stack. | |
void | OnPosChange () |
Called when the view position changes. | |
int | OnEvent (GMessage *Msg) |
Called to process every message received by this window. | |
void | OnPaint (GSurface *pDC) |
Called to paint the onscreen representation of the view. | |
bool | OnRequestClose (bool OsShuttingDown) |
Called on a top level window when something requests to close the window. | |
bool | Visible () |
true if the view is visible | |
void | Visible (bool i) |
Hides/Shows the view. | |
bool | RegisterHook (GView *Target, int EventType, int Priority=0) |
bool | UnregisterHook (GView *Target) |
Unregisters a hook target. | |
virtual void | OnZoom (GWindowZoom Action) |
Called when the window zoom state changes. | |
virtual void | OnTrayClick (GMouse &m) |
Called when the tray icon is clicked. (if present). | |
virtual void | OnReceiveFiles (List< char > &Files) |
Called when files are dropped on the window. | |
bool | Attach (GView *p) |
Attaches the view to a parent view. | |
OsWindow | WindowHandle () |
Returns the OS handle of the top level window. | |
bool | Name (char *n) |
Sets the utf-8 text associated with this view. | |
char * | Name () |
Returns the utf-8 text associated with this view. | |
GRect & | GetPos () |
Get the position of the view relitive to it's parent. | |
bool | SetPos (GRect &p, bool Repaint=false) |
Set the position of the view in terms of it's parent. | |
GRect & | GetClient () |
Get the client region of the window relitive to itself (ie always 0,0-x,y). | |
void | OnChildrenChanged (GView *Wnd, bool Attaching) |
Called when the contents of the Children list have changed. | |
void | OnCreate () |
The view is attached. | |
Protected Attributes | |
GView * | _Default |
The default button. | |
GMenu * | Menu |
The menu on the window. | |
Friends | |
class | GView |
class | GButton |
|
Attaches the view to a parent view. Each GView starts in an un-attached state. When you attach it to a Parent GView the view gains a OS-specific handle and becomes visible on the screen (if the Visible() property is TRUE). However if a view is inserted into the Children list of a GView and it's parent pointer is set correctly it will still paint on the screen without the OS knowing about it. This is known in Lgi as a "virtual window" and is primarily used to cut down on windowing resources. Mouse clicks are handled by the parent window and passed down to the virtual children. Virtual children are somewhat limited. They can't receive focus, or participate in drag and drop operations. If you want to see an example have a look at the GToolBar code. Reimplemented from GView. |
|
Sets the utf-8 text associated with this view. Name and NameW are interchangable. Using them in any order will convert the text between utf-8 and wide to satify any requirement. Generally once the opposing version of the string is required both the utf-8 and wide copies of the string remain cached in RAM until the Name is changed. Reimplemented from GView. |
|
Registers a watcher to receive OnView... messages before they are passed through to the intended recipient.
|
|
Sets the "quit on close" setting. When this is switched on the application will quit the main message loop when this GWindow is closed. This is really useful for your main application window. Otherwise the UI will disappear but the application is still running. |