Index

XFrameWindow

XWindow &rarrXFrameWindow


public
  • DoControl
  • GetHandle
  • GetWindow
  • QueryForClose
  • QueryProcess
  • SetClient
  • SetIcon
  • static long defaultClientStyle
  • static long defaultDialogStyle
  • static long defaultStyle
  • constructors/destructors
  • XFrameWindow
  • ~XFrameWindow
  • display a window
  • Activate
  • Hide
  • SetBottom
  • SetTop
  • Show
  • ShowModal
  • displaying a window
  • Enable
  • InitMenu
  • drawing a window
  • Draw
  • EnableWindowUpdate
  • FillBackground
  • SetBackgroundColor
  • sizing of a window
  • GetClientSize
  • GetSize
  • SetSize
  • text input/output
  • GetText
  • SetText
  • user input
  • DoCommand


  • Derrived

    : public XWindow

    public

    DoControl

    Definition

    void DoControl ( XControlEvent* )

    virtual void DoControl ( XControlEvent* )

    Returns

    void

    GetHandle

    GetHandle returns the window-handle defined by the operating system. The handle is different from the ID of the window and the pointers used by the OOL. In XFrameWindow the function returns: 1. if you have set a client window with function SetClient() the handle of the client 2. if the XFrameWindow displays a resource-defined window, the resource window handle is returned 3. on default, the handle of the client-rect is returned

    Definition

    OOL_WINDOWHANDLE GetHandle ( )

    Parameters

    : -

    Returns

    OOL_WINDOWHANDLE

    OOL_WINDOWHANDLE theSystemHandle

    GetWindow

    With GetWindow you can get a pointer of a window wich is created when the XFrameWindow is constructed with a resource template. Also you can get a pointer to windows which are created dynamicaly if you have specified an ID in the constructors of these windows. In this case you donīt need to store the pointers in your program.

    Definition

    XWindow* GetWindow ( ULONG id )

    Parameters

    : ULONG theWindowID the ID of the client window

    Returns

    XWindow*

    XWindow * thePointer the pointer to the window you have asked for. If you know the type of the window, you can make a typcast to the needed class.

    QueryForClose

    If the user try to close a XFrameWindow this function is called. If you want to check if the window can be closed or not or to perform a security-check (for example with XMessageBox), override this function. This function is not called if you destroy the window with delete.

    Definition

    BOOL QueryForClose ( void )

    virtual BOOL QueryForClose ( void )

    Parameters

    : -

    Returns

    BOOL

    BOOL canBeClosed return TRUE if the window can be closed, otherwise return FALSE

    QueryProcess

    returns a pointer to the owning process (XApplication or XThread) of this window.

    Definition

    XProcess* QueryProcess ( void )

    Returns

    XProcess*

    SetClient

    SetClient is used to set a window, for example a control like a XMultiLineEdit, as a clientwindow of the XFrameWindow so sizing, moving and painting is automaticaly done.

    Definition

    void SetClient ( XWindow* c )

    Parameters

    : XWindow * theNewClient

    Returns

    void

    -

    SetIcon

    Set the icon which is displayed in the button of the system menu.

    Definition

    void SetIcon ( LONG iconHandle )

    Parameters

    : OOL_ICONHANDLE theNewIcon

    Returns

    void

    -

    static long defaultClientStyle

    static long defaultDialogStyle

    static long defaultStyle

    constructors/destructors

    XFrameWindow

    construct a frame-window Note that destructors of windows are called automaticaly when a window is closed! (see ~XFrameWindow)

    Definition

    XFrameWindow ( XResource* id, const char* title, ULONG style, XRect* rec, XFrameWindow* parent, BOOL build )

    XFrameWindow ( XResource* resource, const char* title =NULL, ULONG createstyle = defaultStyle, XRect* rec = NULL, XFrameWindow* parent=NULL, BOOL buildFromResources = FALSE )

    Parameters

    : XResource * theResourceID   a XResource contains two informations, an ID and a pointer
                                            to a XResourceLibrary. If you want to create a window out of
                                            a resourcefile you must specify the ID (otherwise it can be zero)
                                            and the XResourceLibrary which contains the window-resource.
                                            The window which is created always belongs to the process who
                                            owns the resource library, so if you work with multiple processes
                                            every process must have its own resource library.
                char * theTitle             The title of the window which is displayed in the titlebar
                ULONG theStyleofWindow      You can specify the style of the window with the following defines,
                                            which can be or-ed:

    FRM_TITLEBAR the window gets a titlebar FRM_SYSMENU the window gets the system menu FRM_MINBUTTON the titlebar get a button to minimize the window FRM_MAXBUTTON the titlebar get a button to maximize the window

    FRM_CENTER the window is created in the midle of the workplace

    FRM_SIZEBORDER the windowsize can be changed by the user FRM_DIALOGBORDER the window gets a thick border FRM_BORDER the window gets a thin border

    FRM_TASKLIST the window is displayed in the tasklist

    FRM_NOMOVEWITHOWNER the window dontīt move when the parent is moved FRM_ICON the window get an icon wich is identified by theResourceID, if the icon is not found in the resource-library, an error ocurses FRM_ACCELTABLE FRM_SYSMODAL the window is displayed system-modal FRM_SCREENALIGN FRM_MOUSEALIGN FRM_HIDEBUTTON FRM_HIDEMAX FRM_AUTOICON

    there are three static member-variables for default styles

    long defaultStyle default setting for a framewindow long defaultClientStyle default setting for windows wich are displayed as a clientwindow of a framewindow long defaultDialogStyle default setting for windows wich are displayed as a dialog

    Default is defaultStyle. XRect * theRectangle On default a window is created with length and hight of zero. Windows which are created with an resource template get the size of the template. Default is NULL. If theRectangle is specified, the window gets the size of it. XFrameWindow * parent If parent is specified the window is a client of the parent. The behavior depends on the styles you have set. Default is NULL. BOOL buildFromResource If this variable is set OOL try to build the window with a resource template which is identified by theResourceID. If the template is not found, an error ocurses. Default is FALSE.

    Returns

    -

    -

    ~XFrameWindow

    Destructors of windows are called automaticaly when the window is closed. The destructor of XFrameWindow calles the destructor of every client window, meus and toolbars. Also the destructors of handlers (derived classes of XHandler) which are attached with it are called. If the last XFrameWindow of a process is closed, the process will terminate. If you want to close a window yourself, destruct the window with delete.

    Definition

    ~XFrameWindow ( )

    virtual ~XFrameWindow ( )

    Parameters

    : -

    Returns

    -

    -

    display a window

    Activate

    The window will be activated.

    Definition

    void Activate ( void )

    Parameters

    : -

    Returns

    void

    -

    Hide

    Hide the window

    Definition

    void Hide ( void )

    Parameters

    : -

    Returns

    void

    -

    SetBottom

    Set the window to the bottom (in z-order)

    Definition

    void SetBottom ( void )

    Parameters

    : -

    Returns

    void

    -

    SetTop

    Set the window to the top (in z-order)

    Definition

    void SetTop ( void )

    Parameters

    : -

    Returns

    void

    -

    Show

    Displayes a window. The window wil be activated an be shown at the topmost position (in z-order). If the window is minimized the old position and size will be restored.

    Definition

    void Show ( void )

    Parameters

    : -

    Returns

    void

    -

    ShowModal

    ShowModal displays a window modal for another window which is specified in the first parameter, that means that the user cannot perform any input with the specified window. WARNING: you should only use this function for windows which are constructed with a resource template! If you do so the operating system stops with executing the calling code until the window is closed, otherwise the calling code is executed while the window is displayed.

    Definition

    void ShowModal ( XFrameWindow* w )

    void ShowModal ( XFrameWindow* )

    Parameters

    : XFrameWindow * theOwnerWindow the window which is disabled until this window is closed

    Returns

    void

    -

    displaying a window

    Enable

    enables/disables a window for user-input

    Definition

    void Enable ( BOOL enable )

    void Enable ( BOOL enable = TRUE )

    Parameters

    : BOOL enable enables/disables the window (default is TRUE)

    Returns

    void

    -

    InitMenu

    If a menu must be initialized this function is called. If you want to setup the menu dynamicaly, override this function.

    Definition

    void InitMenu ( XMenu* )

    virtual void InitMenu ( XMenu* )

    Parameters

    : XMenu * theMenu

    Returns

    void

    -

    drawing a window

    Draw

    This function is called if a window or a part of it must be redrawn. If you use a window which is not created from a resource template or you dontīt have set a client with SetClient(), you must override this function and call FillBackground().

    Definition

    void Draw ( void )

    virtual void Draw ( void )

    Parameters

    : -

    Returns

    void

    -

    EnableWindowUpdate

    This function can stop drawing the window contents until you allow drawing. For complex windows there can be some performance-advantages. WARNING: If you disable drawing of a window and attach a XToolBar to it, the position and size of the toolbar can not set correctly.

    Definition

    void EnableWindowUpdate ( BOOL enable )

    void EnableWindowUpdate ( BOOL enable = TRUE )

    Parameters

    : BOOL enable enable/disable window drawing (default is TRUE)

    Returns

    void

    -

    FillBackground

    FillBackground fills the background in the color you have set with SetBackgroundColor (default is black). Usualy you call this function when you have overridden Draw(). You donīt have to call this function if a resource defined window is displayed or a window is set as client with SetClient().

    Definition

    void FillBackground ( void )

    Parameters

    : -

    Returns

    void

    -

    SetBackgroundColor

    With this function you set the color wich is used to fill the background in FillBackground(). Default color is black.

    Definition

    void SetBackgroundColor ( XColor* col )

    void SetBackgroundColor ( XColor* )

    Parameters

    : XColor * theNewColor

    Returns

    void

    sizing of a window

    GetClientSize

    Definition

    void GetClientSize ( XRect* rect )

    void GetClientSize ( XRect* )

    Returns

    void

    GetSize

    Get the size and position of a window

    Definition

    void GetSize ( XRect* rect )

    Parameters

    : XRect * theSizeAndPosition

    Returns

    void

    -

    SetSize

    Set the size and/or position of a window

    Definition

    void SetSize ( XRect* rect )

    Parameters

    : XRect * theNewSize

    Returns

    void

    -

    text input/output

    GetText

    Definition

    LONG GetText ( XString* buffer )

    Parameters

    : XString * theBuffer theBuffer will contain the title of the window

    Returns

    LONG

    LONG the length of the text

    SetText

    Set the Text which is displayed in the titlebar

    Definition

    void SetText ( const char* buffer )

    Parameters

    : XString * theNewText

    Returns

    void

    -

    user input

    DoCommand

    If the user selected a menuitem (from XMenuBar or XPopupMenu) if the user pressed a button of a toolbar which is attached to it the framewindow, this function is called. To get the ID of the action the user requested, override this function.

    Definition

    void DoCommand ( LONG )

    virtual void DoCommand ( LONG )

    Parameters

    : LONG theCommandID the ID of the menuitem/toolbar-button

    Returns

    void

    -


    Created by AutoDoc, (C) 1996 by Jens von Pilgrim