Crystal Space: OSXDelegate2D Class Reference (Crystal Space Public API Reference)

| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# OSXDelegate2D Class Reference

List of all members.

## Public Member Functions
(void) | - closeWindow
| Close window (destroys OpenGL context as well).
(void) | - dealloc
| Deallocate object.
(void) | - dispatchEvent:forView:
| Dispatch an event to the driver.
(void) | - focusChanged:shouldPause:
| Change focus of window and adjust title.
(id) | - initWithDriver:
| Initialize with driver.
(void) | - mouseEntered:
| Handle mouse entering or leaving the tracking area.
(BOOL) | - openWindow:width:height:depth:fullscreen:onDisplay:onScreen:
| Open a window if none open.
(BOOL) | - setMouseCursor:
| Set the mouse cursor.
(void) | - setTitle:
| Set the window's title.
(void) | - startTrackingMouse
| Start/Stop tracking mouse position.
## Protected Attributes
OSXDriver2D | driver
| Driver that this object works with.
BOOL | hideMouse
| YES if mouse is not visible.
BOOL | isPaused
| Is window paused (out of focus, etc).
int | lastEventType
| Last processed event type.
NSString * | pausedTitle
int | style
NSString * | title
BOOL | trackingMouse
NSTrackingRectTag | trackingMouseTag
| Keep track of mouse tracking state.
NSWindow * | window
| Window - created even in fullscreen mode to get events (but with a different style) Window can have one of two titles - Paused or active.

## Detailed Description

Definition at line 24 of file OSXDelegate2D.h.

## Member Function Documentation

- (void) closeWindow |  |  |  |

Close window (destroys OpenGL context as well).

- (void) dealloc |  |  |  |

Deallocate object.

- (void) dispatchEvent: |  | (NSEvent *) | ev
forView: |  | (NSView *) | view |

Dispatch an event to the driver.

- (void) focusChanged: |  | (BOOL) | focused
shouldPause: |  | (BOOL) | pause |

Change focus of window and adjust title.

- (id) initWithDriver: |  | (OSXDriver2D) | drv |  |

Initialize with driver.

- (void) mouseEntered: |  | (NSEvent *) | ev |  |

Handle mouse entering or leaving the tracking area.

- (BOOL) openWindow: |  | (const char *) | winTitle
width: |  | (int) | w
height: |  | (int) | h
depth: |  | (int) | d
fullscreen: |  | (BOOL) | fs
onDisplay: |  | (CGDirectDisplayID) | display
onScreen: |  | (unsigned int) | screen |

Open a window if none open.

- (BOOL) setMouseCursor: |  | (csMouseCursorID) | cursor |  |

Set the mouse cursor.

- (void) setTitle: |  | (char *) | newTitle |  |

Set the window's title.

- (void) startTrackingMouse |  |  |  |

Start/Stop tracking mouse position.

## Member Data Documentation

- (OSXDriver2D) driver`[protected]`

Driver that this object works with.

Definition at line 44 of file OSXDelegate2D.h.

- (BOOL) hideMouse`[protected]`

YES if mouse is not visible.

Definition at line 30 of file OSXDelegate2D.h.

- (BOOL) isPaused`[protected]`

Is window paused (out of focus, etc).

Definition at line 41 of file OSXDelegate2D.h.

- (int) lastEventType`[protected]`

Last processed event type.

Definition at line 47 of file OSXDelegate2D.h.

- (NSTrackingRectTag) trackingMouseTag`[protected]`

Keep track of mouse tracking state.

Definition at line 27 of file OSXDelegate2D.h.

- (NSWindow*) window`[protected]`

Window - created even in fullscreen mode to get events (but with a different style) Window can have one of two titles - Paused or active.

Definition at line 36 of file OSXDelegate2D.h.

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

- csplugincommon/macosx/OSXDelegate2D.h