libgnomecanvasmm
rich-text.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _LIBGNOMECANVASMM_RICH_TEXT_H
4 #define _LIBGNOMECANVASMM_RICH_TEXT_H
5 
6 
7 #include <glibmm.h>
8 
9 // -*- C++ -*-
10 /* $Id: rich-text.hg,v 1.10 2002/12/09 16:08:51 aholzmann Exp $ */
11 
12 /* rich-text.h
13  *
14  *
15  * Copyright (C) 2002 The libgnomecanvasmm Development Team
16  *
17  * This library is free software; you can redistribute it and/or
18  * modify it under the terms of the GNU Lesser General Public
19  * License as published by the Free Software Foundation; either
20  * version 2.1 of the License, or (at your option) any later version.
21  *
22  * This library is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25  * Lesser General Public License for more details.
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free
29  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30  */
31 
32 #include <gtkmm/textbuffer.h>
33 #include <libgnomecanvasmm/item.h>
34 #include <libgnomecanvas/gnome-canvas-rich-text.h>
35 
36 
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _GnomeCanvasRichText GnomeCanvasRichText;
39 typedef struct _GnomeCanvasRichTextClass GnomeCanvasRichTextClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 
42 
43 namespace Gnome
44 {
45 
46 namespace Canvas
47 { class RichText_Class; } // namespace Canvas
48 
49 } // namespace Gnome
50 namespace Gnome
51 {
52 
53 namespace Canvas
54 {
55 
56 
57 class RichText : public Item
58 {
59  public:
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
61  typedef RichText CppObjectType;
62  typedef RichText_Class CppClassType;
63  typedef GnomeCanvasRichText BaseObjectType;
64  typedef GnomeCanvasRichTextClass BaseClassType;
65 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
66 
67  virtual ~RichText();
68 
69 #ifndef DOXYGEN_SHOULD_SKIP_THIS
70 
71 private:
72  friend class RichText_Class;
73  static CppClassType richtext_class_;
74 
75  // noncopyable
76  RichText(const RichText&);
77  RichText& operator=(const RichText&);
78 
79 protected:
80  explicit RichText(const Glib::ConstructParams& construct_params);
81  explicit RichText(GnomeCanvasRichText* castitem);
82 
83 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
84 
85 public:
86 #ifndef DOXYGEN_SHOULD_SKIP_THIS
87  static GType get_type() G_GNUC_CONST;
88  static GType get_base_type() G_GNUC_CONST;
89 #endif
90 
92  GnomeCanvasRichText* gobj() { return reinterpret_cast<GnomeCanvasRichText*>(gobject_); }
93 
95  const GnomeCanvasRichText* gobj() const { return reinterpret_cast<GnomeCanvasRichText*>(gobject_); }
96 
97 
98 public:
99  //C++ methods used to invoke GTK+ virtual functions:
100 #ifdef GLIBMM_VFUNCS_ENABLED
101 #endif //GLIBMM_VFUNCS_ENABLED
102 
103 protected:
104  //GTK+ Virtual Functions (override these to change behaviour):
105 #ifdef GLIBMM_VFUNCS_ENABLED
106 #endif //GLIBMM_VFUNCS_ENABLED
107 
108  //Default Signal Handlers::
109 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
110  virtual void on_tag_changed(const Glib::RefPtr<Gtk::TextTag>& tag);
111 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
112 
113 
114 private:
115 
116 
117 public:
118  typedef Gtk::TextIter iterator;
119 
120  RichText(Group& parent, double x, double y, const Glib::ustring& text);
121  explicit RichText(Group& parent);
122 
123 
124  void cut_clipboard();
125 
126  void copy_clipboard();
127 
128  void paste_clipboard();
129 
130 
131  void set_buffer(const Glib::RefPtr<Gtk::TextBuffer>& buffer);
132 
133  Glib::RefPtr<Gtk::TextBuffer> get_buffer() const;
134 
135 
136  void get_iter_location(const iterator& iter, Gdk::Rectangle& location) const;
137  iterator get_iter_at_location(int x, int y) const;
138 
139 
145  Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::TextTag>& > signal_tag_changed();
146 
147 
148  #ifdef GLIBMM_PROPERTIES_ENABLED
149 
155  Glib::PropertyProxy<Glib::ustring> property_text() ;
156 #endif //#GLIBMM_PROPERTIES_ENABLED
157 
158 #ifdef GLIBMM_PROPERTIES_ENABLED
159 
165  Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
166 #endif //#GLIBMM_PROPERTIES_ENABLED
167 
168  #ifdef GLIBMM_PROPERTIES_ENABLED
169 
175  Glib::PropertyProxy<double> property_x() ;
176 #endif //#GLIBMM_PROPERTIES_ENABLED
177 
178 #ifdef GLIBMM_PROPERTIES_ENABLED
179 
185  Glib::PropertyProxy_ReadOnly<double> property_x() const;
186 #endif //#GLIBMM_PROPERTIES_ENABLED
187 
188  #ifdef GLIBMM_PROPERTIES_ENABLED
189 
195  Glib::PropertyProxy<double> property_y() ;
196 #endif //#GLIBMM_PROPERTIES_ENABLED
197 
198 #ifdef GLIBMM_PROPERTIES_ENABLED
199 
205  Glib::PropertyProxy_ReadOnly<double> property_y() const;
206 #endif //#GLIBMM_PROPERTIES_ENABLED
207 
208  #ifdef GLIBMM_PROPERTIES_ENABLED
209 
215  Glib::PropertyProxy<double> property_width() ;
216 #endif //#GLIBMM_PROPERTIES_ENABLED
217 
218 #ifdef GLIBMM_PROPERTIES_ENABLED
219 
225  Glib::PropertyProxy_ReadOnly<double> property_width() const;
226 #endif //#GLIBMM_PROPERTIES_ENABLED
227 
228  #ifdef GLIBMM_PROPERTIES_ENABLED
229 
235  Glib::PropertyProxy<double> property_height() ;
236 #endif //#GLIBMM_PROPERTIES_ENABLED
237 
238 #ifdef GLIBMM_PROPERTIES_ENABLED
239 
245  Glib::PropertyProxy_ReadOnly<double> property_height() const;
246 #endif //#GLIBMM_PROPERTIES_ENABLED
247 
248  #ifdef GLIBMM_PROPERTIES_ENABLED
249 
255  Glib::PropertyProxy<bool> property_editable() ;
256 #endif //#GLIBMM_PROPERTIES_ENABLED
257 
258 #ifdef GLIBMM_PROPERTIES_ENABLED
259 
265  Glib::PropertyProxy_ReadOnly<bool> property_editable() const;
266 #endif //#GLIBMM_PROPERTIES_ENABLED
267 
268  #ifdef GLIBMM_PROPERTIES_ENABLED
269 
275  Glib::PropertyProxy<bool> property_visible() ;
276 #endif //#GLIBMM_PROPERTIES_ENABLED
277 
278 #ifdef GLIBMM_PROPERTIES_ENABLED
279 
285  Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
286 #endif //#GLIBMM_PROPERTIES_ENABLED
287 
288  #ifdef GLIBMM_PROPERTIES_ENABLED
289 
295  Glib::PropertyProxy<bool> property_cursor_visible() ;
296 #endif //#GLIBMM_PROPERTIES_ENABLED
297 
298 #ifdef GLIBMM_PROPERTIES_ENABLED
299 
305  Glib::PropertyProxy_ReadOnly<bool> property_cursor_visible() const;
306 #endif //#GLIBMM_PROPERTIES_ENABLED
307 
308  #ifdef GLIBMM_PROPERTIES_ENABLED
309 
315  Glib::PropertyProxy<bool> property_cursor_blink() ;
316 #endif //#GLIBMM_PROPERTIES_ENABLED
317 
318 #ifdef GLIBMM_PROPERTIES_ENABLED
319 
325  Glib::PropertyProxy_ReadOnly<bool> property_cursor_blink() const;
326 #endif //#GLIBMM_PROPERTIES_ENABLED
327 
328  #ifdef GLIBMM_PROPERTIES_ENABLED
329 
335  Glib::PropertyProxy<bool> property_grow_height() ;
336 #endif //#GLIBMM_PROPERTIES_ENABLED
337 
338 #ifdef GLIBMM_PROPERTIES_ENABLED
339 
345  Glib::PropertyProxy_ReadOnly<bool> property_grow_height() const;
346 #endif //#GLIBMM_PROPERTIES_ENABLED
347 
348  #ifdef GLIBMM_PROPERTIES_ENABLED
349 
355  Glib::PropertyProxy<Gtk::WrapMode> property_wrap_mode() ;
356 #endif //#GLIBMM_PROPERTIES_ENABLED
357 
358 #ifdef GLIBMM_PROPERTIES_ENABLED
359 
365  Glib::PropertyProxy_ReadOnly<Gtk::WrapMode> property_wrap_mode() const;
366 #endif //#GLIBMM_PROPERTIES_ENABLED
367 
368  #ifdef GLIBMM_PROPERTIES_ENABLED
369 
375  Glib::PropertyProxy<Gtk::Justification> property_justification() ;
376 #endif //#GLIBMM_PROPERTIES_ENABLED
377 
378 #ifdef GLIBMM_PROPERTIES_ENABLED
379 
385  Glib::PropertyProxy_ReadOnly<Gtk::Justification> property_justification() const;
386 #endif //#GLIBMM_PROPERTIES_ENABLED
387 
388  #ifdef GLIBMM_PROPERTIES_ENABLED
389 
395  Glib::PropertyProxy<Gtk::DirectionType> property_direction() ;
396 #endif //#GLIBMM_PROPERTIES_ENABLED
397 
398 #ifdef GLIBMM_PROPERTIES_ENABLED
399 
405  Glib::PropertyProxy_ReadOnly<Gtk::DirectionType> property_direction() const;
406 #endif //#GLIBMM_PROPERTIES_ENABLED
407 
408  #ifdef GLIBMM_PROPERTIES_ENABLED
409 
415  Glib::PropertyProxy<Gtk::AnchorType> property_anchor() ;
416 #endif //#GLIBMM_PROPERTIES_ENABLED
417 
418 #ifdef GLIBMM_PROPERTIES_ENABLED
419 
425  Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> property_anchor() const;
426 #endif //#GLIBMM_PROPERTIES_ENABLED
427 
428  #ifdef GLIBMM_PROPERTIES_ENABLED
429 
435  Glib::PropertyProxy<int> property_pixels_above_lines() ;
436 #endif //#GLIBMM_PROPERTIES_ENABLED
437 
438 #ifdef GLIBMM_PROPERTIES_ENABLED
439 
445  Glib::PropertyProxy_ReadOnly<int> property_pixels_above_lines() const;
446 #endif //#GLIBMM_PROPERTIES_ENABLED
447 
448  #ifdef GLIBMM_PROPERTIES_ENABLED
449 
455  Glib::PropertyProxy<int> property_pixels_below_lines() ;
456 #endif //#GLIBMM_PROPERTIES_ENABLED
457 
458 #ifdef GLIBMM_PROPERTIES_ENABLED
459 
465  Glib::PropertyProxy_ReadOnly<int> property_pixels_below_lines() const;
466 #endif //#GLIBMM_PROPERTIES_ENABLED
467 
468  #ifdef GLIBMM_PROPERTIES_ENABLED
469 
475  Glib::PropertyProxy<int> property_pixels_inside_wrap() ;
476 #endif //#GLIBMM_PROPERTIES_ENABLED
477 
478 #ifdef GLIBMM_PROPERTIES_ENABLED
479 
485  Glib::PropertyProxy_ReadOnly<int> property_pixels_inside_wrap() const;
486 #endif //#GLIBMM_PROPERTIES_ENABLED
487 
488  #ifdef GLIBMM_PROPERTIES_ENABLED
489 
495  Glib::PropertyProxy<int> property_left_margin() ;
496 #endif //#GLIBMM_PROPERTIES_ENABLED
497 
498 #ifdef GLIBMM_PROPERTIES_ENABLED
499 
505  Glib::PropertyProxy_ReadOnly<int> property_left_margin() const;
506 #endif //#GLIBMM_PROPERTIES_ENABLED
507 
508  #ifdef GLIBMM_PROPERTIES_ENABLED
509 
515  Glib::PropertyProxy<int> property_right_margin() ;
516 #endif //#GLIBMM_PROPERTIES_ENABLED
517 
518 #ifdef GLIBMM_PROPERTIES_ENABLED
519 
525  Glib::PropertyProxy_ReadOnly<int> property_right_margin() const;
526 #endif //#GLIBMM_PROPERTIES_ENABLED
527 
528  #ifdef GLIBMM_PROPERTIES_ENABLED
529 
535  Glib::PropertyProxy<int> property_indent() ;
536 #endif //#GLIBMM_PROPERTIES_ENABLED
537 
538 #ifdef GLIBMM_PROPERTIES_ENABLED
539 
545  Glib::PropertyProxy_ReadOnly<int> property_indent() const;
546 #endif //#GLIBMM_PROPERTIES_ENABLED
547 
548 
549 };
550 
551 } /* namespace Canvas */
552 } /* namespace Gnome */
553 
554 
555 namespace Glib
556 {
565  Gnome::Canvas::RichText* wrap(GnomeCanvasRichText* object, bool take_copy = false);
566 } //namespace Glib
567 
568 
569 #endif /* _LIBGNOMECANVASMM_RICH_TEXT_H */
570 
Glib::PropertyProxy< bool > property_grow_height()
Should the text box height grow if the text does not fit?.
Definition: bpath.h:149
Glib::PropertyProxy< bool > property_editable()
Is this rich text item editable?.
Definition: affinetrans.h:29
virtual void on_tag_changed(const Glib::RefPtr< Gtk::TextTag > &tag)
Glib::PropertyProxy< int > property_pixels_inside_wrap()
Number of pixels to put inside the wrap.
const GnomeCanvasRichText * gobj() const
Provides access to the underlying C GtkObject.
Definition: rich-text.h:95
Glib::PropertyProxy< Glib::ustring > property_text()
Text to display.
GnomeCanvasRichText * gobj()
Provides access to the underlying C GtkObject.
Definition: rich-text.h:92
Glib::PropertyProxy< bool > property_cursor_visible()
Is the cursor visible in this rich text item?.
Gtk::TextIter iterator
Definition: rich-text.h:118
Glib::PropertyProxy< double > property_x()
X position.
Glib::PropertyProxy< Gtk::Justification > property_justification()
Justification mode.
Glib::PropertyProxy< bool > property_cursor_blink()
Does the cursor blink in this rich text item?.
Glib::PropertyProxy< bool > property_visible()
Is this rich text item visible?.
void set_buffer(const Glib::RefPtr< Gtk::TextBuffer > &buffer)
Definition: item.h:66
void get_iter_location(const iterator &iter, Gdk::Rectangle &location) const
Definition: rich-text.h:57
Glib::PropertyProxy< double > property_y()
Y position.
Glib::PropertyProxy< int > property_pixels_above_lines()
Number of pixels to put above lines.
Definition: group.h:59
Glib::PropertyProxy< int > property_pixels_below_lines()
Number of pixels to put below lines.
Glib::PropertyProxy< Gtk::AnchorType > property_anchor()
Anchor point for text.
Glib::RefPtr< Gtk::TextBuffer > get_buffer() const
Glib::PropertyProxy< Gtk::DirectionType > property_direction()
Text direction.
iterator get_iter_at_location(int x, int y) const
RichText(Group &parent, double x, double y, const Glib::ustring &text)
Glib::PropertyProxy< double > property_height()
Height for text box.
Glib::SignalProxy1< void, const Glib::RefPtr< Gtk::TextTag > & > signal_tag_changed()
Glib::PropertyProxy< int > property_indent()
Number of pixels for indentation.
Glib::PropertyProxy< double > property_width()
Width for text box.
Glib::PropertyProxy< int > property_left_margin()
Number of pixels in the left margin.
Glib::PropertyProxy< Gtk::WrapMode > property_wrap_mode()
Wrap mode for multiline text.
Glib::PropertyProxy< int > property_right_margin()
Number of pixels in the right margin.