home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
tvme30.zip
/
TMSGVIEW.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-02
|
2KB
|
92 lines
// File : TMSGVIEW.H
// Author : Eric Woodruff, CIS ID: 72134,1150
// Updated : Wed 08/02/95 17:54:19
// Note : Copyright 1994-95, Eric Woodruff, All rights reserved
// Compiler: Borland C++ 3.1 to 4.xx
//
// 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 shutDown(void);
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:
// Window will be hidden instead of closed if this is True.
// If so, you must destroy it manually.
Boolean HideOnClose;
TMsgListViewer *msgList;
public:
Boolean isValid;
TMsgViewWindow(const TRect &r, const char *aTitle,
Boolean HideOnly = False);
~TMsgViewWindow();
virtual TPalette &getPalette() const;
virtual Boolean valid(ushort command);
virtual void close();
inline void insertMsg(long Line, char *Text)
{ msgList->insertMsg(Line, Text); }
};
#endif