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

From Apache OpenOffice Wiki
Jump to: navigation, search
(Simple cursor in Writer: Despite coursor is used by Apple, OOo calls it pointer (For OOo cursor is the text cursor))
(Simple cursor in Writer)
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
and Windows existing implementation will help.
 
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 [http://developer.apple.com/documentation/macos8/HumanInterfaceToolbox/AppManager/ProgWithAppearanceMgr/Appearance.9d.html constants] like kThemeArrowCursor or kThemeIBeamCursor. We have no problem for these, then can simply be called in Carbon with the function SetThemeCursor.
+
Of course, we need the standard cursors like arrow, i-beam cursor, that are defined in the Carbon with [http://developer.apple.com/documentation/Carbon/Reference/Appearance_Manager/index.html constants] like kThemeArrowCursor or kThemeIBeamCursor. We have no problem for these, then can simply be called in Carbon with the function SetThemeCursor.
  
 
==== Specific cursors ====
 
==== Specific cursors ====
Line 18: Line 18:
  
 
[http://api.openoffice.org/docs/common/ref/com/sun/star/awt/SystemPointer.html List of OOo pointer's constants]
 
[http://api.openoffice.org/docs/common/ref/com/sun/star/awt/SystemPointer.html List of OOo pointer's constants]
 +
[http://go-oo.org/lxr/source/gsl/vcl/unx/source/inc/ X11 custom cursors definitions]
 +
[http://go-oo.org/lxr/source/gsl/vcl/win/source/src/ Windows custom cursors definitions]
  
 
'''To be continued'''
 
'''To be continued'''
 +
 +
==== Cursors used in windows implementation ====
 +
http://ybarthelemy.info/dev/openoffice/screenshots/win_cursors.png
  
 
[[Category:Porting]]
 
[[Category:Porting]]
 
[[Category:Aqua]]
 
[[Category:Aqua]]

Latest revision as of 00:09, 21 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 X11 custom cursors definitions Windows custom cursors definitions

To be continued

Cursors used in windows implementation

win_cursors.png

Personal tools