OpenTTD Source 20260415-master-g3f4984ebaa
OTTD_CocoaView Class Reference

Subclass of NSView to support mouse awareness and text input. More...

#include <cocoa_wnd.h>

Inheritance diagram for OTTD_CocoaView:

Instance Methods

(NSRect) - getRealRect:
(NSRect) - getVirtualRect:
(CGFloat) - getContentsScale
(NSPoint) - mousePositionFromEvent:
 Return the mouse location.
(instancetype) - initWithFrame: [implementation]
(BOOL) - acceptsFirstResponder [implementation]
 Allow to handle events.
(void) - setNeedsDisplayInRect: [implementation]
(void) - cursorUpdate: [implementation]
 Update mouse cursor to use for this view.
(void) - viewWillMoveToWindow: [implementation]
(void) - viewDidMoveToWindow [implementation]
(void) - mouseEntered: [implementation]
 Make OpenTTD aware that it has control over the mouse.
(void) - mouseExited: [implementation]
 Make OpenTTD aware that it has NO control over the mouse.
(void) - internalMouseMoveEvent: [implementation]
 Internal handler of mouse movement.
(void) - internalMouseButtonEvent [implementation]
 Internal handler of mouse buttons.
(BOOL) - emulateRightButton: [implementation]
 Check if right mouse button should be emulated when left button is pressed.
(void) - mouseMoved: [implementation]
 Handler of mouse movement.
(void) - mouseDragged: [implementation]
 Handler of mouse movement while left button is down.
(void) - mouseDown: [implementation]
 Handler of left mouse button pressing.
(void) - mouseUp: [implementation]
 Handler of left mouse button releasing.
(void) - rightMouseDragged: [implementation]
 Handler of mouse movement when right button is down.
(void) - rightMouseDown: [implementation]
 Handler of right mouse button pressing.
(void) - rightMouseUp: [implementation]
 Handler of right mouse button releasing.
(void) - scrollWheel: [implementation]
 Handler of mouse wheel scrolling.
(void) - magnifyWithEvent: [implementation]
 Handler of magnification events.
(void) - endGestureWithEvent: [implementation]
 Handler of gesture to end magnification.
(BOOL) - internalHandleKeycode:unicode:pressed:modifiers: [implementation]
 Internal handler of keyboard keys.
(void) - keyDown: [implementation]
 Handler of keyboard key pressing.
(void) - keyUp: [implementation]
 Handler of keyboard key releasing.
(void) - flagsChanged: [implementation]
 Handler of modifiers.
(void) - insertText:replacementRange: [implementation]
 Insert the given text at the given range.
(void) - insertText: [implementation]
 Insert the given text at the caret.
(void) - setMarkedText:selectedRange:replacementRange: [implementation]
 Set a new marked text and reposition the caret.
(void) - setMarkedText:selectedRange: [implementation]
 Set a new marked text and reposition the caret.
(void) - unmarkText [implementation]
 Unmark the current marked text.
(NSRange) - selectedRange [implementation]
 Get the caret position.
(NSRange) - markedRange [implementation]
 Get the currently marked range.
(BOOL) - hasMarkedText [implementation]
 Is any text marked?
(NSAttributedString *) - attributedSubstringForProposedRange:actualRange: [implementation]
 Get a string corresponding to the given range.
(NSAttributedString *) - attributedSubstringFromRange: [implementation]
 Get a string corresponding to the given range.
(NSAttributedString *) - attributedString [implementation]
 Get the current edit box string.
(NSUInteger) - characterIndexForPoint: [implementation]
 Get the character that is rendered at the given point.
(NSRect) - firstRectForCharacterRange: [implementation]
 Get the bounding rect for the given range.
(NSRect) - firstRectForCharacterRange:actualRange: [implementation]
 Get the bounding rect for the given range.
(NSArray *) - validAttributesForMarkedText [implementation]
 Get all string attributes that we can process for marked text.
(void) - deleteBackward: [implementation]
 Delete single character left of the cursor.
(void) - deleteWordBackward: [implementation]
 Delete word left of the cursor.
(void) - deleteForward: [implementation]
 Delete single character right of the cursor.
