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

Go Back   Cockos Confederated Forums > Cockos and Friends Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 04-23-2016, 02:16 PM   #1
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default Better_GUI_Resizing -> Need Testers!

V1.21

Hi guys, I am working on a WDL framework to improve GUI resizing. Currently I am working on my WDL fork which is basically WDL-OL + better GUI resizing.

For now look at Better_GUI_Resize branch.

There are a still some things to implement but you can test it now. I am interested in any feature requests, or discussion.

For test build: IPlugExamples/IPlugBetterGUIResize.

NOTE:
- It tries to be as simple as possible for plugin development.
- GUI scaling is automatic.
- There are 3 different types of resizing. See IPlugGUIResize.h
- It works with BITMAPS!
- GUI scale will be shared for all plugin instances.
- Window size will be stored in presets

Current test project uses bitmap oversample mode that will make bitmaps clearer when you scale up.



Original post --------------------------------------------------------------------------------------------
Hi guys,
here is alpha version of better gui resizing. It is still missing a lot of features, but these will be added in the next updates. For now I am interested how does it performs, is resizing too slow? If resizing is really slow than I could insert the code that will disable rescalling bitmaps while resizing and only rescale it when you finish resizing, but disadvantage will be that while resizing you will have black screen, or I could capture GUI at mouse down and rescale that bitmap while resizing, but this will show incorrect text size as text size is specified in ints so it will not scale smoothly. Please report any bug that you spot. I am aware of animated window resizing for AU and I still don't know how to turn it off.

Please test some of your projects that doesn't have vector graphics. Vector graphics support will come soon. For this to work you will need to add some sources to the mac targets.
Look at the picture: https://drive.google.com/file/d/0B1l...ew?usp=sharing


As you can see in IPlugBetterGUIResize example, the only thing you need to change is to load bitmap pointers instead of bitmaps, and to include on gui resize code.


I wish you happy resizing, and don't forget to comment!


Download branch here:
https://github.com/Youlean/WDL-Youle...ter_GUI_Resize


BUGS SO FAR:
Code:
1. Animated scrolling for AU.
2. Laggy resizing on windows.
CHANGELOG:
Code:
V1.21
IPlugControls is now updated to support scaling

V1.20
-Added size limits
-Added resizing by draging sides
-Code is now readable

V1.10
-Added so much things. I can't write it all here.
-Most important is that views and window resizing are now implemented.

V1.01
-Added bitmap oversample. Now you can use bitmaps
 with higher resolution to have better look when you 
resize up.
-Added fast bitmap resizing.

Last edited by Youlean; 06-01-2016 at 04:18 PM.
Youlean is offline   Reply With Quote
Old 04-25-2016, 12:20 PM   #2
Andi!
Human being with feelings
 
Andi!'s Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 30
Default

Great work. It's nice to see such an enhancement in the framework. I wonder if it is really a wanted behaviour that the knobs are also resized. So the knobs are getting really small with small window sizes. Better for me would be that knob sizes don't change but some of them are hidden/shown dynamically.

Thumbs up for your work!
Andi! is offline   Reply With Quote
Old 04-25-2016, 04:15 PM   #3
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by Andi! View Post
Great work. It's nice to see such an enhancement in the framework. I wonder if it is really a wanted behaviour that the knobs are also resized. So the knobs are getting really small with small window sizes. Better for me would be that knob sizes don't change but some of them are hidden/shown dynamically.

Thumbs up for your work!
Thanks! I am really glad that someone commented on this thread. I was getting feeling that no one cares and that is really demotivating, as I have spent 3 weeks working on this...

The plan is to have GUI that can automatically scale to any size for monitors with high resolution, and to have window that can be resized for many plugin views, for example mini view, normal, advanced etc. (This is what you want)

These features will come in the future (if someone cares...)
Youlean is offline   Reply With Quote
Old 04-25-2016, 04:31 PM   #4
Tronic
Human being with feelings
 
Join Date: Jan 2012
Posts: 91
Default

