Commit Graph

10 Commits

Author SHA1 Message Date
Matthias Clasen
8ba16eb4f1 Documentation fixes
Mostly fixing up indentation of continuation lines,
and other small cleanups.
2021-05-20 19:17:49 -04:00
Matthias Clasen
68cd66b210 builderlistitemfactory: Convert docs 2021-03-11 16:37:34 +00:00
Matthias Clasen
806779769e builderlistitemfactory: Documentation fixes 2020-06-29 22:11:36 -04:00
Matthias Clasen
c7feae65f1 builderlistitemfactory: Precompile the xml
This is the one place where we can really take advantage
of precompiling, since we instantiate this template
over and over.
2020-05-30 19:30:14 -04:00
Benjamin Otte
1af004361c listitemfactory: Simplify
Instead of 6 vfuncs, we now have 3 and rely on the factory keeping track
of what it needs to do.

We're doing lots of dancing from one object to another here, but this
will hopefully get simpler with further commits.
2020-05-30 19:26:46 -04:00
Benjamin Otte
db3e225f09 builder: Make gtk_builder_extend_with_template() work with objects
This will be relevant later when we introduce GtkListItem which is not a
GtkWidget.
2020-05-30 19:26:46 -04:00
Benjamin Otte
48a223abdf builderlistitemfactory: Add scope argument
This way, the scope used when creating builder instances can be
influenced. This way, callbacks can be passed into the factory.
2020-05-30 19:26:45 -04:00
Benjamin Otte
12e720fb23 listitemfactory: Make the builder factory properly buildable
Turn the construct arguments into construct properties so that they can
be set from ui files.
2020-05-30 19:26:45 -04:00
Benjamin Otte
626c525706 listview: Expose GtkListItemFactory APIs
Due to the many different ways to set factories, it makes sense to
expose them as custom objects.

This makes the actual APIs for the list widgets simpler, because they
can just have a regular "factory" property.

As a convenience function, gtk_list_view_new_with_factory() was added
to make this whole approach easy to use from C.
2020-05-30 19:26:45 -04:00
Benjamin Otte
cfb293d396 listitemfactory: Add a factory for ui files
Reuse <template> magic to initialize GtkListItems. This feels
amazingly hacky, but it also amazingly worked on the first try.
2020-05-30 19:26:45 -04:00