(void) - deleteWordForward: [implementation]
 Delete word right of the cursor.
(void) - moveLeft: [implementation]
 Move cursor one character left.
(void) - moveWordLeft: [implementation]
 Move cursor one word left.
(void) - moveRight: [implementation]
 Move cursor one character right.
(void) - moveWordRight: [implementation]
 Move cursor one word right.
(void) - moveUp: [implementation]
 Move cursor one line up.
(void) - moveDown: [implementation]
 Move cursor one line down.
(void) - moveUpAndModifySelection: [implementation]
 MScroll one line up.
(void) - moveDownAndModifySelection: [implementation]
 Scroll one line down.
(void) - moveToBeginningOfLine: [implementation]
 Move cursor to the start of the line.
(void) - moveToEndOfLine: [implementation]
 Move cursor to the end of the line.
(void) - scrollPageUp: [implementation]
 Scroll one page up.
(void) - scrollPageDown: [implementation]
 Scroll one page down.
(void) - pageUpAndModifySelection: [implementation]
 Move cursor (and selection) one page up.
(void) - pageDownAndModifySelection: [implementation]
 Move cursor (and selection) one page down.
(void) - scrollToBeginningOfDocument: [implementation]
 Scroll to the beginning of the document.
(void) - scrollToEndOfDocument: [implementation]
 Scroll to the end of the document.
(void) - insertNewline: [implementation]
 Return was pressed.
(void) - cancelOperation: [implementation]
 Escape was pressed.
(void) - doCommandBySelector: [implementation]
 Invoke the selector if we implement it.

Detailed Description

Subclass of NSView to support mouse awareness and text input.

Definition at line 43 of file cocoa_wnd.h.

Method Documentation

◆ acceptsFirstResponder

- (BOOL) acceptsFirstResponder
implementation

Allow to handle events.

Returns
Always YES.

Definition at line 587 of file cocoa_wnd.mm.

References acceptsFirstResponder.

Referenced by acceptsFirstResponder.

◆ attributedString

- (NSAttributedString *) attributedString
implementation

Get the current edit box string.

Returns
The string from the edit box.

Definition at line 1167 of file cocoa_wnd.mm.

References _focused_window, attributedString, and EditBoxInGlobalFocus().

Referenced by attributedString.

◆ attributedSubstringForProposedRange:actualRange:

- (NSAttributedString *) attributedSubstringForProposedRange: (NSRange) theRange
actualRange: (NSRangePointer) actualRange 
implementation

Get a string corresponding to the given range.

Parameters
theRangeThe requested range of the string to return.
[out]actualRangeOptional output of range after validation.
Returns
The requested substring.

Definition at line 1139 of file cocoa_wnd.mm.

References _focused_window, and EditBoxInGlobalFocus().

Referenced by attributedSubstringFromRange:.

◆ attributedSubstringFromRange:

- (NSAttributedString *) attributedSubstringFromRange: (NSRange) theRange
implementation

Get a string corresponding to the given range.

Parameters
theRangeThe requested range of the string to return.
Returns
The requested substring.

Definition at line 1158 of file cocoa_wnd.mm.

References attributedSubstringForProposedRange:actualRange:.

◆ cancelOperation:

- (void) cancelOperation: (id) sender
implementation

Escape was pressed.

Parameters
senderWhere the event comes from.

Definition at line 1431 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ characterIndexForPoint:

- (NSUInteger) characterIndexForPoint: (NSPoint) thePoint
implementation

Get the character that is rendered at the given point.

Parameters
thePointThe point in screen coordinates to get the character index for.
Returns
A negative number to denote an error, otherwise the number of UTF-16 characters up to thePoint.

Definition at line 1180 of file cocoa_wnd.mm.

References _focused_window, CountUtf16Units(), EditBoxInGlobalFocus(), and Point.

◆ cursorUpdate:

- (void) cursorUpdate: (NSEvent *) event
implementation

Update mouse cursor to use for this view.

Parameters
eventEvent from the operating system. Exists because the API requires it.

Definition at line 604 of file cocoa_wnd.mm.

