Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TContextMenuImp.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/base:$Id$
0002 // Author: Nenad Buncic   08/02/96
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, 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_TContextMenuImp
0013 #define ROOT_TContextMenuImp
0014 
0015 
0016 ////////////////////////////////////////////////////////////////////////////////
0017 //                                                                            //
0018 // TContextMenuImp                                                            //
0019 //                                                                            //
0020 // This class provides an interface to GUI independent                        //
0021 // context sensitive popup menus.                                             //
0022 //                                                                            //
0023 ////////////////////////////////////////////////////////////////////////////////
0024 
0025 #include "Rtypes.h"
0026 
0027 class TContextMenu;
0028 class TObject;
0029 class TMethod;
0030 class TFunction;
0031 
0032 
0033 class TContextMenuImp {
0034 
0035 protected:
0036    TContextMenu *fContextMenu{nullptr}; //TContextMenu associated with this implementation
0037 
0038    TContextMenuImp(const TContextMenuImp &cmi) : fContextMenu(cmi.fContextMenu) {}
0039    TContextMenuImp &operator=(const TContextMenuImp &cmi)
0040    {
0041       if (this != &cmi)
0042          fContextMenu = cmi.fContextMenu;
0043       return *this;
0044    }
0045 
0046 public:
0047    TContextMenuImp(TContextMenu *c = nullptr) : fContextMenu(c) {}
0048    virtual ~TContextMenuImp() {}
0049 
0050    virtual TContextMenu *GetContextMenu() const { return fContextMenu; }
0051 
0052    virtual void Dialog(TObject *object, TFunction *function) { (void) object; (void) function; }
0053    virtual void Dialog(TObject *object, TMethod *method) { (void) object; (void) method; }
0054    virtual void DisplayPopup(Int_t x, Int_t y) { (void) x; (void) y; }
0055 
0056    ClassDef(TContextMenuImp,0) //Context sensitive popup menu implementation
0057 };
0058 
0059 #endif