X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df3871691ea8821a60ab2ec47207abfb1337b27d..d10e22fe8ad283f37b1809349028ffc282e393ce:/src/generic/datavgen.cpp diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 934d621f51..73aa09f1ae 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -35,6 +35,7 @@ #include "wx/calctrl.h" #include "wx/popupwin.h" #include "wx/renderer.h" +#include "wx/dcbuffer.h" #include "wx/icon.h" //----------------------------------------------------------------------------- @@ -603,6 +604,43 @@ wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *c m_width = 80; } +wxDataViewColumn::wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *cell, unsigned int model_column, + int width, int flags ) : + wxDataViewColumnBase( bitmap, cell, model_column, width, flags ) +{ + m_width = width; + if (m_width < 0) + m_width = 30; +} + +void wxDataViewColumn::SetAlignment( wxAlignment WXUNUSED(align) ) +{ + // TODO +} + +void wxDataViewColumn::SetSortable( bool WXUNUSED(sortable) ) +{ + // TODO +} + +bool wxDataViewColumn::GetSortable() +{ + // TODO + return false; +} + +void wxDataViewColumn::SetSortOrder( bool WXUNUSED(ascending) ) +{ + // TODO +} + +bool wxDataViewColumn::IsSortOrderAscending() +{ + // TODO + return true; +} + + wxDataViewColumn::~wxDataViewColumn() { } @@ -613,6 +651,12 @@ void wxDataViewColumn::SetTitle( const wxString &title ) } +void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap ) +{ + wxDataViewColumnBase::SetBitmap( bitmap ); + +} + int wxDataViewColumn::GetWidth() { return m_width; @@ -639,6 +683,7 @@ wxDataViewHeaderWindow::wxDataViewHeaderWindow( wxDataViewCtrl *parent, wxWindow m_resizeCursor = new wxCursor( wxCURSOR_SIZEWE ); wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes(); + SetBackgroundStyle( wxBG_STYLE_CUSTOM ); SetOwnForegroundColour( attr.colFg ); SetOwnBackgroundColour( attr.colBg ); if (!m_hasFont) @@ -655,7 +700,10 @@ void wxDataViewHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) int w, h; GetClientSize( &w, &h ); - wxPaintDC dc( this ); + wxAutoBufferedPaintDC dc( this ); + + dc.SetBackground(GetBackgroundColour()); + dc.Clear(); int xpix; m_owner->GetScrollPixelsPerUnit( &xpix, NULL ); @@ -910,6 +958,7 @@ wxDataViewMainWindow::wxDataViewMainWindow( wxDataViewCtrl *parent, wxWindowID i m_hasFocus = false; + SetBackgroundStyle( wxBG_STYLE_CUSTOM ); SetBackgroundColour( *wxWHITE ); UpdateDisplay(); @@ -1051,7 +1100,10 @@ void wxDataViewMainWindow::ScrollWindow( int dx, int dy, const wxRect *rect ) void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) { - wxPaintDC dc( this ); + wxAutoBufferedPaintDC dc( this ); + + dc.SetBackground(GetBackgroundColour()); + dc.Clear(); GetOwner()->PrepareDC( dc );