◆ deleteBackward:

- (void) deleteBackward: (id) sender
implementation

Delete single character left of the cursor.

Parameters
senderWhere the event comes from.

Definition at line 1240 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ deleteForward:

- (void) deleteForward: (id) sender
implementation

Delete single character right of the cursor.

Parameters
senderWhere the event comes from.

Definition at line 1258 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ deleteWordBackward:

- (void) deleteWordBackward: (id) sender
implementation

Delete word left of the cursor.

Parameters
senderWhere the event comes from.

Definition at line 1249 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ deleteWordForward:

- (void) deleteWordForward: (id) sender
implementation

Delete word right of the cursor.

Parameters
senderWhere the event comes from.

Definition at line 1267 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ doCommandBySelector:

- (void) doCommandBySelector: (SEL) aSelector
implementation

Invoke the selector if we implement it.

Parameters
aSelectorThe selector to invoke.

Definition at line 1440 of file cocoa_wnd.mm.

◆ emulateRightButton:

- (BOOL) emulateRightButton: (NSEvent *) event
implementation

Check if right mouse button should be emulated when left button is pressed.

Parameters
eventInformation about occurred event.
Returns
True iff right button should be emulated instead of left one.

Definition at line 689 of file cocoa_wnd.mm.

References _settings_client.

◆ endGestureWithEvent:

- (void) endGestureWithEvent: (NSEvent *) event
implementation

Handler of gesture to end magnification.

Parameters
eventInformation about occurred event.

Definition at line 835 of file cocoa_wnd.mm.

◆ firstRectForCharacterRange:

- (NSRect) firstRectForCharacterRange: (NSRange) aRange
implementation

Get the bounding rect for the given range.

Parameters
aRangeThe start and end location of the string in UTF-16 characters.
Returns
The rectangle in screen coordinates for the given range.

Definition at line 1200 of file cocoa_wnd.mm.

References _focused_window, EditBoxInGlobalFocus(), and Utf8AdvanceByUtf16Units().

Referenced by firstRectForCharacterRange:actualRange:.

◆ firstRectForCharacterRange:actualRange:

- (NSRect) firstRectForCharacterRange: (NSRange) aRange
actualRange: (NSRangePointer) actualRange 
implementation

Get the bounding rect for the given range.

Parameters
aRangeThe start and end location of the string in UTF-16 characters.
[out]actualRangeOptional output of range after validation. Exists because the API requires it.
Returns
The rectangle in screen coordinates for the given range.

Definition at line 1222 of file cocoa_wnd.mm.

References firstRectForCharacterRange:.

◆ flagsChanged:

- (void) flagsChanged: (NSEvent *) event
implementation

Handler of modifiers.

Parameters
eventInformation about occurred event.

Definition at line 983 of file cocoa_wnd.mm.

References _current_mods, and internalHandleKeycode:unicode:pressed:modifiers:.

◆ getContentsScale

- (CGFloat) getContentsScale

Definition at line 578 of file cocoa_wnd.mm.

◆ getRealRect:

- (NSRect) getRealRect: (NSRect) rect

Definition at line 568 of file cocoa_wnd.mm.

◆ getVirtualRect:

- (NSRect) getVirtualRect: (NSRect) rect

Definition at line 573 of file cocoa_wnd.mm.

◆ hasMarkedText

- (BOOL) hasMarkedText
implementation

Is any text marked?

Returns
YES iff text is marked.

Definition at line 1126 of file cocoa_wnd.mm.

References _focused_window, EditBoxInGlobalFocus(), and hasMarkedText.

Referenced by hasMarkedText.

◆ initWithFrame:

- (instancetype) initWithFrame: (NSRect) frameRect
implementation

Definition at line 560 of file cocoa_wnd.mm.

◆ insertNewline:

- (void) insertNewline: (id) sender
implementation

Return was pressed.

Parameters
senderWhere the event comes from.

Definition at line 1422 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ insertText:

- (void) insertText: (id) aString
implementation

Insert the given text at the caret.

Parameters
aStringThe string to insert.

Definition at line 1036 of file cocoa_wnd.mm.

References insertText:replacementRange:.

