~mc.../inkscape/inkscape

« back to all changes in this revision

Viewing changes to src/dialogs/iconpreview.h

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
15
 
 
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>
 
22
 
 
23
#include "ui/widget/panel.h"
 
24
 
 
25
struct SPObject;
 
26
 
 
27
namespace Inkscape {
 
28
namespace UI {
 
29
namespace Dialogs {
 
30
 
 
31
 
 
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);
 
40
 
 
41
    static IconPreviewPanel& getInstance();
 
42
 
 
43
    void refreshPreview();
 
44
    void modeToggled();
 
45
 
 
46
private:
 
47
    IconPreviewPanel(IconPreviewPanel const &); // no copy
 
48
    IconPreviewPanel &operator=(IconPreviewPanel const &); // no assign
 
49
 
 
50
 
 
51
    void on_button_clicked(int which);
 
52
    void renderPreview( SPObject* obj );
 
53
    void updateMagnify();
 
54
 
 
55
    static IconPreviewPanel* instance;
 
56
 
 
57
    Gtk::Tooltips   tips;
 
58
 
 
59
    Gtk::VBox       iconBox;
 
60
    Gtk::HPaned     splitter;
 
61
 
 
62
    int hot;
 
63
    int numEntries;
 
64
    int* sizes;
 
65
 
 
66
    Gtk::Image      magnified;
 
67
    Gtk::Label      magLabel;
 
68
 
 
69
    Gtk::Button           *refreshButton;
 
70
    Gtk::ToggleButton     *selectionButton;
 
71
 
 
72
    guchar** pixMem;
 
73
    Gtk::Image** images;
 
74
    Glib::ustring** labels;
 
75
    Gtk::ToggleToolButton** buttons;
 
76
};
 
77
 
 
78
} //namespace Dialogs
 
79
} //namespace UI
 
80
} //namespace Inkscape
 
81
 
 
82
 
 
83
 
 
84
#endif // SEEN_ICON_PREVIEW_H