home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
ITEXTCTL.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
6KB
|
109 lines
#ifndef _ITEXTCTL_
#define _ITEXTCTL_
/*******************************************************************************
* FILE NAME: itextctl.hpp *
* *
* DESCRIPTION: *
* Declaration of the class(es): *
* ITextControl - This is an abstract base class for all text control *
* window classes. *
* *
* COPYRIGHT: *
* Licensed Materials - Property of IBM *
* (C) Copyright IBM Corporation 1992, 1993 *
* All Rights Reserved *
* US Government Users Restricted Rights - Use, duplication, or disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*******************************************************************************/
#ifndef _ICONTROL_
#include <icontrol.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
// Forward declarations for other classes:
class IResourceId;
class ISize;
class IString;
class ITextControl : public IControl {
typedef IControl
Inherited;
/*******************************************************************************
* The ITextControl class is an abstract base class for all text control *
* window classes. It provides operations to manipulate text strings. *
*******************************************************************************/
public:
/*-------------------------- Constructor/Destructor ----------------------------
| An instance of this class cannot be constructed. |
------------------------------------------------------------------------------*/
ITextControl ( );
virtual
~ITextControl ( );
/*-------------------------------- Accessors -----------------------------------
| These functions provide a means of getting and setting the accessible |
| attributes of instances of this class: |
| setText - Sets the control window text. |
| text - Returns the control window text. |
| textLength - Returns the current length of the control window text, in |
| bytes. |
------------------------------------------------------------------------------*/
virtual ITextControl
&setText ( const char* text ),
&setText ( const IResourceId& text );
virtual IString
text ( ) const;
virtual unsigned long
textLength ( ) const;
/*--------------------------- Clipboard Operations -----------------------------
| clipboardHasTextFormat - Queries whether the clipboard is in text format. |
------------------------------------------------------------------------------*/
Boolean
clipboardHasTextFormat ( ) const;
/*----------------------------- Window Painting --------------------------------
| This function provides a means of updating the window: |
| displaySize - Returns the width and height of the rectangle that encloses |
| the string when it is displayed on the window's presentation |
| space. This function takes into account the font attribute |
| of the presentation space, including a sheared or rotated |
| string. This function also supports double-byte character |
| set (DBCS) characters. |
| |
| If a string is not given, the control's text rectangle size |
| is returned. |
------------------------------------------------------------------------------*/
ISize
displaySize ( const char* text = 0 ) const;
/*-------------------------------- Overrides -----------------------------------
| This class overrides the following protected function: |
| setLayoutDistorted - Treats a font change like a minimum size change. |
------------------------------------------------------------------------------*/
virtual ITextControl
&setLayoutDistorted ( unsigned long layoutAttributeOn,
unsigned long layoutAttributeOff );
private:
/*--------------------------------- Private ----------------------------------*/
ITextControl ( const ITextControl& );
ITextControl
&operator= ( const ITextControl& );
}; // class ITextControl
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif // _ITEXTCTL_