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 _core.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13typedef long wxTextPos; 14 15class wxTextEntry /Abstract/ 16{ 17 %Docstring 18 Common base class for single line text entry fields. 19 %End 20 %TypeHeaderCode 21 #include <wx/textentry.h> 22 %End 23 24public: 25 bool SetMargins( 26 const wxPoint & pt 27 ); 28 %Docstring 29 SetMargins(pt) -> bool 30 SetMargins(left, top=-1) -> bool 31 32 Attempts to set the control margins. 33 %End 34 35 bool SetMargins( 36 wxCoord left, 37 wxCoord top = -1 38 ); 39 40 void AppendText( 41 const wxString & text 42 ); 43 %Docstring 44 AppendText(text) 45 46 Appends the text to the end of the text control. 47 %End 48 49 bool AutoComplete( 50 const wxArrayString & choices 51 ); 52 %Docstring 53 AutoComplete(choices) -> bool 54 AutoComplete(completer) -> bool 55 56 Call this function to enable auto-completion of the text typed in a 57 single-line text control using the given choices. 58 %End 59 60 bool AutoComplete( 61 wxTextCompleter * completer /Transfer/ 62 ); 63 64 bool AutoCompleteFileNames(); 65 %Docstring 66 AutoCompleteFileNames() -> bool 67 68 Call this function to enable auto-completion of the text typed in a 69 single-line text control using all valid file system paths. 70 %End 71 72 bool AutoCompleteDirectories(); 73 %Docstring 74 AutoCompleteDirectories() -> bool 75 76 Call this function to enable auto-completion of the text using the 77 file system directories. 78 %End 79 80 virtual 81 bool CanCopy() const; 82 %Docstring 83 CanCopy() -> bool 84 85 Returns true if the selection can be copied to the clipboard. 86 %End 87 88 virtual 89 bool CanCut() const; 90 %Docstring 91 CanCut() -> bool 92 93 Returns true if the selection can be cut to the clipboard. 94 %End 95 96 virtual 97 bool CanPaste() const; 98 %Docstring 99 CanPaste() -> bool 100 101 Returns true if the contents of the clipboard can be pasted into the 102 text control. 103 %End 104 105 virtual 106 bool CanRedo() const; 107 %Docstring 108 CanRedo() -> bool 109 110 Returns true if there is a redo facility available and the last 111 operation can be redone. 112 %End 113 114 virtual 115 bool CanUndo() const; 116 %Docstring 117 CanUndo() -> bool 118 119 Returns true if there is an undo facility available and the last 120 operation can be undone. 121 %End 122 123 void ChangeValue( 124 const wxString & value 125 ); 126 %Docstring 127 ChangeValue(value) 128 129 Sets the new text control value. 130 %End 131 132 void Clear(); 133 %Docstring 134 Clear() 135 136 Clears the text in the control. 137 %End 138 139 virtual 140 void Copy(); 141 %Docstring 142 Copy() 143 144 Copies the selected text to the clipboard. 145 %End 146 147 virtual 148 void Cut(); 149 %Docstring 150 Cut() 151 152 Copies the selected text to the clipboard and removes it from the 153 control. 154 %End 155 156 long GetInsertionPoint() const; 157 %Docstring 158 GetInsertionPoint() -> long 159 160 Returns the insertion point, or cursor, position. 161 %End 162 163 wxTextPos GetLastPosition() const; 164 %Docstring 165 GetLastPosition() -> TextPos 166 167 Returns the zero based index of the last position in the text control, 168 which is equal to the number of characters in the control. 169 %End 170 171 wxString GetRange( 172 long from_, 173 long to_ 174 ) const; 175 %Docstring 176 GetRange(from_, to_) -> String 177 178 Returns the string containing the text starting in the positions from 179 and up to to in the control. 180 %End 181 182 void GetSelection( 183 long * from /Out/, 184 long * to /Out/ 185 ) const; 186 %Docstring 187 GetSelection() -> (from, to) 188 189 Gets the current selection span. 190 %End 191 192 wxString GetStringSelection() const; 193 %Docstring 194 GetStringSelection() -> String 195 196 Gets the text currently selected in the control. 197 %End 198 199 wxString GetValue() const; 200 %Docstring 201 GetValue() -> String 202 203 Gets the contents of the control. 204 %End 205 206 bool IsEditable() const; 207 %Docstring 208 IsEditable() -> bool 209 210 Returns true if the controls contents may be edited by user (note that 211 it always can be changed by the program). 212 %End 213 214 bool IsEmpty() const; 215 %Docstring 216 IsEmpty() -> bool 217 218 Returns true if the control is currently empty. 219 %End 220 221 virtual 222 void Paste(); 223 %Docstring 224 Paste() 225 226 Pastes text from the clipboard to the text item. 227 %End 228 229 virtual 230 void Redo(); 231 %Docstring 232 Redo() 233 234 If there is a redo facility and the last operation can be redone, 235 redoes the last operation. 236 %End 237 238 void Remove( 239 long from_, 240 long to_ 241 ); 242 %Docstring 243 Remove(from_, to_) 244 245 Removes the text starting at the first given position up to (but not 246 including) the character at the last position. 247 %End 248 249 void Replace( 250 long from_, 251 long to_, 252 const wxString & value 253 ); 254 %Docstring 255 Replace(from_, to_, value) 256 257 Replaces the text starting at the first position up to (but not 258 including) the character at the last position with the given text. 259 %End 260 261 void SetEditable( 262 bool editable 263 ); 264 %Docstring 265 SetEditable(editable) 266 267 Makes the text item editable or read-only, overriding the 268 wxTE_READONLY flag. 269 %End 270 271 void SetInsertionPoint( 272 long pos 273 ); 274 %Docstring 275 SetInsertionPoint(pos) 276 277 Sets the insertion point at the given position. 278 %End 279 280 void SetInsertionPointEnd(); 281 %Docstring 282 SetInsertionPointEnd() 283 284 Sets the insertion point at the end of the text control. 285 %End 286 287 void SetMaxLength( 288 unsigned long len 289 ); 290 %Docstring 291 SetMaxLength(len) 292 293 This function sets the maximum number of characters the user can enter 294 into the control. 295 %End 296 297 void SetSelection( 298 long from_, 299 long to_ 300 ); 301 %Docstring 302 SetSelection(from_, to_) 303 304 Selects the text starting at the first position up to (but not 305 including) the character at the last position. 306 %End 307 308 void SelectAll(); 309 %Docstring 310 SelectAll() 311 312 Selects all text in the control. 313 %End 314 315 void SelectNone(); 316 %Docstring 317 SelectNone() 318 319 Deselects selected text in the control. 320 %End 321 322 bool SetHint( 323 const wxString & hint 324 ); 325 %Docstring 326 SetHint(hint) -> bool 327 328 Sets a hint shown in an empty unfocused text control. 329 %End 330 331 wxString GetHint() const; 332 %Docstring 333 GetHint() -> String 334 335 Returns the current hint string. 336 %End 337 338 wxPoint GetMargins() const; 339 %Docstring 340 GetMargins() -> Point 341 342 Returns the margins used by the control. 343 %End 344 345 void SetValue( 346 const wxString & value 347 ); 348 %Docstring 349 SetValue(value) 350 351 Sets the new text control value. 352 %End 353 354 virtual 355 void Undo(); 356 %Docstring 357 Undo() 358 359 If there is an undo facility and the last operation can be undone, 360 undoes the last operation. 361 %End 362 363 void WriteText( 364 const wxString & text 365 ); 366 %Docstring 367 WriteText(text) 368 369 Writes the text into the text control at the current insertion 370 position. 371 %End 372 373 public: 374 375 376 %Property(name=Hint, get=GetHint, set=SetHint) 377 %Property(name=InsertionPoint, get=GetInsertionPoint, set=SetInsertionPoint) 378 %Property(name=LastPosition, get=GetLastPosition) 379 %Property(name=Margins, get=GetMargins, set=SetMargins) 380 %Property(name=StringSelection, get=GetStringSelection) 381 %Property(name=Value, get=GetValue, set=SetValue) 382}; // end of class wxTextEntry 383 384 385 386//--------------------------------------------------------------------------- 387 388