Menu

Creating your first window with Zekit: entry points, three coordinate systems, and one ordering trap
πŸ“°

Creating your first window with Zekit: entry points, three coordinate systems, and one ordering trap

DEV Community: cppΒ·ζ³½Β·about 3 hours ago
#6Xk2g4Ng
#devtocpp#devto#dev#include#window
Reading 0:00
15s threshold

Zekit is a C++20 desktop GUI toolkit that compiles to a single static library. Getting a window on screen takes eleven lines, and none of them are platform code.

This post walks the whole surface of a Kit::Window : the entry point, the event loop, geometry, size constraints, and the one ordering rule that will silently break your renderer choice if you get it wrong.

The eleven-line program

#include <Zekit.h> #include <ZekitApp.h>

ZEKIT_APP_ENTRY ( myApp ) { Kit :: Window window ; window . SetTitle ( "Zekit" ) ; window . SetSize ( 1000 , 700 ) ;

window . Show ( ) ; return window . exec ( ) ; }

Enter fullscreen mode

Exit fullscreen mode

Two headers, two jobs: Zekit.h for the window, ZekitApp.h for the entry point.

SetTitle takes UTF-8, so non-ASCII text goes in directly.

SetSize(1000, 700) sets the client area , not the outer frame.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.