entry.h
Go to the documentation of this file.00001
00002
00003 #ifndef _CLUTTERMM_ENTRY_H
00004 #define _CLUTTERMM_ENTRY_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <cluttermm/actor.h>
00027 #include <cluttermm/color.h>
00028 #include <pangomm.h>
00029
00030
00031 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00032 typedef struct _ClutterEntry ClutterEntry;
00033 typedef struct _ClutterEntryClass ClutterEntryClass;
00034 #endif
00035
00036
00037 namespace Clutter
00038 { class Entry_Class; }
00039 namespace Clutter
00040 {
00041
00042
00043 class Entry :
00044 public Actor
00045 {
00046
00047 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00048
00049 public:
00050 typedef Entry CppObjectType;
00051 typedef Entry_Class CppClassType;
00052 typedef ClutterEntry BaseObjectType;
00053 typedef ClutterEntryClass BaseClassType;
00054
00055 private: friend class Entry_Class;
00056 static CppClassType entry_class_;
00057
00058 private:
00059
00060 Entry(const Entry&);
00061 Entry& operator=(const Entry&);
00062
00063 protected:
00064 explicit Entry(const Glib::ConstructParams& construct_params);
00065 explicit Entry(ClutterEntry* castitem);
00066
00067 #endif
00068
00069 public:
00070 virtual ~Entry();
00071
00072 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00073 static GType get_type() G_GNUC_CONST;
00074 static GType get_base_type() G_GNUC_CONST;
00075 #endif
00076
00078 ClutterEntry* gobj() { return reinterpret_cast<ClutterEntry*>(gobject_); }
00079
00081 const ClutterEntry* gobj() const { return reinterpret_cast<ClutterEntry*>(gobject_); }
00082
00084 ClutterEntry* gobj_copy();
00085
00086 private:
00087
00088
00089 protected:
00090 Entry();
00091 explicit Entry(const Glib::ustring& font_name, const Glib::ustring& text);
00092 explicit Entry(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color);
00093
00094 public:
00095
00096 static Glib::RefPtr<Entry> create();
00097
00098
00099 static Glib::RefPtr<Entry> create(const Glib::ustring& font_name, const Glib::ustring& text);
00100 ;
00101
00102 static Glib::RefPtr<Entry> create(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color);
00103 ;
00104
00105
00112 void set_text(const Glib::ustring& text);
00113
00120 Glib::ustring set_text() const;
00121
00131 void set_font_name(const Glib::ustring& font_name);
00132
00141 Glib::ustring get_font_name() const;
00142
00143
00150 Color get_color() const;
00151
00152
00158 void set_color(const Color& color);
00159
00160
00170 Glib::RefPtr<Pango::Layout> get_layout();
00171
00181 Glib::RefPtr<const Pango::Layout> get_layout() const;
00182
00183
00189 Pango::Alignment get_alignment() const;
00190
00196 void set_alignment(Pango::Alignment wrap_mode);
00197
00198
00199 int get_cursor_position() const;
00200
00201 void set_cursor_position(int position);
00202
00203
00210 void insert(gunichar wc);
00211
00222 void insert(const Glib::ustring& text, gssize position);
00223
00224
00230 void delete_chars(guint len);
00231
00241 void delete_text(gssize start_pos, gssize end_pos);
00242
00243
00249 void set_visible_cursor(bool visible);
00250
00256 bool get_visible_cursor() const;
00257
00258
00269 void set_visibility(bool visible);
00270
00276 bool get_visibility() const;
00277
00278
00289 void set_invisible_char(gunichar wc);
00290
00294 gunichar get_invisible_char() const;
00295
00296
00303 int get_max_length() const;
00304
00313 void set_max_length(int max_length);
00314
00315
00325 void handle_key_event(KeyEvent* kev);
00326
00327
00333 Glib::SignalProxy0< void > signal_text_changed();
00334
00335
00336
00342 Glib::SignalProxy1< void,ClutterGeometry* > signal_cursor_event();
00343
00344
00350 Glib::SignalProxy0< void > signal_activate();
00351
00352
00353 protected:
00354 #ifdef GLIBMM_VFUNCS_ENABLED
00355 virtual void paint_cursor_vfunc();
00356 #endif //GLIBMM_VFUNCS_ENABLED
00357
00358
00359 public:
00360
00361 public:
00362
00363 #ifdef GLIBMM_VFUNCS_ENABLED
00364 #endif //GLIBMM_VFUNCS_ENABLED
00365
00366 protected:
00367
00368 #ifdef GLIBMM_VFUNCS_ENABLED
00369 #endif //GLIBMM_VFUNCS_ENABLED
00370
00371
00372 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00373 virtual void on_text_changed();
00374 virtual void on_cursor_event(ClutterGeometry* geometry);
00375 virtual void on_activate();
00376 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00377
00378
00379 };
00380
00381 }
00382
00383
00384
00385
00386 namespace Glib
00387 {
00396 Glib::RefPtr<Clutter::Entry> wrap(ClutterEntry* object, bool take_copy = false);
00397 }
00398
00399
00400 #endif
00401