]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/private/messagetype.h
d60aaba9ee0d0a25a2ae992c922ca30f8ca31062
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/private/messagetype.h
3 // Purpose: translate between wx and GtkMessageType
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _GTK_PRIVATE_MSGTYPE_H_
12 #define _GTK_PRIVATE_MSGTYPE_H_
19 // Convert the given wx style to GtkMessageType, return true if succeeded or
21 inline bool ConvertMessageTypeFromWX(int style
, GtkMessageType
*type
)
24 if ( gtk_check_version(2, 10, 0) == NULL
&& (style
& wxICON_NONE
))
25 *type
= GTK_MESSAGE_OTHER
;
27 #endif // __WXGTK210__
28 if (style
& wxICON_EXCLAMATION
)
29 *type
= GTK_MESSAGE_WARNING
;
30 else if (style
& wxICON_ERROR
)
31 *type
= GTK_MESSAGE_ERROR
;
32 else if (style
& wxICON_INFORMATION
)
33 *type
= GTK_MESSAGE_INFO
;
34 else if (style
& wxICON_QUESTION
)
35 *type
= GTK_MESSAGE_QUESTION
;
42 } // namespace wxGTKImpl
44 #endif // _GTK_PRIVATE_MSGTYPE_H_