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

stock.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 00024 00025 #ifndef GFC_GTK_STOCK_HH 00026 #define GFC_GTK_STOCK_HH 00027 00028 #ifndef GFC_STACK_OBJECT_HH 00029 #include <gfc/stackobject.hh> 00030 #endif 00031 00032 #ifndef GFC_UTF_STRING_HH 00033 #include <gfc/utfstring.hh> 00034 #endif 00035 00036 #ifndef GFC_GDK_TYPES_HH 00037 #include <gfc/gdk/types.hh> 00038 #endif 00039 00040 #ifndef GFC_GTK_STOCK_ID_HH 00041 #include <gfc/gtk/stockid.hh> 00042 #endif 00043 00044 #ifndef _CPP_VECTOR 00045 #include <vector> 00046 #endif 00047 00048 namespace GFC { 00049 00050 namespace Gtk { 00051 00052 class AccelKey; 00053 00076 00077 class StockItem : public StackObject 00078 { 00079 GtkStockItem item_; 00080 00081 public: 00084 00085 StockItem(); 00087 00088 StockItem(const StockId& stock_id, const char *label, const char *domain = 0); 00089 StockItem(const StockId& stock_id, const String& label, const String& domain = 0); 00098 00099 StockItem(const StockId& stock_id, const char *label, const AccelKey& accel_key, const char *domain = 0); 00100 StockItem(const StockId& stock_id, const String& label, const AccelKey& accel_key, const String& domain = 0); 00110 00111 StockItem(const StockId& stock_id, const char *label, Gdk::ModifierTypeField modifier, unsigned int key, const char *domain = 0); 00112 StockItem(const StockId& stock_id, const String& label, Gdk::ModifierTypeField modifier, unsigned int key, const String& domain = 0); 00123 00124 StockItem(const StockItem& src); 00127 00128 ~StockItem(); 00130 00131 StockItem& operator=(const StockItem& src); 00135 00139 00140 GtkStockItem* gtk_stock_item() const; 00142 00143 StockId stock_id() const; 00145 00146 const char* label() const; 00148 00149 Gdk::ModifierTypeField modifier() const; 00151 00152 unsigned int keyval() const; 00154 00155 const char* translation_domain() const; 00157 00158 AccelKey accel_key() const; 00160 00164 00165 void set(const StockId& stock_id, const char *label, Gdk::ModifierTypeField modifier, unsigned int key, const char *domain); 00166 void set(const StockId& stock_id, const String& label, Gdk::ModifierTypeField modifier, unsigned int key, const String& domain); 00173 00175 }; 00176 00181 00182 class Stock 00183 { 00184 public: 00187 00188 static void add(const StockItem& item); 00194 00195 static bool lookup(const StockId& stock_id, StockItem& item); 00200 00201 static std::vector<StockId> list_ids(); 00204 00206 }; 00207 00208 } // namespace Gtk 00209 00210 } // namespace GFC 00211 00212 #include <gfc/gtk/inline/stock.inl> 00213 00214 #endif // GFC_GTK_STOCK_HH 00215

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