/usr/include/gtkmm-3.0/gtkmm/textview.h is in libgtkmm-3.0-dev 3.22.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | // Generated by gmmproc 2.50.0 -- DO NOT MODIFY!
#ifndef _GTKMM_TEXTVIEW_H
#define _GTKMM_TEXTVIEW_H
#include <gtkmmconfig.h>
#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>
/* Copyright(C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or(at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
// This is for including the config header before any code (such as
// the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
#include <gtkmm/container.h>
#include <gtkmm/scrollable.h>
#include <gtkmm/textbuffer.h>
#include <gtkmm/textmark.h>
#include <gtkmm/menu.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
using GtkTextView = struct _GtkTextView;
using GtkTextViewClass = struct _GtkTextViewClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Gtk
{ class TextView_Class; } // namespace Gtk
#endif //DOXYGEN_SHOULD_SKIP_THIS
namespace Gtk
{
/** @addtogroup gtkmmEnums gtkmm Enums and Flags */
/**
* @var TextWindowType TEXT_WINDOW_WIDGET
* Window that floats over scrolling areas.
*
* @var TextWindowType TEXT_WINDOW_TEXT
* Scrollable text window.
*
* @var TextWindowType TEXT_WINDOW_LEFT
* Left side border window.
*
* @var TextWindowType TEXT_WINDOW_RIGHT
* Right side border window.
*
* @var TextWindowType TEXT_WINDOW_TOP
* Top border window.
*
* @var TextWindowType TEXT_WINDOW_BOTTOM
* Bottom border window.
*
* @enum TextWindowType
*
* Used to reference the parts of Gtk::TextView.
*
* @ingroup gtkmmEnums
*/
enum TextWindowType
{
TEXT_WINDOW_PRIVATE,
TEXT_WINDOW_WIDGET,
TEXT_WINDOW_TEXT,
TEXT_WINDOW_LEFT,
TEXT_WINDOW_RIGHT,
TEXT_WINDOW_TOP,
TEXT_WINDOW_BOTTOM
};
} // namespace Gtk
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{
template <>
class Value<Gtk::TextWindowType> : public Glib::Value_Enum<Gtk::TextWindowType>
{
public:
static GType value_type() G_GNUC_CONST;
};
} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gtk
{
/** @defgroup TextView TextView Classes
* These classes are used with the Gtk::TextView widget.
*/
/** Multi-line text editing widget. It displays a Gtk::TextBuffer.
*
* The TextView widget looks like this:
* @image html textview1.png
*
* @ingroup Widgets
* @ingroup Containers
* @ingroup TextView
*/
class TextView
: public Container,
public Scrollable
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef TextView CppObjectType;
typedef TextView_Class CppClassType;
typedef GtkTextView BaseObjectType;
typedef GtkTextViewClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
TextView(TextView&& src) noexcept;
TextView& operator=(TextView&& src) noexcept;
// noncopyable
TextView(const TextView&) = delete;
TextView& operator=(const TextView&) = delete;
~TextView() noexcept override;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class TextView_Class;
static CppClassType textview_class_;
protected:
explicit TextView(const Glib::ConstructParams& construct_params);
explicit TextView(GtkTextView* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
/** Get the GType for this class, for use with the underlying GObject type system.
*/
static GType get_type() G_GNUC_CONST;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GtkTextView* gobj() { return reinterpret_cast<GtkTextView*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GtkTextView* gobj() const { return reinterpret_cast<GtkTextView*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
/// This is a default handler for the signal signal_populate_popup().
virtual void on_populate_popup(Menu* menu);
/// This is a default handler for the signal signal_set_anchor().
virtual void on_set_anchor();
/// This is a default handler for the signal signal_insert_at_cursor().
virtual void on_insert_at_cursor(const Glib::ustring& str);
private:
public:
TextView();
explicit TextView(const Glib::RefPtr<TextBuffer>& buffer);
/** Sets @a buffer as the buffer being displayed by @a text_view. The previous
* buffer displayed by the text view is unreferenced, and a reference is
* added to @a buffer. If you owned a reference to @a buffer before passing it
* to this function, you must remove that reference yourself; Gtk::TextView
* will not “adopt” it.
*
* @param buffer A Gtk::TextBuffer.
*/
void set_buffer(const Glib::RefPtr<TextBuffer>& buffer);
/** Returns the Gtk::TextBuffer being displayed by this text view.
* The reference count on the buffer is not incremented; the caller
* of this function won’t own a new reference.
*
* @return A Gtk::TextBuffer.
*/
Glib::RefPtr<TextBuffer> get_buffer();
/** Returns the Gtk::TextBuffer being displayed by this text view.
* The reference count on the buffer is not incremented; the caller
* of this function won’t own a new reference.
*
* @return A Gtk::TextBuffer.
*/
Glib::RefPtr<const TextBuffer> get_buffer() const;
/** Scrolls the TextView so that @a iter is on the screen, by scrolling the minimal distance to get the mark onscreen,
* possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
* @a within_margin.
* @note This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed
* in an idle handler; so this function may not have the desired effect if it's called before the height computations. To avoid
* oddness, consider using gtk_text_view_scroll_to_mark() which saves a point to be scrolled to after line validation.
*
* @param iter An iterator pointing to the position that should be made visible by scrolling.
* @param within_margin margin as a [0.0,0.5] fraction of screen size.
* @result true if scrolling occurred.
*/
bool scroll_to(TextBuffer::iterator& iter, double within_margin = 0);
/** Scrolls the TextView so that @a iter is on the screen, in the position indicated by xalign and yalign,
* possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
* @a within_margin.
* @note This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed
* in an idle handler; so this function may not have the desired effect if it's called before the height computations. To avoid
* oddness, consider using gtk_text_view_scroll_to_mark() which saves a point to be scrolled to after line validation.
*
* @param iter An iterator pointing to the position that should be made visible by scrolling.
* @param within_margin margin as a [0.0,0.5] fraction of screen size.
* @param xalign horizontal alignment of mark within visible area. An alignment of 0.0 indicates left, 1.0 indicates right, 0.5 means center.
* @param yalign vertical alignment of mark within visible area. An alignment of 0.0 indicates top, 1.0 indicates bottom, 0.5 means center.
* @result true if scrolling occurred.
*/
bool scroll_to(TextBuffer::iterator& iter, double within_margin, double xalign, double yalign);
/** Scrolls text_view so that @a mark is on the screen, by scrolling the minimal distance to get the mark onscreen,
* possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
* @a within_margin.
*
* @param mark An mark pointing to the position that should be made visible by scrolling.
* @param within_margin margin as a [0.0,0.5] fraction of screen size.
*/
void scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin = 0);
/** Scrolls the TextView so that @a iter is on the screen, in the position indicated by xalign and yalign,
* possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
* @a within_margin.
*
* @param mark An mark pointing to the position that should be made visible by scrolling.
* @param within_margin margin as a [0.0,0.5] fraction of screen size.
* @param xalign horizontal alignment of mark within visible area. An alignment of 0.0 indicates left, 1.0 indicates right, 0.5 means center.
* @param yalign vertical alignment of mark within visible area. An alignment of 0.0 indicates top, 1.0 indicates bottom, 0.5 means center.
*/
void scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin, double xalign, double yalign);
//It does not do anything more than the default scroll_to(mark).
/** Moves a mark within the buffer so that it's
* located within the currently-visible text area.
*
* @param mark A Gtk::TextMark.
* @return <tt>true</tt> if the mark moved (wasn’t already onscreen).
*/
bool move_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark);
/** Moves the cursor to the currently visible region of the
* buffer, it it isn’t there already.
*
* @return <tt>true</tt> if the cursor had to be moved.
*/
bool place_cursor_onscreen();
/** Fills @a visible_rect with the currently-visible
* region of the buffer, in buffer coordinates. Convert to window coordinates
* with buffer_to_window_coords().
*
* @param visible_rect Rectangle to fill.
*/
void get_visible_rect(Gdk::Rectangle& visible_rect) const;
/** Toggles whether the insertion point should be displayed. A buffer with
* no editable text probably shouldn’t have a visible cursor, so you may
* want to turn the cursor off.
*
* Note that this property may be overridden by the
* Gtk::Settings::property_gtk_keynave_use_caret() settings.
*
* @param setting Whether to show the insertion cursor.
*/
void set_cursor_visible(bool setting = true);
/** Find out whether the cursor should be displayed.
*
* @return Whether the insertion mark is visible.
*/
bool get_cursor_visible() const;
/** Ensures that the cursor is shown (i.e.\ not in an 'off' blink
* interval) and resets the time that it will stay blinking (or
* visible, in case blinking is disabled).
*
* This function should be called in response to user input
* (e.g. from derived classes that override the textview's
* Gtk::Widget::signal_key_press_event() handler).
*
* @newin{3,20}
*/
void reset_cursor_blink();
/** Given an @a iter within a text layout, determine the positions of the
* strong and weak cursors if the insertion point is at that
* iterator. The position of each cursor is stored as a zero-width
* rectangle. The strong cursor location is the location where
* characters of the directionality equal to the base direction of the
* paragraph are inserted. The weak cursor location is the location
* where characters of the directionality opposite to the base
* direction of the paragraph are inserted.
*
* If @a iter is <tt>nullptr</tt>, the actual cursor position is used.
*
* Note that if @a iter happens to be the actual cursor position, and
* there is currently an IM preedit sequence being entered, the
* returned locations will be adjusted to account for the preedit
* cursor’s offset within the preedit sequence.
*
* The rectangle position is in buffer coordinates; use
* buffer_to_window_coords() to convert these
* coordinates to coordinates for one of the windows in the text view.
*
* @newin{3,0}
*
* @param iter A Gtk::TextIter.
* @param strong Location to store the strong
* cursor position (may be <tt>nullptr</tt>).
* @param weak Location to store the weak
* cursor position (may be <tt>nullptr</tt>).
*/
void get_cursor_locations(const TextBuffer::iterator& iter, Gdk::Rectangle& strong, Gdk::Rectangle& weak) const;
/** Gets a rectangle which roughly contains the character at @a iter.
* The rectangle position is in buffer coordinates; use
* buffer_to_window_coords() to convert these
* coordinates to coordinates for one of the windows in the text view.
*
* @param iter A Gtk::TextIter.
* @param location Bounds of the character at @a iter.
*/
void get_iter_location(const TextBuffer::iterator& iter, Gdk::Rectangle& location) const;
/** Retrieves the iterator at buffer coordinates @a x and @a y. Buffer
* coordinates are coordinates for the entire buffer, not just the
* currently-displayed portion. If you have coordinates from an
* event, you have to convert those to buffer coordinates with
* window_to_buffer_coords().
*
* @param iter A Gtk::TextIter.
* @param x X position, in buffer coordinates.
* @param y Y position, in buffer coordinates.
* @return <tt>true</tt> if the position is over text.
*/
void get_iter_at_location(TextBuffer::iterator& iter, int x, int y) const;
/** Retrieves the iterator pointing to the character at buffer
* coordinates @a x and @a y. Buffer coordinates are coordinates for
* the entire buffer, not just the currently-displayed portion.
* If you have coordinates from an event, you have to convert
* those to buffer coordinates with
* window_to_buffer_coords().
*
* Note that this is different from get_iter_at_location(),
* which returns cursor locations, i.e. positions between
* characters.
*
* @newin{2,6}
*
* @param iter A Gtk::TextIter.
* @param trailing If non-<tt>nullptr</tt>, location to store an integer indicating where
* in the grapheme the user clicked. It will either be
* zero, or the number of characters in the grapheme.
* 0 represents the trailing edge of the grapheme.
* @param x X position, in buffer coordinates.
* @param y Y position, in buffer coordinates.
* @return <tt>true</tt> if the position is over text.
*/
void get_iter_at_position(TextBuffer::iterator& iter, int& trailing, int x, int y) const;
/** Gets the y coordinate of the top of the line containing @a iter,
* and the height of the line. The coordinate is a buffer coordinate;
* convert to window coordinates with buffer_to_window_coords().
*
* @param iter A Gtk::TextIter.
* @param y Return location for a y coordinate.
* @param height Return location for a height.
*/
void get_line_yrange(const TextBuffer::iterator& iter, int& y, int& height) const;
/** Gets the Gtk::TextIter at the start of the line containing
* the coordinate @a y. @a y is in buffer coordinates, convert from
* window coordinates with window_to_buffer_coords().
* If non-<tt>nullptr</tt>, @a line_top will be filled with the coordinate of the top
* edge of the line.
*
* @param target_iter A Gtk::TextIter.
* @param y A y coordinate.
* @param line_top Return location for top coordinate of the line.
*/
void get_line_at_y(TextBuffer::iterator& target_iter, int y, int& line_top) const;
/** Converts coordinate ( @a buffer_x, @a buffer_y) to coordinates for the window
* @a win, and stores the result in ( @a window_x, @a window_y).
*
* Note that you can’t convert coordinates for a nonexisting window (see
* set_border_window_size()).
*
* @param win A Gtk::TextWindowType except Gtk::TEXT_WINDOW_PRIVATE.
* @param buffer_x Buffer x coordinate.
* @param buffer_y Buffer y coordinate.
* @param window_x Window x coordinate return location or <tt>nullptr</tt>.
* @param window_y Window y coordinate return location or <tt>nullptr</tt>.
*/
void buffer_to_window_coords(TextWindowType win, int buffer_x, int buffer_y, int& window_x, int& window_y) const;
/** Converts coordinates on the window identified by @a win to buffer
* coordinates, storing the result in ( @a buffer_x, @a buffer_y).
*
* Note that you can’t convert coordinates for a nonexisting window (see
* set_border_window_size()).
*
* @param win A Gtk::TextWindowType except Gtk::TEXT_WINDOW_PRIVATE.
* @param window_x Window x coordinate.
* @param window_y Window y coordinate.
* @param buffer_x Buffer x coordinate return location or <tt>nullptr</tt>.
* @param buffer_y Buffer y coordinate return location or <tt>nullptr</tt>.
*/
void window_to_buffer_coords(TextWindowType win, int window_x, int window_y, int& buffer_x, int& buffer_y) const;
//deprecated
/** Retrieves the Gdk::Window corresponding to an area of the text view;
* possible windows include the overall widget window, child windows
* on the left, right, top, bottom, and the window that displays the
* text buffer. Windows are <tt>nullptr</tt> and nonexistent if their width or
* height is 0, and are nonexistent before the widget has been
* realized.
*
* @param win Window to get.
* @return A Gdk::Window, or <tt>nullptr</tt>.
*/
Glib::RefPtr<Gdk::Window> get_window(TextWindowType win);
/** Retrieves the Gdk::Window corresponding to an area of the text view;
* possible windows include the overall widget window, child windows
* on the left, right, top, bottom, and the window that displays the
* text buffer. Windows are <tt>nullptr</tt> and nonexistent if their width or
* height is 0, and are nonexistent before the widget has been
* realized.
*
* @param win Window to get.
* @return A Gdk::Window, or <tt>nullptr</tt>.
*/
Glib::RefPtr<const Gdk::Window> get_window(TextWindowType win) const;
/** Usually used to find out which window an event corresponds to.
* If you connect to an event signal on @a text_view, this function
* should be called on `event->window` to
* see which window it was.
*
* @param window A window type.
* @return The window type.
*/
TextWindowType get_window_type(const Glib::RefPtr<Gdk::Window>& window);
/** Sets the width of Gtk::TEXT_WINDOW_LEFT or Gtk::TEXT_WINDOW_RIGHT,
* or the height of Gtk::TEXT_WINDOW_TOP or Gtk::TEXT_WINDOW_BOTTOM.
* Automatically destroys the corresponding window if the size is set
* to 0, and creates the window if the size is set to non-zero. This
* function can only be used for the “border windows,” it doesn’t work
* with Gtk::TEXT_WINDOW_WIDGET, Gtk::TEXT_WINDOW_TEXT, or
* Gtk::TEXT_WINDOW_PRIVATE.
*
* @param type Window to affect.
* @param size Width or height of the window.
*/
void set_border_window_size(TextWindowType type, int size);
/** Gets the width of the specified border window. See
* set_border_window_size().
*
* @param type Window to return size from.
* @return Width of window.
*/
int get_border_window_size(TextWindowType type) const;
/** Moves the given @a iter forward by one display (wrapped) line.
* A display line is different from a paragraph. Paragraphs are
* separated by newlines or other paragraph separator characters.
* Display lines are created by line-wrapping a paragraph. If
* wrapping is turned off, display lines and paragraphs will be the
* same. Display lines are divided differently for each view, since
* they depend on the view’s width; paragraphs are the same in all
* views, since they depend on the contents of the Gtk::TextBuffer.
*
* @param iter A Gtk::TextIter.
* @return <tt>true</tt> if @a iter was moved and is not on the end iterator.
*/
bool forward_display_line(TextBuffer::iterator& iter);
/** Moves the given @a iter backward by one display (wrapped) line.
* A display line is different from a paragraph. Paragraphs are
* separated by newlines or other paragraph separator characters.
* Display lines are created by line-wrapping a paragraph. If
* wrapping is turned off, display lines and paragraphs will be the
* same. Display lines are divided differently for each view, since
* they depend on the view’s width; paragraphs are the same in all
* views, since they depend on the contents of the Gtk::TextBuffer.
*
* @param iter A Gtk::TextIter.
* @return <tt>true</tt> if @a iter was moved and is not on the end iterator.
*/
bool backward_display_line(TextBuffer::iterator& iter);
/** Moves the given @a iter forward to the next display line end.
* A display line is different from a paragraph. Paragraphs are
* separated by newlines or other paragraph separator characters.
* Display lines are created by line-wrapping a paragraph. If
* wrapping is turned off, display lines and paragraphs will be the
* same. Display lines are divided differently for each view, since
* they depend on the view’s width; paragraphs are the same in all
* views, since they depend on the contents of the Gtk::TextBuffer.
*
* @param iter A Gtk::TextIter.
* @return <tt>true</tt> if @a iter was moved and is not on the end iterator.
*/
bool forward_display_line_end(TextBuffer::iterator& iter);
/** Moves the given @a iter backward to the next display line start.
* A display line is different from a paragraph. Paragraphs are
* separated by newlines or other paragraph separator characters.
* Display lines are created by line-wrapping a paragraph. If
* wrapping is turned off, display lines and paragraphs will be the
* same. Display lines are divided differently for each view, since
* they depend on the view’s width; paragraphs are the same in all
* views, since they depend on the contents of the Gtk::TextBuffer.
*
* @param iter A Gtk::TextIter.
* @return <tt>true</tt> if @a iter was moved and is not on the end iterator.
*/
bool backward_display_line_start(TextBuffer::iterator& iter);
/** Determines whether @a iter is at the start of a display line.
* See forward_display_line() for an explanation of
* display lines vs. paragraphs.
*
* @param iter A Gtk::TextIter.
* @return <tt>true</tt> if @a iter begins a wrapped line.
*/
bool starts_display_line(const TextBuffer::iterator& iter);
/** Move the iterator a given number of characters visually, treating
* it as the strong cursor position. If @a count is positive, then the
* new strong cursor position will be @a count positions to the right of
* the old cursor position. If @a count is negative then the new strong
* cursor position will be @a count positions to the left of the old
* cursor position.
*
* In the presence of bi-directional text, the correspondence
* between logical and visual order will depend on the direction
* of the current run, and there may be jumps when the cursor
* is moved off of the end of a run.
*
* @param iter A Gtk::TextIter.
* @param count Number of characters to move (negative moves left,
* positive moves right).
* @return <tt>true</tt> if @a iter moved and is not on the end iterator.
*/
bool move_visually(TextBuffer::iterator& iter, int count);
/** Allow the Gtk::TextView input method to internally handle key press
* and release events. If this function returns <tt>true</tt>, then no further
* processing should be done for this key event. See
* gtk_im_context_filter_keypress().
*
* Note that you are expected to call this function from your handler
* when overriding key event handling. This is needed in the case when
* you need to insert your own key handling between the input method
* and the default key event handling of the Gtk::TextView.
*
*
* [C example ellipted]
*
* @newin{2,22}
*
* @param gdk_event The key event.
* @return <tt>true</tt> if the input method handled the key event.
*/
bool im_context_filter_keypress(GdkEventKey* gdk_event);
/** Reset the input method context of the text view if needed.
*
* This can be necessary in the case where modifying the buffer
* would confuse on-going input method behavior.
*
* @newin{2,22}
*/
void reset_im_context();
/** Adds a child widget in the text buffer, at the given @a anchor.
*
* @param child A Gtk::Widget.
* @param anchor A Gtk::TextChildAnchor in the Gtk::TextBuffer for @a text_view.
*/
void add_child_at_anchor(Widget& child, const Glib::RefPtr<TextBuffer::ChildAnchor>& anchor);
/** Adds a child at fixed coordinates in one of the text widget's
* windows.
*
* The window must have nonzero size (see
* set_border_window_size()). Note that the child
* coordinates are given relative to scrolling. When
* placing a child in Gtk::TEXT_WINDOW_WIDGET, scrolling is
* irrelevant, the child floats above all scrollable areas. But when
* placing a child in one of the scrollable windows (border windows or
* text window) it will move with the scrolling as needed.
*
* @param child A Gtk::Widget.
* @param which_window Which window the child should appear in.
* @param xpos X position of child in window coordinates.
* @param ypos Y position of child in window coordinates.
*/
void add_child_in_window(Widget& child, TextWindowType which_window, int xpos, int ypos);
/** Updates the position of a child, as for add_child_in_window().
*
* @param child Child widget already added to the text view.
* @param xpos New X position in window coordinates.
* @param ypos New Y position in window coordinates.
*/
void move_child(Widget& child, int xpos, int ypos);
/** Sets the line wrapping for the view.
*
* @param wrap_mode A Gtk::WrapMode.
*/
void set_wrap_mode(WrapMode wrap_mode);
/** Gets the line wrapping for the view.
*
* @return The line wrap setting.
*/
WrapMode get_wrap_mode() const;
/** Sets the default editability of the Gtk::TextView. You can override
* this default setting with tags in the buffer, using the “editable”
* attribute of tags.
*
* @param setting Whether it’s editable.
*/
void set_editable(bool setting = true);
/** Returns the default editability of the Gtk::TextView. Tags in the
* buffer may override this setting for some ranges of text.
*
* @return Whether text is editable by default.
*/
bool get_editable() const;
/** Sets the default number of blank pixels above paragraphs in @a text_view.
* Tags in the buffer for @a text_view may override the defaults.
*
* @param pixels_above_lines Pixels above paragraphs.
*/
void set_pixels_above_lines(int pixels_above_lines);
/** Gets the default number of pixels to put above paragraphs.
* Adding this function with get_pixels_below_lines()
* is equal to the line space between each paragraph.
*
* @return Default number of pixels above paragraphs.
*/
int get_pixels_above_lines() const;
/** Sets the default number of pixels of blank space
* to put below paragraphs in @a text_view. May be overridden
* by tags applied to @a text_view’s buffer.
*
* @param pixels_below_lines Pixels below paragraphs.
*/
void set_pixels_below_lines(int pixels_below_lines);
/** Gets the value set by set_pixels_below_lines().
*
* The line space is the sum of the value returned by this function and the
* value returned by get_pixels_above_lines().
*
* @return Default number of blank pixels below paragraphs.
*/
int get_pixels_below_lines() const;
/** Sets the default number of pixels of blank space to leave between
* display/wrapped lines within a paragraph. May be overridden by
* tags in @a text_view’s buffer.
*
* @param pixels_inside_wrap Default number of pixels between wrapped lines.
*/
void set_pixels_inside_wrap(int pixels_inside_wrap);
/** Gets the value set by set_pixels_inside_wrap().
*
* @return Default number of pixels of blank space between wrapped lines.
*/
int get_pixels_inside_wrap() const;
/** Sets the default justification of text in @a text_view.
* Tags in the view’s buffer may override the default.
*
* @param justification Justification.
*/
void set_justification(Justification justification);
/** Gets the default justification of paragraphs in @a text_view.
* Tags in the buffer may override the default.
*
* @return Default justification.
*/
Justification get_justification() const;
/** Sets the default left margin for text in @a text_view.
* Tags in the buffer may override the default.
*
* Note that this function is confusingly named.
* In CSS terms, the value set here is padding.
*
* @param left_margin Left margin in pixels.
*/
void set_left_margin(int left_margin);
/** Gets the default left margin size of paragraphs in the @a text_view.
* Tags in the buffer may override the default.
*
* @return Left margin in pixels.
*/
int get_left_margin() const;
/** Sets the default right margin for text in the text view.
* Tags in the buffer may override the default.
*
* Note that this function is confusingly named.
* In CSS terms, the value set here is padding.
*
* @param right_margin Right margin in pixels.
*/
void set_right_margin(int right_margin);
/** Gets the default right margin for text in @a text_view. Tags
* in the buffer may override the default.
*
* @return Right margin in pixels.
*/
int get_right_margin() const;
/** Sets the top margin for text in @a text_view.
*
* Note that this function is confusingly named.
* In CSS terms, the value set here is padding.
*
* @newin{3,20}
*
* @param top_margin Top margin in pixels.
*/
void set_top_margin(int top_margin);
/** Gets the top margin for text in the @a text_view.
*
* @newin{3,20}
*
* @return Top margin in pixels.
*/
int get_top_margin() const;
/** Sets the bottom margin for text in @a text_view.
*
* Note that this function is confusingly named.
* In CSS terms, the value set here is padding.
*
* @newin{3,20}
*
* @param bottom_margin Bottom margin in pixels.
*/
void set_bottom_margin(int bottom_margin);
/** Gets the bottom margin for text in the @a text_view.
*
* @newin{3,20}
*
* @return Bottom margin in pixels.
*/
int get_bottom_margin() const;
/** Sets the default indentation for paragraphs in @a text_view.
* Tags in the buffer may override the default.
*
* @param indent Indentation in pixels.
*/
void set_indent(int indent);
/** Gets the default indentation of paragraphs in @a text_view.
* Tags in the view’s buffer may override the default.
* The indentation may be negative.
*
* @return Number of pixels of indentation.
*/
int get_indent() const;
/** Sets the default tab stops for paragraphs in @a text_view.
* Tags in the buffer may override the default.
*
* @param tabs Tabs as a Pango::TabArray.
*/
void set_tabs(Pango::TabArray& tabs);
/** Gets the default tabs for @a text_view. Tags in the buffer may
* override the defaults. The returned array will be empty if
* "standard" (8-space) tabs are used.
*
* @return Copy of default tab array, or an empty array if "standard" tabs are used.
*/
Pango::TabArray get_tabs() const;
/** Obtains a copy of the default text attributes. These are the
* attributes used for text unless a tag overrides them.
* You'd typically pass the default attributes in to
* Gtk::TextIter::get_attributes() in order to get the
* attributes in effect at a given text position.
*
* @return A new Gtk::TextAttributes.
*/
TextAttributes get_default_attributes() const;
/** Changes the Gtk::TextView overwrite mode.
*
* @newin{2,4}
*
* @param overwrite <tt>true</tt> to turn on overwrite mode, <tt>false</tt> to turn it off.
*/
void set_overwrite(bool overwrite = true);
/** Returns whether the Gtk::TextView is in overwrite mode or not.
*
* @newin{2,4}
*
* @return Whether @a text_view is in overwrite mode or not.
*/
bool get_overwrite() const;
/** Sets the behavior of the text widget when the Tab key is pressed.
* If @a accepts_tab is <tt>true</tt>, a tab character is inserted. If @a accepts_tab
* is <tt>false</tt> the keyboard focus is moved to the next widget in the focus
* chain.
*
* @newin{2,4}
*
* @param accepts_tab <tt>true</tt> if pressing the Tab key should insert a tab
* character, <tt>false</tt>, if pressing the Tab key should move the
* keyboard focus.
*/
void set_accepts_tab(bool accepts_tab = true);
/** Returns whether pressing the Tab key inserts a tab characters.
* set_accepts_tab().
*
* @newin{2,4}
*
* @return <tt>true</tt> if pressing the Tab key inserts a tab character,
* <tt>false</tt> if pressing the Tab key moves the keyboard focus.
*/
bool get_accepts_tab() const;
/** Sets the Gtk::TextView::property_input_purpose() property which
* can be used by on-screen keyboards and other input
* methods to adjust their behaviour.
*
* @newin{3,6}
*
* @param purpose The purpose.
*/
void set_input_purpose(InputPurpose purpose);
/** Gets the value of the Gtk::TextView::property_input_purpose() property.
*
* @newin{3,6}
*/
InputPurpose get_input_purpose() const;
/** Sets the Gtk::TextView::property_input_hints() property, which
* allows input methods to fine-tune their behaviour.
*
* @newin{3,6}
*
* @param hints The hints.
*/
void set_input_hints(InputHints hints);
/** Gets the value of the Gtk::TextView::property_input_hints() property.
*
* @newin{3,6}
*/
InputHints get_input_hints() const;
/** Sets the Gtk::TextView::property_monospace() property, which
* indicates that the text view should use monospace
* fonts.
*
* @newin{3,16}
*
* @param monospace <tt>true</tt> to request monospace styling.
*/
void set_monospace(bool monospace = true);
/** Gets the value of the Gtk::TextView::property_monospace() property.
*
* Return: <tt>true</tt> if monospace fonts are desired
*
* @newin{3,16}
*/
bool get_monospace() const;
//TODO: This signal now takes a GtkWidget* instead of just a GtkMenu*,
//so change that when we can break ABI.
//See https://git.gnome.org/browse/gtk+/commit/?id=88623b98a7ca0afca08ac21bc3aa662c6ed3ab7f
/**
* @par Slot Prototype:
* <tt>void on_my_%populate_popup(Menu* menu)</tt>
*
* The signal_populate_popup() signal gets emitted before showing the
* context menu of the text view.
*
* If you need to add items to the context menu, connect
* to this signal and append your items to the @a menu, which
* will be a Gtk::Menu in this case.
*
* If Gtk::TextView::property_populate_all() is <tt>true</tt>, this signal will
* also be emitted to populate touch popups. In this case,
* @a menu will be a different container, e.g. a Gtk::Toolbar.
*
* The signal handler should not make assumptions about the
* type of @a widget, but check whether @a menu is a Gtk::Menu
* or Gtk::Toolbar or another kind of container.
*
* @param menu The container that is being populated.
*/
Glib::SignalProxy< void,Menu* > signal_populate_popup();
/**
* @par Slot Prototype:
* <tt>void on_my_%set_anchor()</tt>
*
* The signal_set_anchor() signal is a
* [keybinding signal][GtkBindingSignal]
* which gets emitted when the user initiates setting the "anchor"
* mark. The "anchor" mark gets placed at the same position as the
* "insert" mark.
*
* This signal has no default bindings.
*/
Glib::SignalProxy< void > signal_set_anchor();
/**
* @par Slot Prototype:
* <tt>void on_my_%insert_at_cursor(const Glib::ustring& str)</tt>
*
* The signal_insert_at_cursor() signal is a
* [keybinding signal][GtkBindingSignal]
* which gets emitted when the user initiates the insertion of a
* fixed string at the cursor.
*
* This signal has no default bindings.
*
* @param str The string to insert.
*/
Glib::SignalProxy< void,const Glib::ustring& > signal_insert_at_cursor();
//Keybinding signals:
/** Pixels of blank space above paragraphs.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< int > property_pixels_above_lines() ;
/** Pixels of blank space above paragraphs.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< int > property_pixels_above_lines() const;
/** Pixels of blank space below paragraphs.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< int > property_pixels_below_lines() ;
/** Pixels of blank space below paragraphs.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< int > property_pixels_below_lines() const;
/** Pixels of blank space between wrapped lines in a paragraph.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< int > property_pixels_inside_wrap() ;
/** Pixels of blank space between wrapped lines in a paragraph.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< int > property_pixels_inside_wrap() const;
/** Whether the text can be modified by the user.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< bool > property_editable() ;
/** Whether the text can be modified by the user.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< bool > property_editable() const;
/** Whether to wrap lines never, at word boundaries, or at character boundaries.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< WrapMode > property_wrap_mode() ;
/** Whether to wrap lines never, at word boundaries, or at character boundaries.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< WrapMode > property_wrap_mode() const;
/** Left, right, or center justification.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Justification > property_justification() ;
/** Left, right, or center justification.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Justification > property_justification() const;
/** The default left margin for text in the text view.
* Tags in the buffer may override the default.
*
* Note that this property is confusingly named. In CSS terms,
* the value set here is padding, and it is applied in addition
* to the padding from the theme.
*
* Don't confuse this property with Gtk::Widget::property_margin_left().
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< int > property_left_margin() ;
/** The default left margin for text in the text view.
* Tags in the buffer may override the default.
*
* Note that this property is confusingly named. In CSS terms,
* the value set here is padding, and it is applied in addition
* to the padding from the theme.
*
* Don't confuse this property with Gtk::Widget::property_margin_left().
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< int > property_left_margin() const;
/** The default right margin for text in the text view.
* Tags in the buffer may override the default.
*
* Note that this property is confusingly named. In CSS terms,
* the value set here is padding, and it is applied in addition
* to the padding from the theme.
*
* Don't confuse this property with Gtk::Widget::property_margin_right().
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< int > property_right_margin() ;
/** The default right margin for text in the text view.
* Tags in the buffer may override the default.
*
* Note that this property is confusingly named. In CSS terms,
* the value set here is padding, and it is applied in addition
* to the padding from the theme.
*
* Don't confuse this property with Gtk::Widget::property_margin_right().
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< int > property_right_margin() const;
/** The top margin for text in the text view.
*
* Note that this property is confusingly named. In CSS terms,
* the value set here is padding, and it is applied in addition
* to the padding from the theme.
*
* Don't confuse this property with Gtk::Widget::property_margin_top().
*
* @newin{2,30}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< int > property_top_margin() ;
/** The top margin for text in the text view.
*
* Note that this property is confusingly named. In CSS terms,
* the value set here is padding, and it is applied in addition
* to the padding from the theme.
*
* Don't confuse this property with Gtk::Widget::property_margin_top().
*
* @newin{2,30}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< int > property_top_margin() const;
/** The bottom margin for text in the text view.
*
* Note that this property is confusingly named. In CSS terms,
* the value set here is padding, and it is applied in addition
* to the padding from the theme.
*
* Don't confuse this property with Gtk::Widget::property_margin_bottom().
*
* @newin{2,30}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< int > property_bottom_margin() ;
/** The bottom margin for text in the text view.
*
* Note that this property is confusingly named. In CSS terms,
* the value set here is padding, and it is applied in addition
* to the padding from the theme.
*
* Don't confuse this property with Gtk::Widget::property_margin_bottom().
*
* @newin{2,30}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< int > property_bottom_margin() const;
/** Amount to indent the paragraph, in pixels.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< int > property_indent() ;
/** Amount to indent the paragraph, in pixels.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< int > property_indent() const;
/** Custom tabs for this text.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Pango::TabArray > property_tabs() ;
/** Custom tabs for this text.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Pango::TabArray > property_tabs() const;
/** If the insertion cursor is shown.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< bool > property_cursor_visible() ;
/** If the insertion cursor is shown.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< bool > property_cursor_visible() const;
/** The buffer which is displayed.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<TextBuffer> > property_buffer() ;
/** The buffer which is displayed.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> > property_buffer() const;
/** Whether entered text overwrites existing contents.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< bool > property_overwrite() ;
/** Whether entered text overwrites existing contents.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< bool > property_overwrite() const;
/** Whether Tab will result in a tab character being entered.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< bool > property_accepts_tab() ;
/** Whether Tab will result in a tab character being entered.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< bool > property_accepts_tab() const;
/** Which IM (input method) module should be used for this text_view.
* See Gtk::IMContext.
*
* Setting this to a non-<tt>nullptr</tt> value overrides the
* system-wide IM module setting. See the GtkSettings
* Gtk::Settings::property_gtk_im_module() property.
*
* @newin{2,16}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Glib::ustring > property_im_module() ;
/** Which IM (input method) module should be used for this text_view.
* See Gtk::IMContext.
*
* Setting this to a non-<tt>nullptr</tt> value overrides the
* system-wide IM module setting. See the GtkSettings
* Gtk::Settings::property_gtk_im_module() property.
*
* @newin{2,16}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_im_module() const;
/** The purpose of this text field.
*
* This property can be used by on-screen keyboards and other input
* methods to adjust their behaviour.
*
* @newin{3,6}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< InputPurpose > property_input_purpose() ;
/** The purpose of this text field.
*
* This property can be used by on-screen keyboards and other input
* methods to adjust their behaviour.
*
* @newin{3,6}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< InputPurpose > property_input_purpose() const;
/** Additional hints (beyond Gtk::TextView::property_input_purpose()) that
* allow input methods to fine-tune their behaviour.
*
* @newin{3,6}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< InputHints > property_input_hints() ;
/** Additional hints (beyond Gtk::TextView::property_input_purpose()) that
* allow input methods to fine-tune their behaviour.
*
* @newin{3,6}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< InputHints > property_input_hints() const;
/** If :populate-all is <tt>true</tt>, the Gtk::TextView::signal_populate_popup()
* signal is also emitted for touch popups.
*
* @newin{3,8}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< bool > property_populate_all() ;
/** If :populate-all is <tt>true</tt>, the Gtk::TextView::signal_populate_popup()
* signal is also emitted for touch popups.
*
* @newin{3,8}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< bool > property_populate_all() const;
/** Whether to use a monospace font.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< bool > property_monospace() ;
/** Whether to use a monospace font.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< bool > property_monospace() const;
};
} //namespace Gtk
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gtk::TextView
*/
Gtk::TextView* wrap(GtkTextView* object, bool take_copy = false);
} //namespace Glib
#endif /* _GTKMM_TEXTVIEW_H */
|