1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.stc.StyledTextEvent:
==========================================================================================================================================
|phoenix_title| **wx.stc.StyledTextEvent**
==========================================================================================================================================
The type of events sent from :ref:`wx.stc.StyledTextCtrl`.
^^
.. _StyledTextEvent-events:
|events| Events Emitted by this Class
=====================================
Handlers bound for the following event types will receive a :ref:`wx.stc.StyledTextEvent` parameter.
Event macros:
- EVT_STC_AUTOCOMP_CANCELLED(id, fn): Process a ``wxEVT_STC_AUTOCOMP_CANCELLED`` event.
- EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn): Process a ``wxEVT_STC_AUTOCOMP_CHAR_DELETED`` event.
- EVT_STC_AUTOCOMP_COMPLETED(id, fn): Process a ``wxEVT_STC_AUTOCOMP_COMPLETED`` event.
.. versionadded:: 4.1/wxWidgets-3.1.1
- EVT_STC_AUTOCOMP_SELECTION(id, fn): Process a ``wxEVT_STC_AUTOCOMP_SELECTION`` event.
- EVT_STC_AUTOCOMP_SELECTION_CHANGE(id, fn): Process a ``wxEVT_STC_AUTOCOMP_SELECTION_CHANGE`` event.
.. versionadded:: 4.1/wxWidgets-3.1.3
- EVT_STC_CALLTIP_CLICK(id, fn): Process a ``wxEVT_STC_CALLTIP_CLICK`` event.
- EVT_STC_CHANGE(id, fn): Process a ``wxEVT_STC_CHANGE`` event.
- EVT_STC_CHARADDED(id, fn): Process a ``wxEVT_STC_CHARADDED`` event.
- EVT_STC_CLIPBOARD_COPY(id, fn): Process a ``wxEVT_STC_CLIPBOARD_COPY`` event.
.. versionadded:: 4.1/wxWidgets-3.1.0
- EVT_STC_CLIPBOARD_PASTE(id, fn): Process a ``wxEVT_STC_CLIPBOARD_PASTE`` event.
.. versionadded:: 4.1/wxWidgets-3.1.0
- EVT_STC_DO_DROP(id, fn): Process a ``wxEVT_STC_DO_DROP`` event.
- EVT_STC_DOUBLECLICK(id, fn): Process a ``wxEVT_STC_DOUBLECLICK`` event.
- EVT_STC_DRAG_OVER(id, fn): Process a ``wxEVT_STC_DRAG_OVER`` event.
- EVT_STC_DWELLEND(id, fn): Process a ``wxEVT_STC_DWELLEND`` event.
- EVT_STC_DWELLSTART(id, fn): Process a ``wxEVT_STC_DWELLSTART`` event.
- EVT_STC_HOTSPOT_CLICK(id, fn): Process a ``wxEVT_STC_HOTSPOT_CLICK`` event.
- EVT_STC_HOTSPOT_DCLICK(id, fn): Process a ``wxEVT_STC_HOTSPOT_DCLICK`` event.
- EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn): Process a ``wxEVT_STC_HOTSPOT_RELEASE_CLICK`` event.
- EVT_STC_INDICATOR_CLICK(id, fn): Process a ``wxEVT_STC_INDICATOR_CLICK`` event.
- EVT_STC_INDICATOR_RELEASE(id, fn): Process a ``wxEVT_STC_INDICATOR_RELEASE`` event.
- EVT_STC_MACRORECORD(id, fn): Process a ``wxEVT_STC_MACRORECORD`` event.
- EVT_STC_MARGIN_RIGHT_CLICK(id, fn): Process a ``wxEVT_STC_MARGIN_RIGHT_CLICK`` event.
.. versionadded:: 4.1/wxWidgets-3.1.1
- EVT_STC_MARGINCLICK(id, fn): Process a ``wxEVT_STC_MARGINCLICK`` event.
- EVT_STC_MODIFIED(id, fn): Process a ``wxEVT_STC_MODIFIED`` event.
- EVT_STC_NEEDSHOWN(id, fn): Process a ``wxEVT_STC_NEEDSHOWN`` event.
- EVT_STC_PAINTED(id, fn): Process a ``wxEVT_STC_PAINTED`` event.
- EVT_STC_ROMODIFYATTEMPT(id, fn): Process a ``wxEVT_STC_ROMODIFYATTEMPT`` event.
- EVT_STC_SAVEPOINTLEFT(id, fn): Process a ``wxEVT_STC_SAVEPOINTLEFT`` event.
- EVT_STC_SAVEPOINTREACHED(id, fn): Process a ``wxEVT_STC_SAVEPOINTREACHED`` event.
- EVT_STC_START_DRAG(id, fn): Process a ``wxEVT_STC_START_DRAG`` event.
- EVT_STC_STYLENEEDED(id, fn): Process a ``wxEVT_STC_STYLENEEDED`` event.
- EVT_STC_UPDATEUI(id, fn): Process a ``wxEVT_STC_UPDATEUI`` event.
- EVT_STC_USERLISTSELECTION(id, fn): Process a ``wxEVT_STC_USERLISTSELECTION`` event.
- EVT_STC_ZOOM(id, fn): Process a ``wxEVT_STC_ZOOM`` event. ^^
Most of the Scintilla notifications are mapped to a similarly named
:ref:`wx.stc.StyledTextEvent`. However a few of the notifications would only offer information available in other wxWidgets event types, and in those cases a corresponding :ref:`wx.stc.StyledTextEvent` is not defined. Currently, the ``wxEVT_KEY_DOWN`` event is used instead of the ``SCN_KEY`` notification. The regular wxWidgets drag and drop functionality can be used instead of the ``SCN_URIDROPPED`` notification. The ``wxEVT_SET_FOCUS`` event is used instead of the ``SCN_FOCUSIN`` notification. And the ``wxEVT_KILL_FOCUS`` event is used instead of the ``SCN_FOCUSOUT`` notification.
|phoenix_title| Event Types
===========================
The following is a brief description of when the control generates these events and a list of which methods provide relevant information. Additional details can be found in the Scintilla documentation (`http://www.scintilla.org/ScintillaDoc.html#Notifications <http://www.scintilla.org/ScintillaDoc.html#Notifications>`_). ``wxEVT_STC_AUTOCOMP_CANCELLED``
- Generated when an autocompletion list has been canceled.
- Valid event functions: none.
``wxEVT_STC_AUTOCOMP_CHAR_DELETED``
- Generated when a character has been deleted from an autocompletion list.
- Valid event functions: none.
``wxEVT_STC_AUTOCOMP_COMPLETED``
- Generated after an autocompletion list has closed and inserted its text into the control.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetKey`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetString`, :meth:`~wx.stc.StyledTextEvent.GetListCompletionMethod`.
``wxEVT_STC_AUTOCOMP_SELECTION``
- Generated when an entry has been selected in an autocompletion list but before the text has been inserted.
- To prevent the insertion, call :meth:`wx.stc.StyledTextCtrl.AutoCompCancel` in the event handler.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetKey`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetString`, :meth:`~wx.stc.StyledTextEvent.GetListCompletionMethod`.
``wxEVT_STC_AUTOCOMP_SELECTION_CHANGE``
- Generated when items are highlighted in an autocompletion or user list.
- :meth:`~wx.stc.StyledTextEvent.GetPosition` will return the position at which the list is being shown.
- For a user list, :meth:`~wx.stc.StyledTextEvent.GetListType` will return the list type. The list type is a value input in to the :meth:`wx.stc.StyledTextCtrl.UserListShow` method when a user list is created.
- For an autocompletion list, :meth:`~wx.stc.StyledTextEvent.GetListType` will always return zero.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetListType`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetString`.
``wxEVT_STC_CALLTIP_CLICK``
- Generated when a calltip has been clicked.
- :meth:`~wx.stc.StyledTextEvent.GetPosition` will return 1 if the up arrow has been clicked, 2 if the down arrow has been clicked, and 0 for all other clicks.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetPosition`.
``wxEVT_STC_CHANGE``
- Generated when the text of the document has changed.
- This an older style event and should probably not be used in new code. Use ``wxEVT_STC_MODIFIED`` instead.
- Valid event functions: none.
``wxEVT_STC_CHARADDED``
- Generated when a character has been added to the control.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetKey`.
``wxEVT_STC_CLIPBOARD_COPY``
- Generated when text is being cut or copied to the clipboard.
- Use :meth:`wx.stc.StyledTextEvent.SetString` to modify the text that will be placed on the clipboard.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetString`, :meth:`~wx.stc.StyledTextEvent.SetString`.
``wxEVT_STC_CLIPBOARD_PASTE``
- Generated when text is being pasted from the clipboard.
- Use :meth:`wx.stc.StyledTextEvent.SetString` to modify the text that will be inserted into the control.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetString`, :meth:`~wx.stc.StyledTextEvent.SetString`.
``wxEVT_STC_DO_DROP``
- Generated when text is being dropped into the control.
- Details of the drag may be altered by changing the respective fields of the event.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetDragResult`, :meth:`~wx.stc.StyledTextEvent.SetDragResult`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.SetPosition`, :meth:`~wx.stc.StyledTextEvent.GetString`, :meth:`~wx.stc.StyledTextEvent.SetString`, :meth:`~wx.stc.StyledTextEvent.GetX`, :meth:`~wx.stc.StyledTextEvent.GetY`.
``wxEVT_STC_DOUBLECLICK``
- Generated when the control has been double-clicked.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetLine`, :meth:`~wx.stc.StyledTextEvent.GetModifiers`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetAlt`, :meth:`~wx.stc.StyledTextEvent.GetControl`, :meth:`~wx.stc.StyledTextEvent.GetShift`.
``wxEVT_STC_DRAG_OVER``
- Generated repeatedly as text is being dragged inside the control.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetDragResult`, :meth:`~wx.stc.StyledTextEvent.SetDragResult`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetX`, :meth:`~wx.stc.StyledTextEvent.GetY`.
``wxEVT_STC_DWELLEND``
- Generated when the mouse has been moved after a ``wxEVT_STC_DWELLSTART`` event.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetX`, :meth:`~wx.stc.StyledTextEvent.GetY`.
``wxEVT_STC_DWELLSTART``
- Generated when the mouse has remained still for a certain amount of time.
- The amount of time can be specified with :meth:`wx.stc.StyledTextCtrl.SetMouseDwellTime` .
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetX`, :meth:`~wx.stc.StyledTextEvent.GetY`.
``wxEVT_STC_HOTSPOT_CLICK``
- Generated when a hotspot has been clicked.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetModifiers`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetAlt`, :meth:`~wx.stc.StyledTextEvent.GetControl`, :meth:`~wx.stc.StyledTextEvent.GetShift`.
``wxEVT_STC_HOTSPOT_DCLICK``
- Generated when a hotspot has been double-clicked.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetModifiers`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetAlt`, :meth:`~wx.stc.StyledTextEvent.GetControl`, :meth:`~wx.stc.StyledTextEvent.GetShift`.
``wxEVT_STC_HOTSPOT_RELEASE_CLICK``
- Generated when a click-over hotspot has been released.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetModifiers`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetAlt`, :meth:`~wx.stc.StyledTextEvent.GetControl`, :meth:`~wx.stc.StyledTextEvent.GetShift`.
``wxEVT_STC_INDICATOR_CLICK``
- Generated when an indicator has been clicked.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetModifiers`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetAlt`, :meth:`~wx.stc.StyledTextEvent.GetControl`, :meth:`~wx.stc.StyledTextEvent.GetShift`.
``wxEVT_STC_INDICATOR_RELEASE``
- Generated when a click over an indicator has been released.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetModifiers`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetAlt`, :meth:`~wx.stc.StyledTextEvent.GetControl`, :meth:`~wx.stc.StyledTextEvent.GetShift`.
``wxEVT_STC_MACRORECORD``
- Generated while macro recording is in progress.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetMessage`, :meth:`~wx.stc.StyledTextEvent.GetLParam`, :meth:`~wx.stc.StyledTextEvent.GetWParam`.
``wxEVT_STC_MARGIN_RIGHT_CLICK``
- Generated when one of the margins is clicked with the right mouse button.
- This event is only generated if :meth:`~wx.stc.StyledTextEvent.SetMarginSensitive` has been called for one or more of the margins.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetMargin`, :meth:`~wx.stc.StyledTextEvent.GetModifiers`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetAlt`, :meth:`~wx.stc.StyledTextEvent.GetControl`, :meth:`~wx.stc.StyledTextEvent.GetShift`.
``wxEVT_STC_MARGINCLICK``
- Generated when one of the margins is clicked.
- This event is only generated if :meth:`~wx.stc.StyledTextEvent.SetMarginSensitive` has been called for one or more of the margins.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetMargin`, :meth:`~wx.stc.StyledTextEvent.GetModifiers`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetAlt`, :meth:`~wx.stc.StyledTextEvent.GetControl`, :meth:`~wx.stc.StyledTextEvent.GetShift`.
``wxEVT_STC_MODIFIED``
- Generated when the contents of the control have changed or are about to change.
- You should not attempt to make any changes to the control inside a handler for this event.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetAnnotationsLinesAdded`, :meth:`~wx.stc.StyledTextEvent.GetFoldLevelNow`, :meth:`~wx.stc.StyledTextEvent.GetFoldLevelPrev`, :meth:`~wx.stc.StyledTextEvent.GetLength`, :meth:`~wx.stc.StyledTextEvent.GetLine`, :meth:`~wx.stc.StyledTextEvent.GetLinesAdded`, :meth:`~wx.stc.StyledTextEvent.GetModificationType`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetString`, :meth:`~wx.stc.StyledTextEvent.GetToken`.
``wxEVT_STC_NEEDSHOWN``
- Generated when certain lines should be made visible by scrolling the text in the control.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetLength`, :meth:`~wx.stc.StyledTextEvent.GetPosition`.
``wxEVT_STC_PAINTED``
- Generated when the control has been refreshed.
- Valid event functions: none.
``wxEVT_STC_ROMODIFYATTEMPT``
- Generated when an attempt has been made to change the control's text after it has been set read-only.
- Valid event functions: none.
``wxEVT_STC_SAVEPOINTREACHED``
- Generated when the undo history has been made empty.
- Valid event functions: none.
``wxEVT_STC_SAVEPOINTLEFT``
- Generated when the undo history is no longer empty.
- Valid event functions: none.
``wxEVT_STC_START_DRAG``
- Generated when text is being dragged from the control.
- Details of the drag may be altered by changing the respective fields of the event; in particular, set an empty string to prohibit the drag entirely.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetDragFlags`, :meth:`~wx.stc.StyledTextEvent.SetDragFlags`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetString`, :meth:`~wx.stc.StyledTextEvent.SetString`.
``wxEVT_STC_STYLENEEDED``
- Generated when the control has determined that style bytes should be set for a portion of the document.
- These events are only sent if the lexer is set to ``STC_LEX_CONTAINER``.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetPosition`.
``wxEVT_STC_UPDATEUI``
- Generated when the text, style, cursor position, selection, or scrolling of the control has changed.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetUpdated`.
``wxEVT_STC_USERLISTSELECTION``
- Generated when a selection has been made from a user list.
- Valid event functions: :meth:`~wx.stc.StyledTextEvent.GetListType`, :meth:`~wx.stc.StyledTextEvent.GetPosition`, :meth:`~wx.stc.StyledTextEvent.GetString`, :meth:`~wx.stc.StyledTextEvent.GetKey`, :meth:`~wx.stc.StyledTextEvent.GetListCompletionMethod`.
``wxEVT_STC_ZOOM``
- Generated when the zoom factor of the control has been changed either by the user or a call to :meth:`wx.stc.StyledTextCtrl.ZoomIn` /:meth:`~wx.stc.StyledTextEvent.ZoomOut`.
- Valid event functions: none.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>StyledTextEvent</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.stc.StyledTextEvent_inheritance.png" alt="Inheritance diagram of StyledTextEvent" usemap="#dummy" class="inheritance"/></center>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.stc.StyledTextEvent.html" title="wx.stc.StyledTextEvent" alt="" coords="5,237,179,267"/> <area shape="rect" id="node2" href="wx.CommandEvent.html" title="wx.CommandEvent" alt="" coords="17,160,167,189"/> <area shape="rect" id="node3" href="wx.Event.html" title="wx.Event" alt="" coords="51,83,133,112"/> <area shape="rect" id="node4" href="wx.Object.html" title="wx.Object" alt="" coords="49,5,135,35"/> </map>
</p>
</div>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.stc.StyledTextEvent.__init__` Constructor.
:meth:`~wx.stc.StyledTextEvent.GetAlt` Returns ``True`` if the Alt key is pressed.
:meth:`~wx.stc.StyledTextEvent.GetAnnotationsLinesAdded` Returns the number of lines that have been added to or removed from an annotation.
:meth:`~wx.stc.StyledTextEvent.GetControl` Returns ``True`` if the Control key is pressed.
:meth:`~wx.stc.StyledTextEvent.GetDragFlags` Returns flags for the drag operation associated with this event.
:meth:`~wx.stc.StyledTextEvent.GetDragResult` Returns drag result for this event.
:meth:`~wx.stc.StyledTextEvent.GetDragText`
:meth:`~wx.stc.StyledTextEvent.GetFoldLevelNow` Returns the current fold level for the line.
:meth:`~wx.stc.StyledTextEvent.GetFoldLevelPrev` Returns previous fold level for the line.
:meth:`~wx.stc.StyledTextEvent.GetKey` Returns the key code of the key that generated this event.
:meth:`~wx.stc.StyledTextEvent.GetLParam` Returns the value of the LParam field for this event.
:meth:`~wx.stc.StyledTextEvent.GetLength` Returns the length (number of characters) of this event.
:meth:`~wx.stc.StyledTextEvent.GetLine` Returns zero-based line number for this event.
:meth:`~wx.stc.StyledTextEvent.GetLinesAdded` Returns the number of lines added or deleted with this event.
:meth:`~wx.stc.StyledTextEvent.GetListCompletionMethod` Returns a value describing the action that closed the list.
:meth:`~wx.stc.StyledTextEvent.GetListType` Returns the list type for this event.
:meth:`~wx.stc.StyledTextEvent.GetMargin` Returns the zero-based index of the margin that generated this event.
:meth:`~wx.stc.StyledTextEvent.GetMessage` Returns a message number while a macro is being recorded.
:meth:`~wx.stc.StyledTextEvent.GetModificationType` Returns the modification type for this event.
:meth:`~wx.stc.StyledTextEvent.GetModifiers` Returns the modifiers of the key press or mouse click for this event.
:meth:`~wx.stc.StyledTextEvent.GetPosition` Returns the zero-based text position associated this event.
:meth:`~wx.stc.StyledTextEvent.GetShift` Returns ``True`` if the Shift key is pressed.
:meth:`~wx.stc.StyledTextEvent.GetText`
:meth:`~wx.stc.StyledTextEvent.GetToken` Returns the token value for this event.
:meth:`~wx.stc.StyledTextEvent.GetUpdated` Returns the value of the updated field for this event.
:meth:`~wx.stc.StyledTextEvent.GetWParam` Returns value of the WParam field for this event.
:meth:`~wx.stc.StyledTextEvent.GetX` Returns the X coordinate of the mouse for this event.
:meth:`~wx.stc.StyledTextEvent.GetY` Returns the Y coordinate of the mouse for this event.
:meth:`~wx.stc.StyledTextEvent.SetAnnotationLinesAdded` Sets the annotation lines added value for this event.
:meth:`~wx.stc.StyledTextEvent.SetDragFlags` Sets the drag flags for this event.
:meth:`~wx.stc.StyledTextEvent.SetDragResult` Sets the drag result for this event.
:meth:`~wx.stc.StyledTextEvent.SetDragText` Sets the drag text for this event.
:meth:`~wx.stc.StyledTextEvent.SetFoldLevelNow` Sets the current fold level for this event.
:meth:`~wx.stc.StyledTextEvent.SetFoldLevelPrev` Sets the previous fold level for this event.
:meth:`~wx.stc.StyledTextEvent.SetKey` Sets the key code for this event.
:meth:`~wx.stc.StyledTextEvent.SetLParam` Sets value of the LParam field for this event.
:meth:`~wx.stc.StyledTextEvent.SetLength` Sets the length value for this event.
:meth:`~wx.stc.StyledTextEvent.SetLine` Sets line number for this event.
:meth:`~wx.stc.StyledTextEvent.SetLinesAdded` Sets the number of lines added for this event.
:meth:`~wx.stc.StyledTextEvent.SetListCompletionMethod` Sets the list completion method for this event.
:meth:`~wx.stc.StyledTextEvent.SetListType` Sets the list type for this event.
:meth:`~wx.stc.StyledTextEvent.SetMargin` Sets margin number for this event.
:meth:`~wx.stc.StyledTextEvent.SetMessage` Sets message number for this event.
:meth:`~wx.stc.StyledTextEvent.SetModificationType` Sets the modification type for this event.
:meth:`~wx.stc.StyledTextEvent.SetModifiers` Sets the value of the modifiers field for this event.
:meth:`~wx.stc.StyledTextEvent.SetPosition` Sets file position for this event.
:meth:`~wx.stc.StyledTextEvent.SetText` Sets the text for this event.
:meth:`~wx.stc.StyledTextEvent.SetToken` Sets the token for this event.
:meth:`~wx.stc.StyledTextEvent.SetUpdated` Sets the value of the updated field for this event.
:meth:`~wx.stc.StyledTextEvent.SetWParam` Sets the value of the WParam field for this event.
:meth:`~wx.stc.StyledTextEvent.SetX` Sets the X value for this event.
:meth:`~wx.stc.StyledTextEvent.SetY` Sets the Y value for this event.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.stc.StyledTextEvent.Alt` See :meth:`~wx.stc.StyledTextEvent.GetAlt`
:attr:`~wx.stc.StyledTextEvent.AnnotationsLinesAdded` See :meth:`~wx.stc.StyledTextEvent.GetAnnotationsLinesAdded`
:attr:`~wx.stc.StyledTextEvent.Control` See :meth:`~wx.stc.StyledTextEvent.GetControl`
:attr:`~wx.stc.StyledTextEvent.DragFlags` See :meth:`~wx.stc.StyledTextEvent.GetDragFlags` and :meth:`~wx.stc.StyledTextEvent.SetDragFlags`
:attr:`~wx.stc.StyledTextEvent.DragResult` See :meth:`~wx.stc.StyledTextEvent.GetDragResult` and :meth:`~wx.stc.StyledTextEvent.SetDragResult`
:attr:`~wx.stc.StyledTextEvent.DragText` See :meth:`~wx.stc.StyledTextEvent.GetDragText` and :meth:`~wx.stc.StyledTextEvent.SetDragText`
:attr:`~wx.stc.StyledTextEvent.FoldLevelNow` See :meth:`~wx.stc.StyledTextEvent.GetFoldLevelNow` and :meth:`~wx.stc.StyledTextEvent.SetFoldLevelNow`
:attr:`~wx.stc.StyledTextEvent.FoldLevelPrev` See :meth:`~wx.stc.StyledTextEvent.GetFoldLevelPrev` and :meth:`~wx.stc.StyledTextEvent.SetFoldLevelPrev`
:attr:`~wx.stc.StyledTextEvent.Key` See :meth:`~wx.stc.StyledTextEvent.GetKey` and :meth:`~wx.stc.StyledTextEvent.SetKey`
:attr:`~wx.stc.StyledTextEvent.LParam` See :meth:`~wx.stc.StyledTextEvent.GetLParam` and :meth:`~wx.stc.StyledTextEvent.SetLParam`
:attr:`~wx.stc.StyledTextEvent.Length` See :meth:`~wx.stc.StyledTextEvent.GetLength` and :meth:`~wx.stc.StyledTextEvent.SetLength`
:attr:`~wx.stc.StyledTextEvent.Line` See :meth:`~wx.stc.StyledTextEvent.GetLine` and :meth:`~wx.stc.StyledTextEvent.SetLine`
:attr:`~wx.stc.StyledTextEvent.LinesAdded` See :meth:`~wx.stc.StyledTextEvent.GetLinesAdded` and :meth:`~wx.stc.StyledTextEvent.SetLinesAdded`
:attr:`~wx.stc.StyledTextEvent.ListCompletionMethod` See :meth:`~wx.stc.StyledTextEvent.GetListCompletionMethod` and :meth:`~wx.stc.StyledTextEvent.SetListCompletionMethod`
:attr:`~wx.stc.StyledTextEvent.ListType` See :meth:`~wx.stc.StyledTextEvent.GetListType` and :meth:`~wx.stc.StyledTextEvent.SetListType`
:attr:`~wx.stc.StyledTextEvent.Margin` See :meth:`~wx.stc.StyledTextEvent.GetMargin` and :meth:`~wx.stc.StyledTextEvent.SetMargin`
:attr:`~wx.stc.StyledTextEvent.Message` See :meth:`~wx.stc.StyledTextEvent.GetMessage` and :meth:`~wx.stc.StyledTextEvent.SetMessage`
:attr:`~wx.stc.StyledTextEvent.ModificationType` See :meth:`~wx.stc.StyledTextEvent.GetModificationType` and :meth:`~wx.stc.StyledTextEvent.SetModificationType`
:attr:`~wx.stc.StyledTextEvent.Modifiers` See :meth:`~wx.stc.StyledTextEvent.GetModifiers` and :meth:`~wx.stc.StyledTextEvent.SetModifiers`
:attr:`~wx.stc.StyledTextEvent.Position` See :meth:`~wx.stc.StyledTextEvent.GetPosition` and :meth:`~wx.stc.StyledTextEvent.SetPosition`
:attr:`~wx.stc.StyledTextEvent.Shift` See :meth:`~wx.stc.StyledTextEvent.GetShift`
:attr:`~wx.stc.StyledTextEvent.Text` See :meth:`~wx.stc.StyledTextEvent.GetText` and :meth:`~wx.stc.StyledTextEvent.SetText`
:attr:`~wx.stc.StyledTextEvent.Token` See :meth:`~wx.stc.StyledTextEvent.GetToken` and :meth:`~wx.stc.StyledTextEvent.SetToken`
:attr:`~wx.stc.StyledTextEvent.Updated` See :meth:`~wx.stc.StyledTextEvent.GetUpdated` and :meth:`~wx.stc.StyledTextEvent.SetUpdated`
:attr:`~wx.stc.StyledTextEvent.WParam` See :meth:`~wx.stc.StyledTextEvent.GetWParam` and :meth:`~wx.stc.StyledTextEvent.SetWParam`
:attr:`~wx.stc.StyledTextEvent.X` See :meth:`~wx.stc.StyledTextEvent.GetX` and :meth:`~wx.stc.StyledTextEvent.SetX`
:attr:`~wx.stc.StyledTextEvent.Y` See :meth:`~wx.stc.StyledTextEvent.GetY` and :meth:`~wx.stc.StyledTextEvent.SetY`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.stc.StyledTextEvent(CommandEvent)
**Possible constructors**::
StyledTextEvent(commandType=0, id=0)
StyledTextEvent(event)
The type of events sent from StyledTextCtrl.
.. method:: __init__(self, *args, **kw)
|overload| Overloaded Implementations:
:html:`<hr class="overloadsep" /><br />`
**__init__** `(self, commandType=0, id=0)`
Constructor.
:param `commandType`:
:type `commandType`: wx.EventType
:param `id`:
:type `id`: int
:html:`<hr class="overloadsep" /><br />`
**__init__** `(self, event)`
Copy constructor.
:param `event`:
:type `event`: wx.stc.StyledTextEvent
:html:`<hr class="overloadsep" /><br />`
.. method:: GetAlt(self)
Returns ``True`` if the Alt key is pressed.
This method is valid for the following event types:
- ``wxEVT_STC_DOUBLECLICK``
- ``wxEVT_STC_MARGINCLICK``
- ``wxEVT_STC_HOTSPOT_CLICK``
- ``wxEVT_STC_HOTSPOT_DCLICK``
- ``wxEVT_STC_HOTSPOT_RELEASE_CLICK``
- ``wxEVT_STC_INDICATOR_CLICK``
- ``wxEVT_STC_INDICATOR_RELEASE``
- ``wxEVT_STC_MARGIN_RIGHT_CLICK``
:rtype: `bool`
.. method:: GetAnnotationsLinesAdded(self)
Returns the number of lines that have been added to or removed from an annotation.
This method is valid for ``wxEVT_STC_MODIFIED`` events when the result of :meth:`GetModificationType` includes ``STC_MOD_CHANGEANNOTATION``.
:rtype: `int`
.. method:: GetControl(self)
Returns ``True`` if the Control key is pressed.
This method is valid for the following event types:
- ``wxEVT_STC_DOUBLECLICK``
- ``wxEVT_STC_MARGINCLICK``
- ``wxEVT_STC_HOTSPOT_CLICK``
- ``wxEVT_STC_HOTSPOT_DCLICK``
- ``wxEVT_STC_HOTSPOT_RELEASE_CLICK``
- ``wxEVT_STC_INDICATOR_CLICK``
- ``wxEVT_STC_INDICATOR_RELEASE``
- ``wxEVT_STC_MARGIN_RIGHT_CLICK``
:rtype: `bool`
.. method:: GetDragFlags(self)
Returns flags for the drag operation associated with this event.
This method is valid for ``wxEVT_STC_START_DRAG`` events.
:rtype: `int`
.. method:: GetDragResult(self)
Returns drag result for this event.
This method is valid for ``wxEVT_STC_DRAG_OVER`` and ``wxEVT_STC_DO_DROP`` events.
:rtype: :ref:`wx.DragResult`
.. method:: GetDragText(self)
:rtype: `string`
.. wxdeprecated::
Use :meth:`GetString` instead.
.. method:: GetFoldLevelNow(self)
Returns the current fold level for the line.
This method is valid for ``wxEVT_STC_MODIFIED`` events when the result of :meth:`GetModificationType` includes ``STC_MOD_CHANGEFOLD``.
:rtype: `int`
.. method:: GetFoldLevelPrev(self)
Returns previous fold level for the line.
This method is valid for ``wxEVT_STC_MODIFIED`` events when the result of :meth:`GetModificationType` includes ``STC_MOD_CHANGEFOLD``.
:rtype: `int`
.. method:: GetKey(self)
Returns the key code of the key that generated this event.
This method is valid for the following event types:
- ``wxEVT_STC_CHARADDED``
- ``wxEVT_STC_USERLISTSELECTION``
- ``wxEVT_STC_AUTOCOMP_SELECTION``
- ``wxEVT_STC_AUTOCOMP_COMPLETED``
:rtype: `int`
.. method:: GetLParam(self)
Returns the value of the LParam field for this event.
This method is valid for ``wxEVT_STC_MACRORECORD`` events.
:rtype: `int`
.. method:: GetLength(self)
Returns the length (number of characters) of this event.
This method is valid for ``wxEVT_STC_MODIFIED`` and ``wxEVT_STC_NEEDSHOWN`` events.
:rtype: `int`
.. method:: GetLine(self)
Returns zero-based line number for this event.
This method is valid for ``wxEVT_STC_DOUBLECLICK`` and ``wxEVT_STC_MODIFIED`` events.
:rtype: `int`
.. method:: GetLinesAdded(self)
Returns the number of lines added or deleted with this event.
This method is valid for ``wxEVT_STC_MODIFIED`` events when the result of :meth:`GetModificationType` includes ``STC_MOD_INSERTTEXT `` or ``STC_MOD_DELETETEXT``.
:rtype: `int`
.. method:: GetListCompletionMethod(self)
Returns a value describing the action that closed the list.
The returned value will be one of the following constants:
========================== ===========================================================================
``STC_AC_FILLUP`` A fillup character caused the completion.
``STC_AC_DOUBLECLICK`` A double-click caused the completion.
``STC_AC_TAB`` The tab key caused the completion.
``STC_AC_NEWLINE`` The enter key caused the completion.
``STC_AC_COMMAND`` The :meth:`wx.stc.StyledTextCtrl.AutoCompComplete` method was called.
========================== ===========================================================================
|
This method is valid for ``wxEVT_STC_USERLISTSELECTION`` , ``wxEVT_STC_AUTOCOMP_SELECTION`` , and ``wxEVT_STC_AUTOCOMP_COMPLETED`` events.
:rtype: `int`
.. versionadded:: 4.1/wxWidgets-3.1.1
.. method:: GetListType(self)
Returns the list type for this event.
The list type is an integer passed to a list when it is created with the :meth:`wx.stc.StyledTextCtrl.UserListShow` method and can be used to distinguish lists if more than one is used.
This method is valid for ``wxEVT_STC_AUTOCOMP_SELECTION_CHANGE`` and ``wxEVT_STC_USERLISTSELECTION`` events.
:rtype: `int`
.. method:: GetMargin(self)
Returns the zero-based index of the margin that generated this event.
This method is valid for ``wxEVT_STC_MARGINCLICK`` and ``wxEVT_STC_MARGIN_RIGHT_CLICK`` events.
:rtype: `int`
.. method:: GetMessage(self)
Returns a message number while a macro is being recorded.
Many of the :ref:`wx.stc.StyledTextCtrl` methods such as :meth:`InsertText` and :meth:`Paste` have an event number associated with them. This method returns that number while a macro is being recorded so that the macro can be played back later.
This method is valid for ``wxEVT_STC_MACRORECORD`` events.
:rtype: `int`
.. method:: GetModificationType(self)
Returns the modification type for this event.
The modification type is a bit list that describes the change that generated this event. It may contain one or more of the following values:
- ``STC_MOD_INSERTTEXT ``
- ``STC_MOD_DELETETEXT ``
- ``STC_MOD_CHANGESTYLE ``
- ``STC_MOD_CHANGEFOLD ``
- ``STC_PERFORMED_USER ``
- ``STC_PERFORMED_UNDO ``
- ``STC_PERFORMED_REDO ``
- ``STC_MULTISTEPUNDOREDO ``
- ``STC_LASTSTEPINUNDOREDO ``
- ``STC_MOD_CHANGEMARKER ``
- ``STC_MOD_BEFOREINSERT ``
- ``STC_MOD_BEFOREDELETE ``
- ``STC_MULTILINEUNDOREDO ``
- ``STC_STARTACTION ``
- ``STC_MOD_CHANGEINDICATOR ``
- ``STC_MOD_CHANGELINESTATE ``
- ``STC_MOD_CHANGEMARGIN ``
- ``STC_MOD_CHANGEANNOTATION ``
- ``STC_MOD_CONTAINER ``
- ``STC_MOD_LEXERSTATE ``
- ``STC_MOD_INSERTCHECK ``
- ``STC_MOD_CHANGETABSTOPS ``
This method is valid for ``wxEVT_STC_MODIFIED`` events.
:rtype: `int`
.. method:: GetModifiers(self)
Returns the modifiers of the key press or mouse click for this event.
The returned value is a bit list that may contain one or more of the following values:
- ``STC_KEYMOD_SHIFT ``
- ``STC_KEYMOD_CTRL ``
- ``STC_KEYMOD_ALT ``
- ``STC_KEYMOD_SUPER ``
- ``STC_KEYMOD_META ``
In addition, the value can be checked for equality with ``STC_KEYMOD_NORM `` to test if no modifiers are present.
This method is valid for the following event types:
- ``wxEVT_STC_DOUBLECLICK``
- ``wxEVT_STC_MARGINCLICK``
- ``wxEVT_STC_HOTSPOT_CLICK``
- ``wxEVT_STC_HOTSPOT_DCLICK``
- ``wxEVT_STC_HOTSPOT_RELEASE_CLICK``
- ``wxEVT_STC_INDICATOR_CLICK``
- ``wxEVT_STC_INDICATOR_RELEASE``
- ``wxEVT_STC_MARGIN_RIGHT_CLICK``
:rtype: `int`
.. method:: GetPosition(self)
Returns the zero-based text position associated this event.
This method is valid for the following event types:
- ``wxEVT_STC_STYLENEEDED``
- ``wxEVT_STC_DOUBLECLICK``
- ``wxEVT_STC_MODIFIED``
- ``wxEVT_STC_MARGINCLICK``
- ``wxEVT_STC_NEEDSHOWN``
- ``wxEVT_STC_USERLISTSELECTION``
- ``wxEVT_STC_DWELLSTART``
- ``wxEVT_STC_DWELLEND``
- ``wxEVT_STC_HOTSPOT_CLICK``
- ``wxEVT_STC_HOTSPOT_DCLICK``
- ``wxEVT_STC_HOTSPOT_RELEASE_CLICK``
- ``wxEVT_STC_INDICATOR_CLICK``
- ``wxEVT_STC_INDICATOR_RELEASE``
- ``wxEVT_STC_CALLTIP_CLICK``
- ``wxEVT_STC_AUTOCOMP_SELECTION``
- ``wxEVT_STC_AUTOCOMP_SELECTION_CHANGE``
- ``wxEVT_STC_AUTOCOMP_COMPLETED``
- ``wxEVT_STC_MARGIN_RIGHT_CLICK``
:rtype: `int`
.. method:: GetShift(self)
Returns ``True`` if the Shift key is pressed.
This method is valid for the following event types:
- ``wxEVT_STC_DOUBLECLICK``
- ``wxEVT_STC_MARGINCLICK``
- ``wxEVT_STC_HOTSPOT_CLICK``
- ``wxEVT_STC_HOTSPOT_DCLICK``
- ``wxEVT_STC_HOTSPOT_RELEASE_CLICK``
- ``wxEVT_STC_INDICATOR_CLICK``
- ``wxEVT_STC_INDICATOR_RELEASE``
- ``wxEVT_STC_MARGIN_RIGHT_CLICK``
:rtype: `bool`
.. method:: GetText(self)
:rtype: `string`
.. wxdeprecated::
Use :meth:`GetString` instead.
.. method:: GetToken(self)
Returns the token value for this event.
The token is an integer value that can be set with a call to the :meth:`wx.stc.StyledTextCtrl.AddUndoAction` method.
This method is valid for ``wxEVT_STC_MODIFIED`` events when the result of :meth:`GetModificationType` includes ``STC_MOD_CONTAINER``.
:rtype: `int`
.. method:: GetUpdated(self)
Returns the value of the updated field for this event.
The value of this field is a bit list that describes the change that generated this event. It may contain one or more of the following values:
- ``STC_UPDATE_CONTENT ``
- ``STC_UPDATE_SELECTION ``
- ``STC_UPDATE_V_SCROLL ``
- ``STC_UPDATE_H_SCROLL ``
This method is valid for ``wxEVT_STC_UPDATEUI`` events.
:rtype: `int`
.. method:: GetWParam(self)
Returns value of the WParam field for this event.
This method is valid for ``wxEVT_STC_MACRORECORD`` events.
:rtype: `int`
.. method:: GetX(self)
Returns the X coordinate of the mouse for this event.
This method is valid for the following event types:
- ``wxEVT_STC_DWELLSTART``
- ``wxEVT_STC_DWELLEND``
- ``wxEVT_STC_START_DRAG``
- ``wxEVT_STC_DRAG_OVER``
- ``wxEVT_STC_DO_DROP``
:rtype: `int`
.. method:: GetY(self)
Returns the Y coordinate of the mouse for this event.
This method is valid for the following event types:
- ``wxEVT_STC_DWELLSTART``
- ``wxEVT_STC_DWELLEND``
- ``wxEVT_STC_START_DRAG``
- ``wxEVT_STC_DRAG_OVER``
- ``wxEVT_STC_DO_DROP``
:rtype: `int`
.. method:: SetAnnotationLinesAdded(self, val)
Sets the annotation lines added value for this event.
:param `val`:
:type `val`: int
.. method:: SetDragFlags(self, flags)
Sets the drag flags for this event.
:param `flags`:
:type `flags`: int
.. method:: SetDragResult(self, val)
Sets the drag result for this event.
:param `val`:
:type `val`: wx.DragResult
.. method:: SetDragText(self, val)
Sets the drag text for this event.
:param `val`:
:type `val`: string
.. method:: SetFoldLevelNow(self, val)
Sets the current fold level for this event.
:param `val`:
:type `val`: int
.. method:: SetFoldLevelPrev(self, val)
Sets the previous fold level for this event.
:param `val`:
:type `val`: int
.. method:: SetKey(self, k)
Sets the key code for this event.
:param `k`:
:type `k`: int
.. method:: SetLParam(self, val)
Sets value of the LParam field for this event.
:param `val`:
:type `val`: int
.. method:: SetLength(self, len)
Sets the length value for this event.
:param `len`:
:type `len`: int
.. method:: SetLine(self, val)
Sets line number for this event.
:param `val`:
:type `val`: int
.. method:: SetLinesAdded(self, num)
Sets the number of lines added for this event.
:param `num`:
:type `num`: int
.. method:: SetListCompletionMethod(self, val)
Sets the list completion method for this event.
:param `val`:
:type `val`: int
.. versionadded:: 4.1/wxWidgets-3.1.1
.. method:: SetListType(self, val)
Sets the list type for this event.
:param `val`:
:type `val`: int
.. method:: SetMargin(self, val)
Sets margin number for this event.
:param `val`:
:type `val`: int
.. method:: SetMessage(self, val)
Sets message number for this event.
:param `val`:
:type `val`: int
.. method:: SetModificationType(self, t)
Sets the modification type for this event.
:param `t`:
:type `t`: int
.. method:: SetModifiers(self, m)
Sets the value of the modifiers field for this event.
:param `m`:
:type `m`: int
.. method:: SetPosition(self, pos)
Sets file position for this event.
:param `pos`:
:type `pos`: int
.. method:: SetText(self, t)
Sets the text for this event.
:param `t`:
:type `t`: string
.. method:: SetToken(self, val)
Sets the token for this event.
:param `val`:
:type `val`: int
.. method:: SetUpdated(self, val)
Sets the value of the updated field for this event.
:param `val`:
:type `val`: int
.. method:: SetWParam(self, val)
Sets the value of the WParam field for this event.
:param `val`:
:type `val`: int
.. method:: SetX(self, val)
Sets the X value for this event.
:param `val`:
:type `val`: int
.. method:: SetY(self, val)
Sets the Y value for this event.
:param `val`:
:type `val`: int
.. attribute:: Alt
See :meth:`~wx.stc.StyledTextEvent.GetAlt`
.. attribute:: AnnotationsLinesAdded
See :meth:`~wx.stc.StyledTextEvent.GetAnnotationsLinesAdded`
.. attribute:: Control
See :meth:`~wx.stc.StyledTextEvent.GetControl`
.. attribute:: DragFlags
See :meth:`~wx.stc.StyledTextEvent.GetDragFlags` and :meth:`~wx.stc.StyledTextEvent.SetDragFlags`
.. attribute:: DragResult
See :meth:`~wx.stc.StyledTextEvent.GetDragResult` and :meth:`~wx.stc.StyledTextEvent.SetDragResult`
.. attribute:: DragText
See :meth:`~wx.stc.StyledTextEvent.GetDragText` and :meth:`~wx.stc.StyledTextEvent.SetDragText`
.. attribute:: FoldLevelNow
See :meth:`~wx.stc.StyledTextEvent.GetFoldLevelNow` and :meth:`~wx.stc.StyledTextEvent.SetFoldLevelNow`
.. attribute:: FoldLevelPrev
See :meth:`~wx.stc.StyledTextEvent.GetFoldLevelPrev` and :meth:`~wx.stc.StyledTextEvent.SetFoldLevelPrev`
.. attribute:: Key
See :meth:`~wx.stc.StyledTextEvent.GetKey` and :meth:`~wx.stc.StyledTextEvent.SetKey`
.. attribute:: LParam
See :meth:`~wx.stc.StyledTextEvent.GetLParam` and :meth:`~wx.stc.StyledTextEvent.SetLParam`
.. attribute:: Length
See :meth:`~wx.stc.StyledTextEvent.GetLength` and :meth:`~wx.stc.StyledTextEvent.SetLength`
.. attribute:: Line
See :meth:`~wx.stc.StyledTextEvent.GetLine` and :meth:`~wx.stc.StyledTextEvent.SetLine`
.. attribute:: LinesAdded
See :meth:`~wx.stc.StyledTextEvent.GetLinesAdded` and :meth:`~wx.stc.StyledTextEvent.SetLinesAdded`
.. attribute:: ListCompletionMethod
See :meth:`~wx.stc.StyledTextEvent.GetListCompletionMethod` and :meth:`~wx.stc.StyledTextEvent.SetListCompletionMethod`
.. attribute:: ListType
See :meth:`~wx.stc.StyledTextEvent.GetListType` and :meth:`~wx.stc.StyledTextEvent.SetListType`
.. attribute:: Margin
See :meth:`~wx.stc.StyledTextEvent.GetMargin` and :meth:`~wx.stc.StyledTextEvent.SetMargin`
.. attribute:: Message
See :meth:`~wx.stc.StyledTextEvent.GetMessage` and :meth:`~wx.stc.StyledTextEvent.SetMessage`
.. attribute:: ModificationType
See :meth:`~wx.stc.StyledTextEvent.GetModificationType` and :meth:`~wx.stc.StyledTextEvent.SetModificationType`
.. attribute:: Modifiers
See :meth:`~wx.stc.StyledTextEvent.GetModifiers` and :meth:`~wx.stc.StyledTextEvent.SetModifiers`
.. attribute:: Position
See :meth:`~wx.stc.StyledTextEvent.GetPosition` and :meth:`~wx.stc.StyledTextEvent.SetPosition`
.. attribute:: Shift
See :meth:`~wx.stc.StyledTextEvent.GetShift`
.. attribute:: Text
See :meth:`~wx.stc.StyledTextEvent.GetText` and :meth:`~wx.stc.StyledTextEvent.SetText`
.. attribute:: Token
See :meth:`~wx.stc.StyledTextEvent.GetToken` and :meth:`~wx.stc.StyledTextEvent.SetToken`
.. attribute:: Updated
See :meth:`~wx.stc.StyledTextEvent.GetUpdated` and :meth:`~wx.stc.StyledTextEvent.SetUpdated`
.. attribute:: WParam
See :meth:`~wx.stc.StyledTextEvent.GetWParam` and :meth:`~wx.stc.StyledTextEvent.SetWParam`
.. attribute:: X
See :meth:`~wx.stc.StyledTextEvent.GetX` and :meth:`~wx.stc.StyledTextEvent.SetX`
.. attribute:: Y
See :meth:`~wx.stc.StyledTextEvent.GetY` and :meth:`~wx.stc.StyledTextEvent.SetY`
|