00001
00002
00003
#ifndef _LIBGNOMECANVASMM_RICH_TEXT_H
00004
#define _LIBGNOMECANVASMM_RICH_TEXT_H
00005
00006
#include <glibmm.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
#include <gtkmm/textbuffer.h>
00032
#include <libgnomecanvasmm/item.h>
00033
#include <libgnomecanvas/gnome-canvas-rich-text.h>
00034
00035
00036
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00037
typedef struct _GnomeCanvasRichText GnomeCanvasRichText;
00038
typedef struct _GnomeCanvasRichTextClass GnomeCanvasRichTextClass;
00039
#endif
00040
00041
00042
namespace Gnome
00043 {
00044
00045
namespace Canvas
00046 {
class RichText_Class; }
00047
00048 }
00049
namespace Gnome
00050 {
00051
00052
namespace Canvas
00053 {
00054
00055
00056 class RichText :
public Item
00057 {
00058
public:
00059
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00060
typedef RichText CppObjectType;
00061
typedef RichText_Class CppClassType;
00062
typedef GnomeCanvasRichText BaseObjectType;
00063
typedef GnomeCanvasRichTextClass BaseClassType;
00064
#endif
00065
00066
virtual ~RichText();
00067
00068
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00069
00070
private:
00071
friend class RichText_Class;
00072
static CppClassType richtext_class_;
00073
00074
00075
RichText(
const RichText&);
00076
RichText& operator=(
const RichText&);
00077
00078
protected:
00079
explicit RichText(
const Glib::ConstructParams& construct_params);
00080
explicit RichText(GnomeCanvasRichText* castitem);
00081
00082
#endif
00083
00084
public:
00085
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00086
static GType get_type() G_GNUC_CONST;
00087
static GType get_base_type() G_GNUC_CONST;
00088
#endif
00089
00091 GnomeCanvasRichText*
gobj() {
return reinterpret_cast<GnomeCanvasRichText*>(gobject_); }
00092
00094 const GnomeCanvasRichText*
gobj()
const {
return reinterpret_cast<GnomeCanvasRichText*>(gobject_); }
00095
00096
00097
public:
00098
00099
00100
protected:
00101
00102
00103
00104
virtual void on_tag_changed(
const Glib::RefPtr<Gtk::TextTag>& tag);
00105
00106
00107
private:
00108
00109
00110
public:
00111 typedef Gtk::TextIter iterator;
00112
00113
RichText(
Group& parent,
double x,
double y,
const Glib::ustring& text);
00114
explicit RichText(
Group& parent);
00115
00116
00117
void cut_clipboard();
00118
00119
void copy_clipboard();
00120
00121
void paste_clipboard();
00122
00123
00124
void set_buffer(
const Glib::RefPtr<Gtk::TextBuffer>& buffer);
00125
00126
Glib::RefPtr<Gtk::TextBuffer> get_buffer() const;
00127
00128
00129
void get_iter_location(const
iterator& iter, Gdk::Rectangle& location) const;
00130
iterator get_iter_at_location(
int x,
int y) const;
00131
00132
00137 Glib::SignalProxy1<
void,const Glib::RefPtr<Gtk::TextTag>&> signal_tag_changed();
00138
00139
00145 Glib::PropertyProxy<Glib::ustring> property_text();
00146
00152 Glib::PropertyProxy<
double> property_x();
00153
00159 Glib::PropertyProxy<
double> property_y();
00160
00166 Glib::PropertyProxy<
double> property_width();
00167
00173 Glib::PropertyProxy<
double> property_height();
00174
00180 Glib::PropertyProxy<
bool> property_editable();
00181
00187 Glib::PropertyProxy<
bool> property_visible();
00188
00194 Glib::PropertyProxy<
bool> property_cursor_visible();
00195
00201 Glib::PropertyProxy<
bool> property_cursor_blink();
00202
00208 Glib::PropertyProxy<
bool> property_grow_height();
00209
00215 Glib::PropertyProxy<Gtk::WrapMode> property_wrap_mode();
00216
00222 Glib::PropertyProxy<Gtk::Justification> property_justification();
00223
00229 Glib::PropertyProxy<Gtk::DirectionType> property_direction();
00230
00236 Glib::PropertyProxy<Gtk::AnchorType> property_anchor();
00237
00243 Glib::PropertyProxy<
int> property_pixels_above_lines();
00244
00250 Glib::PropertyProxy<
int> property_pixels_below_lines();
00251
00257 Glib::PropertyProxy<
int> property_pixels_inside_wrap();
00258
00264 Glib::PropertyProxy<
int> property_left_margin();
00265
00271 Glib::PropertyProxy<
int> property_right_margin();
00272
00278 Glib::PropertyProxy<
int> property_indent();
00279
00280
00281 };
00282
00283 }
00284 }
00285
00286 namespace Glib
00287 {
00289
Gnome::Canvas::RichText*
wrap(GnomeCanvasRichText* object,
bool take_copy =
false);
00290 }
00291
#endif
00292