Best Practice // Extended View

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Post Reply
SquarePushed
Posts: 15
Joined: Mon May 11, 2020 7:12 pm

Best Practice // Extended View

Post by SquarePushed »

Hi,

Would be great if you could point to some best practices re the following topic:

I want to extend the TextEdit-view with the simple functionality that I can use the arrow-keys of my keyboard to step through a given value-range, and the shift-key should increase the granularity. I use the new WYSIWYG-editor.

How should I proceed? Inherit from the CTextEdit-class? Write a new component? Is there even a way I don't see, yet?

Thanks for your help!
Last edited by SquarePushed on Sat May 16, 2020 5:57 am, edited 1 time in total.

SquarePushed
Posts: 15
Joined: Mon May 11, 2020 7:12 pm

Re: Best Practice // Extended View

Post by SquarePushed »

Or should I just create a Sub-Controller? So many options on the table :)
Last edited by SquarePushed on Sat May 16, 2020 5:58 am, edited 1 time in total.

SquarePushed
Posts: 15
Joined: Mon May 11, 2020 7:12 pm

Re: Best Practice // Extended View

Post by SquarePushed »

Does anyone have a hint how to implement the sub-controller approach? I've found the description in the sdk-manual...but this is not concrete enough for me

Arne Scheffler
Posts: 383
Joined: Mon Jun 20, 2016 7:53 am

Re: Best Practice // Extended View

Post by Arne Scheffler »

I think you have to create two things. First a subclass of CTextEdit where you need to override the onKeyDown method and inform the second thing you create namely a sub-controller which can create your custom CTextEdit class and control what should happen if a key down happens.

Cheers,
Arne

SquarePushed
Posts: 15
Joined: Mon May 11, 2020 7:12 pm

Re: Best Practice // Extended View

Post by SquarePushed »

Thanks Arne!

In the end, I created a separate view. :)

Post Reply