View Single Post
Old 04-26-2016, 02:01 AM   #8
jack461
Human being with feelings
 
jack461's Avatar
 
Join Date: Nov 2013
Location: France
Posts: 181
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