#pragma mark -
#pragma mark Tool Implementation
-#if wxOSX_USE_COCOA
-#define wxOSX_USE_NATIVE_TOOLBAR 1
-#endif
-
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
void UpdateLabel()
{
+#if wxOSX_USE_NATIVE_TOOLBAR
if ( m_toolbarItem )
{
// strip mnemonics from the label for compatibility with the usual
wxCFStringRef sh( GetShortHelp(), GetToolBarFontEncoding() );
[m_toolbarItem setToolTip:sh.AsNSString()];
}
+#endif
}
void Action()
#endif
};
+#if wxOSX_USE_NATIVE_TOOLBAR
+
@interface wxNSToolbarItem : NSToolbarItem
{
wxToolBarTool* impl;
@end
+#endif
+
@interface wxNSToolBarButton : NSButton
{
@end
+#if wxOSX_USE_NATIVE_TOOLBAR
+
@implementation wxNSToolbarItem
- (id)initWithItemIdentifier: (NSString*) identifier
@end
+#endif
+
@implementation wxNSToolBarButton
- (id)initWithFrame:(NSRect)frame
void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
{
- wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, FindById(id));
+ wxToolBarTool* tool = static_cast<wxToolBarTool*>(FindById(id));
if ( tool )
{
wxCHECK_RET( tool->IsButton(), wxT("Can only set bitmap on button tools."));
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
{
- wxToolBarTool* tool = wx_static_cast(wxToolBarTool*, FindById(id));
+ wxToolBarTool* tool = static_cast<wxToolBarTool*>(FindById(id));
if ( tool )
{
wxCHECK_RET( tool->IsButton(), wxT("Can only set bitmap on button tools."));
bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
{
- wxToolBarTool *tool = wx_static_cast( wxToolBarTool*, toolBase );
+ wxToolBarTool *tool = static_cast< wxToolBarTool*>(toolBase );
if (tool == NULL)
return false;
bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolbase)
{
- wxToolBarTool* tool = wx_static_cast( wxToolBarTool*, toolbase );
+ wxToolBarTool* tool = static_cast< wxToolBarTool*>(toolbase );
wxToolBarToolsList::compatibility_iterator node;
for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
{