home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ICLUI.ZIP
/
LISTBOX
/
ALISTBOX.HPP
< prev
next >
Wrap
Text File
|
1993-03-08
|
4KB
|
72 lines
#ifndef ALISTBOX_HPP
#define ALISTBOX_HPP
/******************************************************************************/
/* List Box Sample Program */
/* */
/* 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> // IFrame
#include <icmdhdr.hpp> // ICommandHandler
#include <iwindow.hpp> // IWindow
/******************************************************************************/
/* Class : AExceptionFn */
/* */
/* Purpose : provide a default exception handler class by overriding the */
/* handleException function */
/* It is a subclass of the nested class IWindow::ExceptionFn */
/* */
/******************************************************************************/
class AExceptionFn : public IWindow::ExceptionFn
{
public:
// constructor for class
AExceptionFn(IFrameWindow *frame) : owner(frame) {;}
Boolean
handleException(IException& exception, IEvent& event);
private:
IFrameWindow *owner; // owner of message box
};
/******************************************************************************/
/* Class : AListBox */
/* */
/* Purpose : main window for this example */
/* the window contains a listbox in the client area */
/* an infoarea at the bottom and a static text frame extension */
/* It is a subclass of IFrameWindow and ICommandHandler */
/* */
/******************************************************************************/
class AListBox : public IFrameWindow,
public ICommandHandler
{
public:
AListBox(unsigned long windowId); // constructor for this class
protected:
void setStatus();
Boolean command(ICommandEvent& cmdEvent); // handler command events
private:
IListBox listbox; // client area
IInfoArea infoArea; // infoarea (below client)
IStaticText statusLine; // status line (frame extension at top)
IMenuBar menuBar; // menu bar
AExceptionFn excptHandler; // exception handler
};
#endif