#ifndef __TGMrbMessageViewer_h__
#define __TGMrbMessageViewer_h__
#include "Rtypes.h"
#include "TSystem.h"
#include "TGWindow.h"
#include "TGFrame.h"
#include "TGTextView.h"
#include "TMrbLogger.h"
#include "TMrbLofNamedX.h"
#include "TGMrbTextButton.h"
class TGMrbMessageViewer: public TGTransientFrame {
public:
enum EGMrbViewerId {
kGMrbViewerIdReset,
kGMrbViewerIdAll,
kGMrbViewerIdErrors,
kGMrbViewerIdAdjust,
kGMrbViewerIdClose
};
public:
TGMrbMessageViewer(const TGWindow * Parent, const TGWindow * Main,
const Char_t * Title,
UInt_t Width, UInt_t Height,
TMrbLogger * MsgLog = NULL,
Bool_t Connect = kFALSE,
const Char_t * File = NULL);
~TGMrbMessageViewer() {};
Int_t AddEntries(UInt_t Type = TMrbLogMessage::kMrbMsgAny, Int_t Start = 0, Bool_t WithDate = kTRUE);
virtual Bool_t Notify();
void ActionButtonPressed(Int_t FrameId, Int_t Button);
inline UInt_t Enable(UInt_t Bits) { fEnabled |= Bits; return(fEnabled); };
inline UInt_t Disable(UInt_t Bits) { fEnabled &= ~Bits; return(fEnabled); };
inline void SetWithDate(Bool_t WithDate) { fWithDate = WithDate; };
inline void Help() { gSystem->Exec(Form("mrbHelp %s", this->ClassName())); };
protected:
TList fHeap;
UInt_t fWidth;
UInt_t fHeight;
UInt_t fEnabled;
Bool_t fWithDate;
TMrbLogger * fMsgLog;
TString fLogFile;
TGTextView * fTextView;
TGMrbTextButtonList * fAction;
TMrbLofNamedX fLofActions;
ClassDef(TGMrbMessageViewer, 1)
};
#endif