How does the IDE draw controls?

I’m fascinated by how the IDE draws the native windows and controls in the UI designer. Are they actual windows and widgets somehow shoe horned into the app or are they just accurately drawn on a canvas?

I ask for two reasons:

1). Shear curiosity as a programmer
2). I’ve been toying around with a wireframing/prototyping app and getting some insight as to how Xojo do it would be great.

The window frame on OS X uses private API’s in OS X - dont need private API’s on Windows or Linux
Desktop controls are drawn using draw into

So when you say desktop controls are drawn using DrawInto do you mean they are just cleverly crafted images drawn to a canvas or are there declares that provide the image of a button/popupmenu, etc that you can then render?

To my understanding the Drawinto just returns an image of the control. It’s static for sure.

or window ?

To be honest, I do not understand the use(or to use DrawInto in that case).

So is there an API for Win/Linux that will return an image of the various windows and controls that can then be drawn to a Xojo canvas?

No
Literally RectControl.DrawInto
We dont need a button you can push - just the picture

Its basically much the same technique displayed in the Example project “CanvasDragRect.xojo_binary_project” just using pictures of controls

Finally got round to playing with this. If you literally cut and paste the example from (RectControl.DrawInto) it works but the drawn control is blurry. I’m guessing this is a HiDPI issue. Is there something special that needs to be done to render the control crisply?

just making sure you draw into a picture that is, when on a hidpi screen, also set to be hidpi etc

Now, if you could rephrase the title of this discussion to a useful one that actually tells us what it’s talking about, such as “How does the IDE draw controls in the UI designer”, making a bookmark of it would actually help finding this later again when I ever get to add this feature to Arbed :wink: