Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSPopoverMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa MBS MacControls Plugin 11.2 Yes No No Yes, macOS only No
Function: The Real Studio class for a pop-over.
Notes:
A popover is a unit of content that is positioned relative to some other content on the screen. An anchor is used to express the relation between these two units of content. Each popover has an appearance that specifies its visual characteristics, as well as a behavior that determines which user interactions will cause the popover to close. A transient popover is closed in response to most user interactions, whereas a semi-transient popovers is closed when the user interacts with the window containing the popover's positioning view. Popovers with application-defined behavior are not usually closed on the developer's behalf. AppKit automatically positions each popover relative to its positioning view and moves the popover whenever its positioning view moves. A positioning rectangle within the positioning view can be specified for additional granularity. Popovers can be detached to become a separate window when they are dragged by implementing the appropriate delegate method.

Please also check the documentation from Apple for the NSPopover class.
Available in Mac OS X v10.7 and later.

Feedback, Comments & Corrections

Edge constants

Constant Value Description
MaxXEdge 2 right
MaxYEdge 3 top
(Cocoa coordinates have 0 on bottom of screen)
MinXEdge 0 left
MinYEdge 1 bottom
(Cocoa coordinates have 0 on bottom of screen)

Appearance Constants

Constant Value Description
NSPopoverAppearanceHUD 1 The popover will draw with a HUD appearance.
NSPopoverAppearanceMinimal 0 The popover will use a minimal appearance, currently a solid color border and a solid color fill (although this may change in the future). This is the default appearance.

Behavior modes

Constant Value Description
NSPopoverBehaviorApplicationDefined 0 Your application assumes responsibility for closing the popover. AppKit will still close the popover in a limited number of circumstances. For instance, AppKit will attempt to close the popover when the window of its positioningView is closed. The exact interactions in which AppKit will close the popover are not guaranteed. You may consider implementing -cancel: to close the popover when the escape key is pressed.
NSPopoverBehaviorSemitransient 2 AppKit will close the popover when the user interacts with user interface elements in the window containing the popover's positioning view. Semi-transient popovers cannot be shown relative to views in other popovers, nor can they be shown relative to views in child windows. The exact interactions that cause semi-transient popovers to close are not specified.
NSPopoverBehaviorTransient 1 AppKit will close the popover when the user interacts with a user interface element outside the popover. Note that interacting with menus or panels that become key only when needed will not cause a transient popover to close. The exact interactions that will cause transient popovers to close are not specified.

This class has no sub classes.

Some examples which use this class:


The items on this page are in the following plugins: MBS MacControls Plugin.


NSPointMBS   -   NSPopoverTouchBarItemMBS




Links
MBS Xojo Chart Plugins