~ubuntu-branches/ubuntu/saucy/atkmm1.6/saucy-proposed

« back to all changes in this revision

Viewing changes to atk/src/editabletext.hg

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2010-11-02 20:35:53 UTC
  • Revision ID: james.westby@ubuntu.com-20101102203553-syno2w6yedmcdgk8
ImportĀ upstreamĀ versionĀ 2.22.1

Show diffs side-by-side

added added

removed removed

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