home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
IOC
/
SETCV
/
ASETCV.HPP
< prev
next >
Wrap
Text File
|
1995-04-04
|
4KB
|
76 lines
#ifndef ASETCV_HPP
#define ASETCV_HPP
/******************************************************************************/
/* Canvas Classes Example 2 - Set Canvas */
/* */
/* COPYRIGHT: Copyright (C) International Business Machines Corp., 1992,1993. */
/* */
/* 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 */
/******************************************************************************/
#include <iframe.hpp> // IFrameWindow
#include <istattxt.hpp> // IStaticText
#include <iradiobt.hpp> // IRadioButton
#include <isetcv.hpp> // ISetCanvas
#include <isplitcv.hpp> // ISplitCanvas
#include <iselhdr.hpp> // ISelectHandler
/******************************************************************************/
/* Class : AButtonHandler */
/* */
/* Purpose : this is the select handler for the radio buttons. */
/* The button handler is called when a radio button is selected. */
/* It displays the number of the button in the static text that */
/* is given to it using useInfoArea member function. */
/* AButtonHandler is derived from ISelectHandler */
/******************************************************************************/
class AButtonHandler : public ISelectHandler
{
public:
AButtonHandler() : output(0) {;}
AButtonHandler
&useStatus(IStaticText * pstatus) { output = pstatus; return *this; };
protected:
Boolean
selected( IControlEvent& evt );
private:
IStaticText
*output;
};
/******************************************************************************/
/* Class : ASetCanvas */
/* */
/* Purpose : main window for set canvas sample */
/* the window has a split canvas as the client area. */
/* Three other controls are added to the split canvas. A static */
/* text control is added in the top pane, the lower two panes */
/* contain set canvases. */
/* ASetCanvas is derived from IFrameWindow */
/******************************************************************************/
class ASetCanvas : public IFrameWindow
{
public:
ASetCanvas(unsigned long windowId); // constructor
~ASetCanvas(); // destructor
private:
ISplitCanvas clientCanvas;
IStaticText status;
ISetCanvas vSetCanvas,
hSetCanvas;
IRadioButton * radiobut[NUMBER_OF_BUTTONS];
AButtonHandler buttonHandler;
};
#endif