Enhancements to AUCarbonViewControl
Enhancements to AUCarbonViewControl
- Subject: Enhancements to AUCarbonViewControl
- From: Airy André <email@hidden>
- Date: Tue, 27 May 2003 10:09:07 +0200
Le mercredi, 21 mai 2003, ` 22:05 Europe/Paris, Airy Andri a icrit :
About the XY control, why don't you just register your control for the
two parameters you are interested in. In your "ValueChanged" method
(sorry, I am speaking HIFramework here...) , just ignore the value and
ask the AU for the 2 parameters values.
And in your Tracking method, instead of setting the value of your
control, just change the parameters of the AU (but don't change your
value).
Being able to give a ControlData selector when creating
AUCarbonViewControl would be a very nice addition for this kind of
thing.
The AUCarbonViewControl::ControlToParameter and ParameterToControl
would use this selector if defined instead of
GetControlValue/SetControlValue.
After all, this is already what it is done for text controls...
It would be a minor change to the SDK and would let make complex
controls much simpler and cleaner (and being able to stay AU
independant stuff) ...
I've put in the AUGUIFramework CVS
(
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/augui/AUGUIFramework/
AU View/) a AUCarbonViewEnhancedControl class that implements that.
It does everything the parent class AUCarbonViewControl does, plus it
has the following features :
- possibility to bind the param to a control tag instead of the control
value (int value for discrete value, double value for continuous, and
CFStringRef for text)
This makes complex controls much easier to handle.
- if the param has named params, they are used for value->text
conversion (there is currently nothing for text->value conversion so
make your text control read-only)
- you can control the number of digits for value->text conversion
The XYControl in the Control directory use the new tag binding
capability : one tag is for the X position, and one tag is for the Y
position. The control value is ignored.
My au303 AU uses these three features.
For the one who are using our SDK, the whole CVS has just been updated
but the doc is a little late... So mail me if you want more infos about
what's new.
Airy
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.