I care it....
not comment here, but now you have 99 forks in github
Tronic is offline   Reply With Quote
Old 04-25-2016, 04:40 PM   #5
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by Tronic View Post
I care it....
not comment here, but now you have 99 forks in github
Thanks! No, these forks are from WDL-OL.
Youlean is offline   Reply With Quote
Old 04-25-2016, 08:22 PM   #6
Andi!
Human being with feelings
 
Andi!'s Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 30
Default

More important than the forks is that you are contributing something to the community here, and that's great.
Is it possible that you provide the compiled plug-ins of your example for win/mac to make testing easier? And would be great to have some text elements with different sizes and maybe a fader/switch in your example.
Andi! is offline   Reply With Quote
Old 04-26-2016, 12:54 AM   #7
stw
Human being with feelings
 
Join Date: Apr 2012
Posts: 199
Default

Quote:
Originally Posted by Youlean View Post
These features will come in the future (if someone cares...)
I definitely care too!! ;-)
Just not enough time to drive any serious testing right now, sorry...
stw is offline   Reply With Quote
Old 04-26-2016, 02:01 AM   #8
jack461
Human being with feelings
 
jack461's Avatar
 
Join Date: Nov 2013
Location: France
Posts: 64
Default Two sized plugin...

Hi Youlean!

You are doing a great work, and I wonder if I should use it.

I am working [on Mac, OS X 10.9, Xcode 6.2] on a plugin which includes a graphical code editor, with a kind of whiteboard for designing algorithm. In "run" mode, the plugin has a small footprint, but in "edit" mode, I resize its window to show the whiteboard, and I use the IGraphics::Resize method for that.

While this is working to the perfection (well, most of the time), I have two problems :
- the IGraphics::Resize method deletes all controls with: mControls.Empty(true); while there is probably a good reason for that, which I don't yet fully understand, it is really a pain in the neck to manage the state of my 600 controls or so...
- the size of the plugin is fixed in the two modes (810 by 326 pixels, and 1282 by 910) which may not be convenient for all users.

Finally, I do not use bitmaps, but all controls are drawn with basic primitives such as DrawHorizontalLine, DrawVerticalLine, FillIRect, DrawArc, DrawCircle, FillCircle, FillRoundRect, DrawIText, etc.

As I understand, your approach does not imply that the controls are deleted, as with IGraphics::Resize. On the other hand, it does little in helping with my run/edit problem, since it doesn't change the layout of the plugin.

All in all, it seems that I would have a lot of code rewriting. What is your point of view ? Do you suggest that I have a deeper look to your code, or do you think it doesn't address my problem ?

Anyway, in a future design, I certainly will try to use it, since it looks like a very good approach and provides nice features.

Jack.
jack461 is offline   Reply With Quote
Old 04-26-2016, 02:36 AM   #9
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by jack461 View Post
Hi Youlean!

You are doing a great work, and I wonder if I should use it.

I am working [on Mac, OS X 10.9, Xcode 6.2] on a plugin which includes a graphical code editor, with a kind of whiteboard for designing algorithm. In "run" mode, the plugin has a small footprint, but in "edit" mode, I resize its window to show the whiteboard, and I use the IGraphics::Resize method for that.

While this is working to the perfection (well, most of the time), I have two problems :
- the IGraphics::Resize method deletes all controls with: mControls.Empty(true); while there is probably a good reason for that, which I don't yet fully understand, it is really a pain in the neck to manage the state of my 600 controls or so...
- the size of the plugin is fixed in the two modes (810 by 326 pixels, and 1282 by 910) which may not be convenient for all users.

Finally, I do not use bitmaps, but all controls are drawn with basic primitives such as DrawHorizontalLine, DrawVerticalLine, FillIRect, DrawArc, DrawCircle, FillCircle, FillRoundRect, DrawIText, etc.

As I understand, your approach does not imply that the controls are deleted, as with IGraphics::Resize. On the other hand, it does little in helping with my run/edit problem, since it doesn't change the layout of the plugin.

