lumiera_/tests/library/advice
Ichthyostega 6b4bf0a6ea Library: allow to check if Advice was explicitly given
For context: The »Advice System« was coined a long time ago, in 2010,
based on the vague impression that it might be useful for that kind of application
we are about to build here. And, as can be expected, none of the usage situations
envisioned at that time was brought to bear. Non the less, the facility came in
handy at times, precisely because it is cross-cutting and allows to pass
information without imposing any systematic relationship between the
communication partners.

And now we've got again such a situation.
The global style manager in the UI has to build a virtual CSS path,
which is needed by drawing code somewhere deep down, and we absolutely
do not want to pass a reference to the style manager over 20 recursive calls.

The alternatives would be
 (1) to turn the style manager into a public service
 (2) to have a static access function somewhere
 (3) to use a global variable.
For rationale, (1) would be overblown, because we do not actually request
a service to do work for us, rather we need some global piece of information.
(2) would be equivalent to (1), just more confusing. And (3) is basically
what the Advice system does, with the added benefit of a clear-cut service
access point and a well defined lifecycle.

This changeset adds the ability to check if actual Advice has been published,
which allows us to invoke the (possibly expensive) GTK path building and
style context building code only once.
2019-07-13 17:00:23 +02:00
..
advice-basics-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
advice-binding-pattern-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
advice-configuration-test.cpp Global-Layer-Renaming: adjust header includes 2018-11-15 23:42:43 +01:00
advice-index-test.cpp Doxygen: magically insert a reference to the test class 2017-02-22 03:17:18 +01:00
advice-multiplicity-test.cpp Global-Layer-Renaming: adjust header includes 2018-11-15 23:42:43 +01:00
advice-situations-test.cpp Library: allow to check if Advice was explicitly given 2019-07-13 17:00:23 +02:00