Code

C++-ification.
[inkscape.git] / src / widgets / icon.h
1 #ifndef SEEN_SP_ICON_H
2 #define SEEN_SP_ICON_H
4 /*
5  * Generic icon widget
6  *
7  * Author:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *   Jon A. Cruz <jon@joncruz.org>
10  *
11  * Copyright (C) 2002 Lauris Kaplinski
12  * Copyright (C) 2010 Authors
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include <glib.h>
19 #include "icon-size.h"
21 #define SP_TYPE_ICON SPIcon::getType()
22 #define SP_ICON(o) (GTK_CHECK_CAST ((o), SP_TYPE_ICON, SPIcon))
23 #define SP_IS_ICON(o) (GTK_CHECK_TYPE ((o), SP_TYPE_ICON))
25 #include <gtk/gtkwidget.h>
27 struct SPIconClass {
28     GtkWidgetClass parent_class;
29 };
31 struct SPIcon {
32     GtkWidget widget;
34     Inkscape::IconSize lsize;
35     int psize;
36     gchar *name;
38     GdkPixbuf *pb;
40     static GType getType(void);
42     friend class SPIconImpl;
43 };
46 GtkWidget *sp_icon_new( Inkscape::IconSize size, const gchar *name );
48 #include <glibmm/ustring.h>
49 #include <gtkmm/widget.h>
51 // Might return a wrapped SPIcon, or Gtk::Image
52 Gtk::Widget *sp_icon_get_icon( const Glib::ustring &oid, Inkscape::IconSize size = Inkscape::ICON_SIZE_BUTTON );
54 void sp_icon_fetch_pixbuf( SPIcon *icon );
55 int sp_icon_get_phys_size(int size);
57 namespace Inkscape {
58     void queueIconPrerender( Glib::ustring const &oid, Inkscape::IconSize size = Inkscape::ICON_SIZE_BUTTON );
59 }
61 #endif // SEEN_SP_ICON_H
63 /*
64   Local Variables:
65   mode:c++
66   c-file-style:"stroustrup"
67   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
68   indent-tabs-mode:nil
69   fill-column:99
70   End:
71 */
72 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :