Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSClipViewMBS.autoscroll(theEvent as NSEventMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Scrolls the receiver proportionally to theEvent's distance outside of it.
Notes:
theEvent's location should be expressed in the window's base coordinate system (which it normally is), not the receiving NSClipView's. Returns true if any scrolling is performed; otherwise returns false.

Never invoke this method directly; instead, the NSClipView's document view should repeatedly send itself autoscroll: messages when the cursor is dragged outside the NSClipView's frame during a modal event loop initiated by a mouse-down event. The NSView class implements autoscroll to forward the message to the receiver's superview; thus the message is ultimately forwarded to the NSClipView.

Feedback, Comments & Corrections

NSClipViewMBS.backgroundColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: The color of the receiver's background.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

NSClipViewMBS.constrainScrollPoint(newOrigin as NSPointMBS) as NSPointMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns a scroll point adjusted from proposedNewOrigin, if necessary, to guarantee the receiver will still lie within its document view.
Notes: For example, if proposedNewOrigin's y coordinate lies to the left of the document view's origin, then the y coordinate returned is set to that of the document view's origin.

Feedback, Comments & Corrections

NSClipViewMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Creates a new clipview with the given size and position.
Example:
dim x as new NSClipViewMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSClipViewMBS.Constructor(Handle as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Creates an object based on the given NSClipView handle.
Example:
dim t as new NSClipViewMBS(0, 0, 100, 100)
dim v as new NSClipViewMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)
Notes: The handle is casted to a NSClipView and the plugin retains this handle.

See also:

Feedback, Comments & Corrections

NSClipViewMBS.Constructor(left as Double, top as Double, width as Double, height as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Creates a new NSClipView with the given size and position.
Example:
dim x as new NSClipViewMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSClipViewMBS.copiesOnScroll as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Whether the receiver copies rendered images while scrolling.
Notes:
If true, the receiver copies the existing rendered image to its new location while scrolling and only draws exposed portions of its document view. If false, the receiver always forces its document view to draw itself on scrolling.
(Read and Write computed property)

Feedback, Comments & Corrections

NSClipViewMBS.documentCursor as NSCursorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: The cursor object used over the receiver.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

NSClipViewMBS.documentRect as NSRectMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns the rectangle defining the document view's frame, adjusted to the size of the receiver if the document view is smaller.
Notes:
In other words, this rectangle is always at least as large as the receiver itself.

The document rectangle is used in conjunction with an NSClipView's bounds rectangle to determine values for the indicators of relative position and size between the NSClipView and its document view. For example, NSScrollView uses these rectangles to set the size and position of the knobs in its scrollers. When the document view is much larger than the NSClipView, the knob is small; when the document view is near the same size, the knob is large; and when the document view is the same size or smaller, there is no knob.

Feedback, Comments & Corrections

NSClipViewMBS.documentView as NSViewMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: The document view.
Notes:
Gets or sets the receiver's document view. On set removes any previous document view, and sets the origin of the receiver's bounds rectangle to the origin of the new view's frame rectangle.

If the receiver is contained in an NSScrollView, you should set the NSScrollView DocumentView instead, so it can perform whatever updating it needs.

In the process of setting the document view, this method registers the receiver for the notifications NSViewFrameDidChangeNotification and NSViewBoundsDidChangeNotification, adjusts the key view loop to include the new document view, and updates a parent NSScrollView's display if needed using reflectScrolledClipView.
(Read and Write computed property)

Feedback, Comments & Corrections

NSClipViewMBS.documentVisibleRect as NSRectMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns the exposed rectangle of the receiver's document view, in the document view's own coordinate system.
Notes: Note that this rectangle doesn't reflect the effects of any clipping that may occur above the NSClipView itself. To get the portion of the document view that's guaranteed to be visible, send it a visibleRect message.

Feedback, Comments & Corrections

NSClipViewMBS.drawsBackground as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Whether the receiver draws its background color.
Notes:
If your NSClipView is enclosed in an NSScrollView, you should set the DrawsBackground on the NSScrollView.
(Read and Write computed property)

Feedback, Comments & Corrections

NSClipViewMBS.reflectScrolledClipView(clipView as NSClipViewMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Adjusts the receiver's scrollers to reflect the size and positioning of its content view.

Feedback, Comments & Corrections

NSClipViewMBS.scrollClipView(clipview as NSClipViewMBS, toPoint as NSPointMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Notifies the superview of a clip view that the clip view needs to reset the origin of its bounds rectangle.

Feedback, Comments & Corrections

NSClipViewMBS.scrollToPoint(newOrigin as NSPointMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Changes the origin of the receiver's bounds rectangle to newOrigin.

Feedback, Comments & Corrections

NSClipViewMBS.viewBoundsChanged(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Handles an NSViewBoundsDidChangeNotification, passed in the aNotification argument, by updating a containing NSScrollView based on the new bounds.

Feedback, Comments & Corrections

NSClipViewMBS.viewFrameChanged(notification as NSNotificationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 11.3 Yes No No Yes, macOS only No
Function: Handles an NSViewFrameDidChangeNotification, passed in the aNotification argument, by updating a containing NSScrollView based on the new frame.

Feedback, Comments & Corrections

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





Links
MBS Xojo blog