home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
TUTORIAL
/
DEBUGGER
/
MCELCV
/
AMCELCV.HPP
< prev
next >
Wrap
Text File
|
1993-03-09
|
4KB
|
78 lines
#ifndef AMCELCV_HPP
#define AMCELCV_HPP
/******************************************************************************/
/* Canvas Classes Example 3 - Multi Cell 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 <ipushbut.hpp> // IPushButton
#include <iradiobt.hpp> // IRadioButton
#include <icheckbx.hpp> // ICheckBox
#include <imcelcv.hpp> // IMultiCellCanvas
#include <icmdhdr.hpp> // ICommandHandler
class AMultiCellCanvas; // forward declaration of class
/******************************************************************************/
/* Class : APushButtonHandler */
/* */
/* Purpose : this is the command handler for the push button */
/* the push button handler uses the displayButtonStatus function */
/* from the multi-cell canvas when the button is pressed */
/* APushButtonHandler is derived from ICommandHandler */
/******************************************************************************/
class APushButtonHandler : public ICommandHandler
{
public:
APushButtonHandler() : window(0) {;}
setOwnerWindow(AMultiCellCanvas *pmcellcv) { window = pmcellcv; }
protected:
command( ICommandEvent& evt );
private:
AMultiCellCanvas * window;
};
/******************************************************************************/
/* Class : AMultiCellCanvas */
/* */
/* Purpose : main window for multi cell canvas sample application */
/* the window contains a multi-cell canvas and the other controls */
/* are attached to the canvas. The pushbutton displays a */
/* message box showing the current state of the buttons */
/* AMultiCellCanvas is derived from IFrameWindow */
/******************************************************************************/
class AMultiCellCanvas : public IFrameWindow
{
public:
AMultiCellCanvas(unsigned long windowId);
AMultiCellCanvas&
displayButtonStatus();
private:
IMultiCellCanvas clientCanvas;
IStaticText status,
title1,
title2;
ICheckBox check1,
check2;
IRadioButton radio1,
radio2;
IPushButton pushButton;
APushButtonHandler pushButtonHandler;
};
#endif