home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
IOC
/
HELLO4
/
ADIALOG4.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-07
|
7KB
|
103 lines
#ifndef _ADIALOG4_
#define _ADIALOG4_
/*****************************************************************************
* HELLO WORLD SAMPLE PROGRAM - Version 4: ATextDialog Class (adialog4.hpp) *
* *
* COPYRIGHT: Copyright (C) International Business Machines Corp., 1992,1995. *
* *
* DISCLAIMER OF WARRANTIES: *
* The following [enclosed] code is sample code created by IBM *
* Corporation. This sample code is not part of any standard IBM product *
* and is provided to you solely for the purpose of assisting you in the *
* development of your applications. The code is provided "AS IS", *
* without warranty of any kind. IBM shall not be liable for any damages *
* arising out of your use of the sample code, even if they have been *
* advised of the possibility of such damages. *
*****************************************************************************/
//NOTE: WE RECOMMEND USING A FIXED-SPACE FONT TO LOOK AT THE SOURCE.
#ifndef _IFRAME_ //V4
#include <iframe.hpp> //Include IFrameWindow class header V4
#endif //V4
#ifndef _ICMDHDR_ //V4
#include <icmdhdr.hpp> //Include ICommandHandler class header V4
#endif //V4
#ifndef _ISTRING_ //V4
#include <istring.hpp> //Include IString class header V4
#endif //V4
#ifndef _IMCELCV_ //V4
#include <imcelcv.hpp> //Include IMultiCellCanvas class header V4
#endif //V4
#ifndef _ISTATTXT_ //V4
#include <istattxt.hpp> //Include IStaticText class header V4
#endif //V4
#ifndef _IENTRYFD_ //V4
#include <ientryfd.hpp> //Include IEntryField class header V4
#endif //V4
#ifndef _ISETCV_ //V4
#include <isetcv.hpp> //Include ISetCanvas class header V4
#endif //V4
#ifndef _IPUSHBUT_ //V4
#include <ipushbut.hpp> //Include IPushButton class header V4
#endif //V4
//Forward declarations for other classes:
class AHelloWindow; //V4
class ATextDialog; //V4
/************************************************************************** V4
* Class: ADialogCommandHandler * V4
* * V4
* Purpose: New Command Handler class that handles commands * V4
* specifically for ADialogWindow class windows. * V4
* * V4
**************************************************************************/ //V4
class ADialogCommandHandler : public ICommandHandler { //V4
public: //V4
ADialogCommandHandler(ATextDialog *dialogFrame); //V4
virtual ~ADialogCommandHandler() { } //V4
protected: //V4
/*------------------------ Override Command Function ---------------------| V4
| The command function is called to handle application command events. | V4
|------------------------------------------------------------------------*/ //V4
virtual Boolean //V4
command(ICommandEvent& cmdEvent); //V4
private: //V4
ATextDialog *frame; //V4
};
/************************************************************************** V4
* Class: ATextDialog * V4
* * V4
* Purpose: Dialog Window class for C++ Hello World sample application. * V4
* It is derived from IFrameWindow class. * V4
* * V4
**************************************************************************/ //V4
class ATextDialog : public IFrameWindow //V4
{ //V4
public: //V4
ATextDialog(IString & textString, IWindow * ownerWnd); //V4
virtual ~ATextDialog(); //Destructor for this class V4
virtual ATextDialog //V4
&setTextFromEntryField(); //V4
private: //V4
IString &saveText; //V4
IMultiCellCanvas clientCanvas; //V4
IStaticText statText; //V4
IEntryField textField; //V4
ISetCanvas buttons; //V4
IPushButton pushButton1, //V4
pushButton2; //V4
ADialogCommandHandler dialogCommandHandler; //V4
ATextDialog(const ATextDialog&); //Default copy constructor V4
ATextDialog //V4
&operator=(const ATextDialog&); //Default assignment operator V4
}; //V4
#endif //V4