Logo ROOT   6.08/07
Reference Guide
TGuiBldEditor.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_TGuiBldEditor
13 #define ROOT_TGuiBldEditor
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGuiBldEditor //
19 // //
20 //////////////////////////////////////////////////////////////////////////
21 
22 
23 #ifndef ROOT_TGFrame
24 #include "TGFrame.h"
25 #endif
26 
27 #ifndef ROOT_TGNumberEntry
28 #include "TGNumberEntry.h"
29 #endif
30 
31 class TGuiBldHintsEditor;
32 class TGuiBldNameFrame;
33 class TGuiBldBorderFrame;
35 class TGuiBldDragManager;
36 class TGTab;
37 class TGButton;
38 class TGLabel;
39 class TGGroupFrame;
40 class TGCompositeFrame;
41 
42 //////////////////////////////////////////////////////////////////////////
44 
45 friend class TGuiBldDragManager;
46 
47 private:
48  TGFrame *fSelected; // editted frame
49  TGuiBldNameFrame *fNameFrame; // frame name
51  TGuiBldBorderFrame *fBorderFrame; // frame border
53  TGGroupFrame *fPositionFrame; // X,Y coordinates
54  TGuiBldDragManager *fManager; // main manager
55  Bool_t fEmbedded; // kTRUE when it is inside guibuilder
56  TGTab *fTab; // tab frame
57  TGCompositeFrame *fTablay; // layout tab frame
58  Int_t fLayoutId; // the id of layout tab
59  TGTextButton *fLayoutButton; // button to enable/disable layout
60  TGLabel *fLayoutLabel; // saying if layout is enabled
61  TGNumberEntry *fXpos; // X position
62  TGNumberEntry *fYpos; // Y position
63 
64 public:
65  TGuiBldEditor(const TGWindow *p = 0);
66  virtual ~TGuiBldEditor();
67 
68  Int_t GetXPos() const { return fXpos->GetIntNumber(); }
69  Int_t GetYPos() const { return fYpos->GetIntNumber(); }
70  void SetXPos(Int_t pos) { fXpos->SetIntNumber(pos); }
71  void SetYPos(Int_t pos) { fYpos->SetIntNumber(pos); }
72 
73  TGFrame *GetSelected() const { return fSelected; }
74  Bool_t IsEmbedded() const { return fEmbedded; }
75  void SetEmbedded(Bool_t e = kTRUE) { fEmbedded = e; }
76  void Hide();
77  void UpdateBorder(Int_t);
78  void UpdateBackground(Pixel_t col);
79  void UpdateForeground(Pixel_t col);
80  void Reset();
82 
83  void RemoveFrame(TGFrame *);
84  void TabSelected(Int_t id);
85  void UpdateSelected(TGFrame* = 0); //*SIGNAL*
86  void ChangeSelected(TGFrame*); //*SIGNAL*
87  void SwitchLayout();
88 
89  ClassDef(TGuiBldEditor,0) // frame property editor
90 };
91 
92 #endif
TGTextButton * fLayoutButton
Definition: TGuiBldEditor.h:59
TGNumberEntry * fXpos
Definition: TGuiBldEditor.h:61
Bool_t IsEmbedded() const
Definition: TGuiBldEditor.h:74
void UpdateBorder(Int_t)
Update border of selected frame.
void TabSelected(Int_t id)
Handle selected.
Definition: TGTab.h:66
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGFrame * GetSelected() const
Definition: TGuiBldEditor.h:73
void UpdateForeground(Pixel_t col)
Update foreground.
TGLabel * fLayoutLabel
Definition: TGuiBldEditor.h:60
TGGroupFrame * fPositionFrame
Definition: TGuiBldEditor.h:53
void ChangeSelected(TGFrame *)
Change selected frame.
void RemoveFrame(TGFrame *)
Remove a frame.
TGNumberEntry * fYpos
Definition: TGuiBldEditor.h:62
void SetYPos(Int_t pos)
Definition: TGuiBldEditor.h:71
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
TGuiBldBorderFrame * fBorderFrame
Definition: TGuiBldEditor.h:51
virtual Long_t GetIntNumber() const
void SetXPos(Int_t pos)
Definition: TGuiBldEditor.h:70
virtual ~TGuiBldEditor()
Destructor.
TGuiBldHintsEditor * fHintsFrame
Definition: TGuiBldEditor.h:50
Int_t GetXPos() const
Definition: TGuiBldEditor.h:68
void Reset()
Reset the editor.
void Hide()
Hide editor.
Bool_t fEmbedded
Definition: TGuiBldEditor.h:55
TGuiBldHintsEditor * GetHintsEditor() const
Definition: TGuiBldEditor.h:81
TGuiBldEditor(const TGWindow *p=0)
Constructor.
virtual void SetIntNumber(Long_t val)
Int_t GetYPos() const
Definition: TGuiBldEditor.h:69
void SwitchLayout()
Popup dialog to set layout of editted frame off.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Definition: TRolke.cxx:630
TGuiBldGeometryFrame * fGeomFrame
Definition: TGuiBldEditor.h:52
TGCompositeFrame * fTablay
Definition: TGuiBldEditor.h:57
void UpdateSelected(TGFrame *=0)
Update selected frame.
TGuiBldNameFrame * fNameFrame
Definition: TGuiBldEditor.h:49
void UpdateBackground(Pixel_t col)
Update background.
const Bool_t kTRUE
Definition: Rtypes.h:91
TGuiBldDragManager * fManager
Definition: TGuiBldEditor.h:54
void SetEmbedded(Bool_t e=kTRUE)
Definition: TGuiBldEditor.h:75
TGFrame * fSelected
Definition: TGuiBldEditor.h:48