[LC++][ot] - how do GUI-libs notify the program of changes?

Chris Vine chris at cvine.freeserve.co.uk
Wed Apr 12 06:57:02 UTC 2006


On Monday 10 April 2006 14:07, Julien Claassen wrote:
> Hi all!
>   I'm currently working on a c++-GUI library and I wonder, how the GUI
> tells the program that something changed.
>   Simple scenario: I press a button or move a slider. I would want the
> engine of the program to react directly.
>   Can anyone help me? A pointer to well written tutorial for this problem
> would suffice. Only: I'm not to bright a programmer, really!
>   Kindest regards
>       Julien

You need to create an event loop.  The very simplest uses something like 
select() or poll() with a timeout.

You may want to look at the glib or Qt event loops for some ideas.

Chris





More information about the tuxCPProgramming mailing list