home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
WMDIPRT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-18
|
6KB
|
166 lines
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (C) 1994, by WATCOM International Inc. All rights %
% reserved. No part of this software may be reproduced or %
% used in any form or by any means - graphic, electronic or %
% mechanical, including photocopying, recording, taping or %
% information storage and retrieval systems - except with the %
% written permission of WATCOM International Inc. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
/*************************************************************************
*
* WMDIParent -- Wrapper for the Windows 95 MDI parent control.
*
* Events:
*
*************************************************************************/
#ifndef _WMDIPRT_HPP_INCLUDED
#define _WMDIPRT_HPP_INCLUDED
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,8);
#pragma enum int;
#endif
#ifndef _WFORM_HPP_INCLUDED
# include "wform.hpp"
#endif
#ifndef _WMDICHLD_HPP_INCLUDED
# include "wmdichld.hpp"
#endif
class WCMCLASS WMDIParent : public WForm {
WDeclareSubclass( WMDIParent, WForm );
friend class WMDIChild;
public:
/**************************************************************
* Constructors
**************************************************************/
WMDIParent();
WMDIParent( WWindow *parent, WWindowHandle hdl );
virtual ~WMDIParent();
/**************************************************************
* Properties
**************************************************************/
// ActiveChild
//
// Returns the currently active MDI child. Can optinally
// return whether or not the child is maximized.
WMDIChild *GetActiveChild( WBool *maximized=NULL );
// WindowMenu
//
// Sets the special window menu that MDI will update
// automatically when child windows are created.
WMenu *GetWindowMenu() const;
WBool SetWindowMenu( WMenu *menu );
/**************************************************************
* Methods
**************************************************************/
// ActivateNext
//
// Activates the next MDI child window from the given window.
// If NULL is passed, uses the currently active window.
WBool ActivateNext( WMDIChild *child=NULL );
// ActivatePrevious
//
// Activates the next MDI child window from the given window.
// If NULL is passed, uses the currently active window.
WBool ActivatePrevious( WMDIChild *child=NULL );
// ArrangeMinimized
//
// Arrange minimized child windows.
WBool ArrangeMinimized();
// Cascade
//
// Cascade the children.
WBool Cascade( WBool cascadeDisabledChildren=FALSE );
// Tile
//
// Tile the children.
WBool Tile( WBool horizontal=TRUE,
WBool tileDisabledChildren=FALSE );
// UpdateWindowMenu
//
// Redraw the window menu.
WBool UpdateWindowMenu();
/**************************************************************
* Message processing
**************************************************************/
virtual WBool DefaultProcess( const WMessage & msg,
WLong & returns );
/**************************************************************
* Others
**************************************************************/
virtual int operator==( const WMDIParent & obj ) const;
virtual int operator!=( const WMDIParent & obj ) const;
virtual WBool MakeWindow( WWindow * parent, WUInt id,
const WChar * className,
const WChar * title, const WRect & r,
WStyle style, WStyle exStyle,
void * data=NULL );
virtual WBool FilterMessage( WMessage & msg, WBool & eatMessage );
/**************************************************************
* Overrides
**************************************************************/
virtual WBool Destroy();
virtual WMenu *GetMenu() const;
virtual WBool SetMenu( WMenu *menu );
/**************************************************************
* Event handlers
**************************************************************/
WBool DefaultEventHandler( WWindow * window, WEventData * event );
/**************************************************************
* Data members
**************************************************************/
private:
WWindowHandle _clientHandle;
WWindow * _client;
WMenu * _windowMenu;
WRect _originalClient;
};
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif // _WMDIPRT_HPP_INCLUDED