Revision bd5b1ff61fc9c590bd7fe6f00858af2c015eacda authored by Olivier Couet on 23 August 2006, 09:00:21 UTC, committed by Olivier Couet on 23 August 2006, 09:00:21 UTC

git-svn-id: http://root.cern.ch/svn/root/trunk@16089 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 4121781
Raw File
TGedEditor.h
// @(#)root/ged:$Name:  $:$Id: TGedEditor.h,v 1.8 2006/05/23 04:47:36 brun Exp $
// Author: Marek Biskup, Ilka Antcheva   02/12/2003

/*************************************************************************
 * Copyright (C) 1995-2000, 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_TGedEditor
#define ROOT_TGedEditor

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGedEditor                                                           //
//                                                                      //
// Editor is a composite frame that contains GUI for editting objects   //
// in a canvas. It looks for the class ROOT_classname + 'Editor'.       //
//                                                                      //
// It connects to a Canvas and listens for selected objects             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

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

class TCanvas;
class TGCanvas;
class TGTab;
class TVirtualPad;
class TGedFrame;
class TGedElement;

class TGedEditor : public TVirtualPadEditor, public TGMainFrame {

protected:
   TGCanvas         *fCan;              //provides scroll bars
   TGTab            *fTab;              //tab widget holding the editor
   TGCompositeFrame *fTabContainer;     //main tab container
   TGCompositeFrame *fStyle;            //style tab container frame
   TObject          *fModel;            //selected object
   TVirtualPad      *fPad;              //selected pad
   TCanvas          *fCanvas;           //canvas related to the editor
   TClass           *fClass;            //class of the selected object
   Int_t             fWid;              //widget id
   Bool_t            fGlobal;           //true if editor is global

   virtual void GetEditors();
   virtual void GetClassEditor(TClass *cl);
   virtual void GetBaseClassEditor(TClass *cl);

private:
   TGedEditor(const TGedEditor&);              // not implemented
   TGedEditor& operator=(const TGedEditor&);   // not implemented

public:
   TGedEditor(TCanvas* canvas = 0);
   virtual ~TGedEditor();

   virtual void   CloseWindow();
   virtual void   ConnectToCanvas(TCanvas *c);
   virtual void   DeleteEditors();
   virtual void   DisconnectEditors(TCanvas *canvas);
   TCanvas       *GetCanvas() const { return fCanvas; }
   virtual Bool_t IsGlobal() const { return fGlobal; }
   virtual void   Hide();
   virtual void   SetCanvas(TCanvas *c);
   virtual void   SetGlobal(Bool_t global) { fGlobal = global; }
   virtual void   SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
   virtual void   Show();
   virtual void   RecursiveRemove(TObject* obj);

   ClassDef(TGedEditor,0)  //new editor
};

#endif
back to top