Logo ROOT  
Reference Guide
TGedEditor.cxx
Go to the documentation of this file.
1 // @(#)root/ged:$Id$
2 // Author: Marek Biskup, Ilka Antcheva 02/08/2003
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 //////////////////////////////////////////////////////////////////////////
14 // //
15 // TGedEditor //
16 // //
17 // The main class of ROOT graphics editor. It manages the appearance //
18 // of objects editors according to the selected object in the canvas //
19 // (an object became selected after the user click on it using the //
20 // left-mouse button). //
21 // //
22 // Every object editor provides an object specific GUI and follows a //
23 // simple naming convention: it has as a name the object class name //
24 // concatinated with 'Editor' (e.g. for TGraph objects the object //
25 // editor is TGraphEditor). //
26 // //
27 // The ROOT graphics editor can be activated by selecting 'Editor' //
28 // from the View canvas menu, or SetLine/Fill/Text/MarkerAttributes //
29 // from the context menu. The algorithm in use is simple: according to //
30 // the selected object <obj> in the canvas it looks for a class name //
31 // <obj>Editor. If a class with this name exists, the editor verifies //
32 // that this class derives from the base editor class TGedFrame. //
33 // It makes an instance of the object editor, scans all object base //
34 // classes searching the corresponding object editors and makes an //
35 // instance of the base class editor too. Once the object editor is in //
36 // place, it sets the user interface elements according to the object //
37 // state and is ready for interactions. When a new object of a //
38 // different class is selected, a new object editor is loaded in the //
39 // editor frame. The old one is cached in memory for potential reuse. //
40 // //
41 // Any created canvas will be shown with the editor if you have a //
42 // .rootrc file in your working directory containing the the line: //
43 // Canvas.ShowEditor: true //
44 // //
45 // An created object can be set as selected in a macro by: //
46 // canvas->Selected(parent_pad_of_object, object, 1); //
47 // The first parameter can be the canvas itself or the pad containing //
48 // 'object'. //
49 // //
50 // Begin_Html //
51 /*
52 <img src="gif/TGedEditor.gif">
53 */
54 //End_Html
55 //////////////////////////////////////////////////////////////////////////
56 
57 #include "TGedEditor.h"
58 #include "TCanvas.h"
59 #include "TGCanvas.h"
60 #include "TGTab.h"
61 #include "TGedFrame.h"
62 #include "TROOT.h"
63 #include "TClass.h"
64 #include "TBaseClass.h"
65 #include "TVirtualX.h"
66 
67 
68 class TGedTabInfo : public TObject {
69  // Helper class for managing visibility and order of created tabs.
70 public:
71  TGTabElement *fElement;
72  TGCompositeFrame *fContainer;
73 
74  TGedTabInfo(TGTabElement* el, TGCompositeFrame* f) :
75  fElement(el), fContainer(f) {}
76 };
77 
78 
80 
82 
83 ////////////////////////////////////////////////////////////////////////////////
84 /// Returns TGedEditor that currently creates TGedFrames.
85 
87 {
88  return fgFrameCreator;
89 }
90 
91 ////////////////////////////////////////////////////////////////////////////////
92 /// Set the TGedEditor that currently creates TGedFrames.
93 
95 {
96  fgFrameCreator = e;
97 }
98 
99 ////////////////////////////////////////////////////////////////////////////////
100 /// Constructor of graphics editor.
101 
103  TGMainFrame(gClient->GetRoot(), width, height),
104  fCan (0),
105  fTab (0),
106  fTabContainer (0),
107  fModel (0),
108  fPad (0),
109  fCanvas (0),
110  fClass (0),
111  fGlobal (kTRUE)
112 {
113  fCan = new TGCanvas(this, 170, 10, kFixedWidth);
115 
116  fTab = new TGTab(fCan->GetViewPort(), 10, 10);
117  fTab->Associate(fCan);
120 
121  fTabContainer = GetEditorTab("Style");
122 
123  gROOT->GetListOfCleanups()->Add(this);
124 
125  SetCanvas(canvas);
126  if (fCanvas) {
128  if (ch)
129  Resize(GetWidth(), ch > 700 ? 700 : ch);
130  else
131  Resize(GetWidth(), fCanvas->GetWh()<450 ? 450 : fCanvas->GetWh() + 4);
132  } else {
133  Resize(width, height);
134  }
135 
136  MapSubwindows();
137  MapWindow();
138 }
139 
140 ////////////////////////////////////////////////////////////////////////////////
141 /// Editor destructor.
142 
144 {
145  Hide();
146 
147  if(fGlobal){
148  TQObject::Disconnect("TCanvas", "Selected(TVirtualPad *, TObject *, Int_t)");
149  TQObject::Disconnect("TCanvas", "Closed()");
150  }
151 
152  // delete class editors
153  TIter next(fFrameMap.GetTable());
154  TPair* pair;
155  while ((pair = (TPair*) next())) {
156  if (pair->Value() != 0) {
157  TGedFrame* frame = (TGedFrame*) pair->Value();
158  delete frame;
159  }
160  }
161 
162  TGedTabInfo* ti;
163  TIter it1(&fCreatedTabs);
164  while ((ti = (TGedTabInfo*) it1())) {
165  fTab->AddFrame(ti->fElement,0);
166  fTab->AddFrame(ti->fContainer,0);
167  }
168 
169  delete fTab;
170  delete ((TGFrameElement*)fList->First())->fLayout;
171  delete fCan;
172 }
173 
174 ////////////////////////////////////////////////////////////////////////////////
175 /// Virtual method that is called on any change in the dependent frames.
176 /// This implementation simply calls fPad Modified()/Update().
177 
179 {
180  if (fPad) {
181  fPad->Modified();
182  fPad->Update();
183  }
184 }
185 
186 ////////////////////////////////////////////////////////////////////////////////
187 /// Find or create tab with name.
188 
190 {
191  return GetEditorTabInfo(name)->fContainer;
192 }
193 
194 ////////////////////////////////////////////////////////////////////////////////
195 /// Find or create tab with name.
196 
197 TGedTabInfo* TGedEditor::GetEditorTabInfo(const char* name)
198 {
199  // look in list of created tabs
200  if ( ! fCreatedTabs.IsEmpty()) {
201  TIter next(&fCreatedTabs);
202  TGedTabInfo* ti;
203  while ((ti = (TGedTabInfo *) next())) {
204  if (*ti->fElement->GetText() == name)
205  return ti;
206  }
207  }
208 
209  // create tab
211 
212  // remove created frame end tab element from the fTab frame
214  fTab->RemoveFrame(tc);
215  fTab->RemoveFrame(te);
216 
217  // create a title frame for each tab
218  TGedFrame* nf = CreateNameFrame(tc, name);
219  if (nf) {
220  nf->SetGedEditor(this);
221  nf->SetModelClass(0);
222  tc->AddFrame(nf, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 2, 2));
223  }
224  // add to list of created tabs
225  TGedTabInfo* ti = new TGedTabInfo(te, tc);
226  fCreatedTabs.Add(ti);
227 
228  return ti;
229 }
230 
231 ////////////////////////////////////////////////////////////////////////////////
232 /// Called when closed via WM close button. Calls Hide().
233 
235 {
236  Hide();
237 }
238 
239 ////////////////////////////////////////////////////////////////////////////////
240 /// Clears windows in editor tab.
241 /// Unmap and withdraw currently shown frames and thus prepare for
242 /// construction of a new class layout or destruction.
243 
245 {
246  TIter next(&fVisibleTabs);
247  TGedTabInfo* ti;
248  while ((ti = (TGedTabInfo*)next())) {
249  TGTabElement *te = ti->fElement;
250  TGCompositeFrame *tc = ti->fContainer;
251 
252  fTab->RemoveFrame(te);
253  fTab->RemoveFrame(tc);
254 
255  TIter frames(tc->GetList());
256  frames(); // skip name-frame
257  TGFrameElement* fr;
258  while ((fr = (TGFrameElement *) frames()) != 0) {
259  TGFrame *f = fr->fFrame;
260  tc->RemoveFrame(f);
261  f->UnmapWindow();
262  te->UnmapWindow();
263  tc->UnmapWindow();
264  }
265  fVisibleTabs.Remove(ti);
266  }
267 }
268 
269 ////////////////////////////////////////////////////////////////////////////////
270 /// Set editor global.
271 
273 {
274  fGlobal = global;
275  if (fGlobal) {
276  TQObject::Connect("TCanvas", "Selected(TVirtualPad *, TObject *, Int_t)",
277  "TGedEditor", this, "GlobalSetModel(TVirtualPad *, TObject *, Int_t)");
278 
279  TQObject::Connect("TCanvas", "Closed()",
280  "TGedEditor", this, "GlobalClosed()");
281  }
282 }
283 
284 ////////////////////////////////////////////////////////////////////////////////
285 /// Delete global editor if no canvas exists.
286 
288 {
289  if (gROOT->GetListOfCanvases()->IsEmpty())
291 }
292 
293 ////////////////////////////////////////////////////////////////////////////////
294 /// Set canvas to global editor.
295 
297 {
298  if ((ev != kButton1Down) || !IsMapped() ||
299  (obj && obj->InheritsFrom("TColorWheel")))
300  return;
301 
302  TCanvas* can = pad->GetCanvas();
303  // Do nothing if canvas is the same as before or
304  // local editor of the canvas is active.
305  if (!can || (can == fCanvas || can->GetShowEditor()))
306  return;
307 
308  Show();
309 }
310 
311 ////////////////////////////////////////////////////////////////////////////////
312 /// Connect this editor to the Selected signal of canvas 'c'.
313 
315 {
316  c->Connect("Selected(TVirtualPad*,TObject*,Int_t)", "TGedEditor",
317  this, "SetModel(TVirtualPad*,TObject*,Int_t)");
318 }
319 
320 ////////////////////////////////////////////////////////////////////////////////
321 /// Disconnect this editor from the Selected signal of fCanvas.
322 
324 {
325  if (fCanvas)
326  Disconnect(fCanvas, "Selected(TVirtualPad*,TObject*,Int_t)", this, "SetModel(TVirtualPad*,TObject*,Int_t)");
327 }
328 
329 ////////////////////////////////////////////////////////////////////////////////
330 /// Change connection to another canvas.
331 
333 {
334  if (fCanvas == newcan) return;
335 
337  fCanvas = newcan;
338 
339  if (!newcan) return;
340 
341  SetWindowName(Form("%s_Editor", fCanvas->GetName()));
343  if (fPad == 0) fPad = fCanvas;
345 }
346 
347 ////////////////////////////////////////////////////////////////////////////////
348 /// Activate object editors according to the selected object.
349 
350 void TGedEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t event, Bool_t force)
351 {
352  if ((event != kButton1Down) || (obj && obj->InheritsFrom("TColorWheel")))
353  return;
354 
355  if (gPad && gPad->GetVirtCanvas()) gPad->GetVirtCanvas()->SetCursor(kWatch);
356  gVirtualX->SetCursor(GetId(), gVirtualX->CreateCursor(kWatch));
357 
358  fPad = pad;
359  if (obj == 0) obj = fPad;
360 
361  // keep selected by name
362  TGTabElement* seltab = fTab->GetCurrentTab();
363 
364  Bool_t mapTabs = kFALSE;
365  if (fModel != obj || force) {
366  fModel = obj;
367  if (fModel == 0 || fModel->IsA() != fClass) {
368  ReinitWorkspace();
369  mapTabs = kTRUE;
370  // add Sytle tab to list of visible tabs
372  if (fModel) {
373  fClass = fModel->IsA();
374  // build a list of editors
376  } else {
377  fClass = 0;
378  }
379 
380  // add class editors to fTabContainer
381  TGedFrame* gfr;
382  TIter ngf(&fGedFrames);
383  while ((gfr = (TGedFrame*) ngf()))
385 
386  fExclMap.Clear();
387  fGedFrames.Clear();
388 
389  // add visible tabs in fTab
390  TIter next(&fVisibleTabs);
391  TGedTabInfo* ti;
392  while ((ti = (TGedTabInfo *) next())) {
393  fTab->AddFrame(ti->fElement,0);
394  fTab->AddFrame(ti->fContainer,0);
395  }
396  }
398  } else {
400  } // end fModel != obj
401 
402  if (mapTabs) { // selected object is different class
403  TGedTabInfo* ti;
404  TIter next(&fVisibleTabs);
405  while ((ti = (TGedTabInfo *) next())) {
406  ti->fElement->MapWindow();
407  ti->fContainer->MapWindow();
408  }
409  if (seltab == 0 || fTab->SetTab(seltab->GetString(), kFALSE) == kFALSE)
410  fTab->SetTab(0, kFALSE);
411  }
412 
413  if (fGlobal)
414  Layout();
415  else
416  ((TGMainFrame*)GetMainFrame())->Layout();
417 
418  if (gPad && gPad->GetVirtCanvas()) gPad->GetVirtCanvas()->SetCursor(kPointer);
419  gVirtualX->SetCursor(GetId(), gVirtualX->CreateCursor(kPointer));
420 }
421 
422 ////////////////////////////////////////////////////////////////////////////////
423 /// Show editor.
424 
426 {
427  // gPad is setup properly in calling code for global and canvas editor.
428  if (gPad) SetCanvas(gPad->GetCanvas());
429 
430  if (fCanvas && fGlobal) {
432 
433  if (fCanvas->GetShowEditor())
435 
437  UInt_t cw = fCanvas->GetWindowWidth();
441  if (!ch)
442  cy = cy + 20; // embeded canvas protection
443 
444  Int_t gedx = 0, gedy = 0;
445 
446  if (cw + GetWidth() > dw) {
447  gedx = cx + cw - GetWidth();
448  gedy = ch - GetHeight();
449  } else {
450  if (cx > GetWidth())
451  gedx = cx - GetWidth() - 20;
452  else
453  gedx = cx + cw + 10;
454  gedy = cy - 20;
455  }
456  MoveResize(gedx, gedy, GetWidth(), ch > 700 ? 700 : ch);
457  SetWMPosition(gedx, gedy);
458  } else if (fCanvas) {
460  }
461  MapWindow();
462  gVirtualX->RaiseWindow(GetId());
463 
464  if (!gROOT->GetListOfCleanups()->FindObject(this))
465  gROOT->GetListOfCleanups()->Add(this);
466 }
467 
468 ////////////////////////////////////////////////////////////////////////////////
469 /// Hide editor. The editor is put into non-active state.
470 
472 {
473  UnmapWindow();
474  ReinitWorkspace();
475  fModel = 0; fClass = 0;
477  fCanvas = 0; fPad = 0;
478  gROOT->GetListOfCleanups()->Remove(this);
479 }
480 
481 ////////////////////////////////////////////////////////////////////////////////
482 /// Remove references to fModel in case the fModel is being deleted.
483 /// Deactivate attribute frames if they point to obj.
484 
486 {
487  if (obj == fPad) {
488  // printf("TGedEditor::RecursiveRemove: %s - pad deleted.\n", locglob);
490  return;
491  }
492 
493  if (obj == fModel) {
494  // printf("TGedEditor::RecursiveRemove: %s - model deleted.\n", locglob);
496  return;
497  }
498 }
499 
500 ////////////////////////////////////////////////////////////////////////////////
501 /// Searches for GedFrames for given class. In recursive mode look for class
502 /// editor in its list of bases.
503 
505 {
506  TPair *pair = (TPair*) fFrameMap.FindObject(cl);
507  TClass *edClass = 0;
508  TGedFrame *frame = 0;
509 
510  if (pair == 0) {
511  edClass = TClass::GetClass(Form("%sEditor", cl->GetName()));
512 
513  if (edClass && edClass->InheritsFrom(TGedFrame::Class())) {
514  TGWindow *exroot = (TGWindow*) fClient->GetRoot();
516  fgFrameCreator = this;
517  frame = reinterpret_cast<TGedFrame*>(edClass->New());
518  frame->SetModelClass(cl);
519  fgFrameCreator = 0;
520  fClient->SetRoot(exroot);
521  }
522  fFrameMap.Add(cl, frame);
523  } else {
524  frame = (TGedFrame*)pair->Value();
525  }
526 
527  Bool_t exclfr = kFALSE;
528  Bool_t exclbases = kFALSE;
529 
530  if (frame) {
531  TPair* exclpair = (TPair*) fExclMap.FindObject(cl);
532  if (exclpair) {
533  exclfr = kTRUE;
534  exclbases = (exclpair->Value() != 0);
535  }
536 
537  if (!exclfr && frame->AcceptModel(fModel)){
538  // handle extra tabs in the gedframe
539  if (frame->GetExtraTabs()) {
540  TIter next(frame->GetExtraTabs());
542  while ((subf = (TGedFrame::TGedSubFrame*)next())) {
543  // locate the composite frame on created tabs
544  TGedTabInfo* ti = GetEditorTabInfo(subf->fName);
545  ti->fContainer->AddFrame(subf->fFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX));
546  if (fVisibleTabs.FindObject(ti) == 0)
547  fVisibleTabs.Add(ti);
548  }
549  }
550  InsertGedFrame(frame);
551  }
552  }
553 
554  if (recurse && !exclbases) {
555  if (frame)
556  frame->ActivateBaseClassEditors(cl);
557  else
558  ActivateEditors(cl->GetListOfBases(), recurse);
559  }
560 }
561 
562 ////////////////////////////////////////////////////////////////////////////////
563 /// Searches GedFrames for classes in the given list.
564 
566 {
567  TBaseClass *base;
568  TIter next(bcl);
569 
570  while ((base = (TBaseClass*) next())) {
571  ActivateEditor(base->GetClassPointer(), recurse);
572  }
573 }
574 
575 ////////////////////////////////////////////////////////////////////////////////
576 /// Exclude editor for class cl from current construction.
577 /// If recurse is true the base-class editors of cl are also excluded.
578 
580 {
581  TPair* pair = (TPair*) fExclMap.FindObject(cl);
582  if (pair) {
583  if (recurse && pair->Value() == 0)
584  pair->SetValue((TObject*)(Long_t)1); // hack, reuse TObject as Bool_t
585  } else {
586  fExclMap.Add(cl, (TObject*)(Long_t)(recurse ? 1 : 0));
587  }
588 }
589 
590 ////////////////////////////////////////////////////////////////////////////////
591 /// Insert GedFrame in fGedFrames list according to priorities.
592 
594 {
595  // printf("%s %s insert gedframe %s \n", fModel->GetName(), fModel->IsA()->GetName(),f->GetModelClass()->GetName());
596  TObjLink* lnk = fGedFrames.FirstLink();
597  if (lnk == 0) {
598  fGedFrames.Add(f);
599  return;
600  }
601  TGedFrame* cf;
602  while (lnk) {
603  cf = (TGedFrame*) lnk->GetObject();
604  if (f->GetPriority() < cf->GetPriority()) {
605  fGedFrames.AddBefore(lnk, f);
606  return;
607  }
608  lnk = lnk->Next();
609  }
610  fGedFrames.Add(f);
611 }
612 
613 ////////////////////////////////////////////////////////////////////////////////
614 /// Call SetModel in class editors.
615 
617 {
618  TGFrameElement *el;
619 
620  // Call SetModel on TGedNameFrames (first in the container list)
621  // and map extra-tabs.
622  TIter vistabs(&fVisibleTabs);
623  vistabs(); // skip Style tab
624  TGedTabInfo* ti;
625  while ((ti = (TGedTabInfo *) vistabs())) {
626  TIter fr(ti->fContainer->GetList());
627  el = (TGFrameElement*) fr();
628  if (el) {
629  ((TGedFrame*) el->fFrame)->SetModel(fModel);
630  if (objChanged) {
631  do {
632  el->fFrame->MapSubwindows();
633  el->fFrame->Layout();
634  el->fFrame->MapWindow();
635  } while((el = (TGFrameElement *) fr()));
636  }
637  }
638  ti->fContainer->Layout();
639  }
640 
641  TIter next(fTabContainer->GetList());
642  while ((el = (TGFrameElement *) next())) {
643  if ((el->fFrame)->InheritsFrom(TGedFrame::Class())) {
644  if (objChanged) {
645  el->fFrame->MapSubwindows();
646  ((TGedFrame *)(el->fFrame))->SetModel(fModel);
647  el->fFrame->Layout();
648  el->fFrame->MapWindow();
649  } else {
650  ((TGedFrame *)(el->fFrame))->SetModel(fModel);
651  }
652  }
653  }
655 }
656 
657 ////////////////////////////////////////////////////////////////////////////////
658 /// Virtual function for creation of top name-frame in each tab.
659 
660 TGedFrame* TGedEditor::CreateNameFrame(const TGWindow* parent, const char* /*tab_name*/)
661 {
662  return new TGedNameFrame(parent);
663 }
664 
665 ////////////////////////////////////////////////////////////////////////////////
666 /// Print contents of fFrameMap.
667 
669 {
670  printf("TGedEditor::PrintFrameStat()\n");
671  Int_t sum = 0;
672  TIter next(fFrameMap.GetTable());
673  TPair* pair;
674  while ((pair = (TPair*) next())) {
675  if (pair->Value() != 0) {
676  TClass* cl = (TClass*) pair->Key();
677  printf("TGedFrame created for %s \n", cl->GetName());
678  sum ++;
679  }
680  }
681  printf("SUMMARY: %d editors stored in the local map.\n", sum);
682 }
TGedEditor::GetEditorTabInfo
virtual TGedTabInfo * GetEditorTabInfo(const char *name)
Find or create tab with name.
Definition: TGedEditor.cxx:197
TGTab::GetCurrentTab
TGTabElement * GetCurrentTab() const
Definition: TGTab.h:111
TPair
Definition: TMap.h:102
TGedEditor::Show
virtual void Show()
Show editor.
Definition: TGedEditor.cxx:425
TGedEditor::fTab
TGTab * fTab
Definition: TGedEditor.h:53
c
#define c(i)
Definition: RSha256.hxx:119
TVirtualPadEditor::Terminate
static void Terminate()
Close the global pad editor. Static method.
Definition: TVirtualPadEditor.cxx:118
TGFrame::GetHeight
UInt_t GetHeight() const
Definition: TGFrame.h:250
TVirtualPad::GetCanvas
virtual TCanvas * GetCanvas() const =0
TQObject::Disconnect
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
Definition: TQObject.cxx:1022
TGWindow
Definition: TGWindow.h:31
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TGClient::GetDisplayWidth
UInt_t GetDisplayWidth() const
Get display width.
Definition: TGClient.cxx:263
e
#define e(i)
Definition: RSha256.hxx:121
kFixedWidth
@ kFixedWidth
Definition: GuiTypes.h:387
TGCompositeFrame::GetList
virtual TList * GetList() const
Definition: TGFrame.h:347
TGMainFrame
Definition: TGFrame.h:444
TGedEditor::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
Remove references to fModel in case the fModel is being deleted.
Definition: TGedEditor.cxx:485
TGedFrame::ActivateBaseClassEditors
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
Definition: TGedFrame.cxx:168
TGedNameFrame
Definition: TGedFrame.h:92
f
#define f(i)
Definition: RSha256.hxx:122
TVirtualPad::Update
virtual void Update()=0
TGedFrame::GetPriority
Int_t GetPriority()
Definition: TGedFrame.h:75
TMap::Clear
void Clear(Option_t *option="")
Remove all (key,value) pairs from the map.
Definition: TMap.cxx:97
TGedEditor::SetModel
virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event, Bool_t force=kFALSE)
Activate object editors according to the selected object.
Definition: TGedEditor.cxx:350
TGedEditor::fCreatedTabs
TList fCreatedTabs
Definition: TGedEditor.h:55
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
TList::FindObject
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Definition: TList.cxx:577
kLHintsTop
@ kLHintsTop
Definition: TGLayout.h:40
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
Form
char * Form(const char *fmt,...)
TGedFrame::GetExtraTabs
TList * GetExtraTabs()
Definition: TGedFrame.h:76
TGedEditor::fGlobal
Bool_t fGlobal
Definition: TGedEditor.h:63
TGedEditor.h
TGedEditor::Hide
virtual void Hide()
Hide editor. The editor is put into non-active state.
Definition: TGedEditor.cxx:471
TBaseClass
Definition: TBaseClass.h:33
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TCanvas::GetClickSelected
TObject * GetClickSelected() const
Definition: TCanvas.h:140
TGClient::SetRoot
void SetRoot(TGWindow *root=0)
Sets the current root (i.e.
Definition: TGClient.cxx:245
TGedEditor::GlobalClosed
virtual void GlobalClosed()
Delete global editor if no canvas exists.
Definition: TGedEditor.cxx:287
TGedEditor::fClass
TClass * fClass
Definition: TGedEditor.h:62
TBaseClass.h
TClass.h
TGedFrame::SetModelClass
void SetModelClass(TClass *mcl)
Definition: TGedFrame.h:84
TGMainFrame::SetWindowName
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1749
TPad::GetName
const char * GetName() const
Returns name of object.
Definition: TPad.h:254
TGedEditor::CloseWindow
virtual void CloseWindow()
Called when closed via WM close button. Calls Hide().
Definition: TGedEditor.cxx:234
TCanvas::GetWh
UInt_t GetWh() const
Get Wh.
Definition: TCanvas.h:162
TVirtualX.h
TGedFrame::SetGedEditor
virtual void SetGedEditor(TGedEditor *ed)
Definition: TGedFrame.h:86
TCanvas.h
TMap::Add
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
Definition: TMap.cxx:54
TBaseClass::GetClassPointer
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
Definition: TBaseClass.cxx:63
TGFrame
Definition: TGFrame.h:105
TGFrame::MapSubwindows
virtual void MapSubwindows()
map sub windows
Definition: TGFrame.h:225
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:47
TGedEditor::fTabContainer
TGCompositeFrame * fTabContainer
Definition: TGedEditor.h:57
TGTabElement
Definition: TGTab.h:130
TObject::InheritsFrom
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:445
TGedEditor::ReinitWorkspace
void ReinitWorkspace()
Clears windows in editor tab.
Definition: TGedEditor.cxx:244
TGFrame::MapWindow
virtual void MapWindow()
map window
Definition: TGFrame.h:229
bool
TGFrame::GetWidth
UInt_t GetWidth() const
Definition: TGFrame.h:249
TCanvas::GetClickSelectedPad
TVirtualPad * GetClickSelectedPad() const
Definition: TCanvas.h:145
TGCompositeFrame::fList
TList * fList
Definition: TGFrame.h:329
TGFrameElement::fFrame
TGFrame * fFrame
Definition: TGLayout.h:119
kWatch
@ kWatch
Definition: GuiTypes.h:374
TPair::Key
TObject * Key() const
Definition: TMap.h:120
TROOT.h
gClient
#define gClient
Definition: TGClient.h:166
TList::First
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition: TList.cxx:658
TGedEditor::fVisibleTabs
TList fVisibleTabs
Definition: TGedEditor.h:56
TMap::GetTable
const THashTable * GetTable() const
Definition: TMap.h:75
TGedEditor::ConfigureGedFrames
void ConfigureGedFrames(Bool_t objChaged)
Call SetModel in class editors.
Definition: TGedEditor.cxx:616
TGedEditor::SetCanvas
virtual void SetCanvas(TCanvas *c)
Change connection to another canvas.
Definition: TGedEditor.cxx:332
TGedEditor::fModel
TObject * fModel
Definition: TGedEditor.h:59
TClass::InheritsFrom
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
Definition: TClass.cxx:4777
kLHintsNormal
@ kLHintsNormal
Definition: TGLayout.h:45
TList::FirstLink
virtual TObjLink * FirstLink() const
Definition: TList.h:108
TGedFrame.h
TClass::New
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Definition: TClass.cxx:4881
TGCompositeFrame::MapSubwindows
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1149
TClass::GetListOfBases
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
Definition: TClass.cxx:3555
TGTab::AddTab
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
Definition: TGTab.cxx:343
TGWidget::Associate
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
TGFrame::Resize
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:590
TGedEditor::DisconnectFromCanvas
virtual void DisconnectFromCanvas()
Disconnect this editor from the Selected signal of fCanvas.
Definition: TGedEditor.cxx:323
TList::AddBefore
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
Definition: TList.cxx:195
TPair::SetValue
void SetValue(TObject *val)
Definition: TMap.h:122
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TGTabElement::GetString
const char * GetString() const
Definition: TGTab.h:159
Long_t
long Long_t
Definition: RtypesCore.h:54
TMap::FindObject
TObject * FindObject(const char *keyname) const
Check if a (key,value) pair exists with keyname as name of the key.
Definition: TMap.cxx:215
TGedEditor::fgFrameCreator
static TGedEditor * fgFrameCreator
Definition: TGedEditor.h:69
TGLayoutHints
Definition: TGLayout.h:57
TGedEditor::GetEditorTab
virtual TGCompositeFrame * GetEditorTab(const char *name)
Find or create tab with name.
Definition: TGedEditor.cxx:189
TGTab
Definition: TGTab.h:62
TPair::Value
TObject * Value() const
Definition: TMap.h:121
TGedEditor::ActivateEditor
void ActivateEditor(TClass *cl, Bool_t recurse)
Searches for GedFrames for given class.
Definition: TGedEditor.cxx:504
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TCanvas::GetWindowWidth
UInt_t GetWindowWidth() const
Definition: TCanvas.h:159
TGTab.h
TClass::GetClass
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition: TClass.cxx:2925
TCanvas::GetWindowHeight
UInt_t GetWindowHeight() const
Definition: TCanvas.h:160
kLHintsExpandY
@ kLHintsExpandY
Definition: TGLayout.h:44
TGTab::SetTab
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
Definition: TGTab.cxx:509
TGedFrame::TGedSubFrame::fName
TString fName
Definition: TGedFrame.h:42
TGedEditor::~TGedEditor
virtual ~TGedEditor()
Editor destructor.
Definition: TGedEditor.cxx:143
TGCompositeFrame::RemoveFrame
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1134
TCollection::IsEmpty
virtual Bool_t IsEmpty() const
Definition: TCollection.h:186
kPointer
@ kPointer
Definition: GuiTypes.h:374
fClass
Cppyy::TCppType_t fClass
Definition: DeclareConverters.h:259
TGedEditor::ConnectToCanvas
virtual void ConnectToCanvas(TCanvas *c)
Connect this editor to the Selected signal of canvas 'c'.
Definition: TGedEditor.cxx:314
unsigned int
TGedEditor::fCanvas
TCanvas * fCanvas
Definition: TGedEditor.h:61
TGedEditor::CreateNameFrame
virtual TGedFrame * CreateNameFrame(const TGWindow *parent, const char *tab_name)
Virtual function for creation of top name-frame in each tab.
Definition: TGedEditor.cxx:660
TGedEditor::PrintFrameStat
void PrintFrameStat()
Print contents of fFrameMap.
Definition: TGedEditor.cxx:668
TGedFrame
Definition: TGedFrame.h:33
sum
static long int sum(long int i)
Definition: Factory.cxx:2272
TGedEditor::fCan
TGCanvas * fCan
Definition: TGedEditor.h:52
TGedEditor::ActivateEditors
void ActivateEditors(TList *bcl, Bool_t recurse)
Searches GedFrames for classes in the given list.
Definition: TGedEditor.cxx:565
kButton1Down
@ kButton1Down
Definition: Buttons.h:23
TGedEditor::fExclMap
TMap fExclMap
Definition: TGedEditor.h:49
TQObject::Connect
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition: TQObject.cxx:864
TVirtualPad
Definition: TVirtualPad.h:50
TGFrame::UnmapWindow
virtual void UnmapWindow()
unmap window
Definition: TGFrame.h:231
TGedEditor::SetGlobal
virtual void SetGlobal(Bool_t global)
Set editor global.
Definition: TGedEditor.cxx:272
TCanvas
Definition: TCanvas.h:23
TGedEditor::fFrameMap
TMap fFrameMap
Definition: TGedEditor.h:48
TList::Remove
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition: TList.cxx:821
TGObject::fClient
TGClient * fClient
Definition: TGObject.h:37
TGFrame::MoveResize
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Definition: TGFrame.cxx:614
TGWindow::GetMainFrame
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
Definition: TGWindow.cxx:133
TClass
Definition: TClass.h:80
TGedEditor::ExcludeClassEditor
void ExcludeClassEditor(TClass *cl, Bool_t recurse=kFALSE)
Exclude editor for class cl from current construction.
Definition: TGedEditor.cxx:579
TGedEditor::InsertGedFrame
void InsertGedFrame(TGedFrame *f)
Insert GedFrame in fGedFrames list according to priorities.
Definition: TGedEditor.cxx:593
TGedFrame::TGedSubFrame::fFrame
TGCompositeFrame * fFrame
Definition: TGedFrame.h:43
TList::Add
virtual void Add(TObject *obj)
Definition: TList.h:87
TObject
Definition: TObject.h:37
TGedEditor::TGedEditor
TGedEditor(const TGedEditor &)
TList::Clear
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition: TList.cxx:401
name
char name[80]
Definition: TGX11.cxx:110
kDeepCleanup
@ kDeepCleanup
Definition: TGFrame.h:51
TGCanvas.h
TGCanvas::SetContainer
virtual void SetContainer(TGFrame *f)
Definition: TGCanvas.h:232
TGFrameElement
Definition: TGLayout.h:112
TVirtualPad::Modified
virtual void Modified(Bool_t flag=1)=0
gPad
#define gPad
Definition: TVirtualPad.h:287
TIter
Definition: TCollection.h:233
TGedEditor::fGedFrames
TList fGedFrames
Definition: TGedEditor.h:50
kLHintsExpandX
@ kLHintsExpandX
Definition: TGLayout.h:43
TCanvas::GetSelectedPad
TVirtualPad * GetSelectedPad() const
Definition: TCanvas.h:144
TGCompositeFrame::SetCleanup
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1057
TCanvas::GetWindowTopX
Int_t GetWindowTopX()
Returns current top x position of window on screen.
Definition: TCanvas.cxx:1197
TGTab::GetNumberOfTabs
Int_t GetNumberOfTabs() const
Return number of tabs.
Definition: TGTab.cxx:660
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:53
TGedEditor::GetFrameCreator
static TGedEditor * GetFrameCreator()
Returns TGedEditor that currently creates TGedFrames.
Definition: TGedEditor.cxx:86
TGFrame::Layout
virtual void Layout()
Definition: TGFrame.h:224
TGedFrame::AcceptModel
virtual Bool_t AcceptModel(TObject *)
Definition: TGedFrame.h:83
TGCanvas::GetViewPort
TGViewPort * GetViewPort() const
Definition: TGCanvas.h:227
Class
void Class()
Definition: Class.C:29
TGedEditor::SetFrameCreator
static void SetFrameCreator(TGedEditor *e)
Set the TGedEditor that currently creates TGedFrames.
Definition: TGedEditor.cxx:94
TGTab::GetTabTab
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
Definition: TGTab.cxx:614
TGCompositeFrame
Definition: TGFrame.h:324
TGClient::GetRoot
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition: TGClient.cxx:225
TGCanvas
Definition: TGCanvas.h:202
TGCompositeFrame::AddFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1102
TGString
Definition: TGString.h:30
TGCompositeFrame::Layout
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1242
TGedFrame::TGedSubFrame
Definition: TGedFrame.h:37
TGedEditor
Definition: TGedEditor.h:41
TCanvas::GetShowEditor
Bool_t GetShowEditor() const
Definition: TCanvas.h:148
TList
Definition: TList.h:44
TGMainFrame::SetWMPosition
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1840
TGedEditor::Update
virtual void Update(TGedFrame *frame=0)
Virtual method that is called on any change in the dependent frames.
Definition: TGedEditor.cxx:178
gROOT
#define gROOT
Definition: TROOT.h:406
int
TGedEditor::GlobalSetModel
virtual void GlobalSetModel(TVirtualPad *, TObject *, Int_t)
Set canvas to global editor.
Definition: TGedEditor.cxx:296
TGedEditor::fPad
TVirtualPad * fPad
Definition: TGedEditor.h:60
TCanvas::GetWindowTopY
Int_t GetWindowTopY()
Returns current top y position of window on screen.
Definition: TCanvas.cxx:1208
TCanvas::ToggleEditor
virtual void ToggleEditor()
Toggle editor.
Definition: TCanvas.cxx:2464
TGWindow::IsMapped
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
Definition: TGWindow.cxx:276