svision2
1.0.0
This is SVision2. Another GUI library. A continuation of SVision for MSDOS: SVision for MSDOS.
See full source for demo - src/main.cxx

clang-format.std::make_shared<Button>)src/buttonstates.h (used by Button and Checkbox).#ifdef).Timer in practice you get a Win32Timer, and you can see on the debugger the UINT_PTR timer_idPosixTimer and you can see its timer_t timerid.auto func() -> const int; - for everything.int foo = 0; Point location = {}. So you can look for = and
know when a member is assigned by default.Status is that this is not usable still, and it is under heavy development.
For compilation instructions see Compilation instructions
... I don't own a Mac, so a PR is welcomed. If you want to buy me a Mac, contact me. This is planned - and should be easy to port.
The design of this toolkit is trivial: everything is a raster image. No GPU. Each widget has its own buffer it writes to it, and it gets painted into the parents.
src/platform-foo.{h,cpp}: Implement a new struct PlatformFOO : Platform:
open_window() returns your platform window (see bellow).invalidate(PlatformWindow &w) first cast to your own window:
auto window = static_cast<PlatformWindowFOO *>(&w); (no need to validate, if someone
is sending a different class on purpose - an uglier problem happens).show_window() - again, cast to your own class, to get the correct handle (platformwin32.cpp
is a good simple example).invalidate() - again, cast to your own class, to get the correct handle.
This paints the window content into your platform windowing system.main_loop() - note that you should not exit on last window open. See platformwin32.cpp for
reference.convert_x11_key_event() as example.using ThePlatform = PlatformFOO.PlatformWindowFOO: this class defines a new window. You can add your local code (HWND or XID).
Do this internally in the PlatformFOO.cpp file - only forward declare this in the header, as
this is an pure implementation detail.src/timer.{h,cpp}: You will also need a platform timer. inside timer.h, add define struct FooTimer : PlatformTimer - and at the end using Timer = FooTimer.