// @(#)root/sessionviewer:$Id: c52dc6cb225c25e34d388329d41570a484d98ce0 $
// Author: G Ganis, Aug 2005

/*************************************************************************
 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TProofProgressLog
#define ROOT_TProofProgressLog

///////////////////////////////////////////////////////////////////////////
//                                                                       //
// TProofProgressLog                                                     //
//                                                                       //
// Dialog used to display Proof session logs from the Proof progress     //
// dialog.                                                               //
// It uses TProofMgr::GetSessionLogs() mechanism internally              //
//                                                                       //
///////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif

class TGTextView;
class TGTextButton;
class TProofProgressDialog;
class TProofLog;
class TGTextEntry;
class TGNumberEntry;
class TGListBox;
class TGSplitButton;
class TGVerticalFrame;
class TGCheckButton;
class TGLabel;

class TProofProgressLog : public TGTransientFrame {

private:
   enum ETextType { kRaw = 0, kStd = 1, kGrep = 2 };

   TString               fSessionUrl;
   Int_t                 fSessionIdx;

   TGTextView           *fText;      // text widget
   TGTextButton         *fClose;     // close button
   TGListBox            *fLogList;   // list of workers
   TGTextButton         *fLogNew;    // display logs button
   TProofProgressDialog *fDialog;    // owner dialog
   TProofLog            *fProofLog;  // the log
   TGNumberEntry        *fLinesFrom; // starting line
   TGNumberEntry        *fLinesTo;   // ending line
   TGTextEntry          *fGrepText;  // text to grep for in the logs
   TGTextEntry          *fUrlText;   // url to connect to
   TGNumberEntry        *fSessNum;   // relative index of the session to get
   TGTextEntry          *fFileName;  // file to save to
   TGTextButton         *fSave;      // save button
   TGTextButton         *fGrepButton; //grep button
   TGTextButton         *fUrlButton; //rebuild button
   TGCheckButton        *fAllLines;  // display all lines button
   TGCheckButton        *fRawLines;  // display raw lines button
   TGSplitButton        *fAllWorkers; // display all workers button
   TGVerticalFrame      *fVworkers;  // Vertical frame
   TGLabel              *fGrepLabel;  // label indicating if grepping or piping
   TGCheckButton        *fGrepCheckCmd;  // checkbox active if piping
   TGCheckButton        *fGrepCheckInv;  // checkbox active if inverting

   Bool_t                fFullText;    // 0 - when grep was called
   Int_t                 fTextType;   // Type of retrieval

   void  Init(Int_t w = 700, Int_t h = 600);

public:
   TProofProgressLog(TProofProgressDialog *d, Int_t w = 700, Int_t h = 600);
   TProofProgressLog(const char *url = 0, Int_t sessionidx = 0, Int_t w = 700, Int_t h = 600);
   virtual ~TProofProgressLog();

   void   BuildLogList(Bool_t create = kFALSE);
   void   DoLog(Bool_t grep=kFALSE);
   void   LogMessage(const char *msg, Bool_t all);
   void   Rebuild();

   void   LoadBuffer(const char *buffer);
   void   AddBuffer(const char *buffer);

   void   LoadFile(const char *file);

   void   Clear(Option_t * = 0);
   void   Popup();
   void   SaveToFile();
   void   NoLineEntry();
   void   SetGrepView();
   void   Select(Int_t id, Bool_t all = kTRUE);

   void   SetUrl(const char *url) { fSessionUrl = url; }
   // slots
   void   CloseWindow();

   ClassDef(TProofProgressLog,0) //Class implementing a log graphic box
};

#endif
 TProofProgressLog.h:1
 TProofProgressLog.h:2
 TProofProgressLog.h:3
 TProofProgressLog.h:4
 TProofProgressLog.h:5
 TProofProgressLog.h:6
 TProofProgressLog.h:7
 TProofProgressLog.h:8
 TProofProgressLog.h:9
 TProofProgressLog.h:10
 TProofProgressLog.h:11
 TProofProgressLog.h:12
 TProofProgressLog.h:13
 TProofProgressLog.h:14
 TProofProgressLog.h:15
 TProofProgressLog.h:16
 TProofProgressLog.h:17
 TProofProgressLog.h:18
 TProofProgressLog.h:19
 TProofProgressLog.h:20
 TProofProgressLog.h:21
 TProofProgressLog.h:22
 TProofProgressLog.h:23
 TProofProgressLog.h:24
 TProofProgressLog.h:25
 TProofProgressLog.h:26
 TProofProgressLog.h:27
 TProofProgressLog.h:28
 TProofProgressLog.h:29
 TProofProgressLog.h:30
 TProofProgressLog.h:31
 TProofProgressLog.h:32
 TProofProgressLog.h:33
 TProofProgressLog.h:34
 TProofProgressLog.h:35
 TProofProgressLog.h:36
 TProofProgressLog.h:37
 TProofProgressLog.h:38
 TProofProgressLog.h:39
 TProofProgressLog.h:40
 TProofProgressLog.h:41
 TProofProgressLog.h:42
 TProofProgressLog.h:43
 TProofProgressLog.h:44
 TProofProgressLog.h:45
 TProofProgressLog.h:46
 TProofProgressLog.h:47
 TProofProgressLog.h:48
 TProofProgressLog.h:49
 TProofProgressLog.h:50
 TProofProgressLog.h:51
 TProofProgressLog.h:52
 TProofProgressLog.h:53
 TProofProgressLog.h:54
 TProofProgressLog.h:55
 TProofProgressLog.h:56
 TProofProgressLog.h:57
 TProofProgressLog.h:58
 TProofProgressLog.h:59
 TProofProgressLog.h:60
 TProofProgressLog.h:61
 TProofProgressLog.h:62
 TProofProgressLog.h:63
 TProofProgressLog.h:64
 TProofProgressLog.h:65
 TProofProgressLog.h:66
 TProofProgressLog.h:67
 TProofProgressLog.h:68
 TProofProgressLog.h:69
 TProofProgressLog.h:70
 TProofProgressLog.h:71
 TProofProgressLog.h:72
 TProofProgressLog.h:73
 TProofProgressLog.h:74
 TProofProgressLog.h:75
 TProofProgressLog.h:76
 TProofProgressLog.h:77
 TProofProgressLog.h:78
 TProofProgressLog.h:79
 TProofProgressLog.h:80
 TProofProgressLog.h:81
 TProofProgressLog.h:82
 TProofProgressLog.h:83
 TProofProgressLog.h:84
 TProofProgressLog.h:85
 TProofProgressLog.h:86
 TProofProgressLog.h:87
 TProofProgressLog.h:88
 TProofProgressLog.h:89
 TProofProgressLog.h:90
 TProofProgressLog.h:91
 TProofProgressLog.h:92
 TProofProgressLog.h:93
 TProofProgressLog.h:94
 TProofProgressLog.h:95
 TProofProgressLog.h:96
 TProofProgressLog.h:97
 TProofProgressLog.h:98
 TProofProgressLog.h:99
 TProofProgressLog.h:100
 TProofProgressLog.h:101
 TProofProgressLog.h:102
 TProofProgressLog.h:103
 TProofProgressLog.h:104
 TProofProgressLog.h:105
 TProofProgressLog.h:106
 TProofProgressLog.h:107
 TProofProgressLog.h:108
 TProofProgressLog.h:109