]> git.saurik.com Git - wxWidgets.git/commitdiff
added cw6 fixes and patrick's patches
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 10 Dec 2000 10:17:00 +0000 (10:17 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 10 Dec 2000 10:17:00 +0000 (10:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gdicmn.h
include/wx/mac/timer.h
include/wx/wx_cw.h
include/wx/wx_cw_cm.h
include/wx/wx_cw_d.h
include/wx/wx_cwc.h
include/wx/wx_cwc_d.h
src/mac/carbon/stattext.cpp
src/mac/carbon/timer.cpp
src/mac/stattext.cpp
src/mac/timer.cpp

index 7518f8aaf0610548ed6e362407634a43336c41c1..0f98d1ffa451fe3dc8e89bcdb3c9d53788e307a4 100644 (file)
@@ -167,7 +167,7 @@ enum wxStockCursor
 
 #if defined(__WXMSW__) || defined(__WXPM__)
     #define wxBITMAP(name) wxBitmap(#name, wxBITMAP_TYPE_RESOURCE)
-#elif defined(__WXGTK__) || defined(__WXMOTIF__)
+#elif defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
     // Initialize from an included XPM
     #define wxBITMAP(name) wxBitmap( (const char**) name##_xpm )
 #else // other platforms
index 1554893d8e0894ecfe9cc3ef6cf4d378001873b8..1c4469e9a55b759ab98c5d1e21a5f54d4753b800 100644 (file)
@@ -31,7 +31,8 @@ typedef struct MacTimerInfo
 class WXDLLEXPORT wxTimer: public wxTimerBase
 {
 public:
-    wxTimer();
+       wxTimer() { Init(); }
+       wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id) { Init(); }
     ~wxTimer();
 
     virtual bool Start(int milliseconds = -1,
@@ -41,7 +42,10 @@ public:
     virtual bool IsRunning() const ;
 
     MacTimerInfo m_info;
+protected :
+       void Init();
 private:
+
     DECLARE_ABSTRACT_CLASS(wxTimer)
 };
 
index 5480949118df0d0b9aa4bcd0500d31bacc0131d5..7b1e20dc9e4dd66b403ffb09dbde1d02747d9164 100644 (file)
 #ifndef _WX_CW__
 #define _WX_CW__
 
+#if __MWERKS__ >= 0x2400
+#pragma old_argmatch on
+#endif
+
 #if __option(profile)
 #ifdef __cplusplus
        #if __POWERPC__
index 3e25d4e8ce0c0606f3c792a2c3c5c8710522d485..a565d4a3f6703cc56d830a698e61d336b637c5eb 100644 (file)
@@ -6,6 +6,10 @@
 
 #define WX_COMP_INLINE_NO_CLASS // defined if the compiler does not want the classname repeated for inlines within a class definition
 
+#if __MWERKS__ >= 0x2400
+#pragma old_argmatch on
+#endif
+
 #if (__MWERKS__ < 0x0900) || macintosh
     #define __MAC__
     #define __WXMAC__
index 75a2a5ed2e8bc9ce0b2449c45e965e88165c8368..94d5dd1741efa3a2af319f1584a219b8cef1c07e 100644 (file)
 #ifndef _WX_CW__
 #define _WX_CW__
 
+#if __MWERKS__ >= 0x2400
+#pragma old_argmatch on
+#endif
+
 #if __option(profile)
 #error "profiling is not supported in debug versions"
 #else
index 830a0ca271b2dd29ac7cb1cc60e9560244dd1764..ea8911edf0d86bc3a51ba9eb3e8e205eaa29ee07 100644 (file)
 #ifndef _WX_CW__
 #define _WX_CW__
 
+#if __MWERKS__ >= 0x2400
+#pragma old_argmatch on
+#endif
+
 #if __option(profile)
 #ifdef __cplusplus
        #if __POWERPC__
index b5649cd4a0e303b4e6f91974bd84f36d030922b7..46a17bc2dc95ed75225d72667171a83199de30f2 100644 (file)
 #ifndef _WX_CW__
 #define _WX_CW__
 
+#if __MWERKS__ >= 0x2400
+#pragma old_argmatch on
+#endif
+
 #if __option(profile)
 #error "profiling is not supported in debug versions"
 #else
index 22653f651e02c6b0370599febc420f63e240260c..06d6fe9c3c1ec67031bb0c4a0af1fa889f3b17b4 100644 (file)
@@ -55,6 +55,9 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
 
 void wxStaticText::OnDraw( wxDC &dc )
 {
+    if (m_width <= 0 || m_height <= 0)
+        return;
+
     PrepareDC(dc);
     dc.Clear() ;
     
index 3d0bb31c08e718579e87b0449ec457dad83e404b..413523579111153602e0ceeeba29e163fa196fc8 100644 (file)
@@ -21,13 +21,13 @@ IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
 
 static void wxProcessTimer( unsigned long event , void *data ) ;
 
-pascal void MacTimerProc( TMTask * t )
+static pascal void MacTimerProc( TMTask * t )
 {
        MacTimerInfo * tm = (MacTimerInfo*)  t ;
        wxMacAddEvent( tm->m_table , wxProcessTimer, 0 , (void*) tm->m_timer , TRUE ) ;
 }
 
-void wxProcessTimer( unsigned long event , void *data )
+static void wxProcessTimer( unsigned long event , void *data )
 {
        if ( !data )
                return ;
@@ -44,7 +44,7 @@ void wxProcessTimer( unsigned long event , void *data )
     }
 }
 
-wxTimer::wxTimer()
+void wxTimer::Init()
 {
        m_info.m_task.tmAddr = NULL ;
        m_info.m_task.tmWakeUp = 0 ;
index 22653f651e02c6b0370599febc420f63e240260c..06d6fe9c3c1ec67031bb0c4a0af1fa889f3b17b4 100644 (file)
@@ -55,6 +55,9 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
 
 void wxStaticText::OnDraw( wxDC &dc )
 {
+    if (m_width <= 0 || m_height <= 0)
+        return;
+
     PrepareDC(dc);
     dc.Clear() ;
     
index 3d0bb31c08e718579e87b0449ec457dad83e404b..413523579111153602e0ceeeba29e163fa196fc8 100644 (file)
@@ -21,13 +21,13 @@ IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
 
 static void wxProcessTimer( unsigned long event , void *data ) ;
 
-pascal void MacTimerProc( TMTask * t )
+static pascal void MacTimerProc( TMTask * t )
 {
        MacTimerInfo * tm = (MacTimerInfo*)  t ;
        wxMacAddEvent( tm->m_table , wxProcessTimer, 0 , (void*) tm->m_timer , TRUE ) ;
 }
 
-void wxProcessTimer( unsigned long event , void *data )
+static void wxProcessTimer( unsigned long event , void *data )
 {
        if ( !data )
                return ;
@@ -44,7 +44,7 @@ void wxProcessTimer( unsigned long event , void *data )
     }
 }
 
-wxTimer::wxTimer()
+void wxTimer::Init()
 {
        m_info.m_task.tmAddr = NULL ;
        m_info.m_task.tmWakeUp = 0 ;