/[pcsx2_0.9.7]/trunk/3rdparty/wxWidgets/include/wx/dateevt.h
ViewVC logotype

Contents of /trunk/3rdparty/wxWidgets/include/wx/dateevt.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations) (download)
Mon Sep 6 11:40:06 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 2276 byte(s)
exported r3113 from ./upstream/trunk
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/dateevt.h
3 // Purpose: declares wxDateEvent class
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 2005-01-10
7 // RCS-ID: $Id: dateevt.h 39637 2006-06-08 18:27:44Z RD $
8 // Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_DATEEVT_H_
13 #define _WX_DATEEVT_H_
14
15 #include "wx/event.h"
16 #include "wx/datetime.h"
17 #include "wx/window.h"
18
19 // ----------------------------------------------------------------------------
20 // wxDateEvent: used by wxCalendarCtrl and wxDatePickerCtrl
21 // ----------------------------------------------------------------------------
22
23 class WXDLLIMPEXP_ADV wxDateEvent : public wxCommandEvent
24 {
25 public:
26 wxDateEvent() { }
27 wxDateEvent(wxWindow *win, const wxDateTime& dt, wxEventType type)
28 : wxCommandEvent(type, win->GetId()),
29 m_date(dt)
30 {
31 SetEventObject(win);
32 }
33
34 const wxDateTime& GetDate() const { return m_date; }
35 void SetDate(const wxDateTime &date) { m_date = date; }
36
37 // default copy ctor, assignment operator and dtor are ok
38 virtual wxEvent *Clone() const { return new wxDateEvent(*this); }
39
40 private:
41 wxDateTime m_date;
42
43 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDateEvent)
44 };
45
46 // ----------------------------------------------------------------------------
47 // event types and macros for handling them
48 // ----------------------------------------------------------------------------
49
50 BEGIN_DECLARE_EVENT_TYPES()
51 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, 1101)
52 END_DECLARE_EVENT_TYPES()
53
54 typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
55
56 #define wxDateEventHandler(func) \
57 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDateEventFunction, &func)
58
59 #define EVT_DATE_CHANGED(id, fn) \
60 wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn))
61
62 #ifdef _WX_DEFINE_DATE_EVENTS_
63 DEFINE_EVENT_TYPE(wxEVT_DATE_CHANGED)
64
65 IMPLEMENT_DYNAMIC_CLASS(wxDateEvent, wxCommandEvent)
66 #endif
67
68 #endif // _WX_DATEEVT_H_
69

  ViewVC Help
Powered by ViewVC 1.1.22