/////////////////////////////////////////////////////////////////////////////
-// Name: src/osx/carbon/toolbar.cpp
+// Name: src/osx/cocoa/toolbar.mm
// Purpose: wxToolBar
// Author: Stefan Csomor
// Modified by:
// Created: 04/01/98
-// RCS-ID: $Id: toolbar.cpp 54954 2008-08-03 11:27:03Z VZ $
+// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
- (id)initWithItemIdentifier: (NSString*) identifier
{
- [super initWithItemIdentifier:identifier];
+ self = [super initWithItemIdentifier:identifier];
impl = NULL;
[self setTarget: self];
[self setAction: @selector(clickedAction:)];
- (id)initWithFrame:(NSRect)frame
{
- [super initWithFrame:frame];
+ self = [super initWithFrame:frame];
impl = NULL;
[self setTarget: self];
[self setAction: @selector(clickedAction:)];
[tlw setToolbar:(NSToolbar*) m_macToolbar];
[(NSToolbar*) m_macToolbar setVisible:YES];
- m_peer->Move(0,0,0,0 );
+ GetPeer()->Move(0,0,0,0 );
SetSize( wxSIZE_AUTO_WIDTH, 0 );
- m_peer->SetVisibility( false );
+ GetPeer()->SetVisibility( false );
wxToolBarBase::Show( false );
}
}
bResult = true;
[(NSToolbar*) m_macToolbar setVisible:NO];
MacUninstallNativeToolbar();
- m_peer->SetVisibility( true );
+ GetPeer()->SetVisibility( true );
}
}
// find the maximum tool width and height
// and the number of stretchable items
- unsigned numStretchableSpaces = 0;
+ int numStretchableSpaces = 0;
wxToolBarTool *tool;
wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
while ( node )
dc.GradientFillLinear( rect , wxColour( 0xCC,0xCC,0xCC ), wxColour( 0xA8,0xA8,0xA8 ) , wxSOUTH );
dc.SetPen( wxPen( wxColour( 0x51,0x51,0x51 ) ) );
- dc.DrawRectangle(rect);
+ if ( HasFlag(wxTB_LEFT) )
+ dc.DrawLine(w-1, 0, w-1, h);
+ else if ( HasFlag(wxTB_RIGHT) )
+ dc.DrawLine(0, 0, 0, h);
+ else if ( HasFlag(wxTB_BOTTOM) )
+ dc.DrawLine(0, 0, w, 0);
+ else if ( HasFlag(wxTB_TOP) )
+ dc.DrawLine(0, h-1, w, h-1);
}
-
}
event.Skip();
}