1 /** @file
2 * @brief A simple dialog for previewing icon representation.
3 */
4 /* Authors:
5 * Jon A. Cruz
6 * Bob Jamison
7 * Other dudes from The Inkscape Organization
8 *
9 * Copyright (C) 2004,2005 The Inkscape Organization
10 *
11 * Released under GNU GPL, read the file 'COPYING' for more information
12 */
14 #ifndef SEEN_ICON_PREVIEW_H
15 #define SEEN_ICON_PREVIEW_H
17 #include <gtkmm/box.h>
18 #include <gtkmm/button.h>
19 #include <gtkmm/label.h>
20 #include <gtkmm/paned.h>
21 #include <gtkmm/image.h>
22 #include <gtkmm/togglebutton.h>
23 #include <gtkmm/toggletoolbutton.h>
25 #include "ui/widget/panel.h"
27 struct SPObject;
29 namespace Inkscape {
30 namespace UI {
31 namespace Dialogs {
34 /**
35 * A panel that displays an icon preview
36 */
37 class IconPreviewPanel : public UI::Widget::Panel
38 {
39 public:
40 IconPreviewPanel();
41 //IconPreviewPanel(Glib::ustring const &label);
43 static IconPreviewPanel& getInstance();
45 void refreshPreview();
46 void modeToggled();
48 private:
49 IconPreviewPanel(IconPreviewPanel const &); // no copy
50 IconPreviewPanel &operator=(IconPreviewPanel const &); // no assign
53 void on_button_clicked(int which);
54 void renderPreview( SPObject* obj );
55 void updateMagnify();
57 Gtk::Tooltips tips;
59 Gtk::VBox iconBox;
60 Gtk::HPaned splitter;
62 int hot;
63 int numEntries;
64 int* sizes;
66 Gtk::Image magnified;
67 Gtk::Label magLabel;
69 Gtk::Button *refreshButton;
70 Gtk::ToggleButton *selectionButton;
72 guchar** pixMem;
73 Gtk::Image** images;
74 Glib::ustring** labels;
75 Gtk::ToggleToolButton** buttons;
76 };
78 } //namespace Dialogs
79 } //namespace UI
80 } //namespace Inkscape
84 #endif // SEEN_ICON_PREVIEW_H