Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Fireworks_TableWidget_FWColumnLabelCellRenderer_h
0002 #define Fireworks_TableWidget_FWColumnLabelCellRenderer_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     TableWidget
0006 // Class  :     FWColumnLabelCellRenderer
0007 //
0008 /**\class FWColumnLabelCellRenderer FWColumnLabelCellRenderer.h Fireworks/TableWidget/interface/FWColumnLabelCellRenderer.h
0009 
0010  Description: Cell Renderer which handles the labels at the top of columns
0011 
0012  Usage:
0013     This renderer will draw both the text of the column's label and if the sort order has been set to kAscendingSort or kDescendingSort
0014     it will also draw the appropriate symbol denoting the sort order of the column.
0015 
0016 */
0017 //
0018 // Original Author:  Chris Jones
0019 //         Created:  Mon Feb  2 16:44:11 EST 2009
0020 //
0021 
0022 // system include files
0023 
0024 // user include files
0025 #include "Fireworks/TableWidget/interface/SortOrder.h"
0026 #include "Fireworks/TableWidget/interface/FWTextTableCellRenderer.h"
0027 
0028 // forward declarations
0029 
0030 class FWColumnLabelCellRenderer : public FWTextTableCellRenderer {
0031 public:
0032   FWColumnLabelCellRenderer(const TGGC* iContext = &(getDefaultGC()), bool isSortable = true);
0033   ~FWColumnLabelCellRenderer() override;
0034 
0035   // ---------- const member functions ---------------------
0036   fireworks::table::SortOrder sortOrder() const;
0037 
0038   UInt_t width() const override;
0039 
0040   // ---------- static member functions --------------------
0041 
0042   // ---------- member functions ---------------------------
0043   void setSortOrder(fireworks::table::SortOrder);
0044 
0045   void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight) override;
0046 
0047 private:
0048   //FWColumnLabelCellRenderer(const FWColumnLabelCellRenderer&); // stop default
0049 
0050   //const FWColumnLabelCellRenderer& operator=(const FWColumnLabelCellRenderer&); // stop default
0051 
0052   // ---------- member data --------------------------------
0053   static const UInt_t kGap = 2;
0054   fireworks::table::SortOrder m_sortOrder;
0055   int m_sizeOfOrderIcon;
0056   int m_sizeOfOrderIconStartX;
0057 
0058   bool m_isSortable;
0059 };
0060 
0061 #endif