1 #ifndef SEEN_ICON_PREVIEW_H
2 #define SEEN_ICON_PREVIEW_H
3 /*
4 * A simple dialog for previewing icon representation.
5 *
6 * Authors:
7 * Jon A. Cruz
8 * Bob Jamison
9 * Other dudes from The Inkscape Organization
10 *
11 * Copyright (C) 2004,2005 The Inkscape Organization
12 *
13 * Released under GNU GPL, read the file 'COPYING' for more information
14 */
16 #include <gtkmm/box.h>
17 #include <gtkmm/button.h>
18 #include <gtkmm/label.h>
19 #include <gtkmm/paned.h>
20 #include <gtkmm/image.h>
21 #include <gtkmm/togglebutton.h>
22 #include <gtkmm/toggletoolbutton.h>
24 #include "ui/dialog/dialog.h"
26 struct SPObject;
28 namespace Inkscape {
29 namespace UI {
30 namespace Dialogs {
33 /**
34 * A panel that displays an icon preview
35 */
36 class IconPreviewPanel : public Inkscape::UI::Dialog::Dialog
37 {
38 public:
39 IconPreviewPanel(Inkscape::UI::Dialog::Behavior::BehaviorFactory behavior_factory);
40 //IconPreviewPanel(Glib::ustring const &label);
42 static IconPreviewPanel *create(Inkscape::UI::Dialog::Behavior::BehaviorFactory behavior_factory);
44 void refreshPreview();
45 void modeToggled();
47 private:
48 IconPreviewPanel(IconPreviewPanel const &); // no copy
49 IconPreviewPanel &operator=(IconPreviewPanel const &); // no assign
52 void on_button_clicked(int which);
53 void renderPreview( SPObject* obj );
54 void updateMagnify();
56 static IconPreviewPanel* instance;
58 Gtk::Tooltips tips;
60 Gtk::VBox iconBox;
61 Gtk::HPaned splitter;
63 int hot;
64 int numEntries;
65 int* sizes;
67 Gtk::Image magnified;
68 Gtk::Label magLabel;
70 Gtk::Button *refreshButton;
71 Gtk::ToggleButton *selectionButton;
73 guchar** pixMem;
74 Gtk::Image** images;
75 Glib::ustring** labels;
76 Gtk::ToggleToolButton** buttons;
77 };
79 } //namespace Dialogs
80 } //namespace UI
81 } //namespace Inkscape
85 #endif // SEEN_ICON_PREVIEW_H