Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Fireworks_Core_CmsShowModelPopup_h
0002 #define Fireworks_Core_CmsShowModelPopup_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     CmsShowModelPopup
0007 //
0008 /**\class CmsShowModelPopup CmsShowModelPopup.h Fireworks/Core/interface/CmsShowModelPopup.h
0009 
0010    Description: <one line class summary>
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:
0018 //         Created:  Fri Jun 27 11:23:31 EDT 2008
0019 //
0020 
0021 // system include files
0022 #include <set>
0023 #include <vector>
0024 #ifndef __CINT__
0025 #include <sigc++/connection.h>
0026 #endif
0027 #include "GuiTypes.h"
0028 #include "TGFrame.h"
0029 
0030 // user include files
0031 #ifndef __CINT__
0032 #include "Fireworks/Core/interface/FWModelChangeSignal.h"
0033 #endif
0034 
0035 // forward declarations
0036 class FWEventItem;
0037 class FWSelectionManager;
0038 class FWColorManager;
0039 //class FWModelId;
0040 class FWColorSelect;
0041 class TGCheckButton;
0042 class TGLabel;
0043 class TGTextButton;
0044 class TGTextButton;
0045 class TGHSlider;
0046 class FWDetailViewManager;
0047 class FWSelectionManager;
0048 class FWDialogBuilder;
0049 
0050 class CmsShowModelPopup;
0051 
0052 class CmsShowModelPopup : public TGTransientFrame {
0053 public:
0054   friend class CmsShowModelPopupDetailViewButtonAdapter;
0055 
0056   CmsShowModelPopup(FWDetailViewManager*,
0057                     FWSelectionManager*,
0058                     const FWColorManager*,
0059                     const TGWindow* p = nullptr,
0060                     UInt_t w = 1,
0061                     UInt_t h = 1);
0062   ~CmsShowModelPopup() override;
0063 
0064   void CloseWindow() override { UnmapWindow(); }
0065   // ---------- const member functions ---------------------
0066 
0067   // ---------- static member functions --------------------
0068 
0069   // ---------- member functions ---------------------------
0070   void fillModelPopup(const FWSelectionManager& iSelMgr);
0071   void updateDisplay();
0072   void colorSetChanged();
0073   void disconnectAll();
0074   void changeModelColor(Color_t iColor);
0075   void changeModelOpacity(Int_t opacity = 100);
0076   void toggleModelVisible(Bool_t on = kTRUE);
0077   void openDetailedView();
0078 
0079   void clicked();
0080 
0081   ClassDefOverride(CmsShowModelPopup, 0);
0082 
0083 private:
0084   CmsShowModelPopup(const CmsShowModelPopup&);  // stop default
0085 
0086   const CmsShowModelPopup& operator=(const CmsShowModelPopup&);  // stop default
0087 
0088   // ---------- member data --------------------------------
0089   TGLabel* m_modelLabel;
0090   FWColorSelect* m_colorSelectWidget;
0091   TGCheckButton* m_isVisibleButton;
0092   std::vector<TGTextButton*> m_openDetailedViewButtons;
0093 
0094 #ifndef __CINT__
0095   std::set<FWModelId> m_models;
0096   sigc::connection m_modelChangedConn;
0097   sigc::connection m_destroyedConn;
0098   sigc::connection m_changes;
0099 #endif
0100   FWDetailViewManager* m_detailViewManager;
0101   const FWColorManager* m_colorManager;
0102   TGHSlider* m_opacitySlider;
0103   FWDialogBuilder* m_dialogBuilder;
0104 };
0105 
0106 #endif