Code

moving trunk for module inkscape
[inkscape.git] / src / dialogs / iconpreview.h
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/toggletoolbutton.h>
23 #include "ui/widget/panel.h"
25 struct SPObject;
27 namespace Inkscape {
28 namespace UI {
29 namespace Dialogs {
32 /**
33  * A panel that displays an icon preview
34  */
35 class IconPreviewPanel : public Inkscape::UI::Widget::Panel
36 {
37 public:
38     IconPreviewPanel();
39     //IconPreviewPanel(Glib::ustring const &label);
41     static IconPreviewPanel& getInstance();
43     void refreshPreview();
44     void modeToggled();
46 private:
47     IconPreviewPanel(IconPreviewPanel const &); // no copy
48     IconPreviewPanel &operator=(IconPreviewPanel const &); // no assign
51     void on_button_clicked(int which);
52     void renderPreview( SPObject* obj );
53     void updateMagnify();
55     static IconPreviewPanel* instance;
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