2 /* This file is part of
3 * =================================================
5 * LyX, The Document Processor
6 * Copyright 1995-2000 The LyX Team.
8 * ================================================= */
10 #ifndef GNOME_HELPERS_H
11 #define GNOME_HELPERS_H
18 #include <glade/glade-xml.h>
21 // Glade Helper Function.
24 /** This function will get a widget from the glade XML representation and
25 * will wrap it into the gtk--/gnome-- representation.
28 T* getWidgetPtr(GladeXML* xml, char const * name)
30 T* result = static_cast<T*>(Gtk::wrap_auto((GtkObject*)glade_xml_get_widget(xml, name)));
33 lyxerr << "** ERROR **: unable to load widget: " << name << endl;
34 g_assert(result != NULL);
41 /** Takes a Gdk::Font object reference and returns the name associated
42 * with the font it holds.
44 string get_font_name(Gdk_Font const & font);
47 /** Takes a GdkFont pointer and returns the name associated with the font
48 * it holds. It returns a newly allocated gchar* string.
50 * This function was lifted from e-font.c from the gabber package.
52 gchar * get_font_name(GdkFont const * font);