Logo ROOT  
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#include "TGFrame.h"
25
26class TGLabel;
27class TGTextEntry;
28class TGuiBldEditor;
29class TGuiBldEditor;
30class TRootGuiBuilder;
31class TGListTree;
32class TGFrame;
33class TGCanvas;
34class TGListTreeItem;
36
37
38//////////////////////////////////////////////////////////////////////////
40
41private:
42 TGLabel *fLabel; // label of frame class name
43 TGTextEntry *fFrameName; // name of the frame
44 TGuiBldEditor *fEditor; // pointer to main editor
45 TGCompositeFrame *fTitleFrame; // frame saying that it's "Name Frame"
46 TRootGuiBuilder *fBuilder; // pointer to builder
47 TGuiBldDragManager *fManager; // main manager
48 TGListTree *fListTree; // list tree containing frames hierarchy
50
51protected:
52 void DoRedraw();
53
54public:
55 TGuiBldNameFrame(const TGWindow *p, TGuiBldEditor *editor);
56 virtual ~TGuiBldNameFrame() { }
57
58 void ChangeSelected(TGFrame *frame);
63 void RemoveFrame(TGFrame *frame);
64 void Reset();
65 void SelectFrameByItem(TGListTreeItem* item, Int_t i = 0);
66 void UpdateName();
67
68 ClassDef(TGuiBldNameFrame, 0) // frame name editor
69};
70
71
72#endif
int Int_t
Definition: RtypesCore.h:43
bool Bool_t
Definition: RtypesCore.h:61
#define ClassDef(name, id)
Definition: Rtypes.h:322
char name[80]
Definition: TGX11.cxx:109
void Reset()
Reset name frame.
Bool_t CheckItems(TGCompositeFrame *main)
Check if items are in the list tree and at the same place.
void UpdateName()
Set new name of frame, if it doesn't already exist in the same MDI frame.
void RemoveFrame(TGFrame *frame)
Remove a frame.
TGListTree * fListTree
TRootGuiBuilder * fBuilder
TGCompositeFrame * fTitleFrame
void MapItems(TGCompositeFrame *main)
Map all the frames and subframes in mdi frame to the list tree.
void SelectFrameByItem(TGListTreeItem *item, Int_t i=0)
When list tree item is clicked, frame with that name is selected.
TGTextEntry * fFrameName
TGuiBldNameFrame(const TGWindow *p, TGuiBldEditor *editor)
Constructor.
TGuiBldEditor * fEditor
void DoRedraw()
Redraw frame (just a prototype).
TGCompositeFrame * GetMdi(TGFrame *frame)
Find the parent mdi frame.
TGuiBldDragManager * fManager
virtual ~TGuiBldNameFrame()
void ChangeSelected(TGFrame *frame)
Change selected frame.
TGListTreeItem * FindItemByName(TGListTree *tree, const char *name, TGListTreeItem *item=0)
Find item with GetText == name. Search tree downwards starting at item.
int main(int argc, char **argv)
Definition: tree.py:1