40 lines
No EOL
708 B
Markdown
40 lines
No EOL
708 B
Markdown
# cigui
|
|
|
|
# Goal
|
|
|
|
```cpp
|
|
#include <cigui.hpp>
|
|
|
|
struct ContentView : public cig::View {
|
|
void body() {
|
|
cig::VStack(
|
|
cig::SystemIcon("globe.fill"),
|
|
cig::Text("Welcome to Cigui")
|
|
)
|
|
}
|
|
}
|
|
|
|
struct SettingsView : public cig::View {
|
|
void body() {
|
|
cig::Tabbed(
|
|
cig::Tab(
|
|
|
|
).tag("Tab 1"),
|
|
cig::Tab(
|
|
cig::VStack(
|
|
cig::Text("Other Tab")
|
|
)
|
|
)
|
|
);
|
|
}
|
|
}
|
|
|
|
struct MainApp : public cig::App {
|
|
void body() {
|
|
cig::WindowGroup()(
|
|
cig::ViewWindow(new ContentView()),
|
|
cig::SettingsWindow(new SettingsView())
|
|
)
|
|
}
|
|
}
|
|
``` |