Description


Include file: xwindow.h

Overview

XWindow is the base class for several window classes.

Functions

GetBackgroundColor

Parameters

XColor * color buffer to hold data

Remarks

Query the background-color of the window

GetForegroundColor

Parameters

XColor * color buffer to hold data

Remarks

Query the foreground-color of the window

SetBackgroundColor

Parameters

XColor * color the new color

Return-Value

BOOL success

Remarks

Set the foregrund-color of the window

SetForegroundColor

Parameters

XColor * color the new color

Return-Value

BOOL success

Remarks

Set the foregrund-color of the window

~XWindow

Remarks

Destructors of windows are called automaticaly when they are closed. All destructors of child-windows are called too. All handlers registered at the window aredestructed. You can destroy a window by calling the destructor.

GetFontName

Parameters

XString * buffer the name of the font in format "10.Helvetica"

Remarks

Query the font of the window

SetFont

Parameters

char * fontName the name of the font in format "10.Helvetica"
char * fontName the name of the font
USHORT fontSize the size of the font

Return-Value

BOOL success
BOOL success

Remarks

Set the font of the window
Set the font of the window

Activate

Remarks

Activate the window

Enable

Parameters

BOOL enabe TRUE=enable, FALSE=disable

Remarks

Enable/disable the window

EnableWindowUpdate

Parameters

BOOL enabe TRUE=enable, FALSE=disable window-update

Remarks

Enable/disable window-update

GetWindow

Parameters

ULONG theID ID of the window to find

Return-Value

XWindow * pointer

Remarks

Find a child-window with the given ID

GetWindowID

Return-Value

SHORT theID

Remarks

Query the ID of the window

Invalidate

Parameters

BOOL childs TRUE=childs of the window are invalidated too FALSE=childs are not invalidated

Remarks

Invalidates the window content, it will be redrawn

IsVisible

Return-Value

BOOL result

Remarks

Query if the window is visible or not

QueryWindow

Parameters

ULONG relation relationship:
WIN_PARENT
WIN_NEXT
WIN_PREV
WIN_TOP
WIN_BOTTOM
WIN_OWNER
WIN_PARENT
WIN_NEXTTOP
WIN_PREVTOP

Return-Value

XWindow * pointer

Remarks

Find a window with the given relationship

SetFocus

Return-Value

BOOL result

Remarks

Set the focus to this window

GetPointerHandle

Return-Value

OOL_POINTERHANDLE handle

Remarks

Returns the handle of the actual pointer.

GetPointerPos

Parameters

XPoint * point buffer to hold the datas

Remarks

Returns the position of the pointer

GetSystemPointerHandle

Parameters

LONG theID ID of the needed pointer. Valid values are:
PTR_ARROW
PTR_TEXT
PTR_WAIT
PTR_SIZE
PTR_SIZENWSE
PTR_SIZENESW
PTR_SIZEWE
PTR_SIZENS
PTR_MOVE
PTR_ILLEGAL

BOOL copy If you need a copy of the pointer (to modify it) set copy TRUE, otherwise FALSE.
Default is FALSE.

Return-Value

OOL_POINTERHANDLE handle

Remarks

Returns the handle of the pointer identified by theID.

SetPointer

Parameters

OOL_POINTERHANDLE handle the pointer

Remarks

Set the actual pointer. You can receive a pointer-handle by calling GetSystemPointer() or load a pointer from a resource with XResourceLibrary::LoadIcon.

GetUpdateRect

Parameters

XRect * rect buffer

Remarks

Get the rectangle which should be redrawn

SetSize

Parameters

XRect * rect new size and position

Remarks

Set the size and position of the window

DoMove

Remarks

DoMove informs the application if the window is moved. Override this function if you need this information.

DoSize

Parameters

XSize * size

Remarks

DoSize informs the application if the window is resized. Override this function if you need this information.

GetSize

Parameters

XRect * rect buffer to hold the datas

Remarks

Query the size and position of the window

SetBottom

Remarks

The window is set to the bottom in z-order

SetTop

Remarks

The window is set to the top in z-order

Show

Parameters

BOOL show TRUE=show, FALSE=hide

Remarks

Show/hide the window

GetStyle

Return-Value

ULONG style

Remarks

Query the current style of the window.

SetStyle

Parameters

ULONG style the new syle (depending on the type of window)

Remarks

Set the style of a window

GetText

Parameters

XString * buffer buffer to hold the text

Remarks

Query the text of the window

GetTextLength

Return-Value

LONG length

Remarks

Query the length of the windows text

SetText

Parameters

char * text text to display

Remarks

Set the text of the window

DoCommand

Parameters

LONG theCommandID the ID of the menuitem/toolbar-button

Return-Value

BOOL handled

Remarks

If the user selected a XPopupMenu or if the user pressed a button which is attached to a window, this function is called. To get the ID of the command the user requested, override this function. Return TRUE if you have handled the command, otherwise return FALSE. if you return FALSE the command is posted to the owner of this window.

DoControl

Parameters

XControlEvent * pointerOfEvent a pointer to an instance of XControlEvent

Remarks

If the user has done some interaction with a window this function is called. To get information about the event, override this function, the parameter holds information of your interest.


This document was generated by Jens von Pilgrim's Autodoc