]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/mbarman.mm
Move wxCocoa's wxFontRefData from the header to the implementation file.
[wxWidgets.git] / src / cocoa / mbarman.mm
index 74694bffdc66b4de6444beda1f6041ba1b7a0c1c..35e158a1bd72cdf64e4636f9fa5fb74c87d90307 100644 (file)
 #import <AppKit/NSApplication.h>
 #import <AppKit/NSWindow.h>
 
+#define wxUSE_FSCRIPT 0
+#if wxUSE_FSCRIPT
+    #import <FScript/FScriptMenuItem.h>
+#endif
+
 // Declare setAppleMenu: in an NSApplication category since Tiger and later
 // releases support it but don't declare it as it's considered deprecated.
 @interface NSApplication(wxDeprecatedMethodsWeWantToUse)
@@ -109,6 +114,17 @@ WX_IMPLEMENT_GET_OBJC_CLASS(wxMenuBarManagerObserver,NSObject)
 // ============================================================================
 wxMenuBarManager *wxMenuBarManager::sm_mbarmanInstance = NULL;
 
+static void AddFScriptItem(NSMenu *menu)
+#if wxUSE_FSCRIPT
+{
+    NSMenuItem *item = [[FScriptMenuItem alloc] init];
+    [menu addItem: item];
+    [item release];
+}
+#else
+{}
+#endif
+
 wxMenuBarManager::wxMenuBarManager()
 {
     m_observer = [[WX_GET_OBJC_CLASS(wxMenuBarManagerObserver) alloc]
@@ -149,6 +165,7 @@ wxMenuBarManager::wxMenuBarManager()
 
 /**/[m_menuApp addItemWithTitle:@"Preferences..." action:nil keyEquivalent:@""];
 /**/[m_menuApp addItem: [NSMenuItem separatorItem]];
+/**/AddFScriptItem(m_menuApp);
 /**/menuitem = [[NSMenuItem alloc] initWithTitle: @"Services" action:nil keyEquivalent:@""];
     [menuitem setSubmenu:m_menuServices];
     [m_menuApp addItem: menuitem];