Code

moving trunk for module inkscape
[inkscape.git] / src / ui / widget / entity-entry.h
1 /** \file
2  * \brief 
3  *
4  * Authors:
5  *   Ralf Stephan <ralf@ark.in-berlin.de>
6  *
7  * Copyright (C) 2005 Authors
8  *
9  * Released under GNU GPL.  Read the file 'COPYING' for more information.
10  */
12 #ifndef INKSCAPE_UI_WIDGET_ENTITY_ENTRY__H
13 #define INKSCAPE_UI_WIDGET_ENTITY_ENTRY__H
15 #include <gtkmm/textview.h>
16 #include <gtkmm/tooltips.h>
18 struct rdf_work_entity_t;
19 class SPDocument;
21 namespace Gtk {
22 class TextBuffer;
23 }
25 namespace Inkscape {
26 namespace UI {
27 namespace Widget {
29 class Registry;
31 class EntityEntry {
32 public:
33     static EntityEntry* create (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
34     virtual ~EntityEntry() = 0;
35     virtual void update (SPDocument *doc) = 0;
36     virtual void on_changed() = 0;
37     Gtk::Label _label;
38     Gtk::Widget *_packable;
40 protected: 
41     EntityEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
42     sigc::connection _changed_connection;
43     rdf_work_entity_t *_entity;
44     Gtk::Tooltips *_tt;
45     Registry *_wr;
46 };
48 class EntityLineEntry : public EntityEntry {
49 public:
50     EntityLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
51     ~EntityLineEntry();
52     void update (SPDocument *doc);
54 protected:
55     virtual void on_changed();
56 };
58 class EntityMultiLineEntry : public EntityEntry {
59 public:
60     EntityMultiLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
61     ~EntityMultiLineEntry();
62     void update (SPDocument *doc);
64 protected: 
65     virtual void on_changed();
66     Gtk::TextView _v;
67 };
69 } // namespace Widget
70 } // namespace UI
71 } // namespace Inkscape
73 #endif // INKSCAPE_UI_WIDGET_ENTITY_ENTRY__H
75 /*
76   Local Variables:
77   mode:c++
78   c-file-style:"stroustrup"
79   c-file-offsets:((innamespace . 0)(inline-open . 0))
80   indent-tabs-mode:nil
81   fill-column:99
82   End:
83 */
84 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :