#include "TROOT.h"
#include "TVirtualPadEditor.h"
#include "TPluginManager.h"
#include "TEnv.h"
#include "TVirtualPad.h"
TVirtualPadEditor *TVirtualPadEditor::fgPadEditor = 0;
TString TVirtualPadEditor::fgEditorName = "";
ClassImp(TVirtualPadEditor)
TVirtualPadEditor::TVirtualPadEditor()
{
}
TVirtualPadEditor::~TVirtualPadEditor()
{
}
TVirtualPadEditor *TVirtualPadEditor::LoadEditor()
{
TPluginHandler *h;
if (fgEditorName.Length() == 0)
fgEditorName = gEnv->GetValue("Root.PadEditor","Ged");
h = gROOT->GetPluginManager()->FindHandler("TVirtualPadEditor",
fgEditorName);
if (h) {
if (h->LoadPlugin() == -1)
return 0;
return (TVirtualPadEditor*) h->ExecPlugin(1, gPad->GetCanvas());
}
return 0;
}
const char *TVirtualPadEditor::GetEditorName()
{
return fgEditorName;
}
TVirtualPadEditor *TVirtualPadEditor::GetPadEditor(Bool_t load)
{
if (!fgPadEditor && load)
fgPadEditor = LoadEditor();
return fgPadEditor;
}
void TVirtualPadEditor::SetPadEditorName(const char *name)
{
if (fgEditorName == name) return;
delete fgPadEditor;
fgPadEditor = 0;
fgEditorName = name;
}
void TVirtualPadEditor::ShowEditor()
{
if (!fgPadEditor) {
GetPadEditor();
fgPadEditor->SetGlobal(kTRUE);
}
fgPadEditor->Show();
}
void TVirtualPadEditor::HideEditor()
{
if (fgPadEditor)
fgPadEditor->Hide();
}
void TVirtualPadEditor::Terminate()
{
if (!fgPadEditor) return;
delete fgPadEditor;
fgPadEditor = 0;
}
void TVirtualPadEditor::UpdateFillAttributes(Int_t color, Int_t style)
{
ShowEditor();
fgPadEditor->FillAttributes(color, style);
}
void TVirtualPadEditor::UpdateTextAttributes(Int_t align, Float_t angle,
Int_t col, Int_t font, Float_t tsize)
{
ShowEditor();
fgPadEditor->TextAttributes(align, angle, col, font, tsize);
}
void TVirtualPadEditor::UpdateLineAttributes(Int_t color, Int_t style,
Int_t width)
{
ShowEditor();
fgPadEditor->LineAttributes(color, style, width);
}
void TVirtualPadEditor::UpdateMarkerAttributes(Int_t color, Int_t style,
Float_t msize)
{
ShowEditor();
fgPadEditor->MarkerAttributes(color, style, msize);
}
TVirtualPadEditor.cxx:100 TVirtualPadEditor.cxx:101 TVirtualPadEditor.cxx:102 TVirtualPadEditor.cxx:103 TVirtualPadEditor.cxx:104 TVirtualPadEditor.cxx:105 TVirtualPadEditor.cxx:106 TVirtualPadEditor.cxx:107 TVirtualPadEditor.cxx:108 TVirtualPadEditor.cxx:109 TVirtualPadEditor.cxx:110 TVirtualPadEditor.cxx:111 TVirtualPadEditor.cxx:112 TVirtualPadEditor.cxx:113 TVirtualPadEditor.cxx:114 TVirtualPadEditor.cxx:115 TVirtualPadEditor.cxx:116 TVirtualPadEditor.cxx:117 TVirtualPadEditor.cxx:118 TVirtualPadEditor.cxx:119 TVirtualPadEditor.cxx:120 TVirtualPadEditor.cxx:121 TVirtualPadEditor.cxx:122 TVirtualPadEditor.cxx:123 TVirtualPadEditor.cxx:124 TVirtualPadEditor.cxx:125 TVirtualPadEditor.cxx:126 TVirtualPadEditor.cxx:127 TVirtualPadEditor.cxx:128 TVirtualPadEditor.cxx:129 TVirtualPadEditor.cxx:130 TVirtualPadEditor.cxx:131 TVirtualPadEditor.cxx:132 TVirtualPadEditor.cxx:133 TVirtualPadEditor.cxx:134 TVirtualPadEditor.cxx:135 TVirtualPadEditor.cxx:136 TVirtualPadEditor.cxx:137 TVirtualPadEditor.cxx:138 TVirtualPadEditor.cxx:139 TVirtualPadEditor.cxx:140 TVirtualPadEditor.cxx:141 TVirtualPadEditor.cxx:142 TVirtualPadEditor.cxx:143 TVirtualPadEditor.cxx:144 TVirtualPadEditor.cxx:145 TVirtualPadEditor.cxx:146 TVirtualPadEditor.cxx:147 TVirtualPadEditor.cxx:148 TVirtualPadEditor.cxx:149 TVirtualPadEditor.cxx:150 TVirtualPadEditor.cxx:151 TVirtualPadEditor.cxx:152 TVirtualPadEditor.cxx:153 TVirtualPadEditor.cxx:154 TVirtualPadEditor.cxx:155 TVirtualPadEditor.cxx:156 TVirtualPadEditor.cxx:157 TVirtualPadEditor.cxx:158 TVirtualPadEditor.cxx:159 TVirtualPadEditor.cxx:160 TVirtualPadEditor.cxx:161 TVirtualPadEditor.cxx:162 TVirtualPadEditor.cxx:163 TVirtualPadEditor.cxx:164 TVirtualPadEditor.cxx:165 TVirtualPadEditor.cxx:166 TVirtualPadEditor.cxx:167 TVirtualPadEditor.cxx:168