document-properties.h revision 5cacbbec22b42a0480f396eb94bcfb5f746ac68a
303N/A/** \file
303N/A * \brief Document Properties dialog
303N/A */
303N/A/* Authors:
303N/A * Ralf Stephan <ralf@ark.in-berlin.de>
303N/A * Bryce W. Harrington <bryce@bryceharrington.org>
303N/A *
303N/A * Copyright (C) 2006-2008 Johan Engelen <johan@shouraizou.nl>
303N/A * Copyright (C) 2004, 2005 Authors
303N/A *
303N/A * Released under GNU GPL. Read the file 'COPYING' for more information.
303N/A */
303N/A
303N/A#ifndef INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H
303N/A#define INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H
303N/A
303N/A#include <list>
303N/A#include <stddef.h>
303N/A#include <sigc++/sigc++.h>//
303N/A#include <gtkmm/comboboxtext.h>
5680N/A#include <gtkmm/notebook.h>
303N/A#include <gtkmm/optionmenu.h>
5680N/A#include <gtkmm/textview.h>
5680N/A#include <glibmm/i18n.h>
5680N/A
303N/A#include "ui/widget/notebook-page.h"
303N/A#include "ui/widget/page-sizer.h"
303N/A#include "ui/widget/registered-widget.h"
6239N/A#include "ui/widget/registry.h"
303N/A#include "ui/widget/tolerance-slider.h"
303N/A#include "ui/widget/panel.h"
844N/A
6239N/A#include "xml/helper-observer.h"
303N/A
303N/Anamespace Inkscape {
6239N/A namespace UI {
2899N/A namespace Dialog {
6382N/A
6382N/Aclass DocumentProperties : public UI::Widget::Panel {
6382N/Apublic:
6382N/A void update();
6382N/A static DocumentProperties &getInstance();
6382N/A static void destroy();
6382N/A
5680N/A void update_gridspage();
303N/A
303N/Aprotected:
303N/A void build_page();
303N/A void build_grid();
303N/A void build_guides();
303N/A void build_snap();
303N/A void build_gridspage();
303N/A#if ENABLE_LCMS
303N/A void build_cms();
303N/A#endif // ENABLE_LCMS
303N/A void build_scripting();
303N/A void init();
303N/A
303N/A virtual void on_response (int);
303N/A#if ENABLE_LCMS
303N/A void populate_available_profiles();
303N/A void populate_linked_profiles_box();
303N/A void linkSelectedProfile();
303N/A void removeSelectedProfile();
5680N/A void linked_profiles_list_button_release(GdkEventButton* event);
5680N/A void cms_create_popup_menu(Gtk::Widget& parent, sigc::slot<void> rem);
303N/A#endif // ENABLE_LCMS
4115N/A
4115N/A void external_scripts_list_button_release(GdkEventButton* event);
4115N/A void embedded_scripts_list_button_release(GdkEventButton* event);
4115N/A void populate_script_lists();
4115N/A void addExternalScript();
4115N/A void addEmbeddedScript();
4115N/A void removeExternalScript();
4115N/A void removeEmbeddedScript();
4115N/A void changeEmbeddedScript();
4115N/A void editEmbeddedScript();
4115N/A void external_create_popup_menu(Gtk::Widget& parent, sigc::slot<void> rem);
4115N/A void embedded_create_popup_menu(Gtk::Widget& parent, sigc::slot<void> rem);
4115N/A
4115N/A void _handleDocumentReplaced(SPDesktop* desktop, SPDocument *document);
4115N/A void _handleActivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
4115N/A void _handleDeactivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
4115N/A
4115N/A Inkscape::XML::SignalObserver _emb_profiles_observer, _scripts_observer;
4115N/A Gtk::Notebook _notebook;
4115N/A
4115N/A UI::Widget::NotebookPage _page_page;
4115N/A UI::Widget::NotebookPage _page_guides;
4115N/A UI::Widget::NotebookPage _page_snap;
4115N/A UI::Widget::NotebookPage _page_cms;
4115N/A UI::Widget::NotebookPage _page_scripting;
4115N/A
4115N/A Gtk::Notebook _scripting_notebook;
4115N/A UI::Widget::NotebookPage _page_external_scripts;
4115N/A UI::Widget::NotebookPage _page_embedded_scripts;
4115N/A
4115N/A Gtk::VBox _grids_vbox;
4115N/A
4115N/A UI::Widget::Registry _wr;
303N/A //---------------------------------------------------------------
303N/A UI::Widget::RegisteredCheckButton _rcb_canb;
4115N/A UI::Widget::RegisteredCheckButton _rcb_bord;
4115N/A UI::Widget::RegisteredCheckButton _rcb_shad;
4115N/A UI::Widget::RegisteredColorPicker _rcp_bg;
4115N/A UI::Widget::RegisteredColorPicker _rcp_bord;
5680N/A UI::Widget::RegisteredUnitMenu _rum_deflt;
303N/A UI::Widget::PageSizer _page_sizer;
303N/A //---------------------------------------------------------------
5680N/A UI::Widget::RegisteredCheckButton _rcb_sgui;
303N/A UI::Widget::RegisteredColorPicker _rcp_gui;
303N/A UI::Widget::RegisteredColorPicker _rcp_hgui;
303N/A //---------------------------------------------------------------
303N/A UI::Widget::ToleranceSlider _rsu_sno;
401N/A UI::Widget::ToleranceSlider _rsu_sn;
303N/A UI::Widget::ToleranceSlider _rsu_gusn;
303N/A UI::Widget::RegisteredCheckButton _rcb_snclp;
303N/A UI::Widget::RegisteredCheckButton _rcb_snmsk;
303N/A //---------------------------------------------------------------
303N/A Gtk::Menu _menu;
303N/A Gtk::OptionMenu _combo_avail;
303N/A Gtk::Button _link_btn;
303N/A class LinkedProfilesColumns : public Gtk::TreeModel::ColumnRecord
303N/A {
303N/A public:
303N/A LinkedProfilesColumns()
303N/A { add(nameColumn); add(previewColumn); }
303N/A Gtk::TreeModelColumn<Glib::ustring> nameColumn;
303N/A Gtk::TreeModelColumn<Glib::ustring> previewColumn;
303N/A };
303N/A LinkedProfilesColumns _LinkedProfilesListColumns;
303N/A Glib::RefPtr<Gtk::ListStore> _LinkedProfilesListStore;
303N/A Gtk::TreeView _LinkedProfilesList;
303N/A Gtk::ScrolledWindow _LinkedProfilesListScroller;
303N/A Gtk::Menu _EmbProfContextMenu;
303N/A
303N/A //---------------------------------------------------------------
303N/A Gtk::Button _add_btn;
303N/A Gtk::Button _new_btn;
303N/A class ExternalScriptsColumns : public Gtk::TreeModel::ColumnRecord
303N/A {
303N/A public:
303N/A ExternalScriptsColumns()
303N/A { add(filenameColumn); }
303N/A Gtk::TreeModelColumn<Glib::ustring> filenameColumn;
5680N/A };
303N/A ExternalScriptsColumns _ExternalScriptsListColumns;
303N/A class EmbeddedScriptsColumns : public Gtk::TreeModel::ColumnRecord
303N/A {
3817N/A public:
3817N/A EmbeddedScriptsColumns()
3817N/A { add(idColumn); }
3817N/A Gtk::TreeModelColumn<Glib::ustring> idColumn;
3817N/A };
3817N/A EmbeddedScriptsColumns _EmbeddedScriptsListColumns;
3817N/A Glib::RefPtr<Gtk::ListStore> _ExternalScriptsListStore;
3817N/A Glib::RefPtr<Gtk::ListStore> _EmbeddedScriptsListStore;
3817N/A Gtk::TreeView _ExternalScriptsList;
3817N/A Gtk::TreeView _EmbeddedScriptsList;
3817N/A Gtk::ScrolledWindow _ExternalScriptsListScroller;
3817N/A Gtk::ScrolledWindow _EmbeddedScriptsListScroller;
3817N/A Gtk::Menu _ExternalScriptsContextMenu;
3817N/A Gtk::Menu _EmbeddedScriptsContextMenu;
6133N/A Gtk::Entry _script_entry;
3817N/A Gtk::TextView _EmbeddedContent;
Gtk::ScrolledWindow _EmbeddedContentScroller;
//---------------------------------------------------------------
Gtk::Notebook _grids_notebook;
Gtk::HBox _grids_hbox_crea;
Gtk::Label _grids_label_crea;
Gtk::Button _grids_button_new;
Gtk::Button _grids_button_remove;
Gtk::ComboBoxText _grids_combo_gridtype;
Gtk::Label _grids_label_def;
Gtk::HBox _grids_space;
//---------------------------------------------------------------
Gtk::HBox& _createPageTabLabel(const Glib::ustring& label, const char *label_image);
private:
DocumentProperties();
virtual ~DocumentProperties();
// callback methods for buttons on grids page.
void onNewGrid();
void onRemoveGrid();
};
} // namespace Dialog
} // namespace UI
} // namespace Inkscape
#endif // INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :