[Mono-osx] [Mono-mac] Rulers Sample
kjpou1
kjpou at pt.lu
Sun Nov 14 03:44:24 EST 2010
Hello everyone
Attached is another sample:
http://mono.1490590.n4.nabble.com/file/n3041551/Rulers.zip Rulers.zip
This one has a little more meat to it than the other two I posted:
ScrollView with custom views
Mouse Interaction and Dragging objects around
Ruler Lines and views
Custom ruler units.
Autoscroll events
Menu items: Lock, Zoom In, Zoom Out and Nestle.
Some graphics stuff as well to draw the rectangles
Here is the diff to make it run:
http://mono.1490590.n4.nabble.com/file/n3041551/nsruler.diff nsruler.diff
Kenneth
-------------------------------------
Here is a summary of the diffs:
-------------------------------------
NSView
Change case of ConvertXXXToYYYYY
and ConvertXXXXFromYYYY
NSScrollView
[Export ("hasVerticalRuler")]
bool HasVerticalRuler { get; set; }
[Export ("hasHorizontalRuler")]
bool HasHorizontalRuler { get; set; }
[Export ("rulersVisible")]
bool RulersVisible { get; set; }
[Export ("horizontalRulerView")]
NSRulerView HorizontalRulerView { get; set; }
[Export ("verticalRulerView")]
NSRulerView VerticalRulerView { get; set; }
NSRulerView
add NullAllowed
[Export ("markers"), NullAllowed]
NSRulerMarker [] Markers { get; set; }
NSColor
Added Static to black color so it could be referenced in programs.
[Static]
[Export ("blackColor")]
NSColor Black { get; }
NSGraphics
[DllImport (Constants.AppKitLibrary, EntryPoint="NSRectClip")]
public extern static void RectClip (RectangleF rect);
[DllImport (Constants.AppKitLibrary, EntryPoint="NSFrameRect")]
public extern static void FrameRect (RectangleF rect);
[DllImport (Constants.AppKitLibrary,
EntryPoint="NSFrameRectWithWidth")]
public extern static void FrameRectWithWidth (RectangleF rect, float
frameWidth);
--
View this message in context: http://mono.1490590.n4.nabble.com/Mono-mac-Rulers-Sample-tp3041551p3041551.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list