OpenTTD Source 20260415-master-g3f4984ebaa
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 32 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 450 of file cocoa_wnd.mm.

References VideoDriver::GetCaption().

◆ makeTouchBar

- (nullable NSTouchBar *) makeTouchBar
implementation

Definition at line 488 of file cocoa_wnd.mm.

◆ refreshSystemSprites

- (void) refreshSystemSprites

Definition at line 521 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 473 of file cocoa_wnd.mm.

References VideoDriver_Cocoa::AllocateBackingStore().

◆ touchBar:makeItemForIdentifier:

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

Definition at line 507 of file cocoa_wnd.mm.

◆ touchBarButtonAction:

- (void) touchBarButtonAction: (id) sender
implementation

Definition at line 480 of file cocoa_wnd.mm.


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