Allow building without calendar.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
|
#include "wx/msgdlg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/stockitem.h"
|
#include "wx/stockitem.h"
|
||||||
@@ -494,6 +495,8 @@ wxSize wxDataViewProgressRenderer::GetSize()
|
|||||||
// wxDataViewDateRenderer
|
// wxDataViewDateRenderer
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
|
#if wxUSE_CALENDARCTRL
|
||||||
|
|
||||||
class wxDataViewDateRendererPopupTransient: public wxPopupTransientWindow
|
class wxDataViewDateRendererPopupTransient: public wxPopupTransientWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -540,6 +543,8 @@ void wxDataViewDateRendererPopupTransient::OnCalendar( wxCalendarEvent &event )
|
|||||||
DismissAndNotify();
|
DismissAndNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_CALENDARCTRL
|
||||||
|
|
||||||
IMPLEMENT_ABSTRACT_CLASS(wxDataViewDateRenderer, wxDataViewCustomRenderer)
|
IMPLEMENT_ABSTRACT_CLASS(wxDataViewDateRenderer, wxDataViewCustomRenderer)
|
||||||
|
|
||||||
wxDataViewDateRenderer::wxDataViewDateRenderer( const wxString &varianttype,
|
wxDataViewDateRenderer::wxDataViewDateRenderer( const wxString &varianttype,
|
||||||
@@ -579,13 +584,16 @@ bool wxDataViewDateRenderer::Activate( wxRect WXUNUSED(cell), wxDataViewListMode
|
|||||||
model->GetValue( variant, col, row );
|
model->GetValue( variant, col, row );
|
||||||
wxDateTime value = variant.GetDateTime();
|
wxDateTime value = variant.GetDateTime();
|
||||||
|
|
||||||
|
#if wxUSE_CALENDARCTRL
|
||||||
wxDataViewDateRendererPopupTransient *popup = new wxDataViewDateRendererPopupTransient(
|
wxDataViewDateRendererPopupTransient *popup = new wxDataViewDateRendererPopupTransient(
|
||||||
GetOwner()->GetOwner()->GetParent(), &value, model, col, row );
|
GetOwner()->GetOwner()->GetParent(), &value, model, col, row );
|
||||||
wxPoint pos = wxGetMousePosition();
|
wxPoint pos = wxGetMousePosition();
|
||||||
popup->Move( pos );
|
popup->Move( pos );
|
||||||
popup->Layout();
|
popup->Layout();
|
||||||
popup->Popup( popup->m_cal );
|
popup->Popup( popup->m_cal );
|
||||||
|
#else
|
||||||
|
wxMessageBox(value.Format());
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -624,7 +632,7 @@ void wxDataViewColumn::SetSortable( bool WXUNUSED(sortable) )
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool wxDataViewColumn::GetSortable()
|
bool wxDataViewColumn::GetSortable()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user