Module
macOS only! Some features are available for Windows too but physically located in User32Addition.
Overview | |
|
Sets the transparency value of a Window or a RectControl to a value similar to a Xojo Color Alpha value. Works like a property, which means both is valid:
Dim Alpha As Integer = Window1.Alpha
Canvas1.Alpha = 230
Use the MakeTransparent method on Windows for similar results.
An alternate image that appears on the button when the button is in an on state. Example:
me.AlternativeImage = myPicture
Like alternate image, but the template representation of the image is used. Example:
me.AlternativeTemplate = myPicture
The title that the button displays when the button is in an on state. Works like a property, which means from inside a pusbutton:
me.AlternateTitle = "Systems online"
Dim s as String = me.AlternateTitle
Brings a window to the foreground.
Assigns an containercontrol as a contentview to the item at the specified index of a popupmenu. Reset to normal cell by assigning Nil.
Draws the picture in the specified rectangle of the current CGGraphics context, with optional Blend Modes and opacity. Rest of the parameters are like graphics.DrawPicture. If g is defined, y values are inverted.
Like Picture.Draw in this mpdule, except for that the template representation of the picture is being used.
The image that appears on the menuitem when it’s in an off state, or nil if there should be no such image.
Use the Images method for Windows.
Assigns an image to item at index of a popupmenu.
Sets the image that appears on the button when it’s in an off state, or nil if there is no such image.
Scaling and Position are ignored on Windows.
This currently crashes the project under Windows silently when an image or template is assigned second time to a button – because of getting its handle, not because of the declare.
Sets the image of a segment to pic, using the specified scaling method.
A Boolean value that determines how the button’s image and title are positioned together within the button bezel. Available since macOS 10.12.
me.ImageHugsTitle = True"
Dim b as Boolean = me.ImageHugsTitle
Determines how image and title are placed inside a button cell.
me.ImagePosition = AppKitAddition.NSCellImagePosition.ImageLeft
Dim p as AppKitAddition.NSCellImagePosition = me.ImagePosition
Sets the offstate and onstate images for a menuitem. Here for compatibility with the Windows equivalent.
The scaling mode applied to make the cell’s image fit the frame of the image view.
me.ImageScaling = AppKitAddition.NSImageScaling.None
Dim s as AppKitAddition.NSImageScaling = me.ImageScaling
The image of the menuitem that indicates a "mixed” state.
Resizes a control to the size accomodating its content, if possible.
Currently available for Push- and RadioButtons on Windows.
Gets/sets the style of a popupmenu.
Identical to Image, only that here the template representation of the image is being used. (on Windows the ICON handle if possible)
This currently crashes the project under Windows silently when an image or template is assigned second time to a button – because of getting its handle, not because of the declare.
Identical to Image, only that here the template representation of the image is being used.
A style for the background appearance of a control. Values:
Value | Definition |
Normal | Normal appearance |
Emphasized | An appearance that makes the control visually more important. |
Raised | The background is intended to appear higher than the content drawn on it. |
Lowered | The background is intended to appear lower than the content drawn on it. |
Works together with ImagePosition, Image and Template methods. Values:
Value | Definition |
NoImage | Shows no image. Default value for a control. |
ImageOnly | Shows only the image, no text. |
ImageLeft | Image is Left of the text. Default for Image and Template methods. |
ImageRight | Image is positioned on the right side of the text. |
ImageAbove | Image is positioned above the text. |
ImageOverlaps | Image is centered and may overlap the text. |
Blend mode for the Picture.Draw… methods. See https://developer.apple.com/documentation/appkit/nscompositingoperation
Values for the ImageScaling methods:
Value | Definition |
ProportionallyDown | Image is scaled proportionally down to fit into the control. |
AxesIndependently | Image is scaled unproportionally to fit into the control. |
None | No scaling. Image may overlap or be cut. |
ProportionallyUpOrDown | Proportional scaling, upwards too if necessary. |
Value | Definition |
StylePopup | The default style where item 0 is selectable. |
StylePulldown | Item 0 becomes the title and is not selectable. |