Commit Graph

1884 Commits

Author SHA1 Message Date
Andreas Kling
c71ece77fa VisualBuilder: Tweak grid size and add an (empty) toolbox window. 2019-04-11 04:01:17 +02:00
Andreas Kling
c6ffb3e2b8 VisualBuilder: Use real GWidgets instead of pretend VBWidgets.
That first design was the wrong idea. Instead, have VBWidget instantiate
a GWidget of the appropriate type and parent it to the VBForm.
We then use a new "greedy hit-testing" mechanism in GWidget to prevent any
mouse events from reaching the VBForm's children.

To paint the grabbers above the child widgets, I added a slightly hackish
but kind of neat second_paint_event() that is called after a widget has
painted all of his children. :^)
2019-04-11 03:34:37 +02:00
Andreas Kling
af070324db WindowServer: Tweak window title positioning. 2019-04-11 02:59:40 +02:00
Andreas Kling
ead6524c0a VisualBuilder: Add the first VBWidget subclass: VBButtonWidget. :^) 2019-04-11 02:49:10 +02:00
Andreas Kling
d73f79a2d2 VisualBuilder: Allow resizing widgets using their grabbers. 2019-04-11 02:35:30 +02:00
Andreas Kling
3c8e53ef2b VisualBuilder: Work on selecting a widget and moving it around. 2019-04-11 01:59:07 +02:00
Andreas Kling
77a77b5bf7 WindowServer: Add 1440x900 resolution shortcut to system menu. 2019-04-11 00:21:08 +02:00
Andreas Kling
8268ece1bd VisualBuilder: Start working on an interface builder application.
It's tedious making interfaces programmatically. Let's make a program to
help us with this. :^)
2019-04-11 00:05:47 +02:00
Andreas Kling
0bc72551f4 Kernel: Remove two unneeded headers. 2019-04-10 22:49:11 +02:00
Andreas Kling
d8e1545783 LibCore: Move LibGUI/GLock to LibCore/CLock. 2019-04-10 22:39:59 +02:00
Andreas Kling
ab1c84cf53 LibCore: Move HTTP classes from LibGUI to LibCore. 2019-04-10 22:28:10 +02:00
Andreas Kling
cfd6e6cc36 LibCore: Move GIODevice hierarchy from LibGUI to LibCore. 2019-04-10 20:22:23 +02:00
Andreas Kling
fc1d3074de LibCore: Move LibGUI/GNotifier to LibCore/CNotifier. 2019-04-10 17:35:43 +02:00
Andreas Kling
b2542414d7 LibCore: Add CEventLoop and make LibGUI/GEventLoop inherit from it.
This is shaping up to be quite nice.
2019-04-10 17:30:58 +02:00
Andreas Kling
2f1f51b8ab LibCore: Move LibGUI/GObject to LibCore/CObject. 2019-04-10 17:01:54 +02:00
Andreas Kling
b8062f69d8 LibCore: Add CEvent and make LibGUI/GEvent inherit from it. 2019-04-10 16:56:55 +02:00
Andreas Kling
696ada2810 Taskbar: Don't unconditionally update buttons on every state change. 2019-04-10 16:39:23 +02:00
Andreas Kling
5e0577a042 Introduce LibCore and move GElapsedTimer => CElapsedTimer.
I need a layer somewhere between AK (usable both by userspace and kernel)
and LibGUI (usable by userspace except WindowServer.) So here's LibCore.
2019-04-10 16:14:44 +02:00
Andreas Kling
a74f3615ac Color: Add to_grayscale() and darkened() helpers. 2019-04-10 16:00:29 +02:00
Andreas Kling
cfab81a961 WindowServer: Stop tracking whether clients have painted since last resize.
This optimization is no longer needed now that clients coalesce resizes
on their own. :^)
2019-04-10 15:46:56 +02:00
Andreas Kling
55811f233f LibGUI+WindowServer: Coalesce paints and resizes on the client side.
Only process paint and resize events on the GUI client side if those events
have the latest up-to-date window size. This drastically reduces async
overdraw during interactive resize.
2019-04-10 15:39:28 +02:00
Andreas Kling
0ac55f2c38 GWindow: Discard wrongly-sized backing stores in set_rect().
The WindowServer still holds on to at least one backing store in case it
needs to paint us again before we can render a new one. This ensures that
we don't end up stuck with an undersized backing store.
2019-04-10 14:35:13 +02:00
Andreas Kling
d4818dd2dd WindowServer: Give windows a "background color" to use for missing parts.
When resizing a window, we often end up having to paint some part of it
without coverage in the current backing store. This patch makes those cases
look nicer by having a fallback background color for each window, passed
along with the CreateWindow client message.
2019-04-10 14:29:47 +02:00
Andreas Kling
30e2d62c38 WindowServer: Factor out some parts of compose().
The main compositing loop was getting pretty unwieldy. Break out some parts
into functions so it's more understandable.
2019-04-10 13:51:47 +02:00
Andreas Kling
f6543c5946 LibGUI: Add a simple GGroupBox widget.
This needs some work on the visual side, but it gets the job done already.
2019-04-10 05:52:15 +02:00
Andreas Kling
b980c32662 FontEditor: Update the glyph map when changing a glyph's width. 2019-04-10 04:02:20 +02:00
Andreas Kling
f5c295ecc5 FontEditor: Add a "Glyph width:" label and align some things. 2019-04-10 03:51:03 +02:00
Andreas Kling
cf8b117d97 GCheckBox: Paint the box part as a container frame. 2019-04-10 03:44:23 +02:00
Andreas Kling
4ab0cd5d4c LibGUI: Move frame painting from GFrame to StylePainter.
This way it can be used by others who might not have a GFrame object.
2019-04-10 03:43:46 +02:00
Andreas Kling
e61dd994df FontEditor: Tighten the window size a bit. 2019-04-10 03:14:17 +02:00
Andreas Kling
313ac51832 LibGUI: Turn GTextBox into a wrapper around a single-line GTextEditor. 2019-04-10 03:08:29 +02:00
Andreas Kling
981623f4ee FontEditor: Convert the glyph map and editor widgets to be GFrames. 2019-04-10 02:43:57 +02:00
Andreas Kling
5ab043a687 GSpinBox: Move increment/decrement button within the widget frame. 2019-04-10 02:09:06 +02:00
Andreas Kling
9311164439 GWidget: Make hit testing respect child z-order.
This was as simple as iterating the children in reverse order. Duh. :^)
2019-04-10 02:08:32 +02:00
Andreas Kling
b8f150457e LibGUI: Repaint GScrollBar without hover highlight immediately on leave. 2019-04-10 01:50:10 +02:00
Andreas Kling
4abffa4dbe GSpinBox: Put nice little arrow glyphs on the buttons. 2019-04-10 01:37:08 +02:00
Andreas Kling
a00a2a9db5 WindowServer: Show ongoing resize in number of w/h increments, too.
This makes something like "(80x25)" show up in the resizing label as well
during Terminal resize. :^)
2019-04-09 17:48:01 +02:00
Andreas Kling
1ab99903af WindowServer: Display the window geometry while it's being moved or resized. 2019-04-09 17:17:30 +02:00
Andreas Kling
4c0f586f2b LibGUI: Add a spinbox widget.
This is essentially a combo widget containing a single-line GTextEditor
and two buttons for increment and decrement. The GTextEditor::on_change
callback is hooked to prevent non-numeric input but it's not entirely
perfect since that callback is asynchronous. This will work until we have
some more sophisticated input validation mechanism though.
2019-04-09 16:29:00 +02:00
Andreas Kling
4ba5e472be WindowServer: Always activate newly added windows.
This feels a lot better than new windows popping in inactive state.
2019-04-09 16:25:14 +02:00
Andreas Kling
151b7149e6 GTextEditor: Add GTextEditor::on_change callback for when content changes. 2019-04-09 16:20:36 +02:00
Andreas Kling
60a819c14a Kernel: Yet more work on bringing up POSIX SHM. 2019-04-09 02:37:38 +02:00
Andreas Kling
d6ff64db00 Launcher: Add tooltips to LauncherButtons. 2019-04-09 02:21:24 +02:00
Andreas Kling
26a06f3fcd Kernel: More work towards POSIX SHM, also add ftruncate(). 2019-04-09 01:10:00 +02:00
Andreas Kling
99f3cc26c3 Kernel+LibC: Add stubs for POSIX shared memory API.
Specifically shm_open() and shm_unlink(). This patch just adds stubs.
2019-04-08 23:44:12 +02:00
Andreas Kling
7f2eeb0b35 LibGUI+WindowServer: Add support for GWidget tooltips.
Any GWidget can have a tooltip and it will automatically pop up below the
center of the widget when hovered. GActions added to GToolBars will use
the action text() as their tooltip automagically. :^)
2019-04-08 18:58:44 +02:00
Andreas Kling
3e175c9a96 LibGUI: Move GSocketAddress to its own file. 2019-04-08 17:19:35 +02:00
Andreas Kling
93a4a4c597 Taskbar: Replace TaskbarWidget with a simple GFrame.
There's no need for a custom widget here, at least not now.
2019-04-08 17:17:16 +02:00
Andreas Kling
6d5a54690e LibGUI: Make GSocket connection asynchronous.
Now connect() will return immediately. Later on, when the socket is actually
connected, it will call GSocket::on_connected from the event loop. :^)
2019-04-08 04:56:11 +02:00
Andreas Kling
65d6318c33 Kernel: Support non-blocking connect().
If connect() is called on a non-blocking socket, it will "fail" immediately
with -EINPROGRESS. After that, you select() on the socket and wait for it to
become writable.
2019-04-08 04:52:21 +02:00