31 #include <gdk/gdkkeysyms.h>
32 #include <pango/pango.h>
57 #define GCCV_TEXT_PROP(type,member) \
59 void Set##member (type val) { \
61 SetPosition (m_x, m_y); \
63 type Get##member (void) const {return m_##member;} \
81 friend class TextPrivate;
120 void SetText (
char const *text);
126 void SetText (std::string
const &text);
175 std::list <TextTag *>
const *
GetTags () {
return &m_Tags;}
200 void ReplaceText (std::string &str,
int pos,
unsigned length);
201 unsigned GetCursorPosition () {
return m_CurPos;}
202 void GetSelectionBounds (
unsigned &start,
unsigned &end);
203 void SetSelectionBounds (
unsigned start,
unsigned end);
204 unsigned GetIndexAt (
double x,
double y);
205 bool GetPositionAtIndex (
unsigned index, Rect &rect);
214 void Draw (cairo_t *cr,
bool is_vector)
const;
221 void Move (
double x,
double y);
251 void OnDrag (
double x,
double y);
263 unsigned GetDefaultFontSize () {
return (m_FontDesc)? (double) pango_font_description_get_size (m_FontDesc) / PANGO_SCALE: 0; }
275 void SetInterline (
double interline,
bool emit_changed =
false);
283 void SetJustification (GtkJustification justification,
bool emit_changed =
false);
287 unsigned long m_BlinkSignal;
288 bool m_CursorVisible;
289 unsigned m_CurPos, m_StartSel;
290 std::list <TextRun *> m_Runs;
291 std::list <TextTag *> m_Tags;
293 GtkIMContext *m_ImContext;
294 PangoFontDescription *m_FontDesc;
297 unsigned m_LinesNumber;
357 #endif // GCCV_TEXT_H