Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:06

0001 // @(#)root/guibuilder:$Id$
0002 // Author: Valeriy Onuchin   12/09/04
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGuiBldEditor
0013 #define ROOT_TGuiBldEditor
0014 
0015 
0016 #include "TGFrame.h"
0017 
0018 #include "TGNumberEntry.h"
0019 
0020 class TGuiBldHintsEditor;
0021 class TGuiBldNameFrame;
0022 class TGuiBldBorderFrame;
0023 class TGuiBldGeometryFrame;
0024 class TGuiBldDragManager;
0025 class TGTab;
0026 class TGButton;
0027 class TGLabel;
0028 class TGGroupFrame;
0029 class TGCompositeFrame;
0030 
0031 //////////////////////////////////////////////////////////////////////////
0032 class TGuiBldEditor : public TGVerticalFrame {
0033 
0034 friend class TGuiBldDragManager;
0035 
0036 private:
0037    TGFrame              *fSelected;       // edited frame
0038    TGuiBldNameFrame     *fNameFrame;      // frame name
0039    TGuiBldHintsEditor   *fHintsFrame;     // frame hints
0040    TGuiBldBorderFrame   *fBorderFrame;    // frame border
0041    TGuiBldGeometryFrame *fGeomFrame;      // frame geom
0042    TGGroupFrame         *fPositionFrame;  // X,Y coordinates
0043    TGuiBldDragManager   *fManager;        // main manager
0044    Bool_t                fEmbedded;       // kTRUE when it is inside guibuilder
0045    TGTab                *fTab;            // tab frame
0046    TGCompositeFrame     *fTablay;         // layout tab frame
0047    Int_t                 fLayoutId;       // the id of layout tab
0048    TGTextButton         *fLayoutButton;   // button to enable/disable layout
0049    TGLabel              *fLayoutLabel;    // saying if layout is enabled
0050    TGNumberEntry        *fXpos;           // X position
0051    TGNumberEntry        *fYpos;           // Y position
0052 
0053 public:
0054    TGuiBldEditor(const TGWindow *p = nullptr);
0055    ~TGuiBldEditor() override;
0056 
0057    Int_t    GetXPos() const { return fXpos->GetIntNumber(); }
0058    Int_t    GetYPos() const { return fYpos->GetIntNumber(); }
0059    void     SetXPos(Int_t pos) { fXpos->SetIntNumber(pos); }
0060    void     SetYPos(Int_t pos) { fYpos->SetIntNumber(pos); }
0061 
0062    TGFrame *GetSelected() const { return fSelected; }
0063    Bool_t   IsEmbedded() const { return fEmbedded; }
0064    void     SetEmbedded(Bool_t e = kTRUE) { fEmbedded = e; }
0065    void     Hide();
0066    void     UpdateBorder(Int_t);
0067    void     UpdateBackground(Pixel_t col);
0068    void     UpdateForeground(Pixel_t col);
0069    void     Reset();
0070    TGuiBldHintsEditor *GetHintsEditor() const { return fHintsFrame; }
0071 
0072    void     RemoveFrame(TGFrame *) override;
0073    void     TabSelected(Int_t id);
0074    void     UpdateSelected(TGFrame* = nullptr); //*SIGNAL*
0075    void     ChangeSelected(TGFrame*);     //*SIGNAL*
0076    void     SwitchLayout();
0077 
0078    ClassDefOverride(TGuiBldEditor,0)  // frame property editor
0079 };
0080 
0081 #endif