37 lines
865 B
C
37 lines
865 B
C
|
#ifndef CALENDAREDITOR_H
|
||
|
#define CALENDAREDITOR_H
|
||
|
|
||
|
#include <wx/wx.h>
|
||
|
#include <wx/grid.h>
|
||
|
#include <wx/calctrl.h>
|
||
|
#include <wx/datetime.h>
|
||
|
#include <wx/event.h>
|
||
|
|
||
|
class CalendarEditor : public wxGridCellEditor, public wxEvtHandler
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
CalendarEditor(int day, int month, int year);
|
||
|
~CalendarEditor();
|
||
|
|
||
|
void BeginEdit(int row, int col, wxGrid *grid);
|
||
|
wxGridCellEditor* Clone () const;
|
||
|
void Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler);
|
||
|
bool EndEdit(int row, int col, wxGrid *grid);
|
||
|
void ApplyEdit(int row, int col, wxGrid *grid);
|
||
|
wxString GetValue() const;
|
||
|
void Reset();
|
||
|
void Show(bool show, wxGridCellAttr *attr=NULL);
|
||
|
void SetSize (const wxRect &rect);
|
||
|
void OnCalendarChange(wxCommandEvent& event);
|
||
|
|
||
|
private:
|
||
|
int _day;
|
||
|
int _month;
|
||
|
int _year;
|
||
|
wxWindow *_parent;
|
||
|
wxCalendarCtrl *_calendar;
|
||
|
};
|
||
|
|
||
|
#endif
|