X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c551f1c232840bda79b0b7106b9c11a2773ffaf..6c0d0845c205a59cb0d8c73c0e4bcc84a9d6c550:/src/generic/gridg.cpp diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp index 9ef503b3bb..4c33a1a32a 100644 --- a/src/generic/gridg.cpp +++ b/src/generic/gridg.cpp @@ -25,6 +25,8 @@ #pragma hdrstop #endif +#if wxUSE_GRID + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/dcclient.h" @@ -49,6 +51,13 @@ #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 @@ -116,7 +125,7 @@ wxGenericGrid::wxGenericGrid() m_cellBackgroundColour = *wxWHITE; m_labelTextColour = *wxBLACK; // m_labelBackgroundColour = *wxLIGHT_GREY; - m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE ); + m_labelBackgroundColour = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ); m_labelBackgroundBrush = wxNullBrush; m_labelTextFont = wxNullFont; m_cellTextFont = wxNullFont; @@ -129,9 +138,9 @@ wxGenericGrid::wxGenericGrid() m_inScroll = FALSE; #if defined(__WIN95__) - m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); + m_scrollWidth = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); #elif defined(__WXGTK__) - m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); + m_scrollWidth = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); #else m_scrollWidth = 16; #endif @@ -186,7 +195,7 @@ bool wxGenericGrid::Create(wxWindow *parent, m_cellBackgroundColour = *wxWHITE; m_labelTextColour = *wxBLACK; // m_labelBackgroundColour = *wxLIGHT_GREY; - m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE ); + m_labelBackgroundColour = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ); m_labelBackgroundBrush = wxNullBrush; m_labelTextFont = * wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxBOLD); m_cellTextFont = * wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL); @@ -197,9 +206,9 @@ bool wxGenericGrid::Create(wxWindow *parent, m_inOnTextInPlace = FALSE; m_inScroll = FALSE; #if defined(__WIN95__) - m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); + m_scrollWidth = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); #elif defined(__WXGTK__) - m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); + m_scrollWidth = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); #else m_scrollWidth = 16; #endif @@ -1518,8 +1527,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 +1788,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; } } @@ -2837,3 +2854,4 @@ void *wxGenericGrid::GetCellData(int row, int col) return rc; } +#endif // wxUSE_GRID