17 #ifndef MESSAGEDIALOG_H_ 18 #define MESSAGEDIALOG_H_ 41 MessageDialog(GtkWidget *parent, GtkDialogFlags flags, GtkMessageType whichType, GtkButtonsType buttonsType,
const char *text) {
42 widget=gtk_message_dialog_new(GTK_WINDOW(parent), flags, whichType, buttonsType,
"%s", text);
52 MessageDialog(GtkWidget *parent, GtkDialogFlags flags, GtkMessageType whichType, GtkButtonsType buttonsType,
string &text) {
53 widget=gtk_message_dialog_new(GTK_WINDOW(parent), flags, whichType, buttonsType,
"%s", text.c_str());
63 MessageDialog(GtkWidget *parent, GtkDialogFlags flags, GtkMessageType whichType, GtkButtonsType buttonsType,
Pango &pango) {
66 widget=gtk_message_dialog_new(GTK_WINDOW(parent), flags, whichType, buttonsType, NULL);
67 gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(
widget), pango.
getMarkup().c_str());
73 gtk_widget_destroy(
widget);
99 gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(
widget), pango.
getMarkup().c_str());
100 cout<<
"created"<<endl;
107 gtk_dialog_run(GTK_DIALOG(
widget));
122 gtk_window_set_title(GTK_WINDOW(
widget), text.c_str());
136 MessageInfo(GtkWidget *win,
char *text) :
MessageDialog(win, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, text) {
148 MessageInfo(GtkWidget *win,
string text) :
MessageDialog(win, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, text) {
179 MessageError(GtkWidget *win,
char *text) :
MessageDialog(win, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, text) {
190 MessageError(GtkWidget *win,
string text) :
MessageDialog(win, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, text) {
290 #endif // MESSAGEDIALOG_H_ MessageQuestion(GtkWidget *win, char *text)
MessageWarning(GtkWidget *win, Pango &pango)
MessageDialog & operator<<(Pango &pango)
MessageInfo(GtkWidget *win, char *text)
MessageDialog(GtkWidget *parent, GtkDialogFlags flags, GtkMessageType whichType, GtkButtonsType buttonsType, Pango &pango)
MessageInfo(GtkWidget *win, string text)
MessageWarning(Pango &pango)
MessageError(GtkWidget *win, char *text)
MessageInfo(Pango &pango)
MessageWarning(char *text)
MessageInfo(GtkWidget *win, Pango &pango)
MessageDialog(GtkWidget *parent, GtkDialogFlags flags, GtkMessageType whichType, GtkButtonsType buttonsType, const char *text)
MessageError(Pango &pango)
MessageError(GtkWidget *win, string text)
MessageWarning(GtkWidget *win, string text)
MessageQuestion(string text)
MessageWarning(GtkWidget *win, char *text)
MessageQuestion(Pango &pango)
MessageQuestion(GtkWidget *win, string text)
MessageDialog & operator<<(char *str)
MessageDialog(GtkWidget *parent, GtkDialogFlags flags, GtkMessageType whichType, GtkButtonsType buttonsType, string &text)
MessageWarning(string text)
MessageError(string text)
MessageError(GtkWidget *win, Pango &pango)
MessageQuestion(GtkWidget *win, Pango &pango)
MessageQuestion(char *text)
MessageDialog & operator<<(string str)