home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
WCONTROL.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-18
|
6KB
|
193 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. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
/*************************************************************************
*
* WControl
*
*
* Events:
*
* Scroll --
*
*************************************************************************/
#ifndef _WCONTROL_HPP_INCLUDED
#define _WCONTROL_HPP_INCLUDED
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,8);
#pragma enum int;
#endif
#ifndef _WWINDOW_HPP_INCLUDED
# include "wwindow.hpp"
#endif
//
// Control styles
//
#define WCCSTop ((WStyle)0x00000001L) // CCS_TOP
#define WCCSNoMoveY ((WStyle)0x00000002L) // CCS_NOMOVEY
#define WCCSBottom ((WStyle)0x00000003L) // CCS_BOTTOM
#define WCCSNoResize ((WStyle)0x00000004L) // CCS_NORESIZE
#define WCCSNoParentAlign ((WStyle)0x00000008L) // CCS_NOPARENTALIGN
#define WCCSAdjustable ((WStyle)0x00000020L) // CCS_ADJUSTABLE
#define WCCSNoDivider ((WStyle)0x00000040L) // CCS_NODIVIDER
enum WTextJustification {
WAliLeft,
WTJCenter,
WTJRight
};
enum WVTextJustification {
WVTJTop,
WVTJCenter,
WVTJBottom
};
struct WScrollBarEventData;
class WCMCLASS WControl : public WWindow {
WDeclareSubclass( WControl, WWindow );
public:
/**************************************************************
* Constructors and destructors
**************************************************************/
WControl();
protected:
WControl( WWindow * parent, WWindowHandle hdl );
public:
~WControl();
/**************************************************************
* Properties
**************************************************************/
// DeferResizePercentages
WBool GetDeferResizePercentages() const;
WBool SetDeferResizePercentages( WBool deferResizePercentages );
// FDXModified
WBool SetFDXModified( WBool modified ); // WCMINLINE
WBool GetFDXModified() const; // WCMINLINE
// FDXModifiedPointer
WBool SetFDXModifiedPointer( WBool * fdxModified ); // WCMINLINE
// NextControlInGroup
WControl *GetNextControlInGroup() const;
// ResizePercentages
WRect GetResizePercentages() const; // WCMINLINE
WBool SetResizePercentages( const WRect & resizePercentages );
// TabGroup
WBool SetTabGroup( WBool tabGroup );
WBool GetTabGroup() const;
// TabStop
WBool SetTabStop( WBool tabStop );
WBool GetTabStop() const;
/**************************************************************
* Methods
**************************************************************/
// FDXIn
virtual WBool FDXIn();
// FDXOut
virtual WBool FDXOut();
/**************************************************************
* Event Handlers
**************************************************************/
WBool ControlColorEventHandler( WControl * control,
WMessageEventData * event );
WBool DestroyEventHandler( WControl * control, WEventData * event );
/**************************************************************
* Overrides
**************************************************************/
virtual WBool LoadWindow( WWindow * parent,
const WResourceID & id,
WModuleHandle module=_ApplicationModule );
virtual WBool MakeWindow( WWindow * parent, WUInt id,
const WChar * className,
const WChar * title, const WRect & r,
WStyle wstyle, WStyle exStyle,
void * data=NULL );
/**************************************************************
* Other
**************************************************************/
WRect GetPendingResizePercentages() const; // WCMINLINE
WBool SetPendingResizePercentages( const WRect & pendingResizePercentages ); // WCMINLINE
virtual WBool SetParent( const WWindow * parent );
virtual WBool RedirectChildInput();
virtual int operator ==( const WControl & obj ) const;
static WBool InitializeCommonControls();
/**************************************************************
* Data members
**************************************************************/
private:
WBool * _fdxModified;
WRect _resizePercentages;
WRect _pendingResizePercentages;
WBool _deferResizePercentages;
};
#ifdef WCM_ENABLE_INLINES
#ifndef WCM_NO_WCONTROL_INLINES
#define WCMINLINE inline
#include "wcontrol.inl"
#endif
#endif
extern template WVector<WControl>;
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif // _WCONTROL_HPP_INCLUDED