TContextMenuImp.h

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TContextMenuImp.h 20877 2007-11-19 11:17:07Z rdm $
00002 // Author: Nenad Buncic   08/02/96
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TContextMenuImp
00013 #define ROOT_TContextMenuImp
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////////////////
00017 //                                                                            //
00018 // TContextMenuImp                                                            //
00019 //                                                                            //
00020 // This class provides an interface to GUI independent                        //
00021 // context sensitive popup menus.                                             //
00022 //                                                                            //
00023 ////////////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_Rtypes
00026 #include "Rtypes.h"
00027 #endif
00028 
00029 class TContextMenu;
00030 class TObject;
00031 class TMethod;
00032 class TFunction;
00033 
00034 
00035 class TContextMenuImp {
00036 
00037 protected:
00038    TContextMenu *fContextMenu; //TContextMenu associated with this implementation
00039 
00040    TContextMenuImp(const TContextMenuImp& cmi)
00041      : fContextMenu(cmi.fContextMenu) { }
00042    TContextMenuImp& operator=(const TContextMenuImp& cmi)
00043      {if(this!=&cmi) fContextMenu=cmi.fContextMenu;
00044      return *this;}
00045 
00046 public:
00047    TContextMenuImp(TContextMenu *c=0) : fContextMenu(c) { }
00048    virtual ~TContextMenuImp() { }
00049 
00050    virtual TContextMenu *GetContextMenu() const { return fContextMenu; }
00051 
00052    virtual void Dialog(TObject *object, TFunction *function);
00053    virtual void Dialog(TObject *object, TMethod *method);
00054    virtual void DisplayPopup(Int_t x, Int_t y);
00055 
00056    ClassDef(TContextMenuImp,0) //Context sensitive popup menu implementation
00057 };
00058 
00059 inline void TContextMenuImp::Dialog(TObject *, TFunction *) { }
00060 inline void TContextMenuImp::Dialog(TObject *, TMethod *) { }
00061 inline void TContextMenuImp::DisplayPopup(Int_t, Int_t) { }
00062 
00063 #endif

Generated on Tue Jul 5 14:10:24 2011 for ROOT_528-00b_version by  doxygen 1.5.1