◆ insertText:replacementRange:

- (void) insertText: (id) aString
replacementRange: (NSRange) replacementRange 
implementation

Insert the given text at the given range.

Parameters
aStringThe string to insert.
replacementRangeThe range of the original string to replace.

Definition at line 1013 of file cocoa_wnd.mm.

References _focused_window, EditBoxInGlobalFocus(), HandleTextInput(), and Utf8AdvanceByUtf16Units().

Referenced by insertText:.

◆ internalHandleKeycode:unicode:pressed:modifiers:

- (BOOL) internalHandleKeycode: (unsigned short) keycode
unicode: (char32_t) unicode
pressed: (BOOL) down
modifiers: (NSUInteger) modifiers 
implementation

Internal handler of keyboard keys.

Parameters
keycodeThe raw keycode of the key press.
unicodeThe unicode character of the key press.
downWhether pressing or releasing the key.
modifiersFlags to denote other (special) keys that might have been pressed.
Returns
Whether event should be interpreted.

Definition at line 850 of file cocoa_wnd.mm.

References _dirkeys, _settings_client, _tab_is_down, Debug, EditBoxInGlobalFocus(), VideoDriver::GetInstance(), HandleKeypress(), IsInsideMM(), SB(), and VideoDriver::ToggleFullscreen().

Referenced by flagsChanged:, keyDown:, and keyUp:.

◆ internalMouseButtonEvent

- (void) internalMouseButtonEvent
implementation

Internal handler of mouse buttons.

Definition at line 675 of file cocoa_wnd.mm.

References HandleMouseEvents(), and internalMouseButtonEvent.

Referenced by internalMouseButtonEvent, mouseDown:, mouseUp:, rightMouseDown:, and rightMouseUp:.

◆ internalMouseMoveEvent:

- (void) internalMouseMoveEvent: (NSEvent *) event
implementation

Internal handler of mouse movement.

Parameters
eventInformation about occurred event.

Definition at line 660 of file cocoa_wnd.mm.

References HandleMouseEvents(), and mousePositionFromEvent:.

Referenced by mouseDragged:, mouseMoved:, and rightMouseDragged:.

◆ keyDown:

- (void) keyDown: (NSEvent *) event
implementation

Handler of keyboard key pressing.

Parameters
eventInformation about occurred event.

Definition at line 926 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), internalHandleKeycode:unicode:pressed:modifiers:, and NSStringToUTF32().

◆ keyUp:

- (void) keyUp: (NSEvent *) event
implementation

Handler of keyboard key releasing.

Parameters
eventInformation about occurred event.

Definition at line 959 of file cocoa_wnd.mm.

References internalHandleKeycode:unicode:pressed:modifiers:, and NSStringToUTF32().

◆ magnifyWithEvent:

- (void) magnifyWithEvent: (NSEvent *) event
implementation

Handler of magnification events.

Parameters
eventInformation about occurred event.

Definition at line 814 of file cocoa_wnd.mm.

References HandleMouseEvents().

◆ markedRange

- (NSRange) markedRange
implementation

Get the currently marked range.

Returns
The currently marked range.

Definition at line 1106 of file cocoa_wnd.mm.

References _focused_window, CountUtf16Units(), EditBoxInGlobalFocus(), Textbuf::GetText(), markedRange, Textbuf::markend, and Textbuf::markpos.

Referenced by markedRange, and setMarkedText:selectedRange:replacementRange:.

◆ mouseDown:

- (void) mouseDown: (NSEvent *) event
implementation

Handler of left mouse button pressing.

Parameters
eventInformation about occurred event.

Definition at line 720 of file cocoa_wnd.mm.

References _left_button_down, internalMouseButtonEvent, and rightMouseDown:.

◆ mouseDragged:

- (void) mouseDragged: (NSEvent *) event
implementation

Handler of mouse movement while left button is down.

Parameters
eventInformation about occurred event.

Definition at line 711 of file cocoa_wnd.mm.

References internalMouseMoveEvent:.

◆ mouseEntered:

- (void) mouseEntered: (NSEvent *) theEvent
implementation

