Andreas Kling
f6d2c3ed87
Hook everything up to run the GUI on top of the kernel.
...
Okay things kinda sorta work. Both Bochs and QEMU now boot into GUI mode.
There's a ton of stuff that doesn't make sense and so many things to rework.
Still it's quite cool to have made it this far. :^)
2019-01-10 23:19:29 +01:00
Andreas Kling
8626e95509
Make Widgets/ build inside the kernel.
2019-01-10 22:52:14 +01:00
Andreas Kling
e180e2553a
Rename CBitmap to CharacterBitmap.
2019-01-10 05:41:49 +01:00
Andreas Kling
305aa25aae
Let's have an RGBA32 typedef for raw pixel data.
2019-01-10 05:36:32 +01:00
Andreas Kling
df799e6d7b
ColorSDL.cpp -> Color.cpp
2019-01-10 05:29:36 +01:00
Andreas Kling
f603c17136
Merge EventLoopSDL into EventLoop.
2019-01-10 05:28:37 +01:00
Andreas Kling
3e908abfca
Start separating out the SDL-related stuff in Widgets.
2019-01-10 05:21:19 +01:00
Andreas Kling
077f1007eb
More window manager hacking. Get rid of TerminalWidget for now.
2019-01-10 05:11:07 +01:00
Andreas Kling
ceb373cf71
More window manager hacking. FocusIn/FocusOut events.
2019-01-09 05:40:04 +01:00
Andreas Kling
7577ee0c67
Remove some #if 0'd code.
2019-01-09 04:51:30 +01:00
Andreas Kling
cfd76ade73
Stop recomposing the window hierarchy after every dang widget paint.
2019-01-09 04:46:16 +01:00
Andreas Kling
f3ec96a1b9
Print the number of WindowManager recompose() calls to debugger.
2019-01-09 04:18:28 +01:00
Andreas Kling
39e236d346
Let WindowManager send out events for WindowBecame{Active,Inactive}
2019-01-09 04:15:17 +01:00
Andreas Kling
4775fd88e3
More window management work.
...
- Fix inverted mouse event hit test z-ordering.
- Let the RootWidget backing store simply be the display framebuffer.
2019-01-09 03:51:34 +01:00
Andreas Kling
723ff8c2ab
Add basic z-order for Windows.
2019-01-09 03:16:58 +01:00
Andreas Kling
baec8925a8
Fix blit bleed for windows with x() < 0.
2019-01-09 02:51:53 +01:00
Andreas Kling
9963da9005
Start refactoring graphics system to have per-window backing stores.
...
It was fun for everyone to share a single framebuffer but it was also
kinda really awful. Let's move towards having a "GraphicsBitmap" as the
backing store for each Window.
This is going to need a lot of refactoring so let's get started.
2019-01-09 02:06:04 +01:00
Andreas Kling
a9f256a745
Make the Widgets/ directory build again.
2018-12-21 02:18:16 +01:00
Andreas Kling
ec1c487dcd
Yet another pass of style fixes.
2018-12-21 02:10:45 +01:00
Andreas Kling
dd502bb54e
Make the widgets code build on macOS.
...
Funny, I haven't looked at this code in a few weeks and there's so much to change!
2018-12-02 23:41:10 +01:00
Andreas Kling
8fa2d7104a
More VFS cleanup.
2018-11-15 16:04:25 +01:00
Andreas Kling
601d0d1739
Better int hashing. This was going to bite me sooner or later.
2018-10-27 09:33:24 +02:00
Andreas Kling
fc1facf5c0
Let widget have a font() instead of using Font::defaultFont() everywhere.
2018-10-14 13:06:05 +02:00
Andreas Kling
959a1b0750
Close the MsgBox when clicking the OK button.
...
This feels vaguely crashy. I haven't tested window/widget destruction
before so there's sure to be bugs.
2018-10-14 01:23:01 +02:00
Andreas Kling
3ebea05996
Add a simple MsgBox() :^)
2018-10-14 00:21:42 +02:00
Andreas Kling
e9e7f7a714
Improve TextBox text placement a little bit.
2018-10-13 23:23:11 +02:00
Andreas Kling
d305c316e1
Add TextBox::onReturnPressed.
2018-10-13 23:19:44 +02:00
Andreas Kling
7a0a7abc52
Try out a signal-like system like this:
...
auto* b = new Button;
b->onClick = [] (Button&) {
printf("The button was clicked!\n");
};
2018-10-13 23:01:06 +02:00
Andreas Kling
a3fb19fe9c
Use fooEvent() type names for the virtual event handlers.
2018-10-13 22:51:50 +02:00
Andreas Kling
dfb70ed234
Start working on a simple TextBox widget.
2018-10-13 22:46:34 +02:00
Andreas Kling
6f1b384cde
More work on focus.
...
ListBox now renders differently depending on focus state.
2018-10-13 20:59:25 +02:00
Andreas Kling
1929cb6b71
Implement basic focus.
2018-10-13 17:52:47 +02:00
Andreas Kling
44a32039be
Let the WindowManager track the active window.
...
We draw the active window in a different color, obviously. :^)
2018-10-13 17:42:43 +02:00
Andreas Kling
560405667e
Start using WeakPtr for some of the WindowManager window pointers.
2018-10-13 17:00:45 +02:00
Andreas Kling
6ea8ce500c
Use HashMap::remove() in some places that I wanted it.
2018-10-13 14:26:37 +02:00
Andreas Kling
9a387d96da
Use Vector::remove() in a place I wished I had it earlier.
2018-10-13 01:19:25 +02:00
Andreas Kling
f20977c65f
Add a basic Listbox widget.
2018-10-13 00:20:44 +02:00
Andreas Kling
8016139430
Improve the "k" in Peanut8x10 a bit.
2018-10-12 23:12:17 +02:00
Andreas Kling
e16d145cb4
Some color cleanup.
2018-10-12 23:02:23 +02:00
Andreas Kling
aceedaf957
Clip Painter operations to the screen rect.
2018-10-12 22:50:28 +02:00
Andreas Kling
b5ff34174d
Label should respect background/foreground color.
2018-10-12 21:00:17 +02:00
Andreas Kling
1df47d3ed5
Set KeyEvent modifier bits from SDL key event.
2018-10-12 20:56:22 +02:00
Andreas Kling
b999a77d0f
Improve KeyEvent a bit.
...
Now it has a text() which is what you'll usually want.
2018-10-12 20:55:06 +02:00
Andreas Kling
fb4ae12bc2
Add a visual bell to TerminalWidget. Also backspace.
2018-10-12 20:05:11 +02:00
Andreas Kling
20a1795218
Improve CheckBox style a bit.
2018-10-12 19:47:20 +02:00
Andreas Kling
6f9e0e3876
After moving a window, try to repaint a bit less.
...
Only repaint windows that intersect either the old or the new rect.
Also only repaint those rects in the root widget.
2018-10-12 19:39:48 +02:00
Andreas Kling
74aa4d5345
Fix CheckBox caption position.
2018-10-12 17:00:51 +02:00
Andreas Kling
ff0ce2b921
Painter::TextAlignment::Center vertical fix.
2018-10-12 16:57:43 +02:00
Andreas Kling
0dcdbe3e03
Make buttons pressable.
2018-10-12 15:52:41 +02:00
Andreas Kling
5412dac05d
Paint Button in a very Windows 3-ish style.
2018-10-12 14:58:16 +02:00