home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
VISBUILD
/
CALCULAT
/
CPPOV13
/
ICLRDSP.CPP
< prev
next >
Wrap
Text File
|
1995-05-18
|
2KB
|
56 lines
//****************************************************************************
// IClearDisplay Class - C++ Header File (iclrdsp.hpp) *
// *
// COPYRIGHT: Copyright (C) International Business Machines Corp., 1994,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.
//
#include <istring.hpp>
#include <iwindow.hpp> // IWindow class
#include <icmdhdr.hpp> // ICommandHandler
#ifndef _ITRACE_
#include <itrace.hpp>
#endif
#include "iclrdsp.hpp" // IClearDisplay class header
//***************************************************************************
// Class: IClearDisplay
//
// Purpose: Clears the display values via the ICommandHandler sub class
//
//***************************************************************************
IClearDisplay :: IClearDisplay(IEntryField & theDisplay, IPushButton & theClearPushButton) :
display(theDisplay), clearPushButton(theClearPushButton)
{
}
IClearDisplay :: ~IClearDisplay()
{
}
Boolean IClearDisplay::command(ICommandEvent& cmdEvent)
{
if ( cmdEvent.commandId() == clearPushButton.id() )
{
IFUNCTRACE_DEVELOP();
ITRACE_DEVELOP(" firing connection : Push Button8(clicked), to Entry Field(removeAll)");
try {display.removeAll();}
catch (IException& exc) {};
return (true);
}
else return(false);
}