NIREP

C:/Programs/source/NIREP/DisplayManager/EzGrid.h

00001 //Got from: http://wiki.wxwidgets.org/WxGrid
00002 
00003 #ifndef _EZGRID_H_INCLUDED_
00004 #define _EZGRID_H_INCLUDED_
00005 
00006 #include "wx/grid.h"
00007 
00008 
00009 // EzGrid Provides extra functionality to wxGrid
00010 class EzGrid : public wxGrid
00011 {
00012 public:
00013         EzGrid(wxWindow *parent,
00014                 wxWindowID id,  const wxPoint& pos = wxDefaultPosition,
00015                 const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS,
00016                 const wxString& name = wxPanelNameStr);
00017         ~EzGrid();
00018         void PreviousState();
00019         void SetNumberRows(int nRows);
00020         void RecalcRowLabel();
00021         void UpdateNumRows();
00022         void ClearSelection();
00023         void RevertSel()
00024         {
00025                 if (m_selTemp) 
00026                 {
00027                         wxASSERT(m_selection == NULL);
00028                         m_selection = m_selTemp;
00029                         m_selTemp = NULL;
00030                 }
00031         }
00032 protected:
00033         virtual wxSize DoGetBestSize() const;
00034         DECLARE_EVENT_TABLE()
00035         void OnCellLeftClick(wxGridEvent& event);
00036 #ifdef __WXGTK__
00037     void OnMouseWheel( wxMouseEvent& event );
00038 #endif
00039         wxGridSelection *m_selTemp;
00040 };
00041 
00042 
00043 
00044 #endif // _EZGRID_H_INCLUDED_
 All Classes Functions Variables Typedefs Enumerations Enumerator