X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab11ebfa199a7b36dbb04a735888a4533880dcff..e422162882bf4c5ae743fd618864e97206765fca:/wxPython/src/calendar.i?ds=sidebyside diff --git a/wxPython/src/calendar.i b/wxPython/src/calendar.i index 4dc8f0f56c..96add9859b 100644 --- a/wxPython/src/calendar.i +++ b/wxPython/src/calendar.i @@ -14,7 +14,7 @@ %{ -#include "export.h" +#include "wxPython.h" #include %} @@ -50,7 +50,7 @@ enum wxCalendarHitTestResult { wxCAL_HITTEST_NOWHERE, // outside of anything wxCAL_HITTEST_HEADER, // on the header (weekdays) - wxCAL_HITTEST_DAY // on a day in the calendar + wxCAL_HITTEST_DAY, // on a day in the calendar wxCAL_HITTEST_INCMONTH, wxCAL_HITTEST_DECMONTH, wxCAL_HITTEST_SURROUNDING_WEEK @@ -98,10 +98,10 @@ public: bool IsHoliday() const; - const wxColour& GetTextColour() const; - const wxColour& GetBackgroundColour() const; - const wxColour& GetBorderColour() const; - const wxFont& GetFont() const; + wxColour GetTextColour() const; + wxColour GetBackgroundColour() const; + wxColour GetBorderColour() const; + wxFont GetFont() const; wxCalendarDateBorder GetBorder() const; }; @@ -151,6 +151,11 @@ def EVT_CALENDAR_WEEKDAY_CLICKED(win, id, fn): //--------------------------------------------------------------------------- +%{ + // Put some wx default wxChar* values into wxStrings. + DECLARE_DEF_STRING(CalendarNameStr); +%} + class wxCalendarCtrl : public wxControl { public: @@ -161,7 +166,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS, - const char* name = "calendar"); + const wxString& name = wxPyCalendarNameStr); %name(wxPreCalendarCtrl)wxCalendarCtrl(); bool Create(wxWindow *parent, @@ -170,7 +175,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS, - const char* name = "calendar"); + const wxString& name = wxPyCalendarNameStr); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" %pragma(python) addtomethod = "wxPreCalendarCtrl:val._setOORInfo(val)" @@ -214,18 +219,18 @@ public: // header colours are used for painting the weekdays at the top void SetHeaderColours(const wxColour& colFg, const wxColour& colBg); - const wxColour& GetHeaderColourFg() const; - const wxColour& GetHeaderColourBg() const; + wxColour GetHeaderColourFg() const; + wxColour GetHeaderColourBg() const; // highlight colour is used for the currently selected date void SetHighlightColours(const wxColour& colFg, const wxColour& colBg); - const wxColour& GetHighlightColourFg() const; - const wxColour& GetHighlightColourBg() const; + wxColour GetHighlightColourFg() const; + wxColour GetHighlightColourBg() const; // holiday colour is used for the holidays (if style & wxCAL_SHOW_HOLIDAYS) void SetHolidayColours(const wxColour& colFg, const wxColour& colBg); - const wxColour& GetHolidayColourFg() const; - const wxColour& GetHolidayColourBg() const; + wxColour GetHolidayColourFg() const; + wxColour GetHolidayColourBg() const; // an item without custom attributes is drawn with the default colours and // font and without border, setting custom attributes allows to modify this