Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Menus

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa
Mac Cocoa  
Author Message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Fri Nov 28, 2008 9:56 pm    Post subject: Menus Reply with quote

sonsothunder.com - Creating a Standalone StatusItem Menu

"This tutorial will show you how to create a StatusItem menu that will be
available to all applications in the menu bar.

When you are done, you will have a simple menu that will appear on its own
in the menubar as a "universal" background application, and will contain two
menu items that let you enter a string into the Console and Quit itself."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Jun 27, 2020 4:01 pm    Post subject: Reply with quote

wwdc - Build with iOS pickers, menus and actions

"Build iPhone and iPad apps with fluid interfaces and easily-accessible
contextual information. We'll show you how to integrate the latest UIKit
controls into your app to best take advantage of menus, date pickers,
page controls, and segmented controllers. Learn how to adopt Menus
throughly your user interface, and explore how UIAction can help unify
your event handling. Once you've learned about these new controls,
watch 'Design with iOS pickers, menus and actions' to discover how to
design great interfaces with these tools and APIs."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Sep 15, 2020 5:27 pm    Post subject: Reply with quote

so - Is there an equivalent technique in Cocoa for the synchronous TrackPopupMenu in Windows?

"It appears that popUpContextMenu is already synchronous. Since I didn't see
a way to use NSMenu without having it send a notification to an NSView I came
up with a scheme that instantiates a temporary NSView. The goal is to display
a popup menu and return the selected item in the context of a single function
call."


Code:
NSEvent* event = [NSEvent otherEventWithType:NSApplicationDefined
                     location:wp
                     modifierFlags:NSApplicationDefined
                     timestamp: (NSTimeInterval) 0
                     windowNumber: windowNumber
                     context: [NSGraphicsContext currentContext]
                     subtype:0
                     data1: 0
                     data2: 0];
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Sep 15, 2020 5:30 pm    Post subject: Reply with quote

so - Looking for popUpMenuPositioningItem:atLocation:inView: equivalent for 10.5

"If view is nil, the location is interpreted in the screen coordinate system. This
allows you to pop up a menu disconnected from any window."


Code:
 NSPopUpButtonCell* button = [[NSPopUpButtonCell alloc] initTextCell:@""
                                                           pullsDown:NO];
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Mon Sep 02, 2024 10:26 pm    Post subject: Reply with quote

ADC - AppKit Release Notes for macOS 14

"In macOS 14, menus have been reimplemented from the ground up to fully
use AppKit."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group