Supported Browsers Home   
text_settings_t Previous   
windowevententry_t Next   
Type Definitions Up   

window_t

Declaration

struct window_t {
    int                   x, y;
    size_t                width, height;
    winmng_t              *wm;
    struct window_t       *parent;
    struct window_t       *next, *prev;
    struct window_t       *firstChild, *lastChild;
    windowevententry_t    *eventHandlers;
    void                  *userData;
    windtor_t             dtor;
    painter_t             painter;
    cursor_t              *cursor;
    ibool                 visible;
    long                  flags;
    }

Prototype In

mgraph.h

Description

Window is rectangular area of the screen managed by window manager. Window may contain unlimited number of child windows that are placed inside its area and may themselves contain children. Windows are drawn using a painter callback set with MGL_wmSetWindowPainter and MGL window manager guarantees that the painter never draws anything outside the window's area. Windows may be partially or fully covered by other windows, in which case MGL ensures proper clipping.

MGL contains powerful system for events propagation. Whenever user's action generates an event (e.g. mouse click), it is distributed to the window it belongs (e.g. the window under mouse pointer or the one that captured keyboard).

You can use MGL_wmCreateWindow to create windows.

Members

x

X coordinate of window position

y

Y coordinate of window position

width

Window width

height

Window height

wm

Pointer to window manager that owns the window

parent

Pointer to the parent window

next

Pointer to next sibling window

prev

Pointer to previous sibling window

firstChild

Pointer to the first child window

lastChild

Pointer to the last child window

eventHandlers

Table of event handlers for this window

userData

Arbitrary data pointer for user's needs

dtor

Destructor callback called from MGL_wxDestroyWindow

painter

Painter callback

cursor

Mouse cursor associated with the window

visible

Boolean flag indicating if the window is currently visible

flags

Combination of flags from MGL_wmWindowFlags

 

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com