wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) :
wxMacPortSaver( (GrafPtr) GetWindowPort((WindowRef) win->MacGetTopLevelWindowRef()) )
{
- m_newPort =(GrafPtr) GetWindowPort((WindowRef) win->MacGetTopLevelWindowRef()) ;
+ m_newPort = (GrafPtr) GetWindowPort((WindowRef) win->MacGetTopLevelWindowRef()) ;
m_formerClip = NewRgn() ;
m_newClip = NewRgn() ;
GetClip( m_formerClip ) ;
-
+
if ( win )
{
// guard against half constructed objects, this just leads to a empty clip
- if( win->GetPeer() )
+ if ( win->GetPeer() )
{
int x = 0 , y = 0;
win->MacWindowToRootWindow( &x,&y ) ;
wxMacWindowClipper( win )
{
// the port is already set at this point
- m_newPort =(GrafPtr) GetWindowPort((WindowRef) win->MacGetTopLevelWindowRef()) ;
+ m_newPort = (GrafPtr) GetWindowPort((WindowRef) win->MacGetTopLevelWindowRef()) ;
GetThemeDrawingState( &m_themeDrawingState ) ;
}
m_dc = dc ;
// dc->MacSetupPort(&m_ph) ;
}
+
wxMacPortSetter::~wxMacPortSetter()
{
// m_dc->MacCleanupPort(&m_ph) ;
CGContextRestoreGState( m_cgContext ) ;
CGContextRestoreGState( m_cgContext ) ;
}
+
if ( m_qdPort )
CGContextRelease( m_cgContext ) ;
}
void wxMacCGContext::Clip( const wxRegion ®ion )
{
-// ClipCGContextToRegion ( m_cgContext, &bounds , (RgnHandle) dc->m_macCurrentClipRgn ) ;
+// ClipCGContextToRegion ( m_cgContext, &bounds , (RgnHandle) dc->m_macCurrentClipRgn ) ;
}
void wxMacCGContext::StrokePath( const wxGraphicPath *p )
{
const wxMacCGPath* path = dynamic_cast< const wxMacCGPath*>( p ) ;
CGPathDrawingMode mode = m_mode ;
+
if ( fillStyle == wxODDEVEN_RULE )
{
if ( mode == kCGPathFill )
else if ( mode == kCGPathFillStroke )
mode = kCGPathEOFillStroke ;
}
+
CGContextAddPath( m_cgContext , path->GetPath() ) ;
CGContextDrawPath( m_cgContext , mode ) ;
}
CGContextRef wxMacCGContext::GetNativeContext()
{
- if( m_cgContext == NULL )
+ if ( m_cgContext == NULL )
{
Rect bounds ;
GetPortBounds( (CGrafPtr) m_qdPort , &bounds ) ;
SetPen( m_pen ) ;
SetBrush( m_brush ) ;
}
+
return m_cgContext ;
}
class wxMacCGPattern
{
public :
- wxMacCGPattern()
- {
- }
-
+ wxMacCGPattern() {}
+
// is guaranteed to be called only with a non-Null CGContextRef
virtual void Render( CGContextRef ctxRef ) = 0 ;
operator CGPatternRef() const { return m_patternRef ; }
+
protected :
virtual ~wxMacCGPattern()
{
- // as this is called only when our m_patternRef is been released, don't release
- // it again
+ // as this is called only when our m_patternRef is been released;
+ // don't release it again
}
-
+
static void _Render( void *info, CGContextRef ctxRef )
{
wxMacCGPattern* self = (wxMacCGPattern*) info ;
if ( self && ctxRef )
self->Render( ctxRef ) ;
}
-
+
static void _Dispose( void *info )
{
wxMacCGPattern* self = (wxMacCGPattern*) info ;
delete self ;
}
-
+
CGPatternRef m_patternRef ;
static const CGPatternCallbacks ms_Callbacks ;
ImagePattern( CGImageRef image , CGAffineTransform transform )
{
if ( image )
- {
CFRetain( image ) ;
- }
+
Init( image , transform ) ;
}
kCGPatternTilingNoDistortion, true , &wxMacCGPattern::ms_Callbacks ) ;
}
}
-
+
~ImagePattern()
{
if ( m_image )
CGImageRelease( m_image ) ;
}
+
CGImageRef m_image ;
CGRect m_imageBounds ;
} ;
virtual void Render( CGContextRef ctxRef )
{
- switch( m_hatch )
+ switch ( m_hatch )
{
case wxBDIAGONAL_HATCH :
{
StrokeLineSegments( ctxRef , pts , 2 ) ;
}
break ;
+
case wxCROSSDIAG_HATCH :
{
CGPoint pts[] = {
StrokeLineSegments( ctxRef , pts , 4 ) ;
}
break ;
+
case wxFDIAGONAL_HATCH :
{
CGPoint pts[] = {
StrokeLineSegments( ctxRef , pts , 2 ) ;
}
break ;
+
case wxCROSS_HATCH :
{
CGPoint pts[] = {
StrokeLineSegments( ctxRef , pts , 4 ) ;
}
break ;
+
case wxHORIZONTAL_HATCH :
{
CGPoint pts[] = {
StrokeLineSegments( ctxRef , pts , 2 ) ;
}
break ;
+
case wxVERTICAL_HATCH :
{
CGPoint pts[] = {
}
protected :
- ~HatchPattern()
- {
- }
+ ~HatchPattern() {}
+
int m_hatch ;
CGRect m_imageBounds ;
} ;
{
m_mode = kCGPathFill ;
}
+
if ( stroke )
{
RGBColor col = MAC_WXCOLORREF( pen.GetColour().GetPixel() ) ;
CGContextSetLineWidth( m_cgContext , penWidth ) ;
CGLineCap cap ;
- switch( pen.GetCap() )
+ switch ( pen.GetCap() )
{
case wxCAP_ROUND :
cap = kCGLineCapRound ;
}
CGLineJoin join ;
- switch( pen.GetJoin() )
+ switch ( pen.GetJoin() )
{
case wxJOIN_BEVEL :
join = kCGLineJoinBevel ;
const float dotted_dashed[] = { 9.0 , 6.0 , 3.0 , 3.0 };
- switch( pen.GetStyle() )
+ switch ( pen.GetStyle() )
{
case wxSOLID :
break ;
+
case wxDOT :
lengths = dotted ;
count = WXSIZEOF(dotted);
break ;
+
case wxLONG_DASH :
lengths = dashed ;
count = WXSIZEOF(dashed) ;
break ;
+
case wxSHORT_DASH :
lengths = short_dashed ;
count = WXSIZEOF(short_dashed) ;
break ;
+
case wxDOT_DASH :
lengths = dotted_dashed ;
count = WXSIZEOF(dotted_dashed);
break ;
+
case wxUSER_DASH :
wxDash *dashes ;
count = pen.GetDashes( &dashes ) ;
}
lengths = userLengths ;
break ;
+
case wxSTIPPLE :
{
float alphaArray[1] = { 1.0 } ;
}
}
break ;
+
default :
{
wxMacCFRefHolder<CGColorSpaceRef> patternSpace( CGColorSpaceCreatePattern( wxMacGetGenericRGBColorSpace() ) ) ;
{
CGContextSetLineDash( m_cgContext , 0 , NULL , 0 ) ;
}
+
CGContextSetLineCap( m_cgContext , cap ) ;
delete[] userLengths ;
}
+
if ( fill && stroke )
{
m_mode = kCGPathFillStroke ;
}
m_mode = kCGPathFill ;
}
+
if ( stroke )
- {
m_mode = kCGPathStroke ;
- }
+
if ( fill && stroke )
- {
m_mode = kCGPathFillStroke ;
- }
}
}
CGContextAddRect(c, rect);
return;
}
+
CGContextSaveGState(c);
CGContextTranslateCTM(c, CGRectGetMinX(rect), CGRectGetMinY(rect));
CGContextScaleCTM(c, ovalWidth, ovalHeight);
wxDC::wxDC()
{
- m_ok = FALSE;
- m_colour = TRUE;
+ m_ok = false;
+ m_colour = true;
m_mm_to_pix_x = mm2pt;
m_mm_to_pix_y = mm2pt;
m_userScaleY = 1.0;
m_scaleX = 1.0;
m_scaleY = 1.0;
- m_needComputeScaleX = FALSE;
- m_needComputeScaleY = FALSE;
+ m_needComputeScaleX = false;
+ m_needComputeScaleY = false;
- m_ok = FALSE ;
+ m_ok = false ;
m_macPort = 0 ;
m_macLocalOrigin.x = m_macLocalOrigin.y = 0 ;
m_graphicContext = NULL ;
}
-wxDC::~wxDC(void)
+wxDC::~wxDC()
{
- if( m_macATSUIStyle )
+ if ( m_macATSUIStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUIStyle);
m_macATSUIStyle = NULL ;
// SetRectRgn( (RgnHandle) m_macCurrentClipRgn , xx , yy , xx + ww , yy + hh ) ;
// SectRgn( (RgnHandle) m_macCurrentClipRgn , (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ;
- if( m_clipping )
+ if ( m_clipping )
{
m_clipX1 = wxMax( m_clipX1 , xx );
m_clipY1 = wxMax( m_clipY1 , yy );
}
else
{
- m_clipping = TRUE;
+ m_clipping = true;
m_clipX1 = xx;
m_clipY1 = yy;
m_clipX2 = xx + ww;
DestroyClippingRegion();
return;
}
+
wxCoord x, y, w, h;
region.GetBox( x, y, w, h );
wxCoord xx, yy, ww, hh;
}
SectRgn( (RgnHandle) m_macCurrentClipRgn , (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ;
*/
- if( m_clipping )
+ if ( m_clipping )
{
m_clipX1 = wxMax( m_clipX1 , xx );
m_clipY1 = wxMax( m_clipY1 , yy );
}
else
{
- m_clipping = TRUE;
+ m_clipping = true;
m_clipX1 = xx;
m_clipY1 = yy;
m_clipX2 = xx + ww;
CGContextSaveGState( cgContext );
m_graphicContext->SetPen( m_pen ) ;
m_graphicContext->SetBrush( m_brush ) ;
- m_clipping = FALSE;
+ m_clipping = false;
}
void wxDC::DoGetSizeMM( int* width, int* height ) const
case wxMM_TWIPS:
SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y );
break;
+
case wxMM_POINTS:
SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y );
break;
+
case wxMM_METRIC:
SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y );
break;
+
case wxMM_LOMETRIC:
SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 );
break;
- default:
+
case wxMM_TEXT:
+ default:
SetLogicalScale( 1.0, 1.0 );
break;
}
+
if (mode != wxMM_TEXT)
{
- m_needComputeScaleX = TRUE;
- m_needComputeScaleY = TRUE;
+ m_needComputeScaleX =
+ m_needComputeScaleY = true;
}
}
m_scaleY = m_logicalScaleY * m_userScaleY;
m_deviceOriginX = m_externalDeviceOriginX;
m_deviceOriginY = m_externalDeviceOriginY;
+
// CMB: if scale has changed call SetPen to recalulate the line width
if (m_scaleX != origScaleX || m_scaleY != origScaleY)
{
// this is a bit artificial, but we need to force wxDC to think
// the pen has changed
wxPen pen(GetPen());
+
m_pen = wxNullPen;
SetPen(pen);
}
{
if ( m_pen == pen )
return ;
+
m_pen = pen;
if ( m_graphicContext )
{
{
if (m_brush == brush)
return;
+
m_brush = brush;
if ( m_graphicContext )
{
{
if (m_backgroundBrush == brush)
return;
+
m_backgroundBrush = brush;
if (!m_backgroundBrush.Ok())
return;
{
if (m_logicalFunction == function)
return;
+
m_logicalFunction = function ;
}
col->Set( colour.red >> 8,
colour.green >> 8,
colour.blue >> 8);
+
return true ;
}
path->AddLineToPoint( x2 , y2 ) ;
}
+
m_graphicContext->StrokePath( path ) ;
delete path ;
}
path->AddLineToPoint( x2 , y2 ) ;
}
+
if ( x1 != x2 || y1 != y2 )
- {
path->AddLineToPoint( x1,y1 ) ;
- }
+
path->CloseSubpath() ;
m_graphicContext->DrawPath( path , fillStyle ) ;
delete path ;
// CMB: draw nothing if transformed w or h is 0
if (ww == 0 || hh == 0)
return;
+
// CMB: handle -ve width and/or height
if (ww < 0)
{
hh = -hh;
yy = yy - hh;
}
+
wxGraphicPath* path = m_graphicContext->CreatePath() ;
path->AddRectangle( xx , yy , ww , hh ) ;
m_graphicContext->DrawPath( path ) ;
if ( m_logicalFunction != wxCOPY )
return ;
-
if (radius < 0.0)
radius = - radius * ((width < height) ? width : height);
wxCoord xx = XLOG2DEVMAC(x);
// CMB: draw nothing if transformed w or h is 0
if (ww == 0 || hh == 0)
return;
+
// CMB: handle -ve width and/or height
if (ww < 0)
{
hh = -hh;
yy = yy - hh;
}
+
wxMacCGContext* mctx = ((wxMacCGContext*) m_graphicContext) ;
CGContextRef ctx = mctx->GetNativeContext() ;
AddRoundedRectToPath( ctx , CGRectMake( xx , yy , ww , hh ) , 16 ,16 ) ;
// CMB: draw nothing if transformed w or h is 0
if (ww == 0 || hh == 0)
return;
+
// CMB: handle -ve width and/or height
if (ww < 0)
{
wxCHECK_MSG(Ok(), false, wxT("wxDC::DoBlit Illegal dc"));
wxCHECK_MSG(source->Ok(), false, wxT("wxDC::DoBlit Illegal source DC"));
if ( logical_func == wxNO_OP )
- return TRUE ;
+ return true ;
+
if (xsrcMask == -1 && ysrcMask == -1)
{
- xsrcMask = xsrc; ysrcMask = ysrc;
+ xsrcMask = xsrc;
+ ysrcMask = ysrc;
}
wxCoord yysrc = source->YLOG2DEVMAC(ysrc) ;
blit = wxNullBitmap ;
}
}
+
if ( blit.Ok() )
{
CGContextRef cg = ((wxMacCGContext*)(m_graphicContext))->GetNativeContext() ;
HIViewDrawCGImage( cg , &r , image ) ;
CGImageRelease( image ) ;
}
-
}
else
{
CGContextRef cg = (wxMacCGContext*)(source->GetGraphicContext())->GetNativeContext() ;
void *data = CGBitmapContextGetData( cg ) ;
*/
- return FALSE ; // wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts") ) ;
+ return false ; // wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts") ) ;
}
- return TRUE;
+
+ return true;
}
void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
if ( str.Length() == 0 )
return ;
-
if ( m_logicalFunction != wxCOPY )
return ;
CalcBoundingBox(XDEV2LOG(rect.right), YDEV2LOG(rect.bottom) );
::ATSUDisposeTextLayout(atsuLayout);
+
#if SIZEOF_WCHAR_T == 4
free( ubuf ) ;
#endif
#endif
#endif
-
status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) ubuf , 0 , chars , chars , 1 ,
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
}
}
-
bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
{
wxCHECK_MSG(Ok(), false, wxT("Invalid DC"));
#endif
#endif
- OSStatus status;
+ OSStatus status;
status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) ubuf , 0 , chars , chars , 1 ,
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
- for ( int pos = 0; pos < (int)chars; pos ++ ) {
- unsigned long actualNumberOfBounds = 0;
- ATSTrapezoid glyphBounds;
-
- // We get a single bound, since the text should only require one. If it requires more, there is an issue
- OSStatus result;
- result = ATSUGetGlyphBounds( atsuLayout, 0, 0, kATSUFromTextBeginning, pos + 1, kATSUseDeviceOrigins, 1, &glyphBounds, &actualNumberOfBounds );
- if (result != noErr || actualNumberOfBounds != 1 )
- {
- return false;
- }
-
- widths[pos] = XDEV2LOGREL(FixedToInt( glyphBounds.upperRight.x - glyphBounds.upperLeft.x ));
- //unsigned char uch = s[i];
-
- }
+ for ( int pos = 0; pos < (int)chars; pos ++ )
+ {
+ unsigned long actualNumberOfBounds = 0;
+ ATSTrapezoid glyphBounds;
+
+ // We get a single bound, since the text should only require one. If it requires more, there is an issue
+ OSStatus result;
+ result = ATSUGetGlyphBounds( atsuLayout, 0, 0, kATSUFromTextBeginning, pos + 1,
+ kATSUseDeviceOrigins, 1, &glyphBounds, &actualNumberOfBounds );
+ if (result != noErr || actualNumberOfBounds != 1 )
+ return false;
+
+ widths[pos] = XDEV2LOGREL(FixedToInt( glyphBounds.upperRight.x - glyphBounds.upperLeft.x ));
+ //unsigned char uch = s[i];
+ }
+
::ATSUDisposeTextLayout(atsuLayout);
return true;
}
else
#endif
{
- RGBColor color;
+ RGBColor color;
GetThemeBrushAsColor( m_backgroundBrush.MacGetTheme(), 32, true, &color );
CGContextSetRGBFillColor( cg, (float) color.red / 65536,
- (float) color.green / 65536, (float) color.blue / 65536, 1 );
- CGContextFillRect( cg, rect );
+ (float) color.green / 65536, (float) color.blue / 65536, 1 );
+ CGContextFillRect( cg, rect );
}
// reset to normal value
RGBColor col = MAC_WXCOLORREF( GetBrush().GetColour().GetPixel() ) ;
CGContextSetRGBFillColor( cg, col.red / 65536.0, col.green / 65536.0, col.blue / 65536.0, 1.0 );
}
- break ;
+ break ;
+
case kwxMacBrushThemeBackground :
{
wxFAIL_MSG( wxT("There shouldn't be theme backgrounds under Quartz") ) ;
HIThemeApplyBackground( &rect , &drawInfo, cg ,
kHIThemeOrientationNormal) ;
}
- else
#endif
- {
- }
}
- break ;
+ break ;
+
case kwxMacBrushColour :
- {
- RGBColor col = MAC_WXCOLORREF( m_backgroundBrush.GetColour().GetPixel()) ;
- CGContextSetRGBFillColor( cg , col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 ) ;
- CGContextFillRect(cg, rect);
+ {
+ RGBColor col = MAC_WXCOLORREF( m_backgroundBrush.GetColour().GetPixel()) ;
+ CGContextSetRGBFillColor( cg , col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 ) ;
+ CGContextFillRect(cg, rect);
- // reset to normal value
- col = MAC_WXCOLORREF( GetBrush().GetColour().GetPixel() ) ;
- CGContextSetRGBFillColor( cg , col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 ) ;
- }
- break ;
+ // reset to normal value
+ col = MAC_WXCOLORREF( GetBrush().GetColour().GetPixel() ) ;
+ CGContextSetRGBFillColor( cg , col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 ) ;
+ }
+ break ;
+
+ default
+ break ;
}
}
}
{
wxCHECK_RET(Ok(), wxT("Invalid DC"));
- if( m_macATSUIStyle )
+ if ( m_macATSUIStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUIStyle);
m_macATSUIStyle = NULL ;
LRESULT style = ::SendMessage(GetHwnd(), TB_GETSTYLE, 0, 0L);
if ( !(style & TBSTYLE_FLAT) )
- {
::SendMessage(GetHwnd(), TB_SETSTYLE, 0, style | TBSTYLE_FLAT);
- }
}
#endif // wxUSE_UXTHEME
}
CacheBestSize(sizeBest);
+
return sizeBest;
}
(style & ~wxBORDER_MASK) | wxBORDER_NONE, exstyle
);
- // always include this one, it never hurts and setting it later only if we
- // do have tooltips wouldn't work
+ // always include this one, it never hurts and setting it later
+ // only if we do have tooltips wouldn't work
msStyle |= TBSTYLE_TOOLTIPS;
if ( style & (wxTB_FLAT | wxTB_HORZ_LAYOUT) )
if ( tool->IsControl() )
{
nButtonsToDelete = ((wxToolBarTool *)tool)->GetSeparatorsCount();
-
width *= nButtonsToDelete;
}
}
InvalidateBestSize();
+
return true;
}
{
const size_t nTools = GetToolsCount();
if ( nTools == 0 )
- {
// nothing to do
return true;
- }
const bool isVertical = HasFlag(wxTB_VERTICAL);
{
const wxString& label = tool->GetLabel();
if ( !label.empty() )
- {
button.iString = (int)label.c_str();
- }
}
button.idCommand = tool->GetId();
button.fsStyle = TBSTYLE_CHECK;
break;
+ case wxITEM_NORMAL:
+ button.fsStyle = TBSTYLE_BUTTON;
+ break;
+
default:
wxFAIL_MSG( _T("unexpected toolbar button kind") );
- // fall through
-
- case wxITEM_NORMAL:
button.fsStyle = TBSTYLE_BUTTON;
+ break;
}
bitmapId++;
left = 0;
top = y;
- y += height + 2*GetMargins().y;
+ y += height + 2 * GetMargins().y;
}
else // horizontal toolbar
{
if ( !isVertical )
{
if ( m_maxRows == 0 )
- {
// if not set yet, only one row
SetRows(1);
- }
}
else if ( m_nButtons > 0 ) // vertical non empty toolbar
{
if ( m_maxRows == 0 )
- {
// if not set yet, have one column
SetRows(m_nButtons);
- }
}
InvalidateBestSize();
pt.x = x;
pt.y = y;
int index = (int)::SendMessage(GetHwnd(), TB_HITTEST, 0, (LPARAM)&pt);
+
// MBN: when the point ( x, y ) is close to the toolbar border
// TB_HITTEST returns m_nButtons ( not -1 )
if ( index < 0 || (size_t)index >= m_nButtons )
- {
// it's a separator or there is no tool at all there
return (wxToolBarToolBase *)NULL;
- }
// when TB_SETBUTTONINFO is available (both during compile- and run-time),
// we don't use the dummy separators hack
// we must also refresh the frame after the toolbar size (possibly) changed
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
if ( frame )
- {
frame->SendSizeEvent();
- }
}
// ----------------------------------------------------------------------------
bool wxToolBar::HandlePaint(WXWPARAM wParam, WXLPARAM lParam)
{
- // erase any dummy separators which we used for aligning the controls if
- // any here
+ // erase any dummy separators which were used
+ // for aligning the controls if any here
- // first of all, do we have any controls at all?
+ // first of all, are there any controls at all?
wxToolBarToolsList::compatibility_iterator node;
for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
{
}
if ( !node )
- {
// no controls, nothing to erase
return false;
- }
// prepare the DC on which we'll be drawing
wxClientDC dc(this);
RECT r;
if ( !::GetUpdateRect(GetHwnd(), &r, FALSE) )
- {
// nothing to redraw anyhow
return false;
- }
wxRect rectUpdate;
wxCopyRECTToRect(r, rectUpdate);
wxToolBarToolBase* tool = FindToolForPosition( x, y );
// cursor left current tool
- if( tool != m_pInTool && !tool )
+ if ( tool != m_pInTool && !tool )
{
m_pInTool = 0;
OnMouseEnter( -1 );
}
// cursor entered a tool
- if( tool != m_pInTool && tool )
+ if ( tool != m_pInTool && tool )
{
m_pInTool = tool;
OnMouseEnter( tool->GetId() );
if ( HandlePaint(wParam, lParam) )
return 0;
#endif
+
+ default:
+ break;
}
return wxControl::MSWWindowProc(nMsg, wParam, lParam);
#endif // 0
}
-#endif // wxUSE_TOOLBAR && Win95
+#endif // wxUSE_TOOLBAR