Re: Modifying row rect indent in NSOutlineView

2015-01-29 Thread Quincey Morris
On Jan 29, 2015, at 20:45 , Andrew White andrew.wh...@audinate.com wrote:
 
 I tried subclassing NSOutlineView and catching frameOutlineOfCellAtRow, 
 adding to theRect.origin.x and subtracting from theRect.size.width.  This 
 didn't seem to make a difference.  I have verified that the overridden 
 function is being called and theRect modified, but the rendered output 
 doesn't vary.

Do you mean ‘frameOfOutlineCellAtRow’? That’s the function for the other thing 
you’re asking for — it moves the disclosure triangle.

I’m not sure what the rounded rect surrounding each row” refers to? I don’t 
see any rounded rects in 10.10 except while dragging “onto”. Is that what you 
mean?

 (Also, is there a way to customise the rendered indent level on a per-row 
 basis, rather than always indentationPerLevel ? )

‘frameOfOutlineCellAtRow’ :)



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Modifying row rect indent in NSOutlineView

2015-01-29 Thread Quincey Morris
On Jan 29, 2015, at 22:24 , Andrew White andrew.wh...@audinate.com wrote:
 
 The code I've inherited uses this to draw rounded rects on the background of 
 each row.  So if I want to modify the width and position of those rects, I 
 need to feed information about the item in outlineView:rowViewForItem into 
 the row view and update the drawing accordingly?

You won’t be able to set the frame of the the row view — it’ll be changed to 
match the dimensions of the outline view after you return it. So, you’ll need 
to put a subview inside it, and then use auto layout, or springs  struts, or 
custom drawing, to get the rounded rect frame indented how you want.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Modifying row rect indent in NSOutlineView

2015-01-29 Thread Andrew White

On 30/01/2015 16:04, Quincey Morris wrote:

On Jan 29, 2015, at 20:45 , Andrew White andrew.wh...@audinate.com
mailto:andrew.wh...@audinate.com wrote:


I tried subclassing NSOutlineView and catching frameOutlineOfCellAtRow,
adding to theRect.origin.x and subtracting from theRect.size.width.  This
didn't seem to make a difference.  I have verified that the overridden
function is being called and theRect modified, but the rendered output
doesn't vary.


Do you mean ‘frameOfOutlineCellAtRow’? That’s the function for the other
thing you’re asking for — it moves the disclosure triangle.

I’m not sure what the rounded rect surrounding each row” refers to? I
don’t see any rounded rects in 10.10 except while dragging “onto”. Is that
what you mean?


(Also, is there a way to customise the rendered indent level on a per-row
basis, rather than always indentationPerLevel ? )


‘frameOfOutlineCellAtRow’ :)



OK, I think I've figured out what's happening here.  I can use 
outlineView:rowViewForItem: to draw a box around the row which acts as a 
border into which outlineView:viewForTableColumnItem will be rendered.  Is 
this correct?


The code I've inherited uses this to draw rounded rects on the background 
of each row.  So if I want to modify the width and position of those rects, 
I need to feed information about the item in outlineView:rowViewForItem 
into the row view and update the drawing accordingly?


Thanks

--
Andrew White



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com