KissCount/view/CalendarEditor.h

43 lines
1.0 KiB
C
Raw Normal View History

2010-06-05 14:33:19 +02:00
#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>
2010-06-29 21:43:29 +02:00
#include <wx/choice.h>
2010-06-05 14:33:19 +02:00
2010-06-29 21:43:29 +02:00
class CalendarEditor : public wxGridCellChoiceEditor, public wxEvtHandler
2010-06-05 14:33:19 +02:00
{
2010-07-04 16:33:25 +02:00
public:
2010-06-05 14:33:19 +02:00
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);
2010-06-29 21:43:29 +02:00
/* void OnCalendarChange(wxCommandEvent& event); */
void OnDateChanged(wxCommandEvent& event);
2010-06-27 21:39:49 +02:00
void StartingClick();
bool IsAcceptedKey(wxKeyEvent &event);
2010-06-05 14:33:19 +02:00
2010-07-04 16:33:25 +02:00
private:
2010-06-05 14:33:19 +02:00
int _day;
int _month;
int _year;
wxWindow *_parent;
2010-06-29 21:43:29 +02:00
wxString* _days;
int _maxDay;
wxChoice* _editor;
2010-06-05 14:33:19 +02:00
};
#endif