]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/aga.cpp
Removed a line of debug code that got left in
[wxWidgets.git] / src / mac / aga.cpp
index 58084028329c8d0ab1b4be354d3f8726e0c10425..9a752cbe6d9fe609844955e65a3f0605cfeef32e 100644 (file)
@@ -1,5 +1,6 @@
-#include <wx/mac/uma.h>
-#include <wx/mac/aga.h>
+#include "wx/dc.h"
+#include "wx/mac/uma.h"
+#include "wx/mac/aga.h"
 
 #if !TARGET_CARBON
 
@@ -13,26 +14,27 @@ pascal SInt32 AGAListControlDefProc (SInt16 procID, ControlHandle theControl, Co
 pascal SInt32 AGAEditTextDefProc (SInt16 procID, ControlHandle theControl, ControlDefProcMessage message, SInt32 param) ;
 pascal SInt32 AGAStaticGroupBoxTextDefProc (SInt16 procID, ControlHandle theControl, ControlDefProcMessage message, SInt32 param) ;
 
-#define B                                                                                                              13
-#define        W                                                                                                               0
+#define B   13
+#define        W   0
 
 SInt16 kAGARootControlProcID ;
 int gAGABackgroundColor = 0 ;
 
-const RGBColor gAGAColorArray[] = {    {0xFFFF, 0xFFFF, 0xFFFF},               //      W
-                                       {0xEEEE, 0xEEEE, 0xEEEE},       //      1
-                                       {0xDDDD, 0xDDDD, 0xDDDD},       //      2
-                                       {0xCCCC, 0xCCCC, 0xCCCC},       //      3
-                                       {0xBBBB, 0xBBBB, 0xBBBB},       //      4
-                                       {0xAAAA, 0xAAAA, 0xAAAA},       //      5
-                                       {0x9999, 0x9999, 0x9999},       //      6
-                                       {0x8888, 0x8888, 0x8888},               //      7
-                                       {0x7777, 0x7777, 0x7777},               //      8
-                                       {0x6666, 0x6666, 0x6666},               //      9
-                                       {0x5555, 0x5555, 0x5555},               //      10
-                                       {0x4444, 0x4444, 0x4444},               //      11
-                                       {0x2222, 0x2222, 0x2222},               //      12
-                                       {0x0000, 0x0000, 0x0000}                //      B
+const RGBColor gAGAColorArray[] = {
+  {0xFFFF, 0xFFFF, 0xFFFF},    //      W
+  {0xEEEE, 0xEEEE, 0xEEEE},    //      1
+  {0xDDDD, 0xDDDD, 0xDDDD},    //      2
+  {0xCCCC, 0xCCCC, 0xCCCC},    //      3
+  {0xBBBB, 0xBBBB, 0xBBBB},    //      4
+  {0xAAAA, 0xAAAA, 0xAAAA},    //      5
+  {0x9999, 0x9999, 0x9999},    //      6
+  {0x8888, 0x8888, 0x8888},    //      7
+  {0x7777, 0x7777, 0x7777},    //      8
+  {0x6666, 0x6666, 0x6666},    //      9
+  {0x5555, 0x5555, 0x5555},    //      10
+  {0x4444, 0x4444, 0x4444},    //      11
+  {0x2222, 0x2222, 0x2222},    //      12
+  {0x0000, 0x0000, 0x0000}     //      B
 };
 
 char LAGADefaultOutline_mCorners[4][5][5] =    {
@@ -2552,7 +2554,8 @@ void AGAApplyThemeBackground(ThemeBackgroundKind  inKind,
 {
 }
 
-#endif
+#endif // !TARGET_CARBON
+
 AGAPortHelper::AGAPortHelper( GrafPtr newport) 
 {
        GetPort( &port ) ;
@@ -2583,7 +2586,7 @@ void AGAPortHelper::Setup( GrafPtr newport )
        GetPenState( &oldPenState ) ;
        GetBackColor( &oldBackColor ) ;
        GetForeColor( &oldForeColor ) ;
-
+       wxASSERT( clip == NULL ) ;
        clip = NewRgn() ;
        GetClip( clip );
        font = GetPortTextFont( newport);
@@ -2605,6 +2608,7 @@ AGAPortHelper::~AGAPortHelper()
        if ( clip )
        {
                SetPort( nport ) ;
+               PenNormal() ;
                SetClip( clip ) ;
                DisposeRgn( clip ) ;
                RGBForeColor(&oldForeColor);