X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fgnome%2Fgnome_helpers.h;h=8f63fd1d63cbe3b209b600581e7c4ddff1497f8d;hb=3e39bef2c13125023f3b72532d90575bbe307335;hp=c67ef97175f1e895bf410884a639d0a1399ac787;hpb=bed3713ff0e1c9c28c64bc802ffc8c7011fab164;p=lyx.git diff --git a/src/frontends/gnome/gnome_helpers.h b/src/frontends/gnome/gnome_helpers.h index c67ef97175..8f63fd1d63 100644 --- a/src/frontends/gnome/gnome_helpers.h +++ b/src/frontends/gnome/gnome_helpers.h @@ -1,7 +1,7 @@ // -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * @@ -18,10 +18,15 @@ #include #include -// Glade Helper Function. +// Glade Helper Function. + + +/** This function will get a widget from the glade XML representation and + * will wrap it into the gtk--/gnome-- representation. + */ template -T* getWidgetPtr(GladeXML* xml, const char* name) -{ +T* getWidgetPtr(GladeXML* xml, char const * name) +{ T* result = static_cast(Gtk::wrap_auto((GtkObject*)glade_xml_get_widget(xml, name))); if (result == NULL) { @@ -31,6 +36,19 @@ T* getWidgetPtr(GladeXML* xml, const char* name) return result; } +class Gdk_Font; +/** Takes a Gdk::Font object reference and returns the name associated + * with the font it holds. + */ +string get_font_name(Gdk_Font const & font); + + +/** Takes a GdkFont pointer and returns the name associated with the font + * it holds. It returns a newly allocated gchar* string. + * + * This function was lifted from e-font.c from the gabber package. + */ +gchar * get_font_name(GdkFont const * font); #endif