+void AGAApplyThemeBackground(ThemeBackgroundKind inKind,
+ const Rect * bounds,
+ ThemeDrawState inState,
+ SInt16 inDepth,
+ Boolean inColorDev)
+{
+}
+
+#endif
+AGAPortHelper::AGAPortHelper( GrafPtr newport)
+{
+ GetPort( &port ) ;
+ SetPort( newport ) ;
+// wxASSERT( newport->portRect.left == 0 && newport->portRect.top == 0 ) ;
+ GetPenState( &oldPenState ) ;
+ GetBackColor( &oldBackColor ) ;
+ GetForeColor( &oldForeColor ) ;
+
+ clip = NewRgn() ;
+ GetClip( clip );
+ font = GetPortTextFont( newport);
+ size = GetPortTextSize( newport);
+ style = GetPortTextFace( newport);
+ mode = GetPortTextMode( newport);
+ nport = newport ;
+
+}
+AGAPortHelper::AGAPortHelper()
+{
+ clip = NULL ;
+}
+void AGAPortHelper::Setup( GrafPtr newport )
+{
+ GetPort( &port ) ;
+ SetPort( newport ) ;
+// wxASSERT( newport->portRect.left == 0 && newport->portRect.top == 0 ) ;
+ GetPenState( &oldPenState ) ;
+ GetBackColor( &oldBackColor ) ;
+ GetForeColor( &oldForeColor ) ;
+
+ clip = NewRgn() ;
+ GetClip( clip );
+ font = GetPortTextFont( newport);
+ size = GetPortTextSize( newport);
+ style = GetPortTextFace( newport);
+ mode = GetPortTextMode( newport);
+ nport = newport ;
+}
+void AGAPortHelper::Clear()
+{
+ if ( clip )
+ {
+ DisposeRgn( clip ) ;
+ clip = NULL ;
+ }
+}
+AGAPortHelper::~AGAPortHelper()
+{
+ if ( clip )
+ {
+ SetPort( nport ) ;
+ SetClip( clip ) ;
+ DisposeRgn( clip ) ;
+ RGBForeColor(&oldForeColor);
+ RGBBackColor(&oldBackColor);
+ SetPenState(&oldPenState);
+
+ TextFont( font );
+ TextSize( size );
+ TextFace( style );
+ TextMode( mode );
+ SetPort( port ) ;
+ }
+}