glyphs.cpp revision 50875492099cda448c2aa399dfcaab4e608ea1e5
a37d24d06e3d85017b59997302b89bc2017b0970jvergara * Glyph selector dialog.
a37d24d06e3d85017b59997302b89bc2017b0970jvergara * Jon A. Cruz
a37d24d06e3d85017b59997302b89bc2017b0970jvergara * Copyright (C) 2010 Jon A. Cruz
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * Released under GNU GPL, read the file 'COPYING' for more information
b138eb36479de1170a91322a845ad9e977c3af56ludovicp return *new GlyphsPanel();
e2ad5d496df9ae6a822b25aed4cef9e3746a1658jvergaraclass GlyphColumns : public Gtk::TreeModel::ColumnRecord
a37d24d06e3d85017b59997302b89bc2017b0970jvergara * Constructor
a37d24d06e3d85017b59997302b89bc2017b0970jvergara Inkscape::UI::Widget::Panel("", prefsPath, SP_VERB_DIALOG_GLYPHS, "", false),
a37d24d06e3d85017b59997302b89bc2017b0970jvergara _getContents()->pack_start(*Gtk::manage(table), Gtk::PACK_EXPAND_WIDGET);
a37d24d06e3d85017b59997302b89bc2017b0970jvergara// -------------------------------
a37d24d06e3d85017b59997302b89bc2017b0970jvergara g_signal_connect( G_OBJECT(fontsel), "font_set", G_CALLBACK(fontChangeCB), this );
a37d24d06e3d85017b59997302b89bc2017b0970jvergara// -------------------------------
a37d24d06e3d85017b59997302b89bc2017b0970jvergara //iconView->set_columns(16);
a37d24d06e3d85017b59997302b89bc2017b0970jvergara iconView->signal_item_activated().connect(sigc::mem_fun(*this, &GlyphsPanel::glyphActivated));
a37d24d06e3d85017b59997302b89bc2017b0970jvergara iconView->signal_selection_changed().connect(sigc::mem_fun(*this, &GlyphsPanel::glyphSelectionChanged));
b138eb36479de1170a91322a845ad9e977c3af56ludovicp Gtk::ScrolledWindow *scroller = new Gtk::ScrolledWindow();
a201fb0f51e2e2d392d60b2dd96a21e16a324b88violette scroller->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
a37d24d06e3d85017b59997302b89bc2017b0970jvergara// -------------------------------
a37d24d06e3d85017b59997302b89bc2017b0970jvergara box->pack_start(*Gtk::manage(label), Gtk::PACK_EXPAND_PADDING);
a37d24d06e3d85017b59997302b89bc2017b0970jvergara GtkWidget *applyBtn = gtk_button_new_from_stock(GTK_STOCK_APPLY);
a37d24d06e3d85017b59997302b89bc2017b0970jvergara GTK_WIDGET_SET_FLAGS(applyBtn, GTK_CAN_DEFAULT | GTK_HAS_DEFAULT);
a37d24d06e3d85017b59997302b89bc2017b0970jvergara box->pack_end(*Gtk::manage(Glib::wrap(applyBtn)), Gtk::PACK_SHRINK);
a37d24d06e3d85017b59997302b89bc2017b0970jvergara// -------------------------------
a37d24d06e3d85017b59997302b89bc2017b0970jvergaravoid GlyphsPanel::glyphActivated(Gtk::TreeModel::Path const & path)
a37d24d06e3d85017b59997302b89bc2017b0970jvergara Gtk::ListStore::iterator row = store->get_iter(path);
a37d24d06e3d85017b59997302b89bc2017b0970jvergara if (entry->get_selection_bounds(startPos, endPos)) {
a37d24d06e3d85017b59997302b89bc2017b0970jvergara // there was something selected.
ea01fb5b2270d39e0b705a30a5d633336e25faa0jvergara Gtk::IconView::ArrayHandle_TreePaths itemArray = iconView->get_selected_items();
ea01fb5b2270d39e0b705a30a5d633336e25faa0jvergara Gtk::TreeModel::Path const & path = *itemArray.begin();
ea01fb5b2270d39e0b705a30a5d633336e25faa0jvergara Gtk::ListStore::iterator row = store->get_iter(path);
7855b07c34797e1650c83f4038ced2dade3a8109jvergaravoid GlyphsPanel::fontChangeCB(SPFontSelector *fontsel, font_instance *font, GlyphsPanel *self)
7855b07c34797e1650c83f4038ced2dade3a8109jvergaravoid GlyphsPanel::handleFontChange(SPFontSelector * /*fontsel*/, font_instance *font)
a37d24d06e3d85017b59997302b89bc2017b0970jvergara for (std::vector<gunichar>::iterator it = present.begin(); it != present.end(); ++it)
665c725aa5d38e054c9816f9edf5c8253f3f093ejvergara} // namespace Dialogs
7855b07c34797e1650c83f4038ced2dade3a8109jvergara} // namespace UI
fbbcdae277f66a56a2e5450858b249f82470dc56jvergara} // namespace Inkscape
665c725aa5d38e054c9816f9edf5c8253f3f093ejvergara Local Variables:
7855b07c34797e1650c83f4038ced2dade3a8109jvergara c-file-style:"stroustrup"
fbbcdae277f66a56a2e5450858b249f82470dc56jvergara c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
665c725aa5d38e054c9816f9edf5c8253f3f093ejvergara indent-tabs-mode:nil
665c725aa5d38e054c9816f9edf5c8253f3f093ejvergara fill-column:99
7855b07c34797e1650c83f4038ced2dade3a8109jvergara// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :