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/widget/panel.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 UI::Widget::Panel
37 {
38 public:
39 IconPreviewPanel();
40 //IconPreviewPanel(Glib::ustring const &label);
42 static IconPreviewPanel& getInstance();
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 Gtk::Tooltips tips;
58 Gtk::VBox iconBox;
59 Gtk::HPaned splitter;
61 int hot;
62 int numEntries;
63 int* sizes;
65 Gtk::Image magnified;
66 Gtk::Label magLabel;
68 Gtk::Button *refreshButton;
69 Gtk::ToggleButton *selectionButton;
71 guchar** pixMem;
72 Gtk::Image** images;
73 Glib::ustring** labels;
74 Gtk::ToggleToolButton** buttons;
75 };
77 } //namespace Dialogs
78 } //namespace UI
79 } //namespace Inkscape
83 #endif // SEEN_ICON_PREVIEW_H