ROOT logo
// @(#)root/guibuilder:$Id$
// Author: Valeriy Onuchin   12/09/04

/*************************************************************************
 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGuiBldEditor
#define ROOT_TGuiBldEditor


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGuiBldEditor                                                        //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif

#ifndef ROOT_TGNumberEntry
#include "TGNumberEntry.h"
#endif

class TGuiBldHintsEditor;
class TGuiBldNameFrame;
class TGuiBldBorderFrame;
class TGuiBldGeometryFrame;
class TGuiBldDragManager;
class TGTab;
class TGButton;
class TGLabel;
class TGGroupFrame;
class TGCompositeFrame;

//////////////////////////////////////////////////////////////////////////
class TGuiBldEditor : public TGVerticalFrame {

friend class TGuiBldDragManager;

private:
   TGFrame              *fSelected;       // editted frame
   TGuiBldNameFrame     *fNameFrame;      // frame name
   TGuiBldHintsEditor   *fHintsFrame;     // frame hints
   TGuiBldBorderFrame   *fBorderFrame;    // frame border
   TGuiBldGeometryFrame *fGeomFrame;      // frame geom
   TGGroupFrame         *fPositionFrame;  // X,Y coordinates
   TGuiBldDragManager   *fManager;        // main manager
   Bool_t                fEmbedded;       // kTRUE when it is inside guibuilder
   TGTab                *fTab;            // tab frame
   TGCompositeFrame     *fTablay;         // layout tab frame
   Int_t                 fLayoutId;       // the id of layout tab
   TGTextButton         *fLayoutButton;   // button to enable/disable layout
   TGLabel              *fLayoutLabel;    // saying if layout is enabled
   TGNumberEntry        *fXpos;           // X position
   TGNumberEntry        *fYpos;           // Y position

public:
   TGuiBldEditor(const TGWindow *p = 0);
   virtual ~TGuiBldEditor();

   Int_t    GetXPos() const { return fXpos->GetIntNumber(); }
   Int_t    GetYPos() const { return fYpos->GetIntNumber(); }
   void     SetXPos(Int_t pos) { fXpos->SetIntNumber(pos); }
   void     SetYPos(Int_t pos) { fYpos->SetIntNumber(pos); }

   TGFrame *GetSelected() const { return fSelected; }
   Bool_t   IsEmbedded() const { return fEmbedded; }
   void     SetEmbedded(Bool_t e = kTRUE) { fEmbedded = e; }
   void     Hide();
   void     UpdateBorder(Int_t);
   void     UpdateBackground(Pixel_t col);
   void     UpdateForeground(Pixel_t col);
   void     Reset();
   TGuiBldHintsEditor *GetHintsEditor() const { return fHintsFrame; }

   void     RemoveFrame(TGFrame *);
   void     TabSelected(Int_t id);
   void     UpdateSelected(TGFrame* = 0); //*SIGNAL*
   void     ChangeSelected(TGFrame*);     //*SIGNAL*
   void     SwitchLayout();

   ClassDef(TGuiBldEditor,0)  // frame property editor
};

#endif
 TGuiBldEditor.h:1
 TGuiBldEditor.h:2
 TGuiBldEditor.h:3
 TGuiBldEditor.h:4
 TGuiBldEditor.h:5
 TGuiBldEditor.h:6
 TGuiBldEditor.h:7
 TGuiBldEditor.h:8
 TGuiBldEditor.h:9
 TGuiBldEditor.h:10
 TGuiBldEditor.h:11
 TGuiBldEditor.h:12
 TGuiBldEditor.h:13
 TGuiBldEditor.h:14
 TGuiBldEditor.h:15
 TGuiBldEditor.h:16
 TGuiBldEditor.h:17
 TGuiBldEditor.h:18
 TGuiBldEditor.h:19
 TGuiBldEditor.h:20
 TGuiBldEditor.h:21
 TGuiBldEditor.h:22
 TGuiBldEditor.h:23
 TGuiBldEditor.h:24
 TGuiBldEditor.h:25
 TGuiBldEditor.h:26
 TGuiBldEditor.h:27
 TGuiBldEditor.h:28
 TGuiBldEditor.h:29
 TGuiBldEditor.h:30
 TGuiBldEditor.h:31
 TGuiBldEditor.h:32
 TGuiBldEditor.h:33
 TGuiBldEditor.h:34
 TGuiBldEditor.h:35
 TGuiBldEditor.h:36
 TGuiBldEditor.h:37
 TGuiBldEditor.h:38
 TGuiBldEditor.h:39
 TGuiBldEditor.h:40
 TGuiBldEditor.h:41
 TGuiBldEditor.h:42
 TGuiBldEditor.h:43
 TGuiBldEditor.h:44
 TGuiBldEditor.h:45
 TGuiBldEditor.h:46
 TGuiBldEditor.h:47
 TGuiBldEditor.h:48
 TGuiBldEditor.h:49
 TGuiBldEditor.h:50
 TGuiBldEditor.h:51
 TGuiBldEditor.h:52
 TGuiBldEditor.h:53
 TGuiBldEditor.h:54
 TGuiBldEditor.h:55
 TGuiBldEditor.h:56
 TGuiBldEditor.h:57
 TGuiBldEditor.h:58
 TGuiBldEditor.h:59
 TGuiBldEditor.h:60
 TGuiBldEditor.h:61
 TGuiBldEditor.h:62
 TGuiBldEditor.h:63
 TGuiBldEditor.h:64
 TGuiBldEditor.h:65
 TGuiBldEditor.h:66
 TGuiBldEditor.h:67
 TGuiBldEditor.h:68
 TGuiBldEditor.h:69
 TGuiBldEditor.h:70
 TGuiBldEditor.h:71
 TGuiBldEditor.h:72
 TGuiBldEditor.h:73
 TGuiBldEditor.h:74
 TGuiBldEditor.h:75
 TGuiBldEditor.h:76
 TGuiBldEditor.h:77
 TGuiBldEditor.h:78
 TGuiBldEditor.h:79
 TGuiBldEditor.h:80
 TGuiBldEditor.h:81
 TGuiBldEditor.h:82
 TGuiBldEditor.h:83
 TGuiBldEditor.h:84
 TGuiBldEditor.h:85
 TGuiBldEditor.h:86
 TGuiBldEditor.h:87
 TGuiBldEditor.h:88
 TGuiBldEditor.h:89
 TGuiBldEditor.h:90
 TGuiBldEditor.h:91
 TGuiBldEditor.h:92