128
128
sigc::signal <void> activated;
129
129
sigc::signal <void, int> cursor_moved;
131
// void SetWidth(int width);
133
// void SetHeight(int height);
135
// void GetSizeRequest(int *width, int *height);
136
// void SetBold(bool bold);
138
// void SetItalic(bool italic);
140
// void SetStrikeout(bool strikeout);
141
// bool IsStrikeout();
142
// void SetUnderline(bool underline);
143
// bool IsUnderline();
144
// void SetMultiline(bool multiline);
145
// bool IsMultiline();
146
// void SetWordWrap(bool wrap);
147
// bool IsWordWrap();
148
// void SetReadOnly(bool readonly);
149
// bool IsReadOnly();
150
131
void SetText(const char *text);
151
std::string GetText();
152
// void SetBackground(Texture *background);
153
// const Texture *GetBackground();
132
std::string const& GetText() const;
154
134
void SetTextColor(const Color &color);
155
Color GetTextColor() const;
135
Color const& GetTextColor() const;
156
136
void SetFontFamily (const char *font);
157
137
void SetFontSize (double font_size);
158
138
void SetFontOptions (const cairo_font_options_t *options);
160
// std::string GetFontFamily();
161
// void OnFontSizeChange();
162
// void SetPasswordChar(const char *c);
163
// std::string GetPasswordChar();
164
// bool IsScrollBarRequired();
165
// void GetScrollBarInfo(int *range, int *line_step,
166
// int *page_step, int *cur_pos);
167
// void ScrollTo(int position);
168
// void MarkRedraw();
169
140
/** Select text between start and end. */
170
141
void Select(int start, int end);
171
142
/** Select all text */
217
187
void ResetImContext();
218
188
/** Reset preedit text */
219
189
void ResetPreedit();
220
// /** Create a new im context according to current visibility setting */
221
// void InitImContext();
222
// /** Set the visibility of the edit control */
223
// void SetVisibility(bool visible);
225
// /** Check if the cursor should be blinking */
226
// bool IsCursorBlinking();
227
190
/** Send out a request to blink the cursor if necessary */
228
191
void QueueCursorBlink();
229
192
static bool CursorBlinkCallback(TextEntry *data);
231
194
void ShowCursor();
232
195
void HideCursor();
301
264
void Delete(MovementStep step);
302
265
/** Switch between the overwrite mode and the insert mode*/
303
266
void ToggleOverwrite();
305
268
/** Gets the color of selection background. */
306
269
Color GetSelectionBackgroundColor();
307
270
/** Gets the color of selection text. */
308
271
Color GetSelectionTextColor();
311
// * Gets the gtk widget used by the gadget host and the cursor location
312
// * for gtk im context. relative to the widget coordinate.
314
// GtkWidget *GetWidgetAndCursorLocation(GdkRectangle *cur);
317
274
* Gets the cursor location in pango layout. The unit is pixel.
319
276
void GetCursorLocationInLayout(int *strong_x, int *strong_y, int *strong_height,
320
277
int *weak_x, int *weak_y, int *weak_height);
323
// * Updates the cursor location of input method context.
325
// void UpdateIMCursorLocation();
327
// /** Callback function for IM "commit" signal */
328
// static void CommitCallback(GtkIMContext *context,
329
// const char *str, void *gg);
330
// /** Callback function for IM "retrieve-surrounding" signal */
331
// static gboolean RetrieveSurroundingCallback(GtkIMContext *context,
333
// /** Callback function for IM "delete-surrounding" signal */
334
// static gboolean DeleteSurroundingCallback(GtkIMContext *context, int offset,
335
// int n_chars, void *gg);
336
// /** Callback function for IM "preedit-start" signal */
337
// static void PreeditStartCallback(GtkIMContext *context, void *gg);
338
// /** Callback function for IM "preedit-changed" signal */
339
// static void PreeditChangedCallback(GtkIMContext *context, void *gg);
340
// /** Callback function for IM "preedit-end" signal */
341
// static void PreeditEndCallback(GtkIMContext *context, void *gg);
343
// * Callback for gtk_clipboard_request_text function.
344
// * This function performs real paste.
346
// static void PasteCallback(GtkClipboard *clipboard,
347
// const gchar *str, void *gg);
350
// /** Owner of this gtk edit implementation object. */
351
// GtkEditElement *owner_;
352
// /** Main loop object */
353
// MainLoopInterface *main_loop_;
354
// /** Graphics object, must be CairoGraphics */
355
// const GraphicsInterface *graphics_;
357
279
/** The CairoCanvas which hold cairo_t inside */
358
CairoGraphics *canvas_;
360
// /** Gtk InputMethod Context */
361
// GtkIMContext *im_context_;
280
CairoGraphics* canvas_;
363
282
/** The cached Pango Layout */
364
PangoLayout *cached_layout_;
283
PangoLayout* cached_layout_;
366
285
/** The text content of the edit control */
367
286
std::string _text;