Mac OS X Porting - Cursors

From Apache OpenOffice Wiki
Revision as of 21:25, 20 May 2007 by Ybart (Talk | contribs)

Jump to: navigation, search

Implementing custom cursors

What do we need ?

Simple cursor in Writer

kThemeArrowCursor kThemeIBeamCursor

Code location (inside OpenOffice.org sources) : vcl/source/window/cursor.cxx + vcl/aqua/source/window/salframe.cxx

and Windows existing implementation will help.

Of course, we need the standard cursors like arrow, i-beam cursor, that are defined in the Carbon with constants like kThemeArrowCursor or kThemeIBeamCursor. We have no problem for these, then can simply be called in Carbon with the function SetThemeCursor.

Specific cursors

But we also need more specific cursors for example : help cursor, draw cursors… For these cursors the only function availables to do this are deprecated, so we should not use them. The only choice left is to make a Cocoa wrapper and using NSCursor to build our own cursors.

List of OOo pointer's constants

To be continued

Personal tools