return 0 ;
{
- AGAPortHelper help((**theControl).contrlOwner) ;
+ wxMacPortStateHelper help((**theControl).contrlOwner) ;
AGASetFontStyle( &info->fontStyle ) ;
Boolean mRadioBehavior = false ;
return 0 ;
{
- AGAPortHelper help((**theControl).contrlOwner) ;
+ wxMacPortStateHelper help((**theControl).contrlOwner) ;
AGASetFontStyle( &info->fontStyle ) ;
Boolean mRadioBehavior = false ;
return 0 ;
{
- AGAPortHelper help((**theControl).contrlOwner) ;
+ wxMacPortStateHelper help((**theControl).contrlOwner) ;
Rect frame = (**theControl).contrlRect ;
Boolean hasColor = true;
Boolean disabled = (*theControl)->contrlHilite == 255 ;
return 0 ;
{
- AGAPortHelper help() ;
+ wxMacPortStateHelper help() ;
Rect frame = (**theControl).contrlRect ;
Boolean hasColor = true;
Boolean disabled = (*theControl)->contrlHilite == 255 ;
{
bool disabled = false ;
bool hasColor = true ;
- AGAPortHelper help((**theControl).contrlOwner) ;
+ wxMacPortStateHelper help((**theControl).contrlOwner) ;
AGASetFontStyle( &info->fontStyle ) ;
FontInfo fi ;
::GetFontInfo( &fi ) ;
return 0 ;
{
- AGAPortHelper help((**theControl).contrlOwner) ;
+ wxMacPortStateHelper help((**theControl).contrlOwner) ;
AGASetFontStyle( &info->fontStyle ) ;
int x = (**theControl).contrlRect.left ;
int y = (**theControl).contrlRect.top ;
{
case initCntl :
{
- AGAPortHelper help((**theControl).contrlOwner) ;
+ wxMacPortStateHelper help((**theControl).contrlOwner) ;
SetPort( (**theControl).contrlOwner ) ;
::TextFont( kFontIDGeneva ) ;
::TextSize( 10 ) ;
break ;
case drawCntl :
{
- AGAPortHelper help((**theControl).contrlOwner) ;
+ wxMacPortStateHelper help((**theControl).contrlOwner) ;
AGASetFontStyle( &info->fontStyle ) ;
SetPort( (**theControl).contrlOwner ) ;
RGBBackColor( &gAGARamp[ kAGAWhite ] ) ;
break ;
case kControlMsgKeyDown :
{
- AGAPortHelper help( (**theControl).contrlOwner ) ;
+ wxMacPortStateHelper help( (**theControl).contrlOwner ) ;
AGASetFontStyle( &info->fontStyle ) ;
RGBBackColor( &gAGARamp[ kAGAWhite ] ) ;
RGBForeColor( &gAGARamp[ kAGABlack ] ) ;
break ;
case drawCntl :
{
- AGAPortHelper help((**theControl).contrlOwner) ;
+ wxMacPortStateHelper help((**theControl).contrlOwner) ;
AGASetFontStyle( &info->fontStyle ) ;
RGBBackColor( &gAGARamp[ kAGAWhite ] ) ;
EraseRect( &(**theControl).contrlRect ) ;
// status in a theme savvy manner, pen mode, patterns and fonts
// attributes
-AGAPortHelper::AGAPortHelper( GrafPtr newport)
-{
- m_clip = NULL ;
- Setup( newport ) ;
-}
-AGAPortHelper::AGAPortHelper()
-{
- m_clip = NULL ;
-}
-
-void AGAPortHelper::Setup( GrafPtr newport )
-{
- GetPort( &m_oldPort ) ;
- SetPort( newport ) ;
- wxASSERT_MSG( m_clip == NULL , "Cannot call setup twice" ) ;
- m_clip = NewRgn() ;
- GetClip( m_clip );
- m_textFont = GetPortTextFont( newport);
- m_textSize = GetPortTextSize( newport);
- m_textStyle = GetPortTextFace( newport);
- m_textMode = GetPortTextMode( newport);
- GetThemeDrawingState( &m_drawingState ) ;
- m_currentPort = newport ;
-}
-void AGAPortHelper::Clear()
-{
- if ( m_clip )
- {
- DisposeRgn( m_clip ) ;
- DisposeThemeDrawingState( m_drawingState ) ;
- m_clip = NULL ;
- }
-}
-AGAPortHelper::~AGAPortHelper()
-{
- if ( m_clip )
- {
- SetPort( m_currentPort ) ;
- SetClip( m_clip ) ;
- DisposeRgn( m_clip ) ;
- TextFont( m_textFont );
- TextSize( m_textSize );
- TextFace( m_textStyle );
- TextMode( m_textMode );
- SetThemeDrawingState( m_drawingState , true ) ;
- SetPort( m_oldPort ) ;
- }
-}