All in all, it seems that I would have a lot of code rewriting. What is your point of view ? Do you suggest that I have a deeper look to your code, or do you think it doesn't address my problem ?

Anyway, in a future design, I certainly will try to use it, since it looks like a very good approach and provides nice features.

Jack.
Thanks! Don't use it for now in your projects that you are going to release to the public, because the this is still in alpha phase.
Don't bother too much about my code for now, many more features are comming, so stay tuned.

Don't worry about your project, this will be covered in one of the next updates.
Youlean is offline   Reply With Quote
Old 04-26-2016, 03:45 AM   #10
Antonio the carver
Human being with feelings
 
Join Date: Apr 2014
Posts: 37
Default

We care a lot! This is something I have wanted to do myself for a long time, and I really think your work seems great!

I will take it for a spin when I have time, of that you can be sure

Thank you!
Antonio the carver is offline   Reply With Quote
Old 04-28-2016, 07:38 AM   #11
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by Andi! View Post
More important than the forks is that you are contributing something to the community here, and that's great.
Is it possible that you provide the compiled plug-ins of your example for win/mac to make testing easier? And would be great to have some text elements with different sizes and maybe a fader/switch in your example.
I will add more elements soon. As for testing I think that it is better to build it your self and explore options that this branch will have. Currently I am mainly interested does this work on AAX because I can not test this...
Youlean is offline   Reply With Quote
Old 04-28-2016, 07:40 AM   #12
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by stw View Post
I definitely care too!! ;-)
Just not enough time to drive any serious testing right now, sorry...
Thanks! No problem, test it when you can...

Quote:
Originally Posted by Antonio the carver View Post
We care a lot! This is something I have wanted to do myself for a long time, and I really think your work seems great!

I will take it for a spin when I have time, of that you can be sure

Thank you!
Thanks! This is one of the essential features missing in WDL...
Youlean is offline   Reply With Quote
Old 04-28-2016, 07:54 AM   #13
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

New features added. Look at the changelog. Now GUI scalling is almost done. Next thing will be to have window resizing (that many of you actually want).

To be clear the GUI resizing will be implemented in 3 steps:

1. Setting view size - With this you will be able to set up for example mini view, advanced view where you will have more knobs etc.

2. Window resizing - This will resize window of different view. For example you could have mini view and on that mini view you will have some spectrum analyzer, now when you resize window you can make spectrum analyzer to be resized but the rest of controls won't be enlarged, and view won't jump to the advanced view.

3. GUI scaling - This will take everything you have done with the view and enlarge it. This is mainly for monitors with higher resolutions (retina etc.)

My main goal with all of these is to make it as automatic as possible, so that we don't have to worry about it when we develop the plugins...
Youlean is offline   Reply With Quote
Old 04-28-2016, 08:19 AM   #14
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

awesome, this works really nicely!

When I have time I am going to study your work and integrate the functionality into WDL-OL. We need better resizing and retina support.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 04-28-2016, 08:30 AM   #15
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by olilarkin View Post
awesome, this works really nicely!

When I have time I am going to study your work and integrate the functionality into WDL-OL. We need better resizing and retina support.
Thanks! Don't bother looking at it in detail yet because there are still a lot of features coming... When I finish implementing all features I will let you know...

I wanted to ask you do you know a way to execute some function after load. For example I want GUI to be resized after load (currently it is always resized at GUI open), and if call resize last in the main constructor this works for vst2 but not vst3... I am little bit stuck there.

Also one of disadvantage is that OnGUIOpen is called from audio thread in vst2 (and maybe other formats), but vst3 is called from GUI thread that I prefer for resizing GUI.

Anyways, I will look at these when I finish implementing all features.
Youlean is offline   Reply With Quote
Old 05-07-2016, 10:07 AM   #16
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

This is a preview of a new version that is coming...

Youlean is offline   Reply With Quote
Old 05-22-2016, 05:03 PM   #17
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

