1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _adv.sip 8// 9//--------------------------------------------------------------------------- 10 11%ModuleHeaderCode 12#include <wx/datectrl.h> 13%End 14 15 16//--------------------------------------------------------------------------- 17 18enum 19{ 20 wxDP_DEFAULT, 21 wxDP_SPIN, 22 wxDP_DROPDOWN, 23 wxDP_SHOWCENTURY, 24 wxDP_ALLOWNONE 25}; 26 27class wxDatePickerCtrl : wxControl 28{ 29 %Docstring 30 DatePickerCtrl() 31 DatePickerCtrl(parent, id=wx.ID_ANY, dt=wx.DefaultDateTime, pos=wx.DefaultPosition, size=wx.DefaultSize, style=DP_DEFAULT|DP_SHOWCENTURY, validator=wx.DefaultValidator, name="datectrl") 32 33 This control allows the user to select a date. 34 %End 35 %TypeHeaderCode 36 #include <wx/datectrl.h> 37 %End 38 39public: 40 wxDatePickerCtrl(); 41 %PreMethodCode 42 if (!wxPyCheckForApp()) return NULL; 43 %End 44 45 wxDatePickerCtrl( 46 wxWindow * parent /TransferThis/, 47 wxWindowID id = wxID_ANY, 48 const wxDateTime & dt = wxDefaultDateTime, 49 const wxPoint & pos = wxDefaultPosition, 50 const wxSize & size = wxDefaultSize, 51 long style = wxDP_DEFAULT|wxDP_SHOWCENTURY, 52 const wxValidator & validator = wxDefaultValidator, 53 const wxString & name = "datectrl" 54 ); 55 %PreMethodCode 56 if (!wxPyCheckForApp()) return NULL; 57 %End 58 59 bool Create( 60 wxWindow * parent /TransferThis/, 61 wxWindowID id = wxID_ANY, 62 const wxDateTime & dt = wxDefaultDateTime, 63 const wxPoint & pos = wxDefaultPosition, 64 const wxSize & size = wxDefaultSize, 65 long style = wxDP_DEFAULT|wxDP_SHOWCENTURY, 66 const wxValidator & validator = wxDefaultValidator, 67 const wxString & name = "datectrl" 68 ); 69 %Docstring 70 Create(parent, id=wx.ID_ANY, dt=wx.DefaultDateTime, pos=wx.DefaultPosition, size=wx.DefaultSize, style=DP_DEFAULT|DP_SHOWCENTURY, validator=wx.DefaultValidator, name="datectrl") -> bool 71 72 Create the control window. 73 %End 74 75 bool GetRange( 76 wxDateTime * dt1 /Out/, 77 wxDateTime * dt2 /Out/ 78 ) const; 79 %Docstring 80 GetRange() -> (bool, dt1, dt2) 81 82 If the control had been previously limited to a range of dates using 83 SetRange(), returns the lower and upper bounds of this range. 84 %End 85 86 wxDateTime GetValue() const; 87 %Docstring 88 GetValue() -> wx.DateTime 89 90 Returns the currently entered date. 91 %End 92 93 void SetRange( 94 const wxDateTime & dt1, 95 const wxDateTime & dt2 96 ); 97 %Docstring 98 SetRange(dt1, dt2) 99 100 Sets the valid range for the date selection. 101 %End 102 103 void SetValue( 104 const wxDateTime & dt 105 ); 106 %Docstring 107 SetValue(dt) 108 109 Changes the current value of the control. 110 %End 111 112 public: 113 virtual wxPoint GetClientAreaOrigin() const; 114 virtual bool Validate(); 115 virtual bool TransferDataToWindow(); 116 virtual bool TransferDataFromWindow(); 117 virtual void InitDialog(); 118 virtual bool AcceptsFocus() const; 119 virtual bool AcceptsFocusRecursively() const; 120 virtual bool AcceptsFocusFromKeyboard() const; 121 virtual void AddChild( wxWindowBase *child ); 122 virtual void RemoveChild( wxWindowBase *child ); 123 virtual void InheritAttributes(); 124 virtual bool ShouldInheritColours() const; 125 virtual void OnInternalIdle(); 126 virtual wxWindow *GetMainWindowOfCompositeControl(); 127 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 128 virtual void SetCanFocus(bool canFocus); 129 virtual bool Destroy(); 130 virtual void SetValidator( const wxValidator &validator ); 131 virtual wxValidator* GetValidator(); 132 133 134 protected: 135 virtual bool ProcessEvent(wxEvent & event); 136 virtual void DoEnable(bool enable); 137 virtual void DoGetPosition(int *x, int *y) const; 138 virtual void DoGetSize(int *width, int *height) const; 139 virtual void DoGetClientSize(int *width, int *height) const; 140 virtual wxSize DoGetBestSize() const; 141 virtual wxSize DoGetBestClientSize() const; 142 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 143 virtual void DoSetClientSize(int width, int height); 144 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 145 virtual wxSize DoGetBorderSize() const; 146 virtual void DoMoveWindow(int x, int y, int width, int height); 147 virtual void DoSetWindowVariant( wxWindowVariant variant); 148 virtual wxBorder GetDefaultBorder() const; 149 virtual wxBorder GetDefaultBorderForControl() const; 150 virtual void DoFreeze(); 151 virtual void DoThaw(); 152 virtual bool HasTransparentBackground(); 153 virtual bool TryBefore(wxEvent& event); 154 virtual bool TryAfter(wxEvent& event); 155 156 157 public: 158 159 160 static 161 wxVisualAttributes GetClassDefaultAttributes( 162 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 163 ); 164 %Docstring 165 GetClassDefaultAttributes(variant=wx.WINDOW_VARIANT_NORMAL) -> wx.VisualAttributes 166 %End 167 %PreMethodCode 168 if (!wxPyCheckForApp()) return NULL; 169 %End 170 171 public: 172 173 174 %Property(name=Value, get=GetValue, set=SetValue) 175}; // end of class wxDatePickerCtrl 176 177 178class wxDatePickerCtrlGeneric : wxControl /PyName=GenericDatePickerCtrl/ 179{ 180 %Docstring 181 DatePickerCtrlGeneric() 182 DatePickerCtrlGeneric(parent, id=wx.ID_ANY, dt=wx.DefaultDateTime, pos=wx.DefaultPosition, size=wx.DefaultSize, style=DP_DEFAULT|DP_SHOWCENTURY, validator=wx.DefaultValidator, name="datectrl") 183 184 This control allows the user to select a date. 185 %End 186 %TypeHeaderCode 187 #include <wx/datectrl.h> 188 %End 189 190 %TypeHeaderCode 191 #include <wx/generic/datectrl.h> 192 %End 193public: 194 wxDatePickerCtrlGeneric(); 195 %PreMethodCode 196 if (!wxPyCheckForApp()) return NULL; 197 %End 198 199 wxDatePickerCtrlGeneric( 200 wxWindow * parent /TransferThis/, 201 wxWindowID id = wxID_ANY, 202 const wxDateTime & dt = wxDefaultDateTime, 203 const wxPoint & pos = wxDefaultPosition, 204 const wxSize & size = wxDefaultSize, 205 long style = wxDP_DEFAULT|wxDP_SHOWCENTURY, 206 const wxValidator & validator = wxDefaultValidator, 207 const wxString & name = "datectrl" 208 ); 209 %PreMethodCode 210 if (!wxPyCheckForApp()) return NULL; 211 %End 212 213 bool Create( 214 wxWindow * parent /TransferThis/, 215 wxWindowID id = wxID_ANY, 216 const wxDateTime & dt = wxDefaultDateTime, 217 const wxPoint & pos = wxDefaultPosition, 218 const wxSize & size = wxDefaultSize, 219 long style = wxDP_DEFAULT|wxDP_SHOWCENTURY, 220 const wxValidator & validator = wxDefaultValidator, 221 const wxString & name = "datectrl" 222 ); 223 %Docstring 224 Create(parent, id=wx.ID_ANY, dt=wx.DefaultDateTime, pos=wx.DefaultPosition, size=wx.DefaultSize, style=DP_DEFAULT|DP_SHOWCENTURY, validator=wx.DefaultValidator, name="datectrl") -> bool 225 226 Create the control window. 227 %End 228 229 bool GetRange( 230 wxDateTime * dt1 /Out/, 231 wxDateTime * dt2 /Out/ 232 ) const; 233 %Docstring 234 GetRange() -> (bool, dt1, dt2) 235 236 If the control had been previously limited to a range of dates using 237 SetRange(), returns the lower and upper bounds of this range. 238 %End 239 240 wxDateTime GetValue() const; 241 %Docstring 242 GetValue() -> wx.DateTime 243 244 Returns the currently entered date. 245 %End 246 247 void SetRange( 248 const wxDateTime & dt1, 249 const wxDateTime & dt2 250 ); 251 %Docstring 252 SetRange(dt1, dt2) 253 254 Sets the valid range for the date selection. 255 %End 256 257 void SetValue( 258 const wxDateTime & dt 259 ); 260 %Docstring 261 SetValue(dt) 262 263 Changes the current value of the control. 264 %End 265 266 public: 267 virtual wxPoint GetClientAreaOrigin() const; 268 virtual bool Validate(); 269 virtual bool TransferDataToWindow(); 270 virtual bool TransferDataFromWindow(); 271 virtual void InitDialog(); 272 virtual bool AcceptsFocus() const; 273 virtual bool AcceptsFocusRecursively() const; 274 virtual bool AcceptsFocusFromKeyboard() const; 275 virtual void AddChild( wxWindowBase *child ); 276 virtual void RemoveChild( wxWindowBase *child ); 277 virtual void InheritAttributes(); 278 virtual bool ShouldInheritColours() const; 279 virtual void OnInternalIdle(); 280 virtual wxWindow *GetMainWindowOfCompositeControl(); 281 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 282 virtual void SetCanFocus(bool canFocus); 283 virtual bool Destroy(); 284 virtual void SetValidator( const wxValidator &validator ); 285 virtual wxValidator* GetValidator(); 286 287 288 protected: 289 virtual bool ProcessEvent(wxEvent & event); 290 virtual void DoEnable(bool enable); 291 virtual void DoGetPosition(int *x, int *y) const; 292 virtual void DoGetSize(int *width, int *height) const; 293 virtual void DoGetClientSize(int *width, int *height) const; 294 virtual wxSize DoGetBestSize() const; 295 virtual wxSize DoGetBestClientSize() const; 296 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 297 virtual void DoSetClientSize(int width, int height); 298 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 299 virtual wxSize DoGetBorderSize() const; 300 virtual void DoMoveWindow(int x, int y, int width, int height); 301 virtual void DoSetWindowVariant( wxWindowVariant variant); 302 virtual wxBorder GetDefaultBorder() const; 303 virtual wxBorder GetDefaultBorderForControl() const; 304 virtual void DoFreeze(); 305 virtual void DoThaw(); 306 virtual bool HasTransparentBackground(); 307 virtual bool TryBefore(wxEvent& event); 308 virtual bool TryAfter(wxEvent& event); 309 310 311 public: 312 313 314 static 315 wxVisualAttributes GetClassDefaultAttributes( 316 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 317 ); 318 %Docstring 319 GetClassDefaultAttributes(variant=wx.WINDOW_VARIANT_NORMAL) -> wx.VisualAttributes 320 %End 321 %PreMethodCode 322 if (!wxPyCheckForApp()) return NULL; 323 %End 324 325 public: 326 327 328 %Property(name=Value, get=GetValue, set=SetValue) 329}; // end of class wxDatePickerCtrlGeneric 330 331 332 333//--------------------------------------------------------------------------- 334 335