]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
trying to avoid redraw problems at wrong places
[wxWidgets.git] / src / generic / grid.cpp
index fe2d7c5d0c96473e04ee98940efaba6ef8f4b3bc..cfea196c38546f0cdf0f6e2d6a104e0309139b6e 100644 (file)
@@ -3760,16 +3760,49 @@ static int CoordToRowOrCol(int coord, int defaultDist, int minDist,
 /////////////////////////////////////////////////////////////////////
 
 #if wxUSE_EXTENDED_RTTI
+WX_DEFINE_FLAGS( wxGridStyle )
+
+wxBEGIN_FLAGS( wxGridStyle )
+    // new style border flags, we put them first to
+    // use them for streaming out
+    wxFLAGS_MEMBER(wxBORDER_SIMPLE)
+    wxFLAGS_MEMBER(wxBORDER_SUNKEN)
+    wxFLAGS_MEMBER(wxBORDER_DOUBLE)
+    wxFLAGS_MEMBER(wxBORDER_RAISED)
+    wxFLAGS_MEMBER(wxBORDER_STATIC)
+    wxFLAGS_MEMBER(wxBORDER_NONE)
+    
+    // old style border flags
+    wxFLAGS_MEMBER(wxSIMPLE_BORDER)
+    wxFLAGS_MEMBER(wxSUNKEN_BORDER)
+    wxFLAGS_MEMBER(wxDOUBLE_BORDER)
+    wxFLAGS_MEMBER(wxRAISED_BORDER)
+    wxFLAGS_MEMBER(wxSTATIC_BORDER)
+    wxFLAGS_MEMBER(wxNO_BORDER)
+
+    // standard window styles
+    wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
+    wxFLAGS_MEMBER(wxCLIP_CHILDREN)
+    wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
+    wxFLAGS_MEMBER(wxWANTS_CHARS)
+    wxFLAGS_MEMBER(wxNO_FULL_REPAINT_ON_RESIZE)
+    wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
+    wxFLAGS_MEMBER(wxVSCROLL)
+    wxFLAGS_MEMBER(wxHSCROLL)
+
+wxEND_FLAGS( wxGridStyle )
+
 IMPLEMENT_DYNAMIC_CLASS_XTI(wxGrid, wxScrolledWindow,"wx/grid.h")
 
-WX_BEGIN_PROPERTIES_TABLE(wxGrid)
-    WX_HIDE_PROPERTY( Children )
-WX_END_PROPERTIES_TABLE()
+wxBEGIN_PROPERTIES_TABLE(wxGrid)
+    wxHIDE_PROPERTY( Children )
+    wxPROPERTY_FLAGS( WindowStyle , wxGridStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
+wxEND_PROPERTIES_TABLE()
 
-WX_BEGIN_HANDLERS_TABLE(wxGrid)
-WX_END_HANDLERS_TABLE()
+wxBEGIN_HANDLERS_TABLE(wxGrid)
+wxEND_HANDLERS_TABLE()
 
-WX_CONSTRUCTOR_5( wxGrid , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle ) 
+wxCONSTRUCTOR_5( wxGrid , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle ) 
 
 /*
  TODO : Expose more information of a list's layout etc. via appropriate objects (à la NotebookPageInfo)
@@ -3817,8 +3850,8 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id,
                                   style | wxWANTS_CHARS , name))
         return FALSE;
 
-    m_colMinWidths =GRID_HASH_SIZE ;
-    m_rowMinHeights = GRID_HASH_SIZE ;
+    m_colMinWidths = wxLongToLongHashMap(GRID_HASH_SIZE) ;
+    m_rowMinHeights = wxLongToLongHashMap(GRID_HASH_SIZE) ;
 
     Create() ;