/////////////////////////////////////////////////////////////////////////////
-// Name: cocoa/menu.cpp
+// Name: src/cocoa/menu.cpp
// Purpose: wxMenu and wxMenuBar implementation
// Author: David Elliott
// Modified by:
// Created: 2002/12/09
-// RCS-ID: $Id:
+// RCS-ID: $Id$
// Copyright: (c) 2002 David Elliott
// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------
#include "wx/wxprec.h"
+
+#include "wx/menu.h"
+
#ifndef WX_PRECOMP
- #include "wx/menu.h"
#include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/cocoa/string.h"
#import <Foundation/NSString.h>
-#import <AppKit/NSMenu.h>
+#include "wx/cocoa/objc/NSMenu.h"
#if wxUSE_MENUS
bool wxMenu::Create(const wxString& title, long style)
{
wxAutoNSAutoreleasePool pool;
- m_cocoaNSMenu = [[NSMenu alloc] initWithTitle: wxNSStringWithWxString(title)];
+ m_cocoaNSMenu = [[WXNSMenu alloc] initWithTitle: wxNSStringWithWxString(title)];
AssociateNSMenu(m_cocoaNSMenu);
return true;
}
return true;
}
-wxMenuBar::wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long WXUNUSED(style))
+wxMenuBar::wxMenuBar(size_t n,
+ wxMenu *menus[],
+ const wxString titles[],
+ long style)
{
Create(style);
- for(size_t i = 0; i < n; ++i )
+ for ( size_t i = 0; i < n; ++i )
Append(menus[i], titles[i]);
}