Commit Graph

27 Commits

Author SHA1 Message Date
Andreas Kling
f1b58d8d8c VisualBuilder: Let's have getters and setters for properties. 2019-04-14 04:14:23 +02:00
Andreas Kling
3f6408919f AK: Improve smart pointer ergonomics a bit. 2019-04-14 02:36:06 +02:00
Andreas Kling
c06a3bdeb4 LibGUI+WindowServer: Add support for per-GWidget context menus.
You can now simply assign a GMenu as a GWidget's context menu and it will
automagically pop up on right click. :^)
2019-04-12 17:18:13 +02:00
Andreas Kling
c98bbff0cb VisualBuilder: Add some widget-specific properties. 2019-04-12 15:17:53 +02:00
Andreas Kling
6f90f41516 VisualBuilder: Add some more GWidget default properties. 2019-04-12 14:47:21 +02:00
Andreas Kling
c736dbdf10 VisualBuilder: Add a text box to the properties window. 2019-04-11 23:57:58 +02:00
Andreas Kling
3cddc3484e VisualBuilder: Add [x, y, width, height] properties for all widgets.
At first I tried doing this as a single "rect" property but I like the
feel of the individual properties much better. :^)
2019-04-11 22:54:04 +02:00
Andreas Kling
ec841f3a23 VisualBuilder: Move properties window to its own class. 2019-04-11 22:03:55 +02:00
Andreas Kling
21d4b1c2fc VisualBuilder: Tweak property table column width. 2019-04-11 21:55:57 +02:00
Andreas Kling
34dd4fcaf1 VisualBuilder: Display read-only propery values in gray. 2019-04-11 21:53:39 +02:00
Andreas Kling
383b2efc1f VisualBuilder: Remove debug spam. 2019-04-11 21:47:50 +02:00
Andreas Kling
707bfe848d VisualBuilder: Add a table view with the selected widget's properties. 2019-04-11 21:41:09 +02:00
Andreas Kling
f52e66ceda VisualBuilder: Add a widget registry and a property class.
I need somewhere to centralize the knowledge about the different widget
types available. And VBProperty represents a property key/value of arbitrary
type (it uses a GVariant for the value.)
2019-04-11 16:13:19 +02:00
Andreas Kling
ba4a726e8b VisualBuilder: Add a properties window. 2019-04-11 15:43:26 +02:00
Andreas Kling
93b76628a5 GGroupBox: Improve appearance with new FrameShape::Box style. 2019-04-11 14:27:31 +02:00
Andreas Kling
f0501a0102 VisualBuilder: Add GGroupBox.
The icon currently looks better than a real GGroupBox. I have to fix that.
2019-04-11 13:46:25 +02:00
Andreas Kling
07a9b2c4e6 VisualBuilder: Let's use 5 pixels for the grid size for now. 2019-04-11 13:16:18 +02:00
Andreas Kling
3f67298dad VisualBuilder: Add GScrollBar (and yes, an icon for it, too.) 2019-04-11 06:42:07 +02:00
Andreas Kling
f25c524f20 VisualBuilder: Add GCheckBox and GLabel, and draw icons for them, too. 2019-04-11 06:32:27 +02:00
Andreas Kling
b5d1cfef58 VisualBuilder: Add icons to the toolbox, and support for GProgressBar. 2019-04-11 06:08:06 +02:00
Andreas Kling
75c76f6692 VisualBuilder: Make it possible to insert widgets from the toolbox. 2019-04-11 04:13:11 +02:00
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
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
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