#include "wx/dcclient.h"
#include "wx/timer.h"
#include "wx/settings.h"
+ #include "wx/msgdlg.h"
#endif
#include "wx/stockitem.h"
#include "wx/calctrl.h"
#include "wx/popupwin.h"
#include "wx/renderer.h"
+#include "wx/dcbuffer.h"
#include "wx/icon.h"
//-----------------------------------------------------------------------------
// wxDataViewDateRenderer
// ---------------------------------------------------------
+#if wxUSE_CALENDARCTRL
+
class wxDataViewDateRendererPopupTransient: public wxPopupTransientWindow
{
public:
DismissAndNotify();
}
+#endif // wxUSE_CALENDARCTRL
+
IMPLEMENT_ABSTRACT_CLASS(wxDataViewDateRenderer, wxDataViewCustomRenderer)
wxDataViewDateRenderer::wxDataViewDateRenderer( const wxString &varianttype,
model->GetValue( variant, col, row );
wxDateTime value = variant.GetDateTime();
+#if wxUSE_CALENDARCTRL
wxDataViewDateRendererPopupTransient *popup = new wxDataViewDateRendererPopupTransient(
GetOwner()->GetOwner()->GetParent(), &value, model, col, row );
wxPoint pos = wxGetMousePosition();
popup->Move( pos );
popup->Layout();
popup->Popup( popup->m_cal );
-
+#else
+ wxMessageBox(value.Format());
+#endif
return true;
}
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()
{
}
}
+void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap )
+{
+ wxDataViewColumnBase::SetBitmap( bitmap );
+
+}
+
int wxDataViewColumn::GetWidth()
{
return m_width;
m_resizeCursor = new wxCursor( wxCURSOR_SIZEWE );
wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes();
+ SetBackgroundStyle( wxBG_STYLE_CUSTOM );
SetOwnForegroundColour( attr.colFg );
SetOwnBackgroundColour( attr.colBg );
if (!m_hasFont)
int w, h;
GetClientSize( &w, &h );
- wxPaintDC dc( this );
+ wxAutoBufferedPaintDC dc( this );
+
+ dc.SetBackground(GetBackgroundColour());
+ dc.Clear();
int xpix;
m_owner->GetScrollPixelsPerUnit( &xpix, NULL );
m_hasFocus = false;
+ SetBackgroundStyle( wxBG_STYLE_CUSTOM );
SetBackgroundColour( *wxWHITE );
UpdateDisplay();
void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
- wxPaintDC dc( this );
+ wxAutoBufferedPaintDC dc( this );
+
+ dc.SetBackground(GetBackgroundColour());
+ dc.Clear();
GetOwner()->PrepareDC( dc );
return true;
}
-void wxDataViewCtrl::SetSelection( int row )
+void wxDataViewCtrl::SetSelection( int WXUNUSED(row) )
{
+ // FIXME - TODO
}
-void wxDataViewCtrl::SetSelectionRange( unsigned int from, unsigned int to )
+void wxDataViewCtrl::SetSelectionRange( unsigned int WXUNUSED(from), unsigned int WXUNUSED(to) )
{
+ // FIXME - TODO
}
-void wxDataViewCtrl::SetSelections( const wxArrayInt& aSelections)
+void wxDataViewCtrl::SetSelections( const wxArrayInt& WXUNUSED(aSelections) )
{
+ // FIXME - TODO
}
-
-void wxDataViewCtrl::Unselect( unsigned int row )
+
+void wxDataViewCtrl::Unselect( unsigned int WXUNUSED(row) )
{
+ // FIXME - TODO
}
-bool wxDataViewCtrl::IsSelected( unsigned int row ) const
+bool wxDataViewCtrl::IsSelected( unsigned int WXUNUSED(row) ) const
{
+ // FIXME - TODO
+
return false;
}
int wxDataViewCtrl::GetSelection() const
{
+ // FIXME - TODO
+
return -1;
}
-int wxDataViewCtrl::GetSelections(wxArrayInt& aSelections) const
+int wxDataViewCtrl::GetSelections(wxArrayInt& WXUNUSED(aSelections) ) const
{
+ // FIXME - TODO
+
return 0;
}