New update is available.

Youlean is offline   Reply With Quote
Old 05-25-2016, 03:37 PM   #18
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 271
Default

I have been looking at your code, and I have a question about how to implement part of it.

In my plugin, I have different GUI layouts and sizes. I have been able to move all of the controls correctly, but the redrawing is not working. If I have a large layout and switch to a smaller layout, the larger layout is still displayed with the new smaller layout on top. The controls are working on the smaller layout, but I can't figure out how you managed to resize and redraw the GUI without the artifacts from the larger GUI.

...and many thanks for your work!
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 05-25-2016, 04:12 PM   #19
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by random_id View Post
I have been looking at your code, and I have a question about how to implement part of it.

In my plugin, I have different GUI layouts and sizes. I have been able to move all of the controls correctly, but the redrawing is not working. If I have a large layout and switch to a smaller layout, the larger layout is still displayed with the new smaller layout on top. The controls are working on the smaller layout, but I can't figure out how you managed to resize and redraw the GUI without the artifacts from the larger GUI.

...and many thanks for your work!
No problem!

So if understand correctly you have your own method for GUI resizing? If so, you are probably deleting controls on resize which my implementation avoids so looking at my code won't help you a lot...

Is it possible for you to share a screenshot/video (privately if you want)? This will help me to see what is actually going on...

Did you tried to call SetAllControlsDirty() after resize?
Youlean is offline   Reply With Quote
Old 05-25-2016, 05:37 PM   #20
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 271
Default

Cool! PM sent.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 05-26-2016, 01:26 AM   #21
br_ck1
Human being with feelings
 
Join Date: Dec 2015
Posts: 23
Default

Quote:
Originally Posted by olilarkin View Post
awesome, this works really nicely!

When I have time I am going to study your work and integrate the functionality into WDL-OL. We need better resizing and retina support.
Great. It would be a really nice feature indeed...

And having all great stuff embedded in a single fork of WDL would be even better.
br_ck1 is offline   Reply With Quote
Old 05-26-2016, 01:30 PM   #22
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 271
Default

I just wanted to say that my graphics problem is fixed. Thanks for all the help.

So, your code changes IGraphics::Resize() by removing the following two lines
Code:
 ReleaseMouseCapture();
 mControls.Empty(true);
Just out of curiosity, what does the ReleaseMouseCapture() do that you needed to take it out?
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 05-26-2016, 01:42 PM   #23
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by random_id View Post
I just wanted to say that my graphics problem is fixed. Thanks for all the help.

So, your code changes IGraphics::Resize() by removing the following two lines
Code:
 ReleaseMouseCapture();
 mControls.Empty(true);
Just out of curiosity, what does the ReleaseMouseCapture() do that you needed to take it out?
No problem. Yes these are the changes. I am not deleting controls so mControls.Empty(true); must be deleted and ReleaseMouseCapture(); need to be deleted also because it is releasing mouse every time gui resizes and changing gui size by mouse dragging was not possible because of that.
Youlean is offline   Reply With Quote
Old 05-29-2016, 11:14 AM   #24
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

New version is available... This is slowly coming towards an end. There are still a few features missing but it is almost ready...

Last edited by Youlean; 05-29-2016 at 11:22 AM.
Youlean is offline   Reply With Quote
Old 06-01-2016, 04:16 PM   #25
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

IPlugControls is now updated to support scaling.

Youlean is offline   Reply With Quote
Old 06-01-2016, 05:57 PM   #26
Tronic
Human being with feelings
 
Join Date: Jan 2012
Posts: 91
Default

Tronic is offline   Reply With Quote
Old 06-02-2016, 11:16 PM   #27
Andi!
Human being with feelings
 
Andi!'s Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 30
Default

Fantastic... that really looks great and you are doing an awesome work here.
Andi! is offline   Reply With Quote
Old 06-03-2016, 02:33 AM   #28
MidiN
Human being with feelings
 
