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

label.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_LABEL_HH 00027 #define GFC_GTK_LABEL_HH 00028 00029 #ifndef GFC_GTK_MISC_HH 00030 #include <gfc/gtk/misc.hh> 00031 #endif 00032 00033 #ifndef __GTK_LABEL_H__ 00034 #include <gtk/gtklabel.h> 00035 #endif 00036 00037 namespace GFC { 00038 00039 namespace Pango { 00040 class AttrList; 00041 class Layout; 00042 } 00043 00044 namespace Gtk { 00045 00046 class Menu; 00047 00113 00114 class Label : public Misc 00115 { 00116 friend class G::Object; 00117 00118 Label(const Label&); 00119 Label& operator=(const Label&); 00120 00121 protected: 00124 00125 explicit Label(GtkLabel *label, bool owns_reference = false); 00132 00136 00137 typedef G::Signal<void, Menu&> PopulatePopupSignalType; 00138 typedef G::SignalProxy<TypeInstance, PopulatePopupSignalType> PopulatePopupSignalProxy; 00139 static const PopulatePopupSignalType populate_popup_signal; 00145 00147 00148 public: 00151 00152 Label(); 00154 00155 explicit Label(const char *str, bool use_underline = false); 00156 explicit Label(const String& str, bool use_underline = false); 00160 00161 virtual ~Label(); 00163 00167 00168 GtkLabel* gtk_label() const; 00170 00171 operator GtkLabel* () const; 00173 00174 String get_text() const; 00180 00181 Pointer<Pango::AttrList> get_attributes() const; 00187 00188 String get_label() const; 00192 00193 bool get_use_markup() const; 00196 00197 bool get_use_underline() const; 00200 00201 unsigned int get_mnemonic_keyval() const; 00205 00206 Widget* get_mnemonic_widget() const; 00209 00210 Justification get_justify() const; 00212 00213 bool get_line_wrap() const; 00215 00216 bool get_selectable() const; 00219 00220 void get_layout_offsets(int *x, int *y) const; 00232 00233 bool get_selection_bounds(int *start, int *end) const; 00238 00239 Pango::Layout* get_layout() const; 00246 00250 00251 void set_text(const char *str); 00252 void set_text(const String& str); 00257 00258 void set_attributes(Pango::AttrList *attrs); 00264 00265 void set_markup(const char *str); 00266 void set_markup(const String& str); 00270 00271 void set_label(const char *str); 00272 void set_label(const String& str); 00276 00277 void set_markup_with_mnemonic(const char *str); 00278 void set_markup_with_mnemonic(const String& str); 00287 00288 void set_mnemonic_widget(Widget *widget); 00301 00302 void set_text_with_mnemonic(const char *str); 00303 void set_text_with_mnemonic(const String& str); 00311 00312 void set_justify(Justification jtype); 00318 00319 void set_pattern(const char *pattern); 00320 void set_pattern(const String& pattern); 00326 00327 void set_line_wrap(bool wrap); 00334 00335 void set_selectable(bool setting); 00338 00339 void select_region(int start_offset, int end_offset); 00346 00347 void set_use_markup(bool setting); 00350 00351 void set_use_underline(bool setting); 00355 00359 00360 const PopulatePopupSignalProxy sig_populate_popup(); 00363 00365 }; 00366 00367 } // namespace Gtk 00368 00369 } // namespace GFC 00370 00371 #include <gfc/gtk/inline/label.inl> 00372 00373 #endif // GFC_GTK_LABEL_HH 00374 00375

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