Make OpenTTD aware that it has control over the mouse.

Parameters
theEventInformation about occurred event.

Definition at line 628 of file cocoa_wnd.mm.

◆ mouseExited:

- (void) mouseExited: (NSEvent *) theEvent
implementation

Make OpenTTD aware that it has NO control over the mouse.

Parameters
theEventInformation about occurred event.

Definition at line 636 of file cocoa_wnd.mm.

◆ mouseMoved:

- (void) mouseMoved: (NSEvent *) event
implementation

Handler of mouse movement.

Parameters
eventInformation about occurred event.

Definition at line 702 of file cocoa_wnd.mm.

References internalMouseMoveEvent:.

◆ mousePositionFromEvent:

- (NSPoint) mousePositionFromEvent: (NSEvent *) e

Return the mouse location.

Parameters
eInformation about occurred event.
Returns
Mouse location as NSPoint.

Definition at line 647 of file cocoa_wnd.mm.

Referenced by internalMouseMoveEvent:.

◆ mouseUp:

- (void) mouseUp: (NSEvent *) event
implementation

Handler of left mouse button releasing.

Parameters
eventInformation about occurred event.

Definition at line 735 of file cocoa_wnd.mm.

References _left_button_clicked, _left_button_down, internalMouseButtonEvent, and rightMouseUp:.

◆ moveDown:

- (void) moveDown: (id) sender
implementation

Move cursor one line down.

Parameters
senderWhere the event comes from.

Definition at line 1321 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ moveDownAndModifySelection:

- (void) moveDownAndModifySelection: (id) sender
implementation

Scroll one line down.

Parameters
senderWhere the event comes from.

Definition at line 1339 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ moveLeft:

- (void) moveLeft: (id) sender
implementation

Move cursor one character left.

Parameters
senderWhere the event comes from.

Definition at line 1276 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ moveRight:

- (void) moveRight: (id) sender
implementation

Move cursor one character right.

Parameters
senderWhere the event comes from.

Definition at line 1294 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ moveToBeginningOfLine:

- (void) moveToBeginningOfLine: (id) sender
implementation

Move cursor to the start of the line.

Parameters
senderWhere the event comes from.

Definition at line 1348 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

Referenced by scrollToBeginningOfDocument:.

◆ moveToEndOfLine:

- (void) moveToEndOfLine: (id) sender
implementation

Move cursor to the end of the line.

Parameters
senderWhere the event comes from.

Definition at line 1357 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

Referenced by scrollToEndOfDocument:.

◆ moveUp:

- (void) moveUp: (id) sender
implementation

Move cursor one line up.

Parameters
senderWhere the event comes from.

Definition at line 1312 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ moveUpAndModifySelection:

- (void) moveUpAndModifySelection: (id) sender
implementation

MScroll one line up.

Parameters
senderWhere the event comes from.

Definition at line 1330 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ moveWordLeft:

- (void) moveWordLeft: (id) sender
implementation

Move cursor one word left.

Parameters
senderWhere the event comes from.

Definition at line 1285 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ moveWordRight:

- (void) moveWordRight: (id) sender
implementation

Move cursor one word right.

Parameters
senderWhere the event comes from.

Definition at line 1303 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ pageDownAndModifySelection:

- (void) pageDownAndModifySelection: (id) sender
implementation

Move cursor (and selection) one page down.

Parameters
senderWhere the event comes from.

Definition at line 1393 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ pageUpAndModifySelection:

- (void) pageUpAndModifySelection: (id) sender
implementation

Move cursor (and selection) one page up.

Parameters
senderWhere the event comes from.

Definition at line 1384 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ rightMouseDown:

- (void) rightMouseDown: (NSEvent *) event
implementation

Handler of right mouse button pressing.

Parameters
eventInformation about occurred event.

Definition at line 760 of file cocoa_wnd.mm.

References _right_button_clicked, _right_button_down, and internalMouseButtonEvent.

Referenced by mouseDown:.

◆ rightMouseDragged:

- (void) rightMouseDragged: (NSEvent *) event
implementation

Handler of mouse movement when right button is down.

Parameters
eventInformation about occurred event.

