2
* @brief Symbols dialog
7
* Copyright (C) 2012 Tavmjong Bah
9
* Released under GNU GPL, read the file 'COPYING' for more information
12
#ifndef INKSCAPE_UI_DIALOG_SYMBOLS_H
13
#define INKSCAPE_UI_DIALOG_SYMBOLS_H
15
#include "ui/widget/panel.h"
16
#include "ui/widget/button.h"
18
#include "ui/dialog/desktop-tracker.h"
20
#include "display/drawing.h"
23
#include <gtkmm/treemodel.h>
33
class SymbolColumns; // For Gtk::ListStore
36
* A dialog that displays selectable symbols.
38
class SymbolsDialog : public UI::Widget::Panel {
41
SymbolsDialog( gchar const* prefsPath = "/dialogs/symbols" );
42
virtual ~SymbolsDialog();
44
static SymbolsDialog& getInstance();
50
SymbolsDialog(SymbolsDialog const &); // no copy
51
SymbolsDialog &operator=(SymbolsDialog const &); // no assign
53
static SymbolColumns *getColumns();
59
void draw_symbols( SPDocument* symbol_document );
60
SPDocument* symbols_preview_doc();
62
GSList* symbols_in_doc_recursive(SPObject *r, GSList *l);
63
GSList* symbols_in_doc( SPDocument* document );
64
GSList* use_in_doc_recursive(SPObject *r, GSList *l);
65
GSList* use_in_doc( SPDocument* document );
66
gchar const* style_from_use( gchar const* id, SPDocument* document);
68
Glib::RefPtr<Gdk::Pixbuf>
69
create_symbol_image(gchar const *symbol_name,
70
SPDocument *source, Inkscape::Drawing* drawing,
71
unsigned /*visionkey*/);
73
/* Keep track of all symbol template documents */
74
std::map<Glib::ustring, SPDocument*> symbolSets;
77
Glib::RefPtr<Gtk::ListStore> store;
78
Gtk::ComboBoxText* symbolSet;
79
Gtk::IconView* iconView;
80
Gtk::ComboBoxText* previewScale;
81
Gtk::ComboBoxText* previewSize;
83
void setTargetDesktop(SPDesktop *desktop);
84
SPDesktop* currentDesktop;
85
DesktopTracker deskTrack;
86
SPDocument* currentDocument;
87
SPDocument* previewDocument; /* Document to render single symbol */
89
/* For rendering the template drawing */
91
Inkscape::Drawing renderDrawing;
93
std::vector<sigc::connection> instanceConns;
94
sigc::connection desktopChangeConn;
100
} //namespace Inkscape
103
#endif // INKSCAPE_UI_DIALOG_SYMBOLS_H
108
c-file-style:"stroustrup"
109
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
114
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :