ROOT  6.06/09
Reference Guide
TGuiBldNameFrame.h
Go to the documentation of this file.
1 // @(#)root/guibuilder:$Id$
2 // Author: Valeriy Onuchin 12/09/04
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, 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 #ifndef ROOT_TGuiBldNameFrame
13 #define ROOT_TGuiBldNameFrame
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TGuiBldNameFrame - frame sdisplaying the class name of frame //
18 // and the name of frame //
19 // //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 
24 #ifndef ROOT_TGFrame
25 #include "TGFrame.h"
26 #endif
27 
28 class TGLabel;
29 class TGTextEntry;
30 class TGuiBldEditor;
31 class TGuiBldEditor;
32 class TRootGuiBuilder;
33 class TGListTree;
34 class TGFrame;
35 class TGCanvas;
36 class TGListTreeItem;
37 class TGuiBldDragManager;
38 
39 
40 //////////////////////////////////////////////////////////////////////////
42 
43 private:
44  TGLabel *fLabel; // label of frame class name
45  TGTextEntry *fFrameName; // name of the frame
46  TGuiBldEditor *fEditor; // pointer to main editor
47  TGCompositeFrame *fTitleFrame; // frame saying that it's "Name Frame"
48  TRootGuiBuilder *fBuilder; // pointer to builder
49  TGuiBldDragManager *fManager; // main manager
50  TGListTree *fListTree; // list tree containing frames hierarchy
52 
53 protected:
54  void DoRedraw();
55 
56 public:
57  TGuiBldNameFrame(const TGWindow *p, TGuiBldEditor *editor);
58  virtual ~TGuiBldNameFrame() { }
59 
60  void ChangeSelected(TGFrame *frame);
62  TGListTreeItem *FindItemByName(TGListTree *tree, const char* name, TGListTreeItem *item = 0);
65  void RemoveFrame(TGFrame *frame);
66  void Reset();
67  void SelectFrameByItem(TGListTreeItem* item, Int_t i = 0);
68  void UpdateName();
69 
70  ClassDef(TGuiBldNameFrame, 0) // frame name editor
71 };
72 
73 
74 #endif
TRootGuiBuilder * fBuilder
TGListTreeItem * FindItemByName(TGListTree *tree, const char *name, TGListTreeItem *item=0)
Find item with GetText == name. Search tree downwards starting at item.
void Reset()
Reset name frame.
TGuiBldDragManager * fManager
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGTextEntry * fFrameName
void UpdateName()
Set new name of frame, if it doesn't already exist in the same MDI frame.
TGCompositeFrame * GetMdi(TGFrame *frame)
Find the parent mdi frame.
TGuiBldEditor * fEditor
#define ClassDef(name, id)
Definition: Rtypes.h:254
void RemoveFrame(TGFrame *frame)
Remove a frame.
TGCompositeFrame * fTitleFrame
TGListTree * fListTree
void MapItems(TGCompositeFrame *main)
Map all the frames and subframes in mdi frame to the list tree.
TGuiBldNameFrame(const TGWindow *p, TGuiBldEditor *editor)
int main(int argc, char *argv[])
Definition: python64.c:14
void SelectFrameByItem(TGListTreeItem *item, Int_t i=0)
When list tree item is clicked, frame with that name is selected.
#define name(a, b)
Definition: linkTestLib0.cpp:5
void DoRedraw()
Redraw frame (just a prototype).
virtual ~TGuiBldNameFrame()
void ChangeSelected(TGFrame *frame)
Change selected frame.
Bool_t CheckItems(TGCompositeFrame *main)
Check if items are in the list tree and at the same place.