]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Added headers that didn't get installed.
[wxWidgets.git] / src / common / utilscmn.cpp
index 5a91c57e8f68b3f78bececc9df01166d87b952cb..ff9c48807c6c3d026b21ba1be0c0f39a79a26410 100644 (file)
 #include "wx/process.h"
 #include "wx/txtstrm.h"
 
+#if defined(__WXWINCE__) && wxUSE_DATETIME
+#include "wx/datetime.h"
+#endif
+
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
     #include "wx/statusbr.h"
 #endif // wxUSE_GUI
 
+#ifndef __WXWINCE__
 #include <time.h>
+#else
+#include "wx/msw/wince/time.h"
+#endif
 
-#ifndef __MWERKS__
+#if !defined(__MWERKS__) && !defined(__WXWINCE__)
     #include <sys/types.h>
     #include <sys/stat.h>
 #endif
 
-#ifdef __SALFORDC__
-    #include <clib.h>
-#endif
-
 #ifdef __WXMSW__
     #include "wx/msw/private.h"
 #endif
@@ -259,10 +263,19 @@ wxString wxDecToHex(int dec)
 // Return the current date/time
 wxString wxNow()
 {
+#ifdef __WXWINCE__
+#if wxUSE_DATETIME
+    wxDateTime now = wxDateTime::Now();
+    return now.Format();
+#else
+    return wxEmptyString;
+#endif
+#else
     time_t now = time((time_t *) NULL);
     char *date = ctime(&now);
     date[24] = '\0';
     return wxString::FromAscii(date);
+#endif
 }
 
 const wxChar *wxGetInstallPrefix()
@@ -673,7 +686,7 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt)
     }
 #endif
 
-    wxWindowList::Node  *node = win->GetChildren().GetLast();
+    wxWindowList::compatibility_iterator node = win->GetChildren().GetLast();
     while (node)
     {
         wxWindow* child = node->GetData();
@@ -702,7 +715,7 @@ wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt)
     // Go backwards through the list since windows
     // on top are likely to have been appended most
     // recently.
-    wxWindowList::Node  *node = wxTopLevelWindows.GetLast();
+    wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetLast();
     while (node)
     {
         wxWindow* win = node->GetData();
@@ -837,7 +850,7 @@ wxFont wxGetFontFromUser(wxWindow *parent, const wxFont& fontInit)
 
 void wxEnableTopLevelWindows(bool enable)
 {
-    wxWindowList::Node *node;
+    wxWindowList::compatibility_iterator node;
     for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() )
         node->GetData()->Enable(enable);
 }
@@ -848,7 +861,7 @@ wxWindowDisabler::wxWindowDisabler(wxWindow *winToSkip)
     // don't reenable them later
     m_winDisabled = NULL;
 
-    wxWindowList::Node *node;
+    wxWindowList::compatibility_iterator node;
     for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() )
     {
         wxWindow *winTop = node->GetData();
@@ -874,7 +887,7 @@ wxWindowDisabler::wxWindowDisabler(wxWindow *winToSkip)
 
 wxWindowDisabler::~wxWindowDisabler()
 {
-    wxWindowList::Node *node;
+    wxWindowList::compatibility_iterator node;
     for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() )
     {
         wxWindow *winTop = node->GetData();