home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
IOC
/
HELLO5
/
AEARTHW5.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-07
|
6KB
|
82 lines
#ifndef _AEARTHW5_
#define _AEARTHW5_
/*****************************************************************************
* HELLO WORLD SAMPLE PROGRAM - Version 5: AEarthWindow Header (aearthw5.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 _ISTATTXT_ //V5
#include <istattxt.hpp> //IStaticText class Header V5
#endif //V5
#ifndef _IPAINHDR_ //V5
#include <ipainhdr.hpp> //IPaintHandler class Header V5
#endif //V5
/************************************************************************** V5
* Class: APaintHandler * V5
* * V5
* Purpose: New Paint Handler class that handles requests to repaint * V5
* the static text control containing the graphics of Earth. * V5
* * V5
**************************************************************************/ //V5
class APaintHandler : public IPaintHandler { //V5
public: //V5
virtual ~APaintHandler() { } //V5
protected: //V5
/*--------------------- Override paintWindow Function --------------------| V5
| The paintWindow() function is called to handle repainting of | V5
| the static text window containing the graphics of Earth. | V5
|------------------------------------------------------------------------*/ //V5
virtual Boolean //V5
paintWindow(IPaintEvent&) ; //V5
}; //V5
/************************************************************************** V5
* Class: AEarthWindow * V5
* * V5
* Purpose: Earth window for the C++ Hello World sample application. * V5
* * V5
**************************************************************************/ //V5
class AEarthWindow : public IStaticText //V5
{ //V5
public: //V5
AEarthWindow(unsigned long windowId, //V5
IWindow * parentownerWindow, //V5
const IRectangle& rect=IRectangle()); //V5
virtual ~AEarthWindow(); //V5
/*------------------ Paint the Earth and Stars Functions -----------------| V5
| These functions are called to draw the Earth and stars in a static | V5
| text window. | V5
| paintWorld - Clear the background, draw the Earth and a variable | V5
| number of atmosphere layers, and call paintStars to draw the | V5
| stars. | V5
| paintStars - Draw the stars as graphical points. | V5
|------------------------------------------------------------------------*/ //V5
Boolean //V5
paintWorld(), //V5
paintStars(); //V5
private: //V5
int atmosphereLayers; //V5
IColor spaceColor; //V5
IColor globeColor; //V5
IColor starColor; //V5
APaintHandler paintHandler; //V5
AEarthWindow(const AEarthWindow&); //Default copy constructor V5
AEarthWindow //V5
&operator=(const AEarthWindow&); //Default assignment operator V5
}; //V5
#endif //V5