19#include <gtkmm/scrolledwindow.h>
20#include <gtkmm/entry.h>
54 g_warning (
"An unknown RDF format was requested.");
58 obj->
_label.set_visible(
true);
63 : _label(
Glib::ustring(_(ent->title)),
Gtk::Align::
END),
65 _entity(ent), _wr(&wr)
84 Gtk::Entry *e =
new Gtk::Entry;
85 e->set_tooltip_text (_(ent->
tip));
92 delete static_cast<Gtk::Entry*
>(
_packable);
105 static_cast<Gtk::Entry*
>(
_packable)->set_text(text ? text :
"");
113 if (text.length() > 0) {
114 static_cast<Gtk::Entry*
>(
_packable)->set_text (text.c_str());
142 Gtk::ScrolledWindow *s =
new Gtk::ScrolledWindow;
143 s->set_policy (Gtk::PolicyType::AUTOMATIC, Gtk::PolicyType::AUTOMATIC);
144 s->set_has_frame(
true);
146 _v.set_size_request (-1, 35);
147 _v.set_wrap_mode (Gtk::WrapMode::WORD);
148 _v.set_accepts_tab (
false);
150 _v.set_tooltip_text (_(ent->
tip));
155 return _v.get_buffer()->get_text();
160 delete static_cast<Gtk::ScrolledWindow*
>(
_packable);
173 Gtk::ScrolledWindow *s =
static_cast<Gtk::ScrolledWindow*
>(
_packable);
174 Gtk::TextView *tv =
static_cast<Gtk::TextView*
>(s->get_child());
175 tv->get_buffer()->set_text(text ? text :
"");
183 if (text.length() > 0) {
184 Gtk::ScrolledWindow *s =
static_cast<Gtk::ScrolledWindow*
>(
_packable);
185 Gtk::TextView *tv =
static_cast<Gtk::TextView*
>(s->get_child());
186 tv->get_buffer()->set_text (text.c_str());
199 Gtk::ScrolledWindow *s =
static_cast<Gtk::ScrolledWindow*
>(
_packable);
200 Gtk::TextView *tv =
static_cast<Gtk::TextView*
>(s->get_child());
201 Glib::ustring text = tv->get_buffer()->get_text();
static void done(SPDocument *document, Glib::ustring const &event_description, Glib::ustring const &undo_icon, unsigned int object_modified_tag=0)
Preference storage class.
Glib::ustring getString(Glib::ustring const &pref_path, Glib::ustring const &def="")
Retrieve an UTF-8 string.
static Preferences * get()
Access the singleton Preferences object.
void setString(Glib::ustring const &pref_path, Glib::ustring const &value)
Set an UTF-8 string value.
void save_to_preferences(SPDocument *doc)
rdf_work_entity_t * _entity
static EntityEntry * create(rdf_work_entity_t *ent, Registry &wr)
sigc::connection _changed_connection
EntityEntry(rdf_work_entity_t *ent, Registry &wr)
void load_from_preferences() override
Glib::ustring content() const override
void on_changed() override
EntityLineEntry(rdf_work_entity_t *ent, Registry &wr)
void update(SPDocument *doc, bool read_only) override
~EntityLineEntry() override
void update(SPDocument *doc, bool read_only) override
~EntityMultiLineEntry() override
void on_changed() override
EntityMultiLineEntry(rdf_work_entity_t *ent, Registry &wr)
void load_from_preferences() override
Glib::ustring content() const override
SPDocument * getDocument() const
Typed SVG document implementation.
SPRoot * getRoot()
Returns our SPRoot.
char * title() const
Returns the title of this object, or NULL if there is none.
Editable view implementation.
TODO: insert short description here.
Helper class to stream background task notifications as a series of messages.
Singleton class to access the preferences file in a convenient way.
unsigned int rdf_set_work_entity(SPDocument *doc, struct rdf_work_entity_t *entity, const gchar *text)
const gchar * rdf_get_work_entity(SPDocument const *doc, struct rdf_work_entity_t *entity)
Retrieves a known RDF/Work entity's contents from the document XML by name.
constexpr auto PREFS_METADATA
SPRoot: SVG <svg> implementation.
Holds known RDF/Work tags.