CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/Fireworks/Core/interface/FWTableViewTableManager.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef Fireworks_Core_FWTableViewTableManager_h
00003 #define Fireworks_Core_FWTableViewTableManager_h
00004 //
00005 // Package:     Core
00006 // Class  :     FWTableViewTableManager
00007 // 
00011 //
00012 // Original Author:  
00013 //         Created:  Mon Feb  2 16:40:52 EST 2009
00014 // $Id: FWTableViewTableManager.h,v 1.7 2011/11/18 02:57:07 amraktad Exp $
00015 //
00016 
00017 // system include files
00018 #include <vector>
00019 #include <string>
00020 #include "TQObject.h"
00021 #include "GuiTypes.h"
00022 
00023 // user include files
00024 #include "Fireworks/TableWidget/interface/FWTableManagerBase.h"
00025 #include "Fireworks/TableWidget/interface/FWTextTableCellRenderer.h"
00026 #include "Fireworks/Core/interface/FWTableViewManager.h"
00027 #include "Fireworks/Core/interface/FWExpressionEvaluator.h"
00028 
00029 // forward declarations
00030 class FWTableView;
00031 class FWFramedTextTableCellRenderer;
00032 
00033 class FWTableViewTableManager : public FWTableManagerBase {
00034      friend class FWTableView;
00035 public:
00036      FWTableViewTableManager(const FWTableView *);
00037      virtual ~FWTableViewTableManager();
00038 
00039      // ---------- const member functions ---------------------
00041      virtual  int numberOfRows() const;
00043      virtual  int numberOfColumns() const;
00044      
00046      virtual std::vector<std::string> getTitles() const;
00047      
00050      virtual int unsortedRowNumber(int iSortedRowNumber) const;
00051      
00059      virtual FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const;
00060      
00062      // virtual unsigned int cellHeight() const;
00063      
00065      // virtual std::vector<unsigned int> maxWidthForColumns() const;
00066 
00068      virtual bool hasRowHeaders() const ;
00070      virtual FWTableCellRendererBase* rowHeader(int iSortedRowNumber) const ;
00071 
00073      //virtual void buttonPressedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
00074      //virtual void buttonReleasedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
00075 
00076      // ---------- static member functions --------------------
00077      
00078      // ---------- member functions ---------------------------
00081      // void sort(int iCol, bool iSortOrder);
00082 
00085      void dataChanged(); //*SIGNAL*
00086       
00089      // void visualPropertiesChanged(); //*SIGNAL*
00090      
00091      // ClassDef(FWTableViewTableManager,0);
00092      void updateEvaluators ();
00093 
00094 protected:
00097      virtual void implSort(int iCol, bool iSortOrder);
00098      std::vector<int> m_sortedToUnsortedIndices;
00099 
00100      const FWTableView *m_view;
00101      TGGC *m_graphicsContext;
00102      TGGC *m_highlightContext;
00103      FWTextTableCellRenderer *m_renderer;
00104 
00105      TGGC *m_rowContext;
00106      TGGC *m_rowFillContext;
00107      FWFramedTextTableCellRenderer *m_rowRenderer;
00108    
00109      std::vector<FWExpressionEvaluator> m_evaluators;
00110      std::vector<FWTableViewManager::TableEntry> *m_tableFormats;
00111      
00112      // ---------- member data --------------------------------
00113      // int m_sortColumn;
00114      // bool m_sortOrder;
00115      mutable bool m_caughtExceptionInCellRender;
00116 
00117 private:
00118      FWTableViewTableManager(const FWTableViewTableManager&); // stop default     
00119      const FWTableViewTableManager& operator=(const FWTableViewTableManager&); // stop default
00120 };
00121 
00122 
00123 #endif