class PMDIDocWindow: public PTitledWindow

This interactor defines a Multiple Document Interface child window.

Inheritance:


Public Fields

[more]PDim minSize
User size adjustment minimum limits.
[more]PRootMenu* menu
The menu that was last set by SetMenu().

Public Methods

[more]virtual void SetFocusInteractor ( PInteractor * interactor )
Set the child interactor that has the focus in the PTitledWindow or PInteractorLayout.
[more]virtual void SetTitle ( const PString & title )
Set the windows title string.
[more]virtual void OnClose ()
The system calls this whenever the window is being closed.
[more]virtual BOOL Close ()
Close the top level window.
[more]virtual void SetMenu ( PRootMenu * newMenu, BOOL autoDelete = TRUE )
Attach a menu to the top level window.
[more]virtual void UpdateMyCommandSources ()
Scan through all child interactors and if they are a command source, execute their notification function to enable or disable the item.
[more] PMDIDocWindow ( PMDIFrameWindow *parent, const PString & title, int CanDo=CanClose|CanGrow|CanIconify|CanZoom )
Construct a new MDI child document window.
[more]virtual void SetTitle ( const PString & title )
Set the new window title string.

Public

[more] Overrides from class PTitledWindow

Protected Fields

[more]PDim maxSize
User size adjustment maximum limits.
[more]PDim zoomSize
User size adjustment for "zoomed" windows.
[more]PIcon icon
Icon to be used for window.
[more]PInteractor* focusInteractor
Child interactor that gets the focus when this window gets focus.
[more]BOOL deleteMenu
An indication that the menu is to be deleted when the window is destroyed or when a new menu is set for the window

Protected Methods

[more]virtual ~PTopLevelWindow ()
Destroy the top level window, if a menu has been set for the window then it is deleted as well.
[more]PRootMenu* GetMenu () const
Get the currently active menu attached to the top level window.
[more]PSubMenu& GetHelpMenu ()
Get the active menus help sub-menu.
[more]virtual void OnMenuStartSelect ()
Whenever the menu bar is selected and the process of selecting a menu begins, this function is called.
[more]virtual void OnMenuItemSelect ( PMenuItem & item )
Every menu selection will go through this function allowing it to intercept any or all menu selections.
[more]void RedrawMenu ()
Can be used to redraw the menubar after it has been altered

Protected

[more] Member variables
[more] Overrides from class PTitledWindow
[more] New functions for class
[more] Overrides from class PInteractor
[more] Member variables


Documentation

This interactor defines a Multiple Document Interface child window. The document windows are platform dependent in their exact appearance and their relationship with the PMDIFrameWindow that owns them.
ovirtual void SetFocusInteractor( PInteractor * interactor )
Set the child interactor that has the focus in the PTitledWindow or PInteractorLayout.

The interactor set here may not actually have the focus. It is the interactor that will be given the focus if the parent interactor, eg a dialog, is given the focus. The dialog itself never requires the focus directly.

The behaviour here is to save the interactor for return by the GetFocusInteractor() function.

Parameters:
interactor - Interactor that received focus.

ovirtual void SetTitle( const PString & title )
Set the windows title string. This will be updated on the screen immediately (subject to OS constraints).
Parameters:
title - New title for window.

o Iconic
The user resized the window into the "iconic" state.

o Zoomed
The user resized the window into the "zoomed" state.

o Normalised
The user resized the window into the "normal" state, or the window was already in the "normal" state and the window was just dynamically resized by the user using a platform dependent mechanism

ovirtual void OnClose()
The system calls this whenever the window is being closed. There is no way to prevent this action at this point. Override the Close() or AllowClose() functions if you wish to control if the close operation occurs.

The application writer may override this function to do any clean up or state saving operations.

The default action does nothing.

o Member variables

oPDim minSize
User size adjustment minimum limits.

oPDim maxSize
User size adjustment maximum limits.

oPDim zoomSize
User size adjustment for "zoomed" windows.

oPIcon icon
Icon to be used for window.

oPInteractor* focusInteractor
Child interactor that gets the focus when this window gets focus.

ovirtual ~PTopLevelWindow()
Destroy the top level window, if a menu has been set for the window then it is deleted as well. If the application is not in the process of terminating and this top level window was the first created then the application is terminated as well.

o Overrides from class PTitledWindow

ovirtual BOOL Close()
Close the top level window. This overrides the PTitledWindow version and if is the first top level window created, terminates the application.

o New functions for class

ovirtual void SetMenu( PRootMenu * newMenu, BOOL autoDelete = TRUE )
Attach a menu to the top level window.

If the newMenu parameter is NULL then no menu for the top level window is shown.

If the autoDelete parameter is TRUE then the menu will be automatically deleted when the window is destroyed or when another menu is set using SetMenu().

Parameters:
newMenu - New menu bar to attach to the top level window.
autoDelete - Flag for making the top level window responsible for the deletion of the menu object being attached.

oPRootMenu* GetMenu() const
Get the currently active menu attached to the top level window.

Returns:
pointer to windows menu, or NULL if no menu is set.

oPSubMenu& GetHelpMenu()
Get the active menus help sub-menu. The actual placement of the help sub-menu is platform dependent.

The menus constructed by the user do not contain a help menu due to the platform dependence. If the user wishes to alter the help menu, they must use this function to get an object to manipulate. Note that the exact contents of the menu is, again, platform dependent so essentially the only thing that can be done is to append items to the end of the menu.

Returns:
reference to the help sub-menu.

ovirtual void OnMenuStartSelect()
Whenever the menu bar is selected and the process of selecting a menu begins, this function is called. It may be used to enable or disable menu items before they appear.

The default behaviour does nothing.

ovirtual void OnMenuItemSelect( PMenuItem & item )
Every menu selection will go through this function allowing it to intercept any or all menu selections.

The default behaviour to call the call back function attached to the menu item object.

Parameters:
item - Menu item that was selected.

ovoid RedrawMenu()
Can be used to redraw the menubar after it has been altered

o Overrides from class PInteractor

ovirtual void UpdateMyCommandSources()
Scan through all child interactors and if they are a command source, execute their notification function to enable or disable the item.

The behaviour here is to call PInteractor::UpdateCommandSources() for the menu bar and then all child interactors.

This function is used internally by the library. It would normally not be called directly.

o Member variables

oPRootMenu* menu
The menu that was last set by SetMenu().

oBOOL deleteMenu
An indication that the menu is to be deleted when the window is destroyed or when a new menu is set for the window

o PMDIDocWindow( PMDIFrameWindow *parent, const PString & title, int CanDo=CanClose|CanGrow|CanIconify|CanZoom )
Construct a new MDI child document window. The MDI child window has the same basic capabilities as a PTopLevelWindow as defines by the common ancestor. These define the attributes of a full overlapped window.
Parameters:
parent - Owner MDI frame window.
title - Initial title for child window.
CanDo - Titled window flags.

o Overrides from class PTitledWindow

ovirtual void SetTitle( const PString & title )
Set the new window title string. This will be updated on the screen immediately (subject to OS constraints). It will also update the window list menu to reflect the new window title.
Parameters:
title - New title for MDI child window.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.