Join Date: Jul 2015
Posts: 14
Default

Amazing job @Youlean, keep on going!
Highly appreciated.
MidiN is offline   Reply With Quote
Old 06-05-2016, 05:36 PM   #29
snooks
Human being with feelings
 
Join Date: Sep 2015
Posts: 1,147
Default

Yes, thanks for the additions... appreciate the work!
snooks is offline   Reply With Quote
Old 06-07-2016, 07:39 AM   #30
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Thanks guys! BTW, I have fixed 1pixel cut on IPlugControls...
Youlean is offline   Reply With Quote
Old 07-26-2016, 12:36 PM   #31
snooks
Human being with feelings
 
Join Date: Sep 2015
Posts: 1,147
Default

I'm getting a crash when opening a 2nd instance of a plugin in GetLayoutContainerDrawRECT in IPluginGUIResize.h.

FindLayoutPointerPosition is returning -1 which means this is crashing...
Code:
int position = FindLayoutPointerPosition(viewMode, pControl);
return &layout_container[viewMode].org_draw_area[position];
snooks is offline   Reply With Quote
Old 07-26-2016, 12:39 PM   #32
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by snooks View Post
I'm getting a crash when opening a 2nd instance of a plugin in GetLayoutContainerDrawRECT in IPluginGUIResize.h.

FindLayoutPointerPosition is returning -1 which means this is crashing...
Code:
int position = FindLayoutPointerPosition(viewMode, pControl);
return &layout_container[viewMode].org_draw_area[position];
OK, I will look at it.
Youlean is offline   Reply With Quote
Old 07-26-2016, 01:10 PM   #33
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

I have pushed an update, should be working now, but I noticed other bugs too, I will fix it later...
Youlean is offline   Reply With Quote
Old 07-26-2016, 01:27 PM   #34
snooks
Human being with feelings
 
Join Date: Sep 2015
Posts: 1,147
Default

Cool, thanks for the fix, I'll grab it after you've done your other fixes and test some more. Cheers!
snooks is offline   Reply With Quote
Old 07-27-2016, 11:21 AM   #35
snooks
Human being with feelings
 
Join Date: Sep 2015
Posts: 1,147
Default

I merged your last commits - are you seeing an issue where moving controls in one instance of a plugin moves controls in another?
snooks is offline   Reply With Quote
Old 07-27-2016, 11:56 AM   #36
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

It seams that I broke many things in the code cleanup. Give me few days to fix them all (I hope)...
Youlean is offline   Reply With Quote
Old 07-27-2016, 12:00 PM   #37
snooks
Human being with feelings
 
Join Date: Sep 2015
Posts: 1,147
Default

No worries, let me know when you have something ready for more testing. Thanks!
snooks is offline   Reply With Quote
Old 07-28-2016, 04:46 AM   #38
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

Quote:
Originally Posted by snooks View Post
issue where moving controls in one instance of a plugin moves controls in another?
I can't see this. Can you explain a little bit more?

BTW, thanks for testing! This really speeds up the the development!
Youlean is offline   Reply With Quote
Old 07-28-2016, 05:21 AM   #39
snooks
Human being with feelings
 
Join Date: Sep 2015
Posts: 1,147
Default

Thank you for this extension to IPlug, it's a really great addition!

Re the issue, here's a gif of two plugins placed on top of each other in Reaper (it's the same in other hosts)...



All instances of plugins of the same format (VST2 or VST3) have tied parameters.
snooks is offline   Reply With Quote
Old 07-28-2016, 05:28 AM   #40
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 313
Default

OK, can you reproduce this with IPlugBetterGUIResizing? For me it is working properly here... Did you put this code in your project?

Code:
enum EParams
{
	// This is reserved for GUI resize
	viewMode = 0,
	windowWidth = 1,
	windowHeight = 2,
	// -------------------------------

	// Your custom parameters:
	kGain = 3,
	kGain1 = 4,

	kNumParams
};
Youlean 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 09:14 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.