Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:41

0001 #ifndef Fireworks_Core_FWModelContextMenuHandler_h
0002 #define Fireworks_Core_FWModelContextMenuHandler_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWModelContextMenuHandler
0007 //
0008 /**\class FWModelContextMenuHandler FWModelContextMenuHandler.h Fireworks/Core/interface/FWModelContextMenuHandler.h
0009 
0010  Description: Controls the context menus
0011 
0012  Usage:
0013     This file is used internally by the system
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Tue Sep 22 13:26:02 CDT 2009
0019 //
0020 
0021 // system include files
0022 #include "Rtypes.h"
0023 #include "GuiTypes.h"
0024 
0025 // user include files
0026 
0027 // forward declarations
0028 class TGPopupMenu;
0029 class TGMenuEntry;
0030 class FWSelectionManager;
0031 class FWDetailViewManager;
0032 class FWColorManager;
0033 class FWColorPopup;
0034 class FWGUIManager;
0035 class FWViewContextMenuHandlerBase;
0036 
0037 class FWModelContextMenuHandler {
0038 public:
0039   FWModelContextMenuHandler(FWSelectionManager*, FWDetailViewManager*, FWColorManager*, FWGUIManager*);
0040   virtual ~FWModelContextMenuHandler();
0041 
0042   // ---------- const member functions ---------------------
0043   ///NOTE: iX and iY are in global coordinates
0044   void showSelectedModelContext(Int_t iX, Int_t iY, FWViewContextMenuHandlerBase*) const;
0045 
0046   // ---------- static member functions --------------------
0047 
0048   // ---------- member functions ---------------------------
0049   void chosenItem(Int_t);
0050   void colorChangeRequested(Color_t);
0051 
0052   void addViewEntry(const char*, int, bool enabled = true);
0053   ClassDef(FWModelContextMenuHandler, 0);
0054 
0055 private:
0056   FWModelContextMenuHandler(const FWModelContextMenuHandler&);  // stop default
0057 
0058   const FWModelContextMenuHandler& operator=(const FWModelContextMenuHandler&);  // stop default
0059 
0060   void createModelContext() const;
0061   void createColorPopup() const;
0062   // ---------- member data --------------------------------
0063   mutable TGPopupMenu* m_modelPopup;
0064   mutable FWColorPopup* m_colorPopup;
0065   FWSelectionManager* m_selectionManager;
0066   FWDetailViewManager* m_detailViewManager;
0067   FWColorManager* m_colorManager;
0068   FWGUIManager* m_guiManager;
0069   mutable TGMenuEntry* m_seperator;
0070   mutable TGMenuEntry* m_viewSeperator;
0071   mutable TGMenuEntry* m_afterViewSeperator;
0072   mutable Int_t m_x;
0073   mutable Int_t m_y;
0074   mutable unsigned int m_nDetailViewEntries;
0075   mutable unsigned int m_nViewEntries;
0076   mutable FWViewContextMenuHandlerBase* m_viewHander;
0077 };
0078 
0079 #endif