sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    GUI without decorations

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 3.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bomastudioB Offline
      bomastudio
      last edited by

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


      toposhaper.jpg

      1 Reply Last reply Reply Quote 0
      • fredo6F Offline
        fredo6
        last edited by

        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 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement