1 // -*- c++ -*- 2 // Generated by gmmproc 2.40.0 -- DO NOT MODIFY! 3 #ifndef _CLUTTERMM_TEXT_H 4 #define _CLUTTERMM_TEXT_H 5 6 7 #include <glibmm/ustring.h> 8 #include <sigc++/sigc++.h> 9 10 /* 11 * Copyright (c) 2009 The cluttermm Development Team 12 * 13 * This library is free software; you can redistribute it and/or 14 * modify it under the terms of the GNU Lesser General Public 15 * License as published by the Free Software Foundation; either 16 * version 2 of the License, or (at your option) any later version. 17 * 18 * This library is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 * Lesser General Public License for more details. 22 * 23 * You should have received a copy of the GNU Lesser General Public 24 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 25 */ 26 27 #include <cluttermm/actor.h> 28 #include <glibmm/refptr.h> 29 #include <glibmm/ustring.h> 30 #include <cluttermm/types.h> 31 32 #include <pangomm.h> 33 34 35 #ifndef DOXYGEN_SHOULD_SKIP_THIS 36 typedef struct _ClutterText ClutterText; 37 typedef struct _ClutterTextClass ClutterTextClass; 38 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 39 40 41 namespace Clutter 42 { class Text_Class; } // namespace Clutter 43 namespace Clutter 44 { 45 46 class TextBuffer; 47 class Color; 48 49 50 class Text : public Actor 51 { 52 53 #ifndef DOXYGEN_SHOULD_SKIP_THIS 54 55 public: 56 typedef Text CppObjectType; 57 typedef Text_Class CppClassType; 58 typedef ClutterText BaseObjectType; 59 typedef ClutterTextClass BaseClassType; 60 61 private: friend class Text_Class; 62 static CppClassType text_class_; 63 64 private: 65 // noncopyable 66 Text(const Text&); 67 Text& operator=(const Text&); 68 69 protected: 70 explicit Text(const Glib::ConstructParams& construct_params); 71 explicit Text(ClutterText* castitem); 72 73 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 74 75 public: 76 virtual ~Text(); 77 78 /** Get the GType for this class, for use with the underlying GObject type system. 79 */ 80 static GType get_type() G_GNUC_CONST; 81 82 #ifndef DOXYGEN_SHOULD_SKIP_THIS 83 84 85 static GType get_base_type() G_GNUC_CONST; 86 #endif 87 88 ///Provides access to the underlying C GObject. gobj()89 ClutterText* gobj() { return reinterpret_cast<ClutterText*>(gobject_); } 90 91 ///Provides access to the underlying C GObject. gobj()92 const ClutterText* gobj() const { return reinterpret_cast<ClutterText*>(gobject_); } 93 94 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. 95 ClutterText* gobj_copy(); 96 97 private: 98 99 100 protected: 101 Text(); 102 explicit Text(const Glib::ustring& font_name, const Glib::ustring& text); 103 104 explicit Text(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color); 105 106 explicit Text(const Glib::RefPtr<TextBuffer>& buffer); 107 108 109 public: 110 111 static Glib::RefPtr<Text> create(); 112 113 114 static Glib::RefPtr<Text> create(const Glib::ustring& font_name, const Glib::ustring& text); 115 116 117 static Glib::RefPtr<Text> create(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color); 118 119 120 static Glib::RefPtr<Text> create(const Glib::RefPtr<TextBuffer>& buffer); 121 122 123 /** Set the Clutter::TextBuffer object which holds the text for 124 * this widget. 125 * 126 * @newin{1,10} 127 * @param buffer A Clutter::TextBuffer. 128 */ 129 void set_buffer(const Glib::RefPtr<TextBuffer>& buffer); 130 131 132 /** Get the Clutter::TextBuffer object which holds the text for 133 * this widget. 134 * 135 * @newin{1,10} 136 * @return A Gtk::EntryBuffer object. 137 */ 138 Glib::RefPtr<TextBuffer> get_buffer(); 139 140 /** Get the Clutter::TextBuffer object which holds the text for 141 * this widget. 142 * 143 * @newin{1,10} 144 * @return A Gtk::EntryBuffer object. 145 */ 146 Glib::RefPtr<const TextBuffer> get_buffer() const; 147 148 149 /** Sets the contents of a Clutter::Text actor. 150 * 151 * If the Clutter::Text::property_use_markup() property was set to <tt>true</tt> it 152 * will be reset to <tt>false</tt> as a side effect. If you want to 153 * maintain the Clutter::Text::property_use_markup() you should use the 154 * set_markup() function instead 155 * 156 * @newin{1,0} 157 * @param text The text to set. Passing <tt>0</tt> is the same 158 * as passing "" (the empty string). 159 */ 160 void set_text(const Glib::ustring& text); 161 162 /** Sets @a markup as the contents of a Clutter::Text. 163 * 164 * This is a convenience function for setting a string containing 165 * Pango markup, and it is logically equivalent to: 166 * 167 * 168 * [C example ellipted] 169 * 170 * @newin{1,0} 171 * @param markup A string containing Pango markup. 172 * Passing <tt>0</tt> is the same as passing "" (the empty string). 173 */ 174 void set_markup(const Glib::ustring& markup); 175 176 /** Retrieves a pointer to the current contents of a Clutter::Text 177 * actor. 178 * 179 * If you need a copy of the contents for manipulating, either 180 * use Glib::strdup() on the returned string, or use: 181 * 182 * 183 * [C example ellipted] 184 * 185 * Which will return a newly allocated string. 186 * 187 * If the Clutter::Text actor is empty, this function will return 188 * an empty string, and not <tt>0</tt>. 189 * 190 * @newin{1,0} 191 * @return The contents of the actor. The returned 192 * string is owned by the Clutter::Text actor and should never be modified 193 * or freed. 194 */ 195 Glib::ustring get_text() const; 196 197 198 /** Sets whether a Clutter::Text actor should be activatable. 199 * 200 * An activatable Clutter::Text actor will emit the Clutter::Text::signal_activate() 201 * signal whenever the 'Enter' (or 'Return') key is pressed; if it is not 202 * activatable, a new line will be appended to the current content. 203 * 204 * An activatable Clutter::Text must also be set as editable using 205 * set_editable(). 206 * 207 * @newin{1,0} 208 * @param activatable Whether the Clutter::Text actor should be activatable. 209 */ 210 void set_activatable(bool activatable = true); 211 212 /** Retrieves whether a Clutter::Text is activatable or not. 213 * 214 * @newin{1,0} 215 * @return <tt>true</tt> if the actor is activatable. 216 */ 217 bool get_activatable() const; 218 219 //TODO: Should attrs be const? 220 221 /** Sets the attributes list that are going to be applied to the 222 * Clutter::Text contents. 223 * 224 * The Clutter::Text actor will take a reference on the Pango::AttrList 225 * passed to this function. 226 * 227 * @newin{1,0} 228 * @param attrs A Pango::AttrList or <tt>0</tt> to unset the attributes. 229 */ 230 void set_attributes(Pango::AttrList& attrs); 231 232 /** Gets the attribute list that was set on the Clutter::Text actor 233 * set_attributes(), if any. 234 * 235 * @newin{1,0} 236 * @return The attribute list, or <tt>0</tt> if none was set. The 237 * returned value is owned by the Clutter::Text and should not be unreferenced. 238 */ 239 Pango::AttrList get_attributes() const; 240 241 242 /** Sets the color of the contents of a Clutter::Text actor. 243 * 244 * The overall opacity of the Clutter::Text actor will be the 245 * result of the alpha value of @a color and the composited 246 * opacity of the actor itself on the scenegraph, as returned 247 * by Clutter::Actor::get_paint_opacity(). 248 * 249 * @newin{1,0} 250 * @param color A Clutter::Color. 251 */ 252 void set_color(const Color& color); 253 254 255 /** Retrieves the text color as set by set_color(). 256 * 257 * @newin{1,0} 258 * @param color Return location for a Clutter::Color. 259 */ 260 261 Color get_color() const; 262 263 264 /** Sets the mode used to ellipsize (add an ellipsis: "...") to the 265 * text if there is not enough space to render the entire contents 266 * of a Clutter::Text actor 267 * 268 * @newin{1,0} 269 * @param mode A Pango::EllipsizeMode. 270 */ 271 void set_ellipsize(Pango::EllipsizeMode mode); 272 273 /** Returns the ellipsizing position of a Clutter::Text actor, as 274 * set by set_ellipsize(). 275 * 276 * @newin{1,0} 277 * @return Pango::EllipsizeMode. 278 */ 279 Pango::EllipsizeMode get_ellipsize() const; 280 281 282 /** Sets the font used by a Clutter::Text. The @a font_name string 283 * must either be <tt>0</tt>, which means that the font name from the 284 * default Clutter::Backend will be used; or be something that can 285 * be parsed by the pango_font_description_from_string() function, 286 * like: 287 * 288 * 289 * [C example ellipted] 290 * 291 * @newin{1,0} 292 * @param font_name A font name, or <tt>0</tt> to set the default font name. 293 */ 294 void set_font_name(const Glib::ustring& font_name); 295 296 /** Retrieves the font name as set by set_font_name(). 297 * 298 * @newin{1,0} 299 * @return A string containing the font name. The returned 300 * string is owned by the Clutter::Text actor and should not be 301 * modified or freed. 302 */ 303 Glib::ustring get_font_name() const; 304 305 306 /** Sets @a font_desc as the font description for a Clutter::Text 307 * 308 * The Pango::FontDescription is copied by the Clutter::Text actor 309 * so you can safely call pango_font_description_free() on it after 310 * calling this function. 311 * 312 * @newin{1,2} 313 * @param font_desc A Pango::FontDescription. 314 */ 315 void set_font_description(const Pango::FontDescription& font_desc); 316 317 318 /** Retrieves the Pango::FontDescription used by @a self 319 * 320 * @newin{1,2} 321 * @return A Pango::FontDescription. The returned value is owned 322 * by the Clutter::Text actor and it should not be modified or freed. 323 */ 324 Pango::FontDescription get_font_description() const; 325 326 327 /** Sets the character to use in place of the actual text in a 328 * password text actor. 329 * 330 * If @a wc is 0 the text will be displayed as it is entered in the 331 * Clutter::Text actor. 332 * 333 * @newin{1,0} 334 * @param wc A Unicode character, or 0 to unset the password character. 335 */ 336 void set_password_char(gunichar wc); 337 338 /** Retrieves the character to use in place of the actual text 339 * as set by set_password_char(). 340 * 341 * @newin{1,0} 342 * @return A Unicode character or 0 if the password 343 * character is not set. 344 */ 345 gunichar get_password_char() const; 346 347 348 /** Sets whether the text of the Clutter::Text actor should be justified 349 * on both margins. This setting is ignored if Clutter is compiled 350 * against Pango < 1.18. 351 * 352 * @newin{1,0} 353 * @param justify Whether the text should be justified. 354 */ 355 void set_justify(bool justify = true); 356 357 /** Retrieves whether the Clutter::Text actor should justify its contents 358 * on both margins. 359 * 360 * @newin{0,6} 361 * @return <tt>true</tt> if the text should be justified. 362 */ 363 bool get_justify() const; 364 365 366 /** Retrieves the current Pango::Layout used by a Clutter::Text actor. 367 * 368 * @newin{1,0} 369 * @return A Pango::Layout. The returned object is owned by 370 * the Clutter::Text actor and should not be modified or freed. 371 */ 372 Glib::RefPtr<Pango::Layout> get_layout(); 373 374 /** Retrieves the current Pango::Layout used by a Clutter::Text actor. 375 * 376 * @newin{1,0} 377 * @return A Pango::Layout. The returned object is owned by 378 * the Clutter::Text actor and should not be modified or freed. 379 */ 380 Glib::RefPtr<const Pango::Layout> get_layout() const; 381 382 383 /** Sets the way that the lines of a wrapped label are aligned with 384 * respect to each other. This does not affect the overall alignment 385 * of the label within its allocated or specified width. 386 * 387 * To align a Clutter::Text actor you should add it to a container 388 * that supports alignment, or use the anchor point. 389 * 390 * @newin{1,0} 391 * @param alignment A Pango::Alignment. 392 */ 393 void set_line_alignment(Pango::Alignment alignment); 394 395 /** Retrieves the alignment of a Clutter::Text, as set by 396 * set_line_alignment(). 397 * 398 * @newin{1,0} 399 * @return A Pango::Alignment. 400 */ 401 Pango::Alignment get_line_alignment() const; 402 403 404 /** Sets whether the contents of a Clutter::Text actor should wrap, 405 * if they don't fit the size assigned to the actor. 406 * 407 * @newin{1,0} 408 * @param line_wrap Whether the contents should wrap. 409 */ 410 void set_line_wrap(bool line_wrap = true); 411 412 /** Retrieves the value set using set_line_wrap(). 413 * 414 * @newin{1,0} 415 * @return <tt>true</tt> if the Clutter::Text actor should wrap 416 * its contents. 417 */ 418 bool get_line_wrap() const; 419 420 421 /** Retrieves the line wrap mode used by the Clutter::Text actor. 422 * 423 * See set_line_wrap_mode(). 424 * 425 * @newin{1,0} 426 * @return The wrap mode used by the Clutter::Text. 427 */ 428 Pango::WrapMode get_line_wrap_mode() const; 429 430 /** If line wrapping is enabled (see set_line_wrap()) this 431 * function controls how the line wrapping is performed. The default is 432 * Pango::WRAP_WORD which means wrap on word boundaries. 433 * 434 * @newin{1,0} 435 * @param wrap_mode The line wrapping mode. 436 */ 437 void set_line_wrap_mode(Pango::WrapMode wrap_mode); 438 439 440 /** Gets the maximum length of text that can be set into a text actor. 441 * 442 * See set_max_length(). 443 * 444 * @newin{1,0} 445 * @return The maximum number of characters. 446 */ 447 int get_max_length() const; 448 449 /** Sets the maximum allowed length of the contents of the actor. If the 450 * current contents are longer than the given length, then they will be 451 * truncated to fit. 452 * 453 * @newin{1,0} 454 * @param max The maximum number of characters allowed in the text actor; 0 455 * to disable or -1 to set the length of the current string. 456 */ 457 void set_max_length(int max_length); 458 459 460 /** Sets whether a Clutter::Text actor should be selectable. 461 * 462 * A selectable Clutter::Text will allow selecting its contents using 463 * the pointer or the keyboard. 464 * 465 * @newin{1,0} 466 * @param selectable Whether the Clutter::Text actor should be selectable. 467 */ 468 void set_selectable(bool selectable = true); 469 470 /** Retrieves whether a Clutter::Text is selectable or not. 471 * 472 * @newin{1,0} 473 * @return <tt>true</tt> if the actor is selectable. 474 */ 475 bool get_selectable() const; 476 477 478 /** Selects the region of text between @a start_pos and @a end_pos. 479 * 480 * This function changes the position of the cursor to match 481 * @a start_pos and the selection bound to match @a end_pos. 482 * 483 * @newin{1,0} 484 * @param start_pos Start of the selection, in characters. 485 * @param end_pos End of the selection, in characters. 486 */ 487 void set_selection(gssize start_pos, gssize end_pos); 488 489 /** Retrieves the currently selected text. 490 * 491 * @newin{1,0} 492 * @return A newly allocated string containing the currently 493 * selected text, or <tt>0</tt>. Use Glib::free() to free the returned 494 * string. 495 */ 496 Glib::ustring get_selection() const; 497 498 499 /** Sets the other end of the selection, starting from the current 500 * cursor position. 501 * 502 * If @a selection_bound is -1, the selection unset. 503 * 504 * @newin{1,0} 505 * @param selection_bound The position of the end of the selection, in characters. 506 */ 507 void set_selection_bound(int selection_bound); 508 509 /** Retrieves the other end of the selection of a Clutter::Text actor, 510 * in characters from the current cursor position. 511 * 512 * @newin{1,0} 513 * @return The position of the other end of the selection. 514 */ 515 int get_selection_bound() const; 516 517 518 /** Sets the color of the selection of a Clutter::Text actor. 519 * 520 * If @a color is <tt>0</tt>, the selection color will be the same as the 521 * cursor color, or if no cursor color is set either then it will be 522 * the same as the text color. 523 * 524 * @newin{1,0} 525 * @param color The color of the selection, or <tt>0</tt> to unset it. 526 */ 527 void set_selection_color(const Color& color); 528 529 530 /** Retrieves the color of the selection of a Clutter::Text actor. 531 * 532 * @newin{1,0} 533 * @param color Return location for a Clutter::Color. 534 */ 535 536 Color get_selection_color() const; 537 538 539 /** Sets whether a Clutter::Text actor should be in single line mode 540 * or not. Only editable Clutter::Text<!-- -->s can be in single line 541 * mode. 542 * 543 * A text actor in single line mode will not wrap text and will clip 544 * the visible area to the predefined size. The contents of the 545 * text actor will scroll to display the end of the text if its length 546 * is bigger than the allocated width. 547 * 548 * When setting the single line mode the Clutter::Text::property_activatable() 549 * property is also set as a side effect. Instead of entering a new 550 * line character, the text actor will emit the Clutter::Text::signal_activate() 551 * signal. 552 * 553 * @newin{1,0} 554 * @param single_line Whether to enable single line mode. 555 */ 556 void set_single_line_mode(bool single_line = true); 557 558 /** Retrieves whether the Clutter::Text actor is in single line mode. 559 * 560 * @newin{1,0} 561 * @return <tt>true</tt> if the Clutter::Text actor is in single line mode. 562 */ 563 bool get_single_line_mode() const; 564 565 566 /** Retrieves the color of selected text of a Clutter::Text actor. 567 * 568 * @newin{1,8} 569 * @param color Return location for a Clutter::Color. 570 */ 571 572 Color get_selected_text_color() const; 573 574 575 /** Sets whether the contents of the Clutter::Text actor contains markup 576 * in Pango's text markup language. 577 * 578 * Setting Clutter::Text::property_use_markup() on an editable Clutter::Text will 579 * not have any effect except hiding the markup. 580 * 581 * See also Clutter::Text::property_use_markup(). 582 * 583 * @newin{1,0} 584 * @param setting <tt>true</tt> if the text should be parsed for markup. 585 */ 586 void set_use_markup(bool setting = true); 587 588 /** Retrieves whether the contents of the Clutter::Text actor should be 589 * parsed for the Pango text markup. 590 * 591 * @newin{1,0} 592 * @return <tt>true</tt> if the contents will be parsed for markup. 593 */ 594 bool get_use_markup() const; 595 596 597 /** Sets whether the Clutter::Text actor should be editable. 598 * 599 * An editable Clutter::Text with key focus set using 600 * Clutter::Actor::grab_key_focus() or Clutter::Stage::set_key_focus() 601 * will receive key events and will update its contents accordingly. 602 * 603 * @newin{1,0} 604 * @param editable Whether the Clutter::Text should be editable. 605 */ 606 void set_editable(bool editable = true); 607 608 /** Retrieves whether a Clutter::Text is editable or not. 609 * 610 * @newin{1,0} 611 * @return <tt>true</tt> if the actor is editable. 612 */ 613 bool get_editable() const; 614 615 616 /** Inserts @a wc at the current cursor position of a 617 * Clutter::Text actor. 618 * 619 * @newin{1,0} 620 * @param wc A Unicode character. 621 */ 622 void insert(gunichar wc); 623 624 /** Inserts @a text into a Clutter::Actor at the given position. 625 * 626 * If @a position is a negative number, the text will be appended 627 * at the end of the current contents of the Clutter::Text. 628 * 629 * The position is expressed in characters, not in bytes. 630 * 631 * @newin{1,0} 632 * @param text The text to be inserted. 633 * @param position The position of the insertion, or -1. 634 */ 635 void insert(const Glib::ustring& text, gssize position); 636 637 638 /** Deletes @a n_chars inside a Clutter::Text actor, starting from the 639 * current cursor position. 640 * 641 * Somewhat awkwardly, the cursor position is decremented by the same 642 * number of characters you've deleted. 643 * 644 * @newin{1,0} 645 * @param n_chars The number of characters to delete. 646 */ 647 void delete_chars(guint len); 648 649 /** Deletes the text inside a Clutter::Text actor between @a start_pos 650 * and @a end_pos. 651 * 652 * The starting and ending positions are expressed in characters, 653 * not in bytes. 654 * 655 * @newin{1,0} 656 * @param start_pos Starting position. 657 * @param end_pos Ending position. 658 */ 659 void delete_text(gssize start_pos, gssize end_pos); 660 661 /** Deletes the currently selected text 662 * 663 * This function is only useful in subclasses of Clutter::Text 664 * 665 * @newin{1,0} 666 * @return <tt>true</tt> if text was deleted or if the text actor 667 * is empty, and <tt>false</tt> otherwise. 668 */ 669 bool delete_selection(); 670 671 672 /** Retrieves the contents of the Clutter::Text actor between 673 * @a start_pos and @a end_pos, but not including @a end_pos. 674 * 675 * The positions are specified in characters, not in bytes. 676 * 677 * @newin{1,0} 678 * @param start_pos Start of text, in characters. 679 * @param end_pos End of text, in characters. 680 * @return A newly allocated string with the contents of 681 * the text actor between the specified positions. Use Glib::free() 682 * to free the resources when done. 683 */ 684 Glib::ustring get_chars(gssize start_pos, gssize end_pos) const; 685 686 687 /** Sets the color of the cursor of a Clutter::Text actor. 688 * 689 * If @a color is <tt>0</tt>, the cursor color will be the same as the 690 * text color. 691 * 692 * @newin{1,0} 693 * @param color The color of the cursor, or <tt>0</tt> to unset it. 694 */ 695 void set_cursor_color(const Color& color); 696 697 /** Retrieves the color. 698 */ 699 Color get_cursor_color() const; 700 701 702 /** Sets the cursor of a Clutter::Text actor at @a position. 703 * 704 * The position is expressed in characters, not in bytes. 705 * 706 * @newin{1,0} 707 * @param position The new cursor position, in characters. 708 */ 709 void set_cursor_position(int position); 710 711 /** Retrieves the cursor position. 712 * 713 * @newin{1,0} 714 * @return The cursor position, in characters. 715 */ 716 int get_cursor_position() const; 717 718 719 /** Sets whether the cursor of a Clutter::Text actor should be 720 * visible or not. 721 * 722 * The color of the cursor will be the same as the text color 723 * unless set_cursor_color() has been called. 724 * 725 * The size of the cursor can be set using set_cursor_size(). 726 * 727 * The position of the cursor can be changed programmatically using 728 * set_cursor_position(). 729 * 730 * @newin{1,0} 731 * @param cursor_visible Whether the cursor should be visible. 732 */ 733 void set_cursor_visible(bool visible); 734 735 /** Retrieves whether the cursor of a Clutter::Text actor is visible. 736 * 737 * @newin{1,0} 738 * @return <tt>true</tt> if the cursor is visible. 739 */ 740 bool get_cursor_visible() const; 741 742 743 /** Sets the size of the cursor of a Clutter::Text. The cursor 744 * will only be visible if the Clutter::Text::property_cursor_visible() property 745 * is set to <tt>true</tt>. 746 * 747 * @newin{1,0} 748 * @param size The size of the cursor, in pixels, or -1 to use the 749 * default value. 750 */ 751 void set_cursor_size(int size); 752 753 /** Retrieves the size of the cursor of a Clutter::Text actor. 754 * 755 * @newin{1,0} 756 * @return The size of the cursor, in pixels. 757 */ 758 guint get_cursor_size() const; 759 760 Rect get_cursor_rect() const; 761 762 763 /** Emits the Clutter::Text::signal_activate() signal, if @a self has been set 764 * as activatable using set_activatable(). 765 * 766 * This function can be used to emit the signal_activate() signal inside 767 * a Clutter::Actor::signal_captured_event() or Clutter::Actor::signal_key_press_event() 768 * signal handlers before the default signal handler for the 769 * Clutter::Text is invoked. 770 * 771 * @newin{1,0} 772 * @return <tt>true</tt> if the signal_activate() signal has been emitted, 773 * and <tt>false</tt> otherwise. 774 */ 775 bool activate(); 776 777 /** Retrieves the position of the character at the given coordinates. 778 * 779 * Return: the position of the character 780 * 781 * @newin{1,10} 782 * @param x The X coordinate, relative to the actor. 783 * @param y The Y coordinate, relative to the actor. 784 */ 785 int coords_to_position(float x, float y); 786 787 788 /** Retrieves the coordinates of the given @a position. 789 * 790 * @newin{1,0} 791 * @param position Position in characters. 792 * @param x Return location for the X coordinate, or <tt>0</tt>. 793 * @param y Return location for the Y coordinate, or <tt>0</tt>. 794 * @param line_height Return location for the line height, or <tt>0</tt>. 795 * @return <tt>true</tt> if the conversion was successful. 796 */ 797 bool position_to_coords(int position, float & x, float & y, float & line_height); 798 799 800 /** Sets, or unsets, the pre-edit string. This function is useful 801 * for input methods to display a string (with eventual specific 802 * Pango attributes) before it is entered inside the Clutter::Text 803 * buffer. 804 * 805 * The preedit string and attributes are ignored if the Clutter::Text 806 * actor is not editable. 807 * 808 * This function should not be used by applications 809 * 810 * @newin{1,2} 811 * @param preedit_str The pre-edit string, or <tt>0</tt> to unset it. 812 * @param preedit_attrs The pre-edit string attributes. 813 * @param cursor_pos The cursor position for the pre-edit string. 814 */ 815 void set_preedit_string(const Glib::ustring& preedit_str, const Pango::AttrList& preedit_attrs, guint ursor_pos); 816 817 818 /** Obtains the coordinates where the Clutter::Text will draw the Pango::Layout 819 * representing the text. 820 * 821 * @newin{1,8} 822 * @param x Location to store X offset of layout, or <tt>0</tt>. 823 * @param y Location to store Y offset of layout, or <tt>0</tt>. 824 */ 825 void get_layout_offsets(int& x, int& y); 826 827 828 /** 829 * @par Slot Prototype: 830 * <tt>void on_my_%activate()</tt> 831 * 832 * The signal_activate() signal is emitted each time the actor is 'activated' 833 * by the user, normally by pressing the 'Enter' key. The signal is 834 * emitted only if Clutter::Text::property_activatable() is set to <tt>true</tt>. 835 * 836 * @newin{1,0} 837 */ 838 839 Glib::SignalProxy0< void > signal_activate(); 840 841 842 /** 843 * @par Slot Prototype: 844 * <tt>void on_my_%text_changed()</tt> 845 * 846 * The signal_text_changed() signal is emitted after @a actor's text changes 847 * 848 * @newin{1,0} 849 */ 850 851 Glib::SignalProxy0< void > signal_text_changed(); 852 853 854 /** 855 * @par Slot Prototype: 856 * <tt>void on_my_%cursor_changed()</tt> 857 * 858 * The signal_cursor_changed() signal is emitted whenever the cursor 859 * position or size changes. 860 * 861 * @newin{1,16} 862 */ 863 864 Glib::SignalProxy0< void > signal_cursor_changed(); 865 866 //These are action signals, so probably shouldn't be wrapped: 867 //_WRAP_SIGNAL(void insert_text(const char* new_text, int new_text_length, int position), "insert-text", no_default_handler) 868 //_WRAP_SIGNAL(void delete_text(int start_pos, int end_pos), "insert-text", no_default_handler) 869 870 #ifdef GLIBMM_PROPERTIES_ENABLED 871 /** Whether pressing return causes the activate signal to be emitted. 872 * 873 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 874 * @return A PropertyProxy that allows you to get or set the value of the property, 875 * or receive notification when the value of the property changes. 876 */ 877 Glib::PropertyProxy< bool > property_activatable() ; 878 #endif //#GLIBMM_PROPERTIES_ENABLED 879 880 #ifdef GLIBMM_PROPERTIES_ENABLED 881 /** Whether pressing return causes the activate signal to be emitted. 882 * 883 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 884 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 885 * or receive notification when the value of the property changes. 886 */ 887 Glib::PropertyProxy_ReadOnly< bool > property_activatable() const; 888 #endif //#GLIBMM_PROPERTIES_ENABLED 889 890 #ifdef GLIBMM_PROPERTIES_ENABLED 891 /** A list of style attributes to apply to the contents of the actor. 892 * 893 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 894 * @return A PropertyProxy that allows you to get or set the value of the property, 895 * or receive notification when the value of the property changes. 896 */ 897 Glib::PropertyProxy< Pango::AttrList > property_attributes() ; 898 #endif //#GLIBMM_PROPERTIES_ENABLED 899 900 #ifdef GLIBMM_PROPERTIES_ENABLED 901 /** A list of style attributes to apply to the contents of the actor. 902 * 903 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 904 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 905 * or receive notification when the value of the property changes. 906 */ 907 Glib::PropertyProxy_ReadOnly< Pango::AttrList > property_attributes() const; 908 #endif //#GLIBMM_PROPERTIES_ENABLED 909 910 #ifdef GLIBMM_PROPERTIES_ENABLED 911 /** The buffer for the text. 912 * 913 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 914 * @return A PropertyProxy that allows you to get or set the value of the property, 915 * or receive notification when the value of the property changes. 916 */ 917 Glib::PropertyProxy< Glib::RefPtr<TextBuffer> > property_buffer() ; 918 #endif //#GLIBMM_PROPERTIES_ENABLED 919 920 #ifdef GLIBMM_PROPERTIES_ENABLED 921 /** The buffer for the text. 922 * 923 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 924 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 925 * or receive notification when the value of the property changes. 926 */ 927 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> > property_buffer() const; 928 #endif //#GLIBMM_PROPERTIES_ENABLED 929 930 #ifdef GLIBMM_PROPERTIES_ENABLED 931 /** Color of the font used by the text. 932 * 933 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 934 * @return A PropertyProxy that allows you to get or set the value of the property, 935 * or receive notification when the value of the property changes. 936 */ 937 Glib::PropertyProxy< Color > property_color() ; 938 #endif //#GLIBMM_PROPERTIES_ENABLED 939 940 #ifdef GLIBMM_PROPERTIES_ENABLED 941 /** Color of the font used by the text. 942 * 943 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 944 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 945 * or receive notification when the value of the property changes. 946 */ 947 Glib::PropertyProxy_ReadOnly< Color > property_color() const; 948 #endif //#GLIBMM_PROPERTIES_ENABLED 949 950 #ifdef GLIBMM_PROPERTIES_ENABLED 951 /** Cursor Color. 952 * 953 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 954 * @return A PropertyProxy that allows you to get or set the value of the property, 955 * or receive notification when the value of the property changes. 956 */ 957 Glib::PropertyProxy< Color > property_cursor_color() ; 958 #endif //#GLIBMM_PROPERTIES_ENABLED 959 960 #ifdef GLIBMM_PROPERTIES_ENABLED 961 /** Cursor Color. 962 * 963 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 964 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 965 * or receive notification when the value of the property changes. 966 */ 967 Glib::PropertyProxy_ReadOnly< Color > property_cursor_color() const; 968 #endif //#GLIBMM_PROPERTIES_ENABLED 969 970 #ifdef GLIBMM_PROPERTIES_ENABLED 971 /** Whether the cursor color has been set. 972 * 973 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 974 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 975 * or receive notification when the value of the property changes. 976 */ 977 Glib::PropertyProxy_ReadOnly< bool > property_cursor_color_set() const; 978 #endif //#GLIBMM_PROPERTIES_ENABLED 979 980 981 #ifdef GLIBMM_PROPERTIES_ENABLED 982 /** The cursor position. 983 * 984 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 985 * @return A PropertyProxy that allows you to get or set the value of the property, 986 * or receive notification when the value of the property changes. 987 */ 988 Glib::PropertyProxy< guint > property_cursor_position() ; 989 #endif //#GLIBMM_PROPERTIES_ENABLED 990 991 #ifdef GLIBMM_PROPERTIES_ENABLED 992 /** The cursor position. 993 * 994 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 995 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 996 * or receive notification when the value of the property changes. 997 */ 998 Glib::PropertyProxy_ReadOnly< guint > property_cursor_position() const; 999 #endif //#GLIBMM_PROPERTIES_ENABLED 1000 1001 #ifdef GLIBMM_PROPERTIES_ENABLED 1002 /** The width of the cursor, in pixels. 1003 * 1004 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1005 * @return A PropertyProxy that allows you to get or set the value of the property, 1006 * or receive notification when the value of the property changes. 1007 */ 1008 Glib::PropertyProxy< int > property_cursor_size() ; 1009 #endif //#GLIBMM_PROPERTIES_ENABLED 1010 1011 #ifdef GLIBMM_PROPERTIES_ENABLED 1012 /** The width of the cursor, in pixels. 1013 * 1014 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1015 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1016 * or receive notification when the value of the property changes. 1017 */ 1018 Glib::PropertyProxy_ReadOnly< int > property_cursor_size() const; 1019 #endif //#GLIBMM_PROPERTIES_ENABLED 1020 1021 #ifdef GLIBMM_PROPERTIES_ENABLED 1022 /** Whether the input cursor is visible. 1023 * 1024 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1025 * @return A PropertyProxy that allows you to get or set the value of the property, 1026 * or receive notification when the value of the property changes. 1027 */ 1028 Glib::PropertyProxy< bool > property_cursor_visible() ; 1029 #endif //#GLIBMM_PROPERTIES_ENABLED 1030 1031 #ifdef GLIBMM_PROPERTIES_ENABLED 1032 /** Whether the input cursor is visible. 1033 * 1034 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1035 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1036 * or receive notification when the value of the property changes. 1037 */ 1038 Glib::PropertyProxy_ReadOnly< bool > property_cursor_visible() const; 1039 #endif //#GLIBMM_PROPERTIES_ENABLED 1040 1041 #ifdef GLIBMM_PROPERTIES_ENABLED 1042 /** Whether the text is editable. 1043 * 1044 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1045 * @return A PropertyProxy that allows you to get or set the value of the property, 1046 * or receive notification when the value of the property changes. 1047 */ 1048 Glib::PropertyProxy< bool > property_editable() ; 1049 #endif //#GLIBMM_PROPERTIES_ENABLED 1050 1051 #ifdef GLIBMM_PROPERTIES_ENABLED 1052 /** Whether the text is editable. 1053 * 1054 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1055 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1056 * or receive notification when the value of the property changes. 1057 */ 1058 Glib::PropertyProxy_ReadOnly< bool > property_editable() const; 1059 #endif //#GLIBMM_PROPERTIES_ENABLED 1060 1061 #ifdef GLIBMM_PROPERTIES_ENABLED 1062 /** The preferred place to ellipsize the string. 1063 * 1064 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1065 * @return A PropertyProxy that allows you to get or set the value of the property, 1066 * or receive notification when the value of the property changes. 1067 */ 1068 Glib::PropertyProxy< Pango::EllipsizeMode > property_ellipsize() ; 1069 #endif //#GLIBMM_PROPERTIES_ENABLED 1070 1071 #ifdef GLIBMM_PROPERTIES_ENABLED 1072 /** The preferred place to ellipsize the string. 1073 * 1074 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1075 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1076 * or receive notification when the value of the property changes. 1077 */ 1078 Glib::PropertyProxy_ReadOnly< Pango::EllipsizeMode > property_ellipsize() const; 1079 #endif //#GLIBMM_PROPERTIES_ENABLED 1080 1081 #ifdef GLIBMM_PROPERTIES_ENABLED 1082 /** The font description to be used. 1083 * 1084 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1085 * @return A PropertyProxy that allows you to get or set the value of the property, 1086 * or receive notification when the value of the property changes. 1087 */ 1088 Glib::PropertyProxy< Pango::FontDescription > property_font_description() ; 1089 #endif //#GLIBMM_PROPERTIES_ENABLED 1090 1091 #ifdef GLIBMM_PROPERTIES_ENABLED 1092 /** The font description to be used. 1093 * 1094 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1095 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1096 * or receive notification when the value of the property changes. 1097 */ 1098 Glib::PropertyProxy_ReadOnly< Pango::FontDescription > property_font_description() const; 1099 #endif //#GLIBMM_PROPERTIES_ENABLED 1100 1101 #ifdef GLIBMM_PROPERTIES_ENABLED 1102 /** The font to be used by the text. 1103 * 1104 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1105 * @return A PropertyProxy that allows you to get or set the value of the property, 1106 * or receive notification when the value of the property changes. 1107 */ 1108 Glib::PropertyProxy< Glib::ustring > property_font_name() ; 1109 #endif //#GLIBMM_PROPERTIES_ENABLED 1110 1111 #ifdef GLIBMM_PROPERTIES_ENABLED 1112 /** The font to be used by the text. 1113 * 1114 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1115 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1116 * or receive notification when the value of the property changes. 1117 */ 1118 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_font_name() const; 1119 #endif //#GLIBMM_PROPERTIES_ENABLED 1120 1121 #ifdef GLIBMM_PROPERTIES_ENABLED 1122 /** Whether the text should be justified. 1123 * 1124 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1125 * @return A PropertyProxy that allows you to get or set the value of the property, 1126 * or receive notification when the value of the property changes. 1127 */ 1128 Glib::PropertyProxy< bool > property_justify() ; 1129 #endif //#GLIBMM_PROPERTIES_ENABLED 1130 1131 #ifdef GLIBMM_PROPERTIES_ENABLED 1132 /** Whether the text should be justified. 1133 * 1134 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1135 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1136 * or receive notification when the value of the property changes. 1137 */ 1138 Glib::PropertyProxy_ReadOnly< bool > property_justify() const; 1139 #endif //#GLIBMM_PROPERTIES_ENABLED 1140 1141 #ifdef GLIBMM_PROPERTIES_ENABLED 1142 /** The preferred alignment for the string, for multi-line text. 1143 * 1144 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1145 * @return A PropertyProxy that allows you to get or set the value of the property, 1146 * or receive notification when the value of the property changes. 1147 */ 1148 Glib::PropertyProxy< Pango::Alignment > property_line_alignment() ; 1149 #endif //#GLIBMM_PROPERTIES_ENABLED 1150 1151 #ifdef GLIBMM_PROPERTIES_ENABLED 1152 /** The preferred alignment for the string, for multi-line text. 1153 * 1154 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1155 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1156 * or receive notification when the value of the property changes. 1157 */ 1158 Glib::PropertyProxy_ReadOnly< Pango::Alignment > property_line_alignment() const; 1159 #endif //#GLIBMM_PROPERTIES_ENABLED 1160 1161 #ifdef GLIBMM_PROPERTIES_ENABLED 1162 /** Control how line-wrapping is done. 1163 * 1164 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1165 * @return A PropertyProxy that allows you to get or set the value of the property, 1166 * or receive notification when the value of the property changes. 1167 */ 1168 Glib::PropertyProxy< Pango::WrapMode > property_line_wrap_mode() ; 1169 #endif //#GLIBMM_PROPERTIES_ENABLED 1170 1171 #ifdef GLIBMM_PROPERTIES_ENABLED 1172 /** Control how line-wrapping is done. 1173 * 1174 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1175 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1176 * or receive notification when the value of the property changes. 1177 */ 1178 Glib::PropertyProxy_ReadOnly< Pango::WrapMode > property_line_wrap_mode() const; 1179 #endif //#GLIBMM_PROPERTIES_ENABLED 1180 1181 #ifdef GLIBMM_PROPERTIES_ENABLED 1182 /** If set, wrap the lines if the text becomes too wide. 1183 * 1184 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1185 * @return A PropertyProxy that allows you to get or set the value of the property, 1186 * or receive notification when the value of the property changes. 1187 */ 1188 Glib::PropertyProxy< bool > property_line_wrap() ; 1189 #endif //#GLIBMM_PROPERTIES_ENABLED 1190 1191 #ifdef GLIBMM_PROPERTIES_ENABLED 1192 /** If set, wrap the lines if the text becomes too wide. 1193 * 1194 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1195 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1196 * or receive notification when the value of the property changes. 1197 */ 1198 Glib::PropertyProxy_ReadOnly< bool > property_line_wrap() const; 1199 #endif //#GLIBMM_PROPERTIES_ENABLED 1200 1201 #ifdef GLIBMM_PROPERTIES_ENABLED 1202 /** Maximum length of the text inside the actor. 1203 * 1204 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1205 * @return A PropertyProxy that allows you to get or set the value of the property, 1206 * or receive notification when the value of the property changes. 1207 */ 1208 Glib::PropertyProxy< int > property_max_length() ; 1209 #endif //#GLIBMM_PROPERTIES_ENABLED 1210 1211 #ifdef GLIBMM_PROPERTIES_ENABLED 1212 /** Maximum length of the text inside the actor. 1213 * 1214 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1215 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1216 * or receive notification when the value of the property changes. 1217 */ 1218 Glib::PropertyProxy_ReadOnly< int > property_max_length() const; 1219 #endif //#GLIBMM_PROPERTIES_ENABLED 1220 1221 #ifdef GLIBMM_PROPERTIES_ENABLED 1222 /** If non-zero, use this character to display the actor's contents. 1223 * 1224 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1225 * @return A PropertyProxy that allows you to get or set the value of the property, 1226 * or receive notification when the value of the property changes. 1227 */ 1228 Glib::PropertyProxy< gunichar > property_password_char() ; 1229 #endif //#GLIBMM_PROPERTIES_ENABLED 1230 1231 #ifdef GLIBMM_PROPERTIES_ENABLED 1232 /** If non-zero, use this character to display the actor's contents. 1233 * 1234 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1235 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1236 * or receive notification when the value of the property changes. 1237 */ 1238 Glib::PropertyProxy_ReadOnly< gunichar > property_password_char() const; 1239 #endif //#GLIBMM_PROPERTIES_ENABLED 1240 1241 #ifdef GLIBMM_PROPERTIES_ENABLED 1242 /** The cursor position. 1243 * 1244 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1245 * @return A PropertyProxy that allows you to get or set the value of the property, 1246 * or receive notification when the value of the property changes. 1247 */ 1248 Glib::PropertyProxy< int > property_position() ; 1249 #endif //#GLIBMM_PROPERTIES_ENABLED 1250 1251 #ifdef GLIBMM_PROPERTIES_ENABLED 1252 /** The cursor position. 1253 * 1254 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1255 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1256 * or receive notification when the value of the property changes. 1257 */ 1258 Glib::PropertyProxy_ReadOnly< int > property_position() const; 1259 #endif //#GLIBMM_PROPERTIES_ENABLED 1260 //TODO: Marked for removal in clutter. 1261 #ifdef GLIBMM_PROPERTIES_ENABLED 1262 /** Whether the text is selectable. 1263 * 1264 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1265 * @return A PropertyProxy that allows you to get or set the value of the property, 1266 * or receive notification when the value of the property changes. 1267 */ 1268 Glib::PropertyProxy< bool > property_selectable() ; 1269 #endif //#GLIBMM_PROPERTIES_ENABLED 1270 1271 #ifdef GLIBMM_PROPERTIES_ENABLED 1272 /** Whether the text is selectable. 1273 * 1274 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1275 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1276 * or receive notification when the value of the property changes. 1277 */ 1278 Glib::PropertyProxy_ReadOnly< bool > property_selectable() const; 1279 #endif //#GLIBMM_PROPERTIES_ENABLED 1280 1281 #ifdef GLIBMM_PROPERTIES_ENABLED 1282 /** Selected Text Color. 1283 * 1284 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1285 * @return A PropertyProxy that allows you to get or set the value of the property, 1286 * or receive notification when the value of the property changes. 1287 */ 1288 Glib::PropertyProxy< Color > property_selected_text_color() ; 1289 #endif //#GLIBMM_PROPERTIES_ENABLED 1290 1291 #ifdef GLIBMM_PROPERTIES_ENABLED 1292 /** Selected Text Color. 1293 * 1294 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1295 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1296 * or receive notification when the value of the property changes. 1297 */ 1298 Glib::PropertyProxy_ReadOnly< Color > property_selected_text_color() const; 1299 #endif //#GLIBMM_PROPERTIES_ENABLED 1300 1301 #ifdef GLIBMM_PROPERTIES_ENABLED 1302 /** Whether the selected text color has been set. 1303 * 1304 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1305 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1306 * or receive notification when the value of the property changes. 1307 */ 1308 Glib::PropertyProxy_ReadOnly< bool > property_selected_text_color_set() const; 1309 #endif //#GLIBMM_PROPERTIES_ENABLED 1310 1311 1312 #ifdef GLIBMM_PROPERTIES_ENABLED 1313 /** The cursor position of the other end of the selection. 1314 * 1315 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1316 * @return A PropertyProxy that allows you to get or set the value of the property, 1317 * or receive notification when the value of the property changes. 1318 */ 1319 Glib::PropertyProxy< int > property_selection_bound() ; 1320 #endif //#GLIBMM_PROPERTIES_ENABLED 1321 1322 #ifdef GLIBMM_PROPERTIES_ENABLED 1323 /** The cursor position of the other end of the selection. 1324 * 1325 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1326 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1327 * or receive notification when the value of the property changes. 1328 */ 1329 Glib::PropertyProxy_ReadOnly< int > property_selection_bound() const; 1330 #endif //#GLIBMM_PROPERTIES_ENABLED 1331 1332 #ifdef GLIBMM_PROPERTIES_ENABLED 1333 /** Selection Color. 1334 * 1335 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1336 * @return A PropertyProxy that allows you to get or set the value of the property, 1337 * or receive notification when the value of the property changes. 1338 */ 1339 Glib::PropertyProxy< Color > property_selection_color() ; 1340 #endif //#GLIBMM_PROPERTIES_ENABLED 1341 1342 #ifdef GLIBMM_PROPERTIES_ENABLED 1343 /** Selection Color. 1344 * 1345 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1346 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1347 * or receive notification when the value of the property changes. 1348 */ 1349 Glib::PropertyProxy_ReadOnly< Color > property_selection_color() const; 1350 #endif //#GLIBMM_PROPERTIES_ENABLED 1351 1352 #ifdef GLIBMM_PROPERTIES_ENABLED 1353 /** Whether the selection color has been set. 1354 * 1355 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1356 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1357 * or receive notification when the value of the property changes. 1358 */ 1359 Glib::PropertyProxy_ReadOnly< bool > property_selection_color_set() const; 1360 #endif //#GLIBMM_PROPERTIES_ENABLED 1361 1362 1363 #ifdef GLIBMM_PROPERTIES_ENABLED 1364 /** Whether the text should be a single line. 1365 * 1366 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1367 * @return A PropertyProxy that allows you to get or set the value of the property, 1368 * or receive notification when the value of the property changes. 1369 */ 1370 Glib::PropertyProxy< bool > property_single_line_mode() ; 1371 #endif //#GLIBMM_PROPERTIES_ENABLED 1372 1373 #ifdef GLIBMM_PROPERTIES_ENABLED 1374 /** Whether the text should be a single line. 1375 * 1376 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1377 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1378 * or receive notification when the value of the property changes. 1379 */ 1380 Glib::PropertyProxy_ReadOnly< bool > property_single_line_mode() const; 1381 #endif //#GLIBMM_PROPERTIES_ENABLED 1382 1383 #ifdef GLIBMM_PROPERTIES_ENABLED 1384 /** The text to render. 1385 * 1386 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1387 * @return A PropertyProxy that allows you to get or set the value of the property, 1388 * or receive notification when the value of the property changes. 1389 */ 1390 Glib::PropertyProxy< Glib::ustring > property_text() ; 1391 #endif //#GLIBMM_PROPERTIES_ENABLED 1392 1393 #ifdef GLIBMM_PROPERTIES_ENABLED 1394 /** The text to render. 1395 * 1396 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1397 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1398 * or receive notification when the value of the property changes. 1399 */ 1400 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_text() const; 1401 #endif //#GLIBMM_PROPERTIES_ENABLED 1402 1403 #ifdef GLIBMM_PROPERTIES_ENABLED 1404 /** Whether or not the text includes Pango markup. 1405 * 1406 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1407 * @return A PropertyProxy that allows you to get or set the value of the property, 1408 * or receive notification when the value of the property changes. 1409 */ 1410 Glib::PropertyProxy< bool > property_use_markup() ; 1411 #endif //#GLIBMM_PROPERTIES_ENABLED 1412 1413 #ifdef GLIBMM_PROPERTIES_ENABLED 1414 /** Whether or not the text includes Pango markup. 1415 * 1416 * You rarely need to use properties because there are get_ and set_ methods for almost all of them. 1417 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 1418 * or receive notification when the value of the property changes. 1419 */ 1420 Glib::PropertyProxy_ReadOnly< bool > property_use_markup() const; 1421 #endif //#GLIBMM_PROPERTIES_ENABLED 1422 1423 1424 public: 1425 1426 public: 1427 //C++ methods used to invoke GTK+ virtual functions: 1428 1429 protected: 1430 //GTK+ Virtual Functions (override these to change behaviour): 1431 1432 //Default Signal Handlers:: 1433 /// This is a default handler for the signal signal_activate(). 1434 virtual void on_activate(); 1435 /// This is a default handler for the signal signal_text_changed(). 1436 virtual void on_text_changed(); 1437 /// This is a default handler for the signal signal_cursor_changed(). 1438 virtual void on_cursor_changed(); 1439 1440 1441 }; 1442 1443 } // namespace Clutter 1444 1445 1446 namespace Glib 1447 { 1448 /** A Glib::wrap() method for this object. 1449 * 1450 * @param object The C instance. 1451 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. 1452 * @result A C++ instance that wraps this C instance. 1453 * 1454 * @relates Clutter::Text 1455 */ 1456 Glib::RefPtr<Clutter::Text> wrap(ClutterText* object, bool take_copy = false); 1457 } 1458 1459 1460 #endif /* _CLUTTERMM_TEXT_H */ 1461 1462