home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
WTOOLTIP.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-11-29
|
5KB
|
181 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. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
/*************************************************************************
*
* WToolTip -- Wrapper for the Windows 95 ToolTip control.
*
* Events:
*
*************************************************************************/
#ifndef _WTOOLTIP_HPP_INCLUDED
#define _WTOOLTIP_HPP_INCLUDED
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,8);
#pragma enum int;
#endif
#ifndef _WCONTROL_HPP_INCLUDED
# include "wcontrol.hpp"
#endif
#ifndef _WWINDOW_HPP_INCLUDED
# include "wwindow.hpp"
#endif
#ifndef _WVECTOR_HPP_INCLUDED
# include "wvector.hpp"
#endif
class WToolTip;
enum WToolTipIdentifierType {
WToolTipWindowHandle,
WToolTipIdentifier
};
enum WToolTipDuration {
WToolTipAutomaticDuration,
WToolTipReshowDuration,
WToolTipAutoPopDuration,
WToolTipInitialDuration,
};
//
// ToolTip styles
//
#define WTOOLTSDefault ((WStyle)0x00000001L) // TTS_ALWAYSTIP
#define WTOOLTSAlwaysTip ((WStyle)0x00000001L) // TTS_ALWAYSTIP
#define WTOOLTSNoPrefix ((WStyle)0x00000002L) // TTS_NOPREFIX
class WCMCLASS WToolTip : public WControl {
WDeclareSubclass( WToolTip, WControl );
public:
/**********************************************************
* Constructors and Destructors
*********************************************************/
WToolTip();
~WToolTip();
/**********************************************************
* Properties
*********************************************************/
// Count
WInt GetCount() const;
// DelayTime
WBool SetDelayTime( WInt milliseconds=500,
WToolTipDuration duration=WToolTipAutomaticDuration );
/**********************************************************
* Methods
*********************************************************/
// Activate
void Activate();
// Add
WBool Add( WWindow * parent, WToolTipIdentifierType type,
const WRect & rect, const char * text=NULL,
WWindow * window=NULL, WLong id=0,
WBool getTextFromParent=FALSE );
// Deactivate
void Deactivate();
// Delete
WBool Delete( WLong itemNumber );
// DeleteAll
WBool DeleteAll();
// Retrieve
WLong Retrieve( const WPoint & pt, WWindow * win=NULL );
/**********************************************************
* Item Properties
*********************************************************/
// ID
void SetID( WLong itemNumber, WLong id );
WLong GetID( WLong itemNumber ) const;
// Parent
WBool SetParent( WLong itemNumber, WWindow * parent );
WWindow * GetParent( WLong itemNumber );
// Rectangle
WBool SetRectangle( WLong itemNumber, const WRect & rect );
WRect GetRectangle( WLong itemNumber );
// Text
WBool SetText( WLong itemNumber, const WString & str );
WString GetText( WLong itemNumber );
// Type
void SetType( WLong itemNumber, WToolTipIdentifierType type );
WToolTipIdentifierType GetType( WLong itemNumber );
// Window
void SetWindow( WLong itemNumber, WWindow * window );
WWindow * GetWindow( WLong itemNumber );
/**********************************************************
* Overrides
*********************************************************/
virtual WBool SetParent( const WWindow * parent );
virtual WWindow * GetParent() const;
virtual WBool SetRectangle( const WRect & rectangle,
WBool update=TRUE );
virtual WRect GetRectangle( WBool absolute=FALSE ) const;
virtual WBool SetText( const WString & text );
virtual WString GetText() const;
virtual const WChar * InitializeClass();
virtual WStyle GetDefaultStyle() const;
virtual WBool CloneWindow( WStyle newStyle, WStyle newExStyle,
void * data=NULL );
};
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif // _WTOOLTIP_HPP_INCLUDED