]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/utils.cpp
removed TTN_NEEDTEXT handlers, we don't use tooltips on demand
[wxWidgets.git] / src / x11 / utils.cpp
index 071f4f6b98cbe5a7c04e250a0ff4d49533f69c4a..aa03ce8a5b895d0328bead991e3b65783b2a5743 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        utils.cpp
+// Name:        src/x11/utils.cpp
 // Purpose:     Various utilities
 // Author:      Julian Smart
 // Modified by:
@@ -9,6 +9,13 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#if defined(__BORLANDC__)
+    #pragma hdrstop
+#endif
+
 // ============================================================================
 // declarations
 // ============================================================================
 // headers
 // ----------------------------------------------------------------------------
 
-#include "wx/setup.h"
 #include "wx/utils.h"
-#include "wx/app.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/window.h" // for wxTopLevelWindows
+#endif
+
 #include "wx/apptrait.h"
 #include "wx/msgdlg.h"
 #include "wx/cursor.h"
-#include "wx/window.h" // for wxTopLevelWindows
 
 #include <ctype.h>
 #include <stdarg.h>
@@ -73,8 +83,8 @@ void wxFlushEvents()
 
 bool wxCheckForInterrupt(wxWindow *wnd)
 {
-    wxASSERT_MSG(FALSE, wxT("wxCheckForInterrupt not yet implemented."));
-    return FALSE;
+    wxFAIL_MSG(wxT("wxCheckForInterrupt not yet implemented."));
+    return false;
 }
 
 // ----------------------------------------------------------------------------
@@ -136,7 +146,7 @@ void wxGetMousePosition( int* x, int* y )
 #endif
 };
 
-// Return TRUE if we have a colour display
+// Return true if we have a colour display
 bool wxColourDisplay()
 {
     return wxDisplayDepth() > 1;
@@ -198,11 +208,11 @@ bool wxSetDisplay(const wxString& display_name)
 {
     gs_displayName = display_name;
 
-    if ( display_name.IsEmpty() )
+    if ( display_name.empty() )
     {
         gs_currentDisplay = NULL;
 
-        return TRUE;
+        return true;
     }
     else
     {
@@ -211,10 +221,10 @@ bool wxSetDisplay(const wxString& display_name)
         if (display)
         {
             gs_currentDisplay = (WXDisplay*) display;
-            return TRUE;
+            return true;
         }
         else
-            return FALSE;
+            return false;
     }
 }
 
@@ -351,20 +361,20 @@ wxString wxGetXEventName(XEvent& event)
     return str;
 #else
     int type = event.xany.type;
-           static char* event_name[] = {
-               "", "unknown(-)",                                         // 0-1
-               "KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease", // 2-5
-               "MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn",  // 6-9
-               "FocusOut", "KeymapNotify", "Expose", "GraphicsExpose",   // 10-13
-               "NoExpose", "VisibilityNotify", "CreateNotify",           // 14-16
-               "DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest",// 17-20
-               "ReparentNotify", "ConfigureNotify", "ConfigureRequest",  // 21-23
-               "GravityNotify", "ResizeRequest", "CirculateNotify",      // 24-26
-               "CirculateRequest", "PropertyNotify", "SelectionClear",   // 27-29
-               "SelectionRequest", "SelectionNotify", "ColormapNotify",  // 30-32
-               "ClientMessage", "MappingNotify",                         // 33-34
-               "unknown(+)"};                                            // 35
-           type = wxMin(35, type); type = wxMax(1, type);
+    static char* event_name[] = {
+        "", "unknown(-)",                                         // 0-1
+        "KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease", // 2-5
+        "MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn",  // 6-9
+        "FocusOut", "KeymapNotify", "Expose", "GraphicsExpose",   // 10-13
+        "NoExpose", "VisibilityNotify", "CreateNotify",           // 14-16
+        "DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest",// 17-20
+        "ReparentNotify", "ConfigureNotify", "ConfigureRequest",  // 21-23
+        "GravityNotify", "ResizeRequest", "CirculateNotify",      // 24-26
+        "CirculateRequest", "PropertyNotify", "SelectionClear",   // 27-29
+        "SelectionRequest", "SelectionNotify", "ColormapNotify",  // 30-32
+        "ClientMessage", "MappingNotify",                         // 33-34
+        "unknown(+)"};                                            // 35
+        type = wxMin(35, type); type = wxMax(1, type);
         return wxString::FromAscii(event_name[type]);
 #endif
 }