00001
00002
00003 #ifndef _LIBGNOMEUIMM_ICON_TEXTITEM_H
00004 #define _LIBGNOMEUIMM_ICON_TEXTITEM_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
00027
00028
00029
00030
00031 #include <libgnomecanvasmm/item.h>
00032 #include <libgnomeuimm/file-entry.h>
00033 #include <libgnomeuimm/entry.h>
00034 #include <gtkmm/entry.h>
00035
00036
00037 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00038 typedef struct _GnomeIconTextItem GnomeIconTextItem;
00039 typedef struct _GnomeIconTextItemClass GnomeIconTextItemClass;
00040 #endif
00041
00042
00043 namespace Gnome
00044 {
00045
00046 namespace UI
00047 { class IconTextItem_Class; }
00048
00049 }
00050 namespace Gnome
00051 {
00052
00053 namespace UI
00054 {
00055
00056
00057 class IconTextItem : public Gnome::Canvas::Item
00058 {
00059 public:
00060 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00061 typedef IconTextItem CppObjectType;
00062 typedef IconTextItem_Class CppClassType;
00063 typedef GnomeIconTextItem BaseObjectType;
00064 typedef GnomeIconTextItemClass BaseClassType;
00065 #endif
00066
00067 virtual ~IconTextItem();
00068
00069 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00070
00071 private:
00072 friend class IconTextItem_Class;
00073 static CppClassType icontextitem_class_;
00074
00075
00076 IconTextItem(const IconTextItem&);
00077 IconTextItem& operator=(const IconTextItem&);
00078
00079 protected:
00080 explicit IconTextItem(const Glib::ConstructParams& construct_params);
00081 explicit IconTextItem(GnomeIconTextItem* castitem);
00082
00083 #endif
00084
00085 public:
00086 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00087 static GType get_type() G_GNUC_CONST;
00088 static GType get_base_type() G_GNUC_CONST;
00089 #endif
00090
00092 GnomeIconTextItem* gobj() { return reinterpret_cast<GnomeIconTextItem*>(gobject_); }
00093
00095 const GnomeIconTextItem* gobj() const { return reinterpret_cast<GnomeIconTextItem*>(gobject_); }
00096
00097
00098 public:
00099
00100
00101 protected:
00102
00103
00104
00105 virtual bool on_text_changed();
00106 virtual void on_height_changed();
00107 virtual void on_width_changed();
00108 virtual void on_editing_started();
00109 virtual void on_editing_stopped();
00110 virtual void on_selection_started();
00111 virtual void on_selection_stopped();
00112
00113
00114 private:
00115
00116
00117 public:
00118 IconTextItem(Gnome::Canvas::Group& parent);
00119 IconTextItem(Gnome::Canvas::Group& parent, int x, int y, int width,
00120 const Glib::ustring& fontname, const Glib::ustring& text,
00121 bool is_editable = true);
00122
00123
00124 void set_xy(int x, int y);
00125
00126 void select(bool select = true);
00127
00128 void focus(bool focused = true);
00129
00130 Glib::ustring get_text() const;
00131
00132 void start_editing();
00133
00134 void stop_editing(bool accept = true);
00135
00136 Glib::RefPtr<Gtk::Editable> get_editable();
00137
00138 Glib::RefPtr<const Gtk::Editable> get_editable() const;
00139
00140
00141 Glib::SignalProxy0< bool > signal_text_changed();
00142
00143
00144 Glib::SignalProxy0< void > signal_height_changed();
00145
00146
00147 Glib::SignalProxy0< void > signal_width_changed();
00148
00149
00150 Glib::SignalProxy0< void > signal_editing_started();
00151
00152
00153 Glib::SignalProxy0< void > signal_editing_stopped();
00154
00155
00156 Glib::SignalProxy0< void > signal_selection_started();
00157
00158
00159 Glib::SignalProxy0< void > signal_selection_stopped();
00160
00161
00162 };
00163
00164 }
00165 }
00166
00167
00168 namespace Glib
00169 {
00175 Gnome::UI::IconTextItem* wrap(GnomeIconTextItem* object, bool take_copy = false);
00176 }
00177
00178
00179 #endif
00180