Jump to content

Immediate widget handling


Recommended Posts

Posted

Good afteroon,
we are trying to understand how the creation or the visibility or redraw in general of a widget works.

As far as we have seen, even using these settings (in gfxconf.h file):
#define GWIN_REDRAW_IMMEDIATE                    TRUE
#define GWIN_REDRAW_SINGLEOP                     TRUE

the creation of a widget or the visibilty of a widget is not immediate.
How can we have a real immediate creation of a widget? Is there a way to have an immediate creation or redraw of a widget? Even if it will bring to a performance slowness; that is not important for us.
Thanks you

Posted

Hello @Stefano and welcome to the community!

The redrawing is handled by the window manager. It's possible to use no window manager at all, the built-in window manager or you can write and use your own window manager using gwinSetWindowManager() if you have any specific needs. With the built-in window manager you should achieve an instant-redraw of a widget by setting GWIN_REDRAW_IMMEDIATE to TRUE and calling gwinRedraw(). However, that setting is a global setting that will affect redrawing of all widgets. It will cause all redrawing requests to take place immediately - even when a widget requests a redrawing by itself. One of the jobs of a window manager is to figure out when and how to redraw things.

If you can explain why you need this / what you want to achieve we might be able to help you in a better way.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...