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