]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/gridg.cpp
Moved gsockunx.h from src/unix to include/wx/unix
[wxWidgets.git] / src / generic / gridg.cpp
index 9ef503b3bb9826d278853c3b9f31338e4e9d0560..cb590108cbf6988ca8d2c6b9bbc1dab649c65b6a 100644 (file)
 #define wxUSE_DOUBLE_BUFFERING  1
 #endif
 
+#ifdef __WXPM__
+#define wxIPE_ADJUST            -1
+#define wxIPE_STYLE             wxNO_BORDER
+#define wxIPE_HIGHLIGHT         1
+#define wxUSE_DOUBLE_BUFFERING  1
+#endif
+
 #ifdef __WXGTK__
 #define wxIPE_ADJUST            -1
 #define wxIPE_STYLE             wxNO_BORDER
@@ -1518,8 +1525,16 @@ void wxGenericGrid::OnSelectCellImplementation(wxDC *dc, int row, int col)
 
       m_inPlaceTextItem->Show(TRUE);
       m_inPlaceTextItem->SetFocus();
-      if (wxIPE_HIGHLIGHT)
+#if defined(__VISAGECPP__)
+      {
+          int                       highlight = wxIPE_HIGHLIGHT;
+          if (highlight != 0)
+              HighlightCell(dc, TRUE);
+      }
+#else
+      if (wxIPE_HIGHLIGHT != 0)
           HighlightCell(dc, TRUE);
+#endif
     }
   else
     {
@@ -1771,21 +1786,21 @@ void wxGenericGrid::DrawTextRect(wxDC *dc, const wxString& text, wxRect *rect, i
   {
     case wxRIGHT:
     {
-      x = (rect->x + rect->width - textWidth - 1.0);
-      y = (rect->y + (rect->height - textHeight)/2.0);
+      x = (rect->x + rect->width - textWidth - (float)1.0);
+      y = (rect->y + (rect->height - textHeight)/(float)2.0);
       break;
     }
     case wxCENTRE:
     {
-      x = (rect->x + (rect->width - textWidth)/2.0);
-      y = (rect->y + (rect->height - textHeight)/2.0);
+      x = (rect->x + (rect->width - textWidth)/(float)2.0);
+      y = (rect->y + (rect->height - textHeight)/(float)2.0);
       break;
     }
     case wxLEFT:
     default:
     {
-      x = (rect->x + 1.0);
-      y = (rect->y + (rect->height - textHeight)/2.0);
+      x = (rect->x + (float)1.0);
+      y = (rect->y + (rect->height - textHeight)/(float)2.0);
       break;
     }
   }