COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 11-24-2018, 01:59 PM   #1
Nonlinear
Human being with feelings
 
Join Date: Apr 2018
Posts: 396
Default Display plugin variable as text using what means?

Naive question for many of you but I'm stumped - I want to display a variable's value on-screen as read-only text. I tried ICaptionControl but that displays the control's normalized value (0-1) - I want to display the actual variable value as used in the plugin code (i.e., 0-2500, etc.).

So I think I need to use ITextControl - but that function requires a "constant char" type - how do I send it a VARIABLE character?

Seems I would also need an "integer/float to character" step in here somewhere to convert the number to text but I don't see any functions (in WDL-OL) that do that.

Displaying numbers is a common GUI element in plugins - what's the approach to doing this in WDL-OL?
Nonlinear is offline   Reply With Quote
Old 11-25-2018, 12:55 AM   #2
k.d.iv
Human being with feelings
 
Join Date: Mar 2018
Posts: 28
Default

You can try cast it (char*)variable, (char)variable or something similar, but should not be considered as a permanent fix, if it works.
Or look how the control you want is made and make your own control that fits.

Last edited by k.d.iv; 11-25-2018 at 01:02 AM.
k.d.iv is offline   Reply With Quote
Old 11-25-2018, 05:36 AM   #3
pressplay
Human being with feelings
 
pressplay's Avatar
 
Join Date: Sep 2017
Location: Berlin
Posts: 47
Default

Code:
ITextControl::SetTextFromPlug(YourVariableText)
does what you want. I have not used it, however.
pressplay is offline   Reply With Quote
Old 11-25-2018, 09:48 AM   #4
Nonlinear
Human being with feelings
 
Join Date: Apr 2018
Posts: 396
Default

Thanks all.

I actually found exactly what I was looking for in another thread here: https://forum.cockos.com/showthread....+iText+control
Nonlinear is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.