Benjamin Otte
12331e3376
listbase: Move focus moving keybindings here
...
The focus tracker is not yet moved because that depends on scroll_to()
support and we don't have that yet.
Whoops.
So we use a hack.
2020-05-30 19:26:46 -04:00
Benjamin Otte
2541037ec2
listbase: Move orientable implementation here
2020-05-30 19:26:46 -04:00
Benjamin Otte
9d6aa7d88e
listbase: Move selection handling here
2020-05-30 19:26:46 -04:00
Benjamin Otte
0bd16308d6
listbase: Move item manager here
...
Nothing really changes, because both ListView and GridView still keep
self->item_manager around, but it's set up to point at the base's item
manager.
This way we can slowly move things to GtkListBase that need the item
manager (like trackers).
2020-05-30 19:26:46 -04:00
Benjamin Otte
0011ce949c
listbase: Move GtkScrollable implementation
...
Shared code between GtkGridView and GtkListView.
2020-05-30 19:26:46 -04:00
Benjamin Otte
cc987b31ae
Add GtkListBase
...
This is a base item for GTK's list widgets so they can share some (read:
hopefully a lot of) code.
2020-05-30 19:26:46 -04:00
Benjamin Otte
c092d0a616
gridview: Simplify allocation code
...
It doesn't fix the bug I'm after, but it looks a lot better.
2020-05-30 19:26:46 -04:00
Benjamin Otte
f57afe51af
gridview: Add move keybindings
2020-05-30 19:26:46 -04:00
Benjamin Otte
bc22d04737
gridview: Implement (un)select all
...
Adds listitem.select-all and listitem.unselect-all actions and installs
the same keybindings as the treeview for those actions.
2020-05-30 19:26:46 -04:00
Benjamin Otte
093677b0f8
gridview: Add a focus tracker
...
... and use that to properly update selections when moving around with
the arrow keys.
2020-05-30 19:26:46 -04:00
Benjamin Otte
c38e050cc7
gridview: Implement list.scroll-to action
2020-05-30 19:26:46 -04:00
Benjamin Otte
ba0122fd02
gridview: Add activation
2020-05-30 19:26:46 -04:00
Benjamin Otte
affd2737d5
gridview: Implement minimum row height
...
We only allocate a certain amount of widgets - and we don't want to run
out of them. So we make all widgets high enough for this to never
happen.
2020-05-30 19:26:46 -04:00
Benjamin Otte
cc68073af0
gridview: Implement the list.select-item action
2020-05-30 19:26:46 -04:00
Benjamin Otte
1b105cdbef
gridview: Implement anchors and scrolling
2020-05-30 19:26:45 -04:00
Benjamin Otte
ea93e18081
gridview: Actually do something
...
Implement measuring and allocating items - which makes the items appear
when drawing and allows interacting with the items.
However, the gridview still does not allow any user interaction
(including scrolling).
2020-05-30 19:26:45 -04:00
Benjamin Otte
443e44853a
listview: Pass the CSS name of listitems to the manager
...
... instead of hardcoding "row".
2020-05-30 19:26:45 -04:00
Benjamin Otte
b73e95655d
gridview: Implement GtkOrientable
...
Again, this is just the skeleton, because the Gridview does nothing yet.
2020-05-30 19:26:45 -04:00
Benjamin Otte
e8bb84e0e2
gridview: Add factory handling
...
Just copy the listview APIs.
Code still doesn't do anything with it.
2020-05-30 19:26:45 -04:00
Benjamin Otte
368f04e06b
gridview: Implement GtkScrollable
...
We can now scroll all the nothing we display.
We also clip it properly.
2020-05-30 19:26:45 -04:00
Benjamin Otte
86a75abe51
gridview: Add API for setting number of columns
...
The API isn't used yet.
2020-05-30 19:26:45 -04:00
Benjamin Otte
70aaecc937
gtk: Add a GtkGridView skeleton
2020-05-30 19:26:45 -04:00