1
This directory contains objects that provide "views" onto collections
2
of widgets, hiding the concrete widget classes involved. For
3
instance, the search_entry view wraps the widgets used to enter a
4
search term and provide feedback to the user. The view objects are
5
normally just aggregates that hold pointers to one or more widgets.
7
Code in this directory will normally have at least "controller" class
8
in <gtk/controller>, which provides the logic driving the view. For
9
instance, the "search" controller attaches to the "search_input" view
10
to parse patterns that the user enters, emitting signals or error
11
messages as appropriate.
13
The benefits of doing this are:
15
1) Separation of concerns, with explicit documentation of the
16
interface required by each side.
18
2) It allows the program logic to be unit-tested, by providing
19
a non-interactive implementation of the view interface.
21
To keep the abstract interfaces free of references to GUI types,
22
implementations of these interfaces are located in <gtk/view_impls>.