Jump to content
Some fixes and expermental features added to the Scintilla (SyntaxEditor) Widget
 

Some fixes and expermental features added to the Scintilla (SyntaxEditor) Widget


klepto2
 Share


In this gif you can see a small app with 3 tabs. The first tab renderes the scintilla control normally as an extra window above the actual Ultra Engine-Window. The second tab redirects the rendering to a pixmap and uses this to display the content in UltraEngine. The second appoach supprts full integration into the UltraEngine-UI with blending and overlays while the first has many drawbacks (airspace problem, no alpha blending) the 3rd is reserved for ingame ui mode, when the ui is rendered with vulkan. Then the control is redirected to a texture and this is used.
  • Like 3

 Share


Recommended Comments

The Airspace problem is a description for mixing different GUI technologies. In this case, the scintilla control uses natively gdi+ and its own window class and HWND. this window is rendered by gdi+ while the rest of the ui is rendered by UltraEngine.  So to show the scintilla control, it must always been on top of the Ultra Engine-Widgets, which means that the z-Index or order doesn't matter and in the gif you can see that the red overlay is clipped by the scintilla control, while with the redirection to the pixmap this is no problem, because i render the pixmap natively in UltraEngine and the original Scintilla Window is hidden. The term mostly comes from WPF and WinForms: https://adityaswami89.wordpress.com/2014/02/24/airspace-problem-wpf/

Link to comment

I'm doing the same thing for 3D rendering viewports. It works very well, but the pixmap approach you are showing here is very cool.

Link to comment

Wait, so what is doing rhe rendering to the pixmap? GDI, or does Scintillia have that capability built into it?

Link to comment

The rendering is done by a combination of gdi+ and the basic win32 api. I will send you some code tomorrow. But the keyword is PrintWindow() and getdibits().

Link to comment

It's also worth noting that in desktop mode menus and comboboxes use a separate window for the pop-up component, so there is no problems with these things appearing on top of a child window. However, this is not true when the GUI is being rendered in Vulkan.

Link to comment

I am using a small helper method to check if the interface is native or not (maybe something like this could make it into the Widget class) and to decide if i could use textures or must use pixmaps:

bool IsNativeInterface(shared_ptr<Interface> i)
{
    return i->GetWindow() != NULL;
}

If the interface is not native and you want or need to interact with the window you need to get it with ActiveWindow() and not use ui->GetWindow().

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...