home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
listpm.zip
/
source
/
list.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-08
|
5KB
|
130 lines
/*
listPM list files under Presentation Manager. Uses Open Class Libarary.
Copyright (C) 1996 Paul Elliott
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Paul Elliott
3987 South Gessner #224
Houston Tx 77063
Paul.Elliott@Hrnowl.LoneStar.Org
*/
#ifndef LIST
#define LIST
#include "listrun.hpp" // parameters of the interface with our caller,
// listmain.
#include "search.hpp" // search dialog.
// all open class libarary needed include files.
#include <ithread.hpp> // uses threads.
#include <iframe.hpp> // frame window
#include <icmdhdr.hpp> // command handler
#include <iclipbrd.hpp> // clipboard.
#include <imle.hpp> // multiline edit.
#include <imsgbox.hpp> // message box.
#include <iexcbase.hpp> // exceptions.
#include <iinfoa.hpp> // info area.
#include <iaccel.hpp> // keyboard accelerator.
#include <ifiledlg.hpp> // file dialog.
#include <ifilehdr.hpp> // file dialog handler.
#include <imenuhdr.hpp> // menu handler.
#include <isubmenu.hpp> // submenus.
#include <ititle.hpp> // title bar.
#include <ifont.hpp> // font
#include <ifontdlg.hpp> // font dialog.
#include <isizehdr.hpp> // Resize handler.
#include <isizeevt.hpp> // resize events.
#include <ihelp.hpp> // help Window.
#include <ihelphdr.hpp> // help window handler.
#include <stdlib.h> // define calls to C libarary
#include <io.h>
/*
* This program is not an object oriented program,
* but a procedural one. Inheritance is used only as required to
* define callbacks required by the interface to open class libaray.
*
* This program displays a window in which the listing of a file can be displayed.
* the user can switch displayed files, display a new file in a new window
* on another thread, control word wrap, and cut selected text to the system
* clippboard.
*/
// Define the main frame window for the program.
// It has attacthed almost all control and call back structures attached.
class ListFrame : public IFrameWindow ,
// following protected handlers define call backs
// required by Open class library.
protected ICommandHandler,
protected IMenuHandler,
protected IResizeHandler,
protected IHelpHandler
{
private:
IString file_displayed; // remember file we are dispalying
IInfoArea info; // info area status block
IMultiLineEdit mle; // multiline editor cleint window.
IAccelerator acc; // key board accelerator,
// works with menu
// resources defined by URE.
ITitle title; // Title for our window.
IHelpWindow help; // is there help for us?
SearchInfo search_dialog; // dialog to get search information.
public:
// return currently displayed file.
IString file(void) const { return file_displayed; };
ListFrame(const IString file); // construct ourselves from filename.
protected:
// command handler, handles all ICommandEvents for our window.
// called when user selects an item or accelerator command.
virtual Boolean command( ICommandEvent& event );
// This menu handler gets control when Word wrap submenu is activated.
// inusres right option is checked.
virtual Boolean menuShowing ( IMenuEvent& event,ISubmenu& submenu);
// resize event handler, catches user resizeing frame window,
// storing new size.
virtual Boolean windowResize(IResizeEvent& evt);
// returns panel id.
virtual Boolean keysHelpId(IEvent& evt);
};
#endif //LIST