mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 21:28:40 +00:00
44 lines
1017 B
C++
44 lines
1017 B
C++
#include "FrameBufferSDL.h"
|
|
#include "EventLoopSDL.h"
|
|
#include "RootWidget.h"
|
|
#include "Label.h"
|
|
#include "Button.h"
|
|
#include <cstdio>
|
|
|
|
int main(int c, char** v)
|
|
{
|
|
FrameBufferSDL fb(800, 600);
|
|
fb.show();
|
|
|
|
EventLoopSDL loop;
|
|
|
|
RootWidget w;
|
|
fb.setRootWidget(&w);
|
|
|
|
auto* l1 = new Label(&w);
|
|
l1->setRect(Rect(100, 100, 300, 20));
|
|
l1->setText("0123456789");
|
|
|
|
auto* l2 = new Label(&w);
|
|
l2->setRect(Rect(100, 120, 300, 20));
|
|
l2->setText("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
|
|
|
auto* l3 = new Label(&w);
|
|
l3->setRect(Rect(100, 140, 300, 20));
|
|
l3->setText("abcdefghijklmnopqrstuvwxyz");
|
|
|
|
auto* l4 = new Label(&w);
|
|
l4->setRect(Rect(100, 160, 300, 20));
|
|
l4->setText("!\"#$%&'()*+,-./:;<=>?@[\\]^_{|}~");
|
|
|
|
auto* l5 = new Label(&w);
|
|
l5->setRect(Rect(200, 200, 400, 50));
|
|
l5->setText("Welcome to the Serenity Operating System");
|
|
|
|
auto* b = new Button(&w);
|
|
b->setRect(Rect(10, 10, 100, 30));
|
|
b->setCaption("Button!");
|
|
|
|
return loop.exec();
|
|
}
|