Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: OS X - preferences menu and pdf files



Hi.

You need an aedt:

#include "CarbonEvents.h"
#include "AppleEvents.h"

resource 'aedt' (1002)
{
{
kCoreEventClass, kHICommandPreferences, cPreferences /*your command
number for prefs*/;
}
};
Enabling/disabling:

#if qCarbon
if( HasAquaMenuLayout_AC())
{
::EnableMenuCommand( NULL, kHICommandPreferences);
}
else
#endif
{
::Enable( cPreferences, !lowSpace);
}

And perhaps this disgusting hack if you don't want duplicate menubar
resources:

if (HasAquaMenuLayout_AC())
{
MenuRef menu = MAGetMenu(mFile);
if (menu) {
short item = ::CountMenuItems(menu);
::DeleteMenuItem(menu, item); // quit item
::DeleteMenuItem(menu, item-1); // the divider
}

menu = MAGetMenu(mEdit);
if (menu) {
short item = ::CountMenuItems(menu);
::DeleteMenuItem(menu, item); // quit item
::DeleteMenuItem(menu, item-1); // the divider
}
}
/OlaM

> ----------
> From: Alan Dail
> Sent: Monday, May 27, 2002 16:45 PM
> To: email@hidden
> Subject: OS X - preferences menu and pdf files
>
> Hi all,
>
> I've ported an app from MacApp 3.3.1 to MacApp r15.1.1. Mostly
> everything is working now. One thing I haven't figured out is how to
> get the app to use the Preferences menu item in the application menu.
> It is disabled and I can't find any reference to it in the MacApp
> sources. How do I turn on this menu item?
>
> The other thing that I'll need to do in this app is generate .pdf files
> from our views. Has anyone done this before? I want to set it up so
> that drawing into my TView subclass generates a .pdf, just like you draw
> into the TView to print. I expect this will be an OS X only feature.
> Any pointers on how to do this would be appreciated.
>
> Alan Dail
> _______________________________________________
> macapp-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/macapp-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
macapp-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macapp-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.