Hi there.
I am trying to create my own interface-compatible implementation of QCCompositionParameterView so that I can change the controls created depending on port type or input key. I would subclass the view but that would still involve writing my own -setCompositionRenderer, and generally much messing around with private APIs (e.g. I would like to subclass QCImageView too), so I decided to create a clone that only inherits from NSView, NSImageView etc. so that nothing breaks unexpectedly.

I started out with the code in QCTV's parameter panel and modified it to create the relevant control for composition inputs that match my app's custom protocol. I want other controls to look and behave just like a regular parameter view, and would like to hear some implementation recommendations from the people who maintain Apple's class.

The questions below represent what I'm thinking. They are neither complete nor intended to be answered one-by-one, but just serve as a guide to where I am coming from and the kind of directions I'm looking for.

The QCTV code uses an array of controls and an array of labels, with a single control for each input. Some inputs will now need two controls— QCCompositionParameterView also does this with QCPortTypeNumber, for example—so this method won't work. What would be the recommended implementation method for constructing this? Sometimes a number can be a text field and a circular slider, sometimes a text field and a horizontal slider. I presume the latter is only used if a min && max value is given. What other inputs have multiple representations under certain conditions? QCTV ignores QCPortTypeStructure. Does the regular parameter view now handle this, and if so, how? What are the spacing and layout constants used?

The regular parameter view also has some backgroundColor and drawsBackground methods. Do these just call the scroll view's implementation, or the clip views, or both? I'm not sure how the scroll view and clip view interact here. Do you also set copiesOnScroll? How do you handle isOpaque?

Are there any non-public methods that related classes like QCView expect a parameter view to implement, that I would need to duplicate too?

I realise many of these are best practice requests for creating custom views and scroll views in general, but it would help if I could get as close as possible to the way QCCompositionParameterView implements things.

– Nicholas

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to