home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
IOC
/
HELLO3
/
AHELLOW3.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-07
|
7KB
|
102 lines
#ifndef _AHELLOW3_
#define _AHELLOW3_
/*****************************************************************************
* HELLO WORLD SAMPLE PROGRAM - Version 3: Class Header (ahellow3.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_ //V2
#include <iframe.hpp> //Include IFrameWindow class header V2
#endif //V2
#ifndef _ISTATTXT_ //V2
#include <istattxt.hpp> //Include IStaticText class header V2
#endif //V2
#ifndef _IINFOA_ //V2
#include <iinfoa.hpp> //Include IInfoArea class header V2
#endif //V2
#ifndef _IMENUBAR_ //V3
#include <imenubar.hpp> //Include IMenuBar class header V3
#endif //V3
#ifndef _ICMDHDR_ //V3
#include <icmdhdr.hpp> //Include ICommandHandler class header V3
#endif //V3
//Forward declarations for other classes:
class AHelloWindow; //V3
/************************************************************************** V3
* Class: ACommandHandler * V3
* * V3
* Purpose: New Command Handler class that handles commands * V3
* specifically for AHelloWindow class windows. * V3
* * V3
**************************************************************************/ //V3
class ACommandHandler : public ICommandHandler { //V3
public: //V3
ACommandHandler(AHelloWindow *helloFrame); //V3
virtual ~ACommandHandler() { } //V3
protected: //V3
/*------------------------ Override Command Function ---------------------| V3
| The command function is called to handle application command events. | V3
|------------------------------------------------------------------------*/ //V3
virtual Boolean //V3
command(ICommandEvent& cmdEvent); //V3
private: //V3
AHelloWindow *frame; //V3
}; //V3
/************************************************************************** V2
* Class: AHelloWindow * V2
* * V2
* Purpose: Main Window class for C++ Hello World sample application. * V2
* It is derived from IFrameWindow class. * V2
* * V2
**************************************************************************/ //V2
class AHelloWindow : public IFrameWindow //V2
{ //V2
public: //V2
AHelloWindow(unsigned long windowId); //V2
virtual ~AHelloWindow(); //Destructor for this class v3
/*------------------------ Hello Text Alignment --------------------------| V3
| The following enumeration type is used to specify the alignment of | V3
| text in the hello static text window. | V3
|------------------------------------------------------------------------*/ //V3
enum Alignment //V3
{ //V3
left, center, right //V3
}; //V3
/*---------------------- Hello Static Text Functions ---------------------| V3
| This function is used to change the hello static text window. | V3
| setAlignment - Align the static text horizontally. The text is | V3
| always centered vertically by design. | V3
|------------------------------------------------------------------------*/ //V3
virtual AHelloWindow //V3
&setAlignment(Alignment alignment); //V3
private: //V2
IMenuBar menuBar; //V3
IStaticText statusLine; //V3
IStaticText hello; //V2
IInfoArea infoArea; //V2
ACommandHandler commandHandler; //V3
AHelloWindow(const AHelloWindow&); //Default copy constructor V2
AHelloWindow //V2
&operator=(const AHelloWindow&); //Default assignment operator V2
}; //V2
#endif //V2