build/api-examples/Widget.cpp¶
Complete program from the Widget API reference. Save it at the path shown above and use the build command in the reference page.
Source files · Download Widget.cpp
#include "widgets.hpp"
#include <cstdio>
#include <cstring>
int main()
{
gaspardos::gui::Widgets widgets(320, 200);
gaspardos::gui::Widget item(gaspardos::gui::LabelKind, 1, 10, 10, 100, 26, "hello");
return widgets.add(item) == 0 ? 0 : 1;
}