[Drawkit] Questions on control knobs

Brad Larson larson at sonoplot.com
Mon Jun 23 20:28:51 PDT 2008


It looks like the best route to add shapes that can have their  
properties modified later (such as arcs, circles, and rounded  
rectangles) is to subclass DKDrawableShape, so I'm doing that and  
starting to work with control knobs and I had a few scattered  
questions / comments:

1) If I wanted to remove the rotation control from a drawn rectangle,  
is there an easier way to set which control knobs are shown than  
subclassing DKDrawableShape and overriding the knobMask method with  
something like
+ (int) knobMask
{
	return 	kGCDrawableShapeAllSizeKnobs;
}
?  It seems like a lot of work to create a subclass where I'm  
overriding only one method.  Am I missing a property that can be set  
after the DKDrawableShape is created?

2) For a shape with custom control points, such as an arc, would it be  
best to remove all knobs and instead create specific hotspots  
corresponding to the start, end, and center of the arc?  I guess I'm  
not quite sure when to rely on the DKKnobs and when on the hotspots,  
or are they interchangeable?

3) It looks like DKDrawableShape+Hotspot.h is not included as a  
framework header, and is commented out in the DKDrawKit.h header  
file.  Is there a reason for this?  The framework seems to operate  
correctly with the header included.

Thanks again.

______________________
Brad Larson
SonoPlot, Inc.
3030 Laura Lane, Suite 120
Middleton, WI 53562





More information about the Drawkit mailing list