home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 17
/
CD_ASCQ_17_101194.iso
/
vrac
/
ve2tv103.zip
/
TMSGVIEW.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-07-31
|
2KB
|
86 lines
// File : TMSGVIEW.H
// Author : Eric Woodruff, CIS ID: 72134,1150
// Updated : Sun 07/31/94 15:56:28
// Note : Copyright 1994, Eric Woodruff, All rights reserved
// Compiler: Borland C++ 3.1 to 4.02
//
// Header file for the message viewer window.
//
const
cmPrevMsg = 230, // Shouldn't interfere with anything else.
cmNextMsg = 231; // Can be disabled when viewer is closed.
#if defined(Uses_TMsgViewWindow)
#if !defined(Uses_TListViewer) || !defined(Uses_TWindow)
#define Uses_TWindow
#define Uses_TListViewer
#include <tv.h>
#endif
struct TMessage
{
// All members public by default.
long Line; // Line number in the source file.
char MsgEntry[250]; // Message text.
};
//
// Message list viewer
// Palette Layout:
// 1 = Normal text (active)
// 2 = Normal text (passive)
// 3 = Focused text (active)
// 4 = Focused text (passive)
//
class TMsgListViewer : public TListViewer
{
private:
TNSCollection *Msgs;
public:
TMsgListViewer(const TRect &bounds, TScrollBar *aHScrollBar,
TScrollBar *aVScrollBar);
virtual TPalette &getPalette() const;
virtual void handleEvent(TEvent& event);
virtual void setState(ushort aState, Boolean enable);
virtual void getText(char *dest, short item, short maxLen);
void insertMsg(long Line, char *Message);
};
//
// Message list window
// Palette Layout:
// 1 = Frame passive
// 2 = Frame active
// 3 = Frame icons
// 4 = Scrollbar page
// 5 = Scrollbar controls
// 6 = List normal text
// 7 = List focused text (active)
// 8 = List focused text (passive)
//
class TMsgViewWindow : public TWindow // Define a new window class
{
private:
TMsgListViewer *msgList;
public:
Boolean isValid;
TMsgViewWindow(const TRect &r, const char *aTitle);
~TMsgViewWindow();
virtual TPalette &getPalette() const;
virtual Boolean valid(ushort command);
// virtual void close(); // Never really closed, just hidden.
inline void insertMsg(long Line, char *Text)
{ msgList->insertMsg(Line, Text); }
};
#endif