#include "TError.h"
#include "TGFrame.h"
#include "TGTextView.h"
#include "TGScrollBar.h"
#include "TProof.h"
#include "TProofProgressDialog.h"
#include "TProofProgressLog.h"
ClassImp(TProofProgressLog)
TProofProgressLog::TProofProgressLog(TProofProgressDialog *d, Int_t w, Int_t h) :
TGTransientFrame(gClient->GetRoot(), gClient->GetRoot(), w, h)
{
fDialog = d;
SetCleanup(kDeepCleanup);
fText = new TGTextView(this, w, h);
AddFrame(fText, new TGLayoutHints(kLHintsExpandX |
kLHintsExpandY, 3, 3, 3, 3));
fClose = new TGTextButton(this, " &Close ");
fClose->Connect("Clicked()", "TProofProgressLog", this, "CloseWindow()");
AddFrame(fClose, new TGLayoutHints(kLHintsBottom |
kLHintsCenterX, 0, 0, 5, 5));
char title[256] = {0};
strcpy(title,Form("PROOF Processing Logs: %s",
(fDialog->fProof ? fDialog->fProof->GetMaster() : "<dummy>")));
SetWindowName(title);
SetIconName(title);
MapSubwindows();
Resize();
Window_t wdummy;
int ax, ay;
gVirtualX->TranslateCoordinates(GetParent()->GetId(), fDialog->fDialog->GetId(),
(Int_t)(((TGFrame *)GetParent())->GetWidth() + w),
(Int_t)(((TGFrame *)GetParent())->GetHeight()- 3*h/2), ax, ay, wdummy);
Move(ax, ay);
Popup();
}
TProofProgressLog::~TProofProgressLog()
{
fDialog->fLogWindow = 0;
fDialog->fProof->Disconnect("LogMessage(const char*,Bool_t)", this,
"LogMessage(const char*,Bool_t)");
}
void TProofProgressLog::Popup()
{
MapWindow();
}
void TProofProgressLog::Clear(Option_t *)
{
if (fText)
fText->Clear();
}
void TProofProgressLog::LoadBuffer(const char *buffer)
{
if (fText)
fText->LoadBuffer(buffer);
}
void TProofProgressLog::LoadFile(const char *file)
{
if (fText)
fText->LoadFile(file);
}
void TProofProgressLog::AddBuffer(const char *buffer)
{
if (fText) {
TGText txt;
txt.LoadBuffer(buffer);
fText->AddText(&txt);
}
}
void TProofProgressLog::CloseWindow()
{
DeleteWindow();
}
Last update: Thu Jan 17 09:01:57 2008
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.