GUI without decorations

GUI without decorations

Postby bomastudio » Tue Aug 21, 2018 6:36 am

Hi guys, I'm guessing how to build a GUI without any decorations (frame, toolbar, statusbas, etc) like Fredo's Toposhaper does. Any ideas?
0
User avatar
bomastudio 
PluginStore Author
PluginStore Author
 

Re: GUI without decorations

Postby fredo6 » Sun Aug 26, 2018 8:40 pm

GUI like TopoShaper and my other plugins' are drawn in the viewport and constantly refreshed (at each view.invalidate). So this is a very different technique compared with HTML dialogs.

Benefits:
1) you can use a state driven approach, since the refresh is permanent
2) you do not have problems of focus between the Sketchup window and the dialog box

Drawbacks
1) you have to draw everything with the OpenGL methods (i.e. view.draw2d()), and manage the interactivity with onLButtonDown, onLButtonDown and onMouseMove()).
2) The GUI takes some real-estate on the Sketchup viewport. And also, it disappears when you Orbit or pan
3) Some users don't like it, as it is 'non standard' (by the way, when looking at Web Sites, this difficult to say that there are standard in HTML too!)

Note that HTML / JavaScript / CSS, you can make the programming state driven by using frameworks like Vue and Bootstrap. There is a learning curve but overall it's working fine. For the focus, this is more complex to handle, but there is a technique to force Sketchup to give back focus to itself.

Fredo
1
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Developers' Forum

Who is online

Users browsing this forum: No registered users and 12 guests

Visit our sponsors: