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

messagedialog.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 00026 00027 #ifndef GFC_GTK_MESSAGE_DIALOG_HH 00028 #define GFC_GTK_MESSAGE_DIALOG_HH 00029 00030 #ifndef GFC_GTK_DIALOG_HH 00031 #include <gfc/gtk/dialog.hh> 00032 #endif 00033 00034 #ifndef __GTK_MESSAGE_DIALOG_H__ 00035 #include <gtk/gtkmessagedialog.h> 00036 #endif 00037 00038 namespace GFC { 00039 00040 namespace Gtk { 00041 00042 class MessageDialogClass; 00043 00046 00047 enum MessageType 00048 { 00049 MESSAGE_INFO = GTK_MESSAGE_INFO, 00050 MESSAGE_WARNING = GTK_MESSAGE_WARNING, 00051 MESSAGE_QUESTION = GTK_MESSAGE_QUESTION, 00052 MESSAGE_ERROR = GTK_MESSAGE_ERROR 00053 }; 00054 00058 00059 enum ButtonType 00060 { 00061 BUTTONS_NONE = GTK_BUTTONS_NONE, 00062 BUTTONS_OK = GTK_BUTTONS_OK, 00063 BUTTONS_CLOSE = GTK_BUTTONS_CLOSE, 00064 BUTTONS_CANCEL = GTK_BUTTONS_CANCEL, 00065 BUTTONS_YES_NO = GTK_BUTTONS_YES_NO, 00066 BUTTONS_OK_CANCEL = GTK_BUTTONS_OK_CANCEL 00067 }; 00068 00096 00097 class MessageDialog : public Dialog 00098 { 00099 friend class G::Object; 00100 00101 MessageDialog(const MessageDialog&); 00102 MessageDialog& operator=(const MessageDialog&); 00103 00104 protected: 00107 00108 explicit MessageDialog(GtkMessageDialog *dialog, bool owns_reference = false); 00115 00117 00118 public: 00121 00122 MessageDialog(Window *parent = 0, DialogFlagsField flags = DIALOG_DESTROY_WITH_PARENT); 00132 00133 MessageDialog(MessageType type, ButtonType buttons, Window *parent = 0, DialogFlagsField flags = DIALOG_DESTROY_WITH_PARENT); 00144 00145 MessageDialog(MessageType type, ButtonType buttons, const String& message, Window *parent = 0, DialogFlagsField flags = DIALOG_DESTROY_WITH_PARENT); 00156 00157 virtual ~MessageDialog(); 00159 00163 00164 GtkMessageDialog* gtk_message_dialog() const; 00166 00167 operator GtkMessageDialog* () const; 00169 00173 00174 void set_markup(const String& message); 00178 00179 void set_markup(const char *message_format, ...); 00184 00185 void set_message(const String& message); 00188 00189 void set_message(const char *message_format, ...); 00193 00195 }; 00196 00197 } // namespace Gtk 00198 00199 } // namespace GFC 00200 00201 #include <gfc/gtk/inline/messagedialog.inl> 00202 00203 #endif // GFC_GTK_MESSAGE_DIALOG_HH 00204

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