Skip to content

build/api-examples/Menu.cpp

Complete program from the Menu API reference. Save it at the path shown above and use the build command in the reference page.

Source files · Download Menu.cpp

#include "widgets.hpp"
#include <cstdio>
#include <cstring>

int main()
{
    gaspardos::gui::Widgets widgets(320, 200);
    gaspardos::gui::Menu    item(1, 10, 10, 100, 26, "File");
    return widgets.add(item) == 0 ? 0 : 1;
}