OpenTTD Source 20261123-master-g1c55c72fd0
OTTD_CocoaWindow Class Reference

Subclass of NSWindow to cater our special needs. More...

#include <cocoa_wnd.h>

Inheritance diagram for OTTD_CocoaWindow:

Instance Methods

(instancetype) - initWithContentRect:styleMask:backing:defer:driver:
 Initialize event system for the application rectangle.
(void) - setFrame:display:
 Define the rectangle we draw our window in.
(void) - refreshSystemSprites
(void) - touchBarButtonAction: [implementation]
(nullable NSTouchBar *) - makeTouchBar [implementation]
(nullable NSTouchBarItem *) - touchBar:makeItemForIdentifier: [implementation]

Detailed Description

Subclass of NSWindow to cater our special needs.

Definition at line 27 of file cocoa_wnd.h.

Method Documentation

◆ initWithContentRect:styleMask:backing:defer:driver:

- (instancetype) initWithContentRect: (NSRect) contentRect
styleMask: (NSUInteger) styleMask
backing: (NSBackingStoreType) backingType
defer: (BOOL) flag
driver: (VideoDriver_Cocoa *) drv 

Initialize event system for the application rectangle.

Parameters
contentRectThe boundaries of the window.
styleMaskThe window style to apply.
backingTypeHow the drawing is buffered.
flagWhether to create the window immediately, or once it's moved on screen.
drvThe underlying video driver.
Returns
The initialized window.

Definition at line 425 of file cocoa_wnd.mm.

References VideoDriver::GetCaption().

◆ makeTouchBar

- (nullable NSTouchBar *) makeTouchBar
implementation

Definition at line 463 of file cocoa_wnd.mm.

◆ refreshSystemSprites

- (void) refreshSystemSprites

Definition at line 496 of file cocoa_wnd.mm.

◆ setFrame:display:

- (void) setFrame: (NSRect) frameRect
display: (BOOL) flag 

Define the rectangle we draw our window in.

Parameters
frameRectThe new boundaries of the window.
flagWhether the window redraws the views.

Definition at line 448 of file cocoa_wnd.mm.

References VideoDriver_Cocoa::AllocateBackingStore().

◆ touchBar:makeItemForIdentifier:

- (nullable NSTouchBarItem *) touchBar: (NSTouchBar *) touchBar
makeItemForIdentifier: (NSTouchBarItemIdentifier) identifier 
implementation

Definition at line 482 of file cocoa_wnd.mm.

◆ touchBarButtonAction:

- (void) touchBarButtonAction: (id) sender
implementation

Definition at line 455 of file cocoa_wnd.mm.


The documentation for this class was generated from the following files: