index 044ce5d44eae6d6337a9d6360dc0a8189448701f..8502a34686d168e682859f76ae3118fa09149d3a 100644 (file)
#include "ui/widget/panel.h"
#include "sp-font.h"
+#include "sp-font-face.h"
#include "verbs.h"
#include "document.h"
#include "desktop.h"
#include <gtkmm/box.h>
#include "display/nr-svgfonts.h"
+#include "attributes.h"
+
class SvgFontDrawingArea : Gtk::DrawingArea{
public:
SvgFontDrawingArea();
- void set_text(gchar*);
+ void set_text(Glib::ustring);
void set_svgfont(SvgFont*);
+ void set_size(int x, int y);
void redraw();
private:
+ int x,y;
SvgFont* svgfont;
- gchar* text;
+ Glib::ustring text;
bool on_expose_event (GdkEventExpose *event);
};
namespace UI {
namespace Dialog {
+class GlyphComboBox : public Gtk::ComboBoxText {
+public:
+ GlyphComboBox();
+ void update(SPFont*);
+};
+
class SvgFontsDialog : public UI::Widget::Panel {
public:
SvgFontsDialog();
void update_fonts();
SvgFont* get_selected_svgfont();
+ SPFont* get_selected_spfont();
void on_font_selection_changed();
+ void on_preview_text_changed();
+ void on_glyphs_changed();
+ void on_kerning_changed();
+ void on_setwidth_changed();
+
+ class AttrEntry : public Gtk::HBox
+ {
+ public:
+ AttrEntry(SvgFontsDialog* d, gchar* lbl, const SPAttributeEnum attr);
+ private:
+ SvgFontsDialog* dialog;
+ void on_attr_changed();
+ Gtk::Entry entry;
+ SPAttributeEnum attr;
+ };
+
private:
+ Gtk::HBox* AttrCombo(gchar* lbl, const SPAttributeEnum attr);
+// Gtk::HBox* AttrSpin(gchar* lbl, const SPAttributeEnum attr);
+ Gtk::VBox* global_settings_tab();
+ Gtk::VBox* kerning_tab();
+ Gtk::VBox* glyphs_tab();
+
class Columns : public Gtk::TreeModel::ColumnRecord
{
public:
Columns()
{
- add(font);
+ add(spfont);
add(svgfont);
add(label);
}
- Gtk::TreeModelColumn<SPFont*> font;
+ Gtk::TreeModelColumn<SPFont*> spfont;
Gtk::TreeModelColumn<SvgFont*> svgfont;
Gtk::TreeModelColumn<Glib::ustring> label;
};
Columns _columns;
Gtk::TreeView _font_list;
Gtk::VBox _font_settings;
- SvgFontDrawingArea _font_da;
+ Gtk::Entry _preview_entry;
+ SvgFontDrawingArea _font_da, kerning_preview;
+ GlyphComboBox first_glyph, second_glyph;
+ SPGlyphKerning* kerning_pair;
+ Gtk::SpinButton kerning_spin, setwidth_spin;
+
class EntryWidget : public Gtk::HBox
{
public: