This patch moves to sending up to 32 rects at a time when coordinating the
painting between WindowServer and its clients. Rects are also merged into
a minimal DisjointRectSet on the server side before painting.
Interactive resize looks a lot better after this change, since we can
usually do all the repainting needed in one go.
It's now possible to edit widget properties inline in the properties window.
We're currently relying on the basic GVariant conversion functions to do
all the "parsing" but that's not gonna be good enough.
GAbstractView should be able to manage the high-level editing logic, as long
as subclasses implement content_rect(GModelIndex) so we know where to put
the editing widgets. :^)
...and then make GWidget layout invalidation lazy. This way we coalesce
multiple invalidations into a single relayout and we don't have to worry
about child widgets not being fully constructed.
This is pretty shaky still, but the basic idea is that you subclass GModel
and return true for editable indices. The table view also needs to have its
editable flag set.
Now GTextEditor manages its own editing actions (cut/copy/paste/etc) and
will show a context menu containing them when requested.
Apps that want to put a GTextEditor's actions in its menu can get to the
actions via public getters. :^)
The declarative approach had way too many limitations. This patch adds a
context menu event that can be hooked to prepare a custom context menu on
demand just-in-time. :^)
- child_at(Point)
- move_to_front()
- move_to_back()
- is_frontmost()
- is_backmost()
This patch also makes it possible to receive the mouse event that triggers
a context menu before the context menu is shown. I'm not sure this is the
best design for context menus but it works for now.
The enabled state of a GAction now propagates both to any toolbar buttons
and any menu items linked to the action. Toolbar buttons are painted in
a grayed out style when disabled. Menu items are gray when disabled. :^)
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. :^)