Code

r10952@tres: ted | 2006-02-16 09:17:08 -0800
[inkscape.git] / src / ui / dialog / extension-editor.cpp
1 /**
2  * \brief Extension editor
3  *
4  * Authors:
5  *   Bryce W. Harrington <bryce@bryceharrington.org>
6  *   Ted Gould <ted@gould.cx>
7  *
8  * Copyright (C) 2004-2006 Authors
9  *
10  * Released under GNU GPL.  Read the file 'COPYING' for more information.
11  */
13 #ifdef HAVE_CONFIG_H
14 # include <config.h>
15 #endif
17 #include <gtkmm/frame.h>
18 #include <gtkmm/scrolledwindow.h>
19 #include <gtkmm/alignment.h>
21 #include "extension-editor.h"
22 #include "verbs.h"
24 namespace Inkscape {
25 namespace UI {
26 namespace Dialog {
28 ExtensionEditor::ExtensionEditor()
29     : Dialog ("dialogs.extensioneditor", SP_VERB_DIALOG_EXTENSIONEDITOR)
30 {
31  
32     //Main HBox
33     Gtk::HBox* hbox_list_page = Gtk::manage(new Gtk::HBox());
34     hbox_list_page->set_border_width(12);
35     hbox_list_page->set_spacing(12);
36     this->get_vbox()->add(*hbox_list_page);
39     //Pagelist
40     Gtk::Frame* list_frame = Gtk::manage(new Gtk::Frame());
41     Gtk::ScrolledWindow* scrolled_window = Gtk::manage(new Gtk::ScrolledWindow());
42     hbox_list_page->pack_start(*list_frame, false, true, 0);
43     _page_list.set_headers_visible(false);
44     scrolled_window->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
45     scrolled_window->add(_page_list);
46     list_frame->set_shadow_type(Gtk::SHADOW_IN);
47     list_frame->add(*scrolled_window);
48     _page_list_model = Gtk::TreeStore::create(_page_list_columns);
49     _page_list.set_model(_page_list_model);
50     _page_list.append_column("name",_page_list_columns._col_name);
51     Glib::RefPtr<Gtk::TreeSelection> page_list_selection = _page_list.get_selection();
52     page_list_selection->signal_changed().connect(sigc::mem_fun(*this, &ExtensionEditor::on_pagelist_selection_changed));
53     page_list_selection->set_mode(Gtk::SELECTION_BROWSE);
56     //Pages
57     Gtk::VBox* vbox_page = Gtk::manage(new Gtk::VBox());
58     Gtk::Frame* title_frame = Gtk::manage(new Gtk::Frame());
59     hbox_list_page->pack_start(*vbox_page, true, true, 0);
60     title_frame->add(_page_title);
61     vbox_page->pack_start(*title_frame, false, false, 0);
62     vbox_page->pack_start(_page_frame, true, true, 0);
63     _page_frame.set_shadow_type(Gtk::SHADOW_IN);
64     title_frame->set_shadow_type(Gtk::SHADOW_IN);
67     show_all_children();
68 }
70 ExtensionEditor::~ExtensionEditor()
71 {
72 }
74 } // namespace Dialog
75 } // namespace UI
76 } // namespace Inkscape
78 /*
79   Local Variables:
80   mode:c++
81   c-file-style:"stroustrup"
82   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
83   indent-tabs-mode:nil
84   fill-column:99
85   End:
86 */
87 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :