Debian Codegraph @

atk/src/editabletext.hg

raw
1 /* Copyright (C) 2002 The gtkmm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
15 */
16
17 _DEFS(atkmm,atk)
18
19 #include <atkmm/text.h>
20
21 #ifndef DOXYGEN_SHOULD_SKIP_THIS
22 extern "C"
23 {
24 typedef struct _AtkEditableTextIface AtkEditableTextIface;
25 typedef struct _AtkEditableText AtkEditableText;
26 }
27 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
28
29
30 namespace Atk
31 {
32
33 /** The ATK interface implemented by components containing user-editable text content.
34 *
35 * This should be implemented by UI components which contain text which the user can edit, via the Atk::Object
36 * corresponding to that component (see Atk::Object).
37 *
38 * An object which implements %EditableText shall also implement Atk::Text.
39 */
40 class ATKMM_API EditableText : public Glib::Interface
41 {
42 _CLASS_INTERFACE(EditableText, AtkEditableText, ATK_EDITABLE_TEXT, AtkEditableTextIface, , , ATKMM_API)
43
44 public:
45 _WRAP_METHOD(bool set_run_attributes(const AttributeSet& attrib_set, int start_offset, int end_offset), atk_editable_text_set_run_attributes)
46 _WRAP_METHOD(void set_text_contents(const Glib::ustring& string), atk_editable_text_set_text_contents)
47 _WRAP_METHOD(void insert_text(const Glib::ustring& string, int length, int& position), atk_editable_text_insert_text)
48 _WRAP_METHOD(void copy_text(int start_pos, int end_pos), atk_editable_text_copy_text)
49 _WRAP_METHOD(void cut_text(int start_pos, int end_pos), atk_editable_text_cut_text)
50 _WRAP_METHOD(void delete_text(int start_pos, int end_pos), atk_editable_text_delete_text)
51 _WRAP_METHOD(void paste_text(int position), atk_editable_text_paste_text)
52
53 protected:
54 _WRAP_VFUNC(bool set_run_attributes(AtkAttributeSet* attrib_set, int start_offset, int end_offset), set_run_attributes)
55
56 #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
57 _WRAP_VFUNC(void set_text_contents(const Glib::ustring& string), set_text_contents)
58
59 _WRAP_VFUNC(void insert_text(const Glib::ustring& string, int length, int& position), insert_text)
60 _WRAP_VFUNC(void copy_text(int start_pos, int end_pos), copy_text)
61 _WRAP_VFUNC(void cut_text(int start_pos, int end_pos), cut_text)
62 _WRAP_VFUNC(void delete_text(int start_pos, int end_pos), delete_text)
63 _WRAP_VFUNC(void paste_text(int position), paste_text)
64 };
65
66 } // namespace Atk