Code

f70423702a862fe3d4eac399343a285bfb66d805
[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  *
10  * Copyright (C) 2002 Lauris Kaplinski
11  *
12  * Released under GNU GPL, read the file 'COPYING' for more information
13  */
15 #include <glib.h>
17 #include "icon-size.h"
19 #define SP_TYPE_ICON (sp_icon_get_type ())
20 #define SP_ICON(o) (GTK_CHECK_CAST ((o), SP_TYPE_ICON, SPIcon))
21 #define SP_IS_ICON(o) (GTK_CHECK_TYPE ((o), SP_TYPE_ICON))
23 #include <gtk/gtkwidget.h>
25 struct SPIcon {
26     GtkWidget widget;
28     Inkscape::IconSize lsize;
29     int psize;
30     gchar *name;
32     GdkPixbuf *pb;
33 };
35 struct SPIconClass {
36     GtkWidgetClass parent_class;
37 };
39 GType sp_icon_get_type (void);
41 GtkWidget *sp_icon_new( Inkscape::IconSize size, const gchar *name );
43 #include <glibmm/ustring.h>
44 #include <gtkmm/widget.h>
46 // Might return a wrapped SPIcon, or Gtk::Image
47 Gtk::Widget *sp_icon_get_icon( const Glib::ustring &oid, Inkscape::IconSize size = Inkscape::ICON_SIZE_BUTTON );
49 void sp_icon_fetch_pixbuf( SPIcon *icon );
50 int sp_icon_get_phys_size(int size);
52 namespace Inkscape {
53     void queueIconPrerender( Glib::ustring const &oid, Inkscape::IconSize size = Inkscape::ICON_SIZE_BUTTON );
54 }
56 #endif // SEEN_SP_ICON_H