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:
parent
1c4e8f384d
commit
8d0ca2928b
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user