Difference between revisions of "Mac OS X Porting - Cursors"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Specific cursors)
(Simple cursor in Writer: Despite coursor is used by Apple, OOo calls it pointer (For OOo cursor is the text cursor))
Line 8: Line 8:
 
kThemeIBeamCursor
 
kThemeIBeamCursor
  
Code location (inside OpenOffice.org sources) : [http://go-oo.org/lxr/source/gsl/vcl/source/window/cursor.cxx vcl/source/window/cursor.cxx] + [http://go-oo.org/lxr/source/gsl/vcl/aqua/source/window/salframe.cxx vcl/aqua/source/window/salframe.cxx]  
+
Code location (inside OpenOffice.org sources) : [http://go-oo.org/lxr/source/gsl/vcl/aqua/source/window/salframe.cxx vcl/aqua/source/window/salframe.cxx] [http://go-oo.org/lxr/source/gsl/vcl/inc/vcl/salframe.hxx vcl/inc/vcl/salframe.hxx] [http://go-oo.org/lxr/source/gsl/vcl/inc/vcl/ptrstyle.hxx vcl/inc/vcl/ptrstyle.hxx] [http://go-oo.org/lxr/source/gsl/vcl/source/window/window.cxx vcl/source/window/window.cxx] [http://go-oo.org/lxr/source/gsl/vcl/inc/vcl/window.hxx vcl/inc/vcl/window.hxx]
  
 
and Windows existing implementation will help.
 
and Windows existing implementation will help.

Revision as of 21:38, 20 May 2007

Implementing custom cursors

What do we need ?

Simple cursor in Writer

kThemeArrowCursor kThemeIBeamCursor

Code location (inside OpenOffice.org sources) : vcl/aqua/source/window/salframe.cxx vcl/inc/vcl/salframe.hxx vcl/inc/vcl/ptrstyle.hxx vcl/source/window/window.cxx vcl/inc/vcl/window.hxx

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