]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gnome/gnome_helpers.h
(John): translate dialog titles.
[lyx.git] / src / frontends / gnome / gnome_helpers.h
index c67ef97175f1e895bf410884a639d0a1399ac787..8f63fd1d63cbe3b209b600581e7c4ddff1497f8d 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * =================================================
- * 
+ *
  *          LyX, The Document Processor
  *          Copyright 1995-2000 The LyX Team.
  *
 #include <glade/glade-xml.h>
 #include <glib.h>
 
-// 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<class T>
-T* getWidgetPtr(GladeXML* xml, const char* name)
-{   
+T* getWidgetPtr(GladeXML* xml, char const * name)
+{
        T* result = static_cast<T*>(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