Definition at line 751 of file cocoa_wnd.mm.

References internalMouseMoveEvent:.

◆ rightMouseUp:

- (void) rightMouseUp: (NSEvent *) event
implementation

Handler of right mouse button releasing.

Parameters
eventInformation about occurred event.

Definition at line 771 of file cocoa_wnd.mm.

References _right_button_down, and internalMouseButtonEvent.

Referenced by mouseUp:.

◆ scrollPageDown:

- (void) scrollPageDown: (id) sender
implementation

Scroll one page down.

Parameters
senderWhere the event comes from.

Definition at line 1375 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ scrollPageUp:

- (void) scrollPageUp: (id) sender
implementation

Scroll one page up.

Parameters
senderWhere the event comes from.

Definition at line 1366 of file cocoa_wnd.mm.

References EditBoxInGlobalFocus(), and HandleKeypress().

◆ scrollToBeginningOfDocument:

- (void) scrollToBeginningOfDocument: (id) sender
implementation

Scroll to the beginning of the document.

Parameters
senderWhere the event comes from.

Definition at line 1402 of file cocoa_wnd.mm.

References moveToBeginningOfLine:.

◆ scrollToEndOfDocument:

- (void) scrollToEndOfDocument: (id) sender
implementation

Scroll to the end of the document.

Parameters
senderWhere the event comes from.

Definition at line 1412 of file cocoa_wnd.mm.

References moveToEndOfLine:.

◆ scrollWheel:

- (void) scrollWheel: (NSEvent *) event
implementation

Handler of mouse wheel scrolling.

Parameters
eventInformation about occurred event.

Definition at line 781 of file cocoa_wnd.mm.

References _settings_client.

◆ selectedRange

- (NSRange) selectedRange
implementation

Get the caret position.

Returns
The range with caret position.

Definition at line 1092 of file cocoa_wnd.mm.

References _focused_window, Textbuf::caretpos, CountUtf16Units(), EditBoxInGlobalFocus(), Textbuf::GetText(), and selectedRange.

Referenced by selectedRange.

◆ setMarkedText:selectedRange:

- (void) setMarkedText: (id) aString
selectedRange: (NSRange) selRange 
implementation

Set a new marked text and reposition the caret.

Parameters
aStringThe string to set the marked text for.
selRangeThe new selection range.

Definition at line 1077 of file cocoa_wnd.mm.

References setMarkedText:selectedRange:replacementRange:.

◆ setMarkedText:selectedRange:replacementRange:

- (void) setMarkedText: (id) aString
selectedRange: (NSRange) selRange
replacementRange: (NSRange) replacementRange 
implementation

Set a new marked text and reposition the caret.

Parameters
aStringThe string to set the marked text for.
selRangeThe new selection range.
replacementRangeThe range to replace, counted from the marked range.

Definition at line 1047 of file cocoa_wnd.mm.

References _focused_window, EditBoxInGlobalFocus(), HandleTextInput(), markedRange, and Utf8AdvanceByUtf16Units().

Referenced by setMarkedText:selectedRange:.

◆ setNeedsDisplayInRect:

- (void) setNeedsDisplayInRect: (NSRect) invalidRect
implementation

Definition at line 592 of file cocoa_wnd.mm.

◆ unmarkText

- (void) unmarkText
implementation

Unmark the current marked text.

Definition at line 1083 of file cocoa_wnd.mm.

References HandleTextInput(), and unmarkText.

Referenced by unmarkText.

◆ validAttributesForMarkedText

- (NSArray *) validAttributesForMarkedText
implementation

Get all string attributes that we can process for marked text.

Returns
The valid attributes, in this case an empty array.

Definition at line 1231 of file cocoa_wnd.mm.

References validAttributesForMarkedText.

Referenced by validAttributesForMarkedText.

◆ viewDidMoveToWindow

- (void) viewDidMoveToWindow
implementation

Definition at line 616 of file cocoa_wnd.mm.

◆ viewWillMoveToWindow:

- (void) viewWillMoveToWindow: (NSWindow *) win
implementation

Definition at line 609 of file cocoa_wnd.mm.


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