GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

fontselection.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00025 00026 #ifndef GFC_GTK_FONT_SELECTION_HH 00027 #define GFC_GTK_FONT_SELECTION_HH 00028 00029 #ifndef GFC_GTK_VBOX_HH 00030 #include <gfc/gtk/box.hh> 00031 #endif 00032 00033 #ifndef GFC_GTK_DIALOG_HH 00034 #include <gfc/gtk/dialog.hh> 00035 #endif 00036 00037 #ifndef __GTK_FONTSEL_H__ 00038 #include <gtk/gtkfontsel.h> 00039 #endif 00040 00041 namespace GFC { 00042 00043 namespace Pango { 00044 class FontFace; 00045 class FontFamily; 00046 } 00047 00048 namespace Gtk { 00049 00050 class Button; 00051 class Entry; 00052 class Label; 00053 00064 00065 class FontSelection : public VBox 00066 { 00067 friend class G::Object; 00068 00069 FontSelection(const FontSelection&); 00070 FontSelection& operator=(const FontSelection&); 00071 00072 protected: 00075 00076 explicit FontSelection(GtkFontSelection *font_selection, bool owns_reference = false); 00083 00085 00086 public: 00089 00090 FontSelection(); 00092 00093 virtual ~FontSelection(); 00095 00099 00100 GtkFontSelection* gtk_font_selection() const; 00102 00103 operator GtkFontSelection* () const; 00105 00106 Entry* size_entry() const; 00108 00109 Entry* preview_entry() const; 00111 00112 Pango::FontFamily* get_font_family() const; 00114 00115 Pango::FontFace* get_font_face() const; 00117 00118 String get_font_name() const; 00120 00121 String get_preview_text() const; 00123 00127 00128 bool set_font_name(const char *fontname); 00129 bool set_font_name(const String& fontname); 00133 00134 void set_preview_text(const char *text); 00135 void set_preview_text(const String& text); 00138 00140 }; 00141 00149 00150 class FontSelectionDialog : public Dialog 00151 { 00152 friend class G::Object; 00153 00154 FontSelectionDialog(const FontSelectionDialog&); 00155 FontSelectionDialog& operator=(const FontSelectionDialog&); 00156 00157 protected: 00160 00161 explicit FontSelectionDialog(GtkFontSelectionDialog *font_selection_dialog, bool owns_reference = false); 00168 00170 00171 public: 00174 00175 FontSelectionDialog(); 00177 00178 explicit FontSelectionDialog(const char *title); 00179 explicit FontSelectionDialog(const String& title); 00182 00183 virtual ~FontSelectionDialog(); 00185 00189 00190 GtkFontSelectionDialog* gtk_font_selection_dialog() const; 00192 00193 operator GtkFontSelectionDialog* () const; 00195 00196 FontSelection* fontsel() const; 00198 00199 Button* ok_button() const; 00201 00202 Button* apply_button() const; 00204 00205 Button* cancel_button() const; 00207 00208 String get_font_name() const; 00210 00211 String get_preview_text() const; 00213 00217 00218 bool set_font_name(const char *fontname); 00219 bool set_font_name(const String& fontname); 00223 00224 void set_preview_text(const char *text); 00225 void set_preview_text(const String& text); 00228 00230 }; 00231 00232 } // namespace Gtk 00233 00234 } // namespace GFC 00235 00236 #include <gfc/gtk/inline/fontselection.inl> 00237 00238 #endif // GFC_GTK_FONT_SELECTION_HH 00239

Generated on Tue Aug 24 00:34:31 2004 for GFC-UI by doxygen 1.3.8