Commit graph

1086 commits

Author SHA1 Message Date
76dd4fb5dc ...tidy.up: prepare for working on the timeline display
''a new hope''

This was quite a long way until we're back at the point of
re-building the timeline anew.

Stash the canvas research code to make room for new things to come
2018-10-07 03:44:00 +02:00
cd557f50ec DemoGuiRoundtrip: successfully completed (closes #1999) 2018-10-06 17:42:22 +02:00
e8931bf4bf NotificationDisplay: react on changes of the error state
this turned out to be more tricky than expected.
When we initially configure the UI and invoke this->show_all(),
seemingly some draw-callbacks will be scheduled into the event loop.
Just set_visible(false) on the relevant buttons directly after that call
will have no effect (since the widget is still hidden at that point anyway,
it is not yet mapped and realised).

Thus we need to schedule a callback with the Glib::signal_idle(),
so our state detection runs after the initial mapping of the UI


NOTE: there is a minor itch, which I don't address right now:
when adding the error state and thus revealing the additional buttons,
the error log grabs some additional horizontal space, even while there
would be ample space for the additional buttons within the button bar.
When the error state is cleared and the buttons thus hidden again,
the additional horizontal space is dropped and the error log gets
narrower. Probably we'd need some special GTK call to re-allocate
the required space properly
2018-10-05 18:26:26 +02:00
12344ae9d8 NotificationDisplay: add an Error-State and implement signal to trigger on change
this is more or less gratitious functionality for now,
yet I consider it a proof-of-concept
2018-10-05 15:59:21 +02:00
33af82cf73 NotificationDisplay: now responding to the "Flash" message on UI-Bus
solved by temporarily adding a CSS class.
Mostly this was an issue of writing the Stylesheet properly.

Hint: use the GTK+ inspector, i.e. run with

GTK_DEBUG=interactive target/lumiera
2018-10-05 05:36:53 +02:00
e573d3cc96 StyleCSS: add alternative stylesheet to be comined with the system theme (#1170)
Even while we (still) have the goal to ship our own stylesheet and provide
the typical subdued media-aplication look, right now this porting and styling effort (#1023)
is unfinished and handled with rather low priority (writing code is more important
than toying with styles and looks).

This alternative stylesheet is meant to be used with a typical "light" desktop theme.
We'll add just the bare minimum of definitions to make lumiera work well in that setup.
And right now, I'll use that setup to continue with my development work
2018-10-05 03:25:50 +02:00
b7180735f9 StyleCSS: abandon using a theme engine
In GTK-2 you'd always use a theming engine.
During the transitional period, GTK-3 followed that path,
but at the point when the new CSS based system was mature enough,
this approach was discouraged, since it means to ship additional
executable code and defeats the purpose of configuring the look
of the application through one coherent set of rules.

As it turns out, debian continued to ship the 'adwaita' for some
extended transitional period, but in Stretch it is gone, which broke
our half-way ported stylesheet.

This changeset removes the use of a theming engine, and fixes tha
basic look by adding the background-color: inherit, which pushes aside
many (but not all) of the default theme definitions.

However, our stylesheet remains mostly broken and TODO for now
2018-10-05 00:29:48 +02:00
fb4d9be2b4 draft generic decorator to make a widget flash
not finished, having problems with Lumiera's stylesheet
2018-10-05 00:16:45 +02:00
5aa28626ad NotificationDisplay: function to demote error entries into warnings
...and remove them from the mark-index for special handling
2018-10-03 19:33:28 +02:00
e9527d6304 NotificationDisplay: proper handling of marks at insert position
Basically we create a pair of marks, with left/right gravity and then
inject the content between. Unfortunately, when the insert position
is the very end of the buffer (which it always is), this trick
leads to nesting the marked regions into each other.

As a remedy, we first insert the trailing newline,
and then attach the insert position one step before
2018-10-03 19:13:39 +02:00
4635d18265 NotificationDisplay: draft function to retain only the errors
discard all other info log messages and retain only the entries marked as error.
This is also a proof-of-concept regarding position bookmarks and markup.

Implemented by populating a new buffer and swapping it into place.
2018-10-03 17:50:20 +02:00
7655960b23 Fix Zombie invocation in GUI shutdown (closes #1178)
== possible Scenario ==
 1. Gui: sigTerm invoked
 2. last Subsystem -> cleans all remaining Subsy entries
 3. main-Thread wakens
 4. leaves main() und undloads the GUI plug-in
 5. which destroys the `DependencyFactory<LocationQuery>` placed in static memory
 6. the Gui-Thread returns from sigTerm()  and invokes `~UiManager()`
 7. which indirectly deregisters through `InteractionDirector` the `LocationQuery` Service
 8. `DependInject::Service::shutdown()` grabs the Lock ==> **BOOM**

== Solution ==
Ensure all dtors of the UI backbone are invoked ''prior'' to calling sigTerm()
2018-10-02 02:45:01 +02:00
f9c6a49b9b NotificationDisplay: implement reset/clearAll 2018-10-01 00:47:19 +02:00
f97beaa774 GuiNotification: implementation complete (closes #1047)
The very backbone structure of the Lumiera UI, the UI-Bus is now fully defined
and proven to be operative, including asynchronous dispatch of messages
an a generic notification mechanism
2018-10-01 00:46:22 +02:00
5fd3fb3d7b DemoGuiRoundtrip: first successful complete roundtrip GUI->Proc->GUI (see #1099)
A communication chain, triggered from a button in a non-modal dialog box,
passing invocation into another thread, dispatched by the ProcDispatcher,
then again passing thread boundaries to push a response back into the UI.

This is a milestone, and integrates several components built during the last years.
2018-09-29 17:34:25 +02:00
abfb897336 DemoGuiRoundtrip: now invoke the Proc-Layer commands from within the UI dialog 2018-09-29 15:23:47 +02:00
6b941b2c1e TestControl: retrieve action arguments from the dialog controls
...and this also demonstrates how action code will typically be arranged within such a dialog page
2018-09-29 01:26:35 +02:00
10b9abd79b TestControl: build the necessary control widgets
- a text input field
- a trigger to invoke the showInfo function on GuiNotification
- triggers to send state mark messages via GuiNotification into the UI-Bus
- a combo box to define the action-ID within those state mark messages

With these controls, it should be possible to execute all the variations
of the Tangible element protocol and verify the respective behaviour
has been coded up properly within the receiving ErrorLogDisplay widget

Note the key point (and the next step to code up) is for #1099 to
invoke a dummy/demo command in Proc-Layer, which in turn pushes an
reaction via the GuiNotification facade back into the UI asynchronously...
2018-09-27 04:15:27 +02:00
77980ef024 TestControl: the first tangible UI feedback caused via UI-Bus (see #1099)
wrap up the helpers and wire the connection to the UI-Bus.
Then attempt a direct invocation, still within the GTK thread.

While this might seem as just some silly experiment, in fact it is
*** THE FUCKING FIRST TIME to transmit a visible action to a real widget ***

this links together and integrates various efforts achieved during the last years
2018-09-26 17:17:59 +02:00
74f3ab3932 TestControl: concept draft how to simplify building notebook widgets
Gtk::Notebook is a quite powerful container foundation to build complex dialog widgets with multible pages on tabs.
Hower, the construction, wiring an setup is notoriously tedious, due to the repetitiveness
and the sheer amount of child widgets spread over various pages.

This design draft is an attempt to mitigate the required boilerplate, without
overly much obscuring the structure. The basic idea is to package each page into
a locally defined child struct, which is actually heap allocated and managed automatically.
This way, each child page gets its own namespace, and wiring to other components
is made explicit by passing named ctor arguments -- while the overall structure
of building and wiring of widgets stays close to the habits of Gtkmm programming.
2018-09-26 15:47:39 +02:00
0c082361f3 TestControl: hooked up a simple child-dialog (see #1174)
...which gives us already the base functionality required to run the first tests

- can be triggered from the Help menu
- non-modal dialog (Gtk::Dialog)
- attached as child / slave-Window to the current active workspace window
- window manager hint to keep it on top
- have a notebook control within the dialog
- attached (passively) to the UI-Bus
2018-09-25 06:11:38 +02:00
7f760d77e5 TestControl: prepare a location in the UI for test and diagnostics (#1074) 2018-09-25 05:31:41 +02:00
245a07bc16 NotificationDisplay: integrate for warning and error display
Surprise, surprise.... it really works
our "bang" messages are fantastic, yellow and bold now
2018-09-24 04:17:04 +02:00
fa55ff63d5 NotificationDisplay: investigate ways to define the markup tag(s)
...with the option to expand this approach later to use a central StyleManager (#1169)
2018-09-24 03:30:42 +02:00
5b14e83ebf NotificationDisplay: investigate options to organise error display markup
...just to decide not to follow-up too much on that topic right now.
As it turns out, GTK seems to be lacking in that respect. I have plotted
some ideas how we could work around that discrepancy in future...

And for this simple DemoGuiRoundtrip, we'll just use direct styling,
but we'll store a table of bookmarks for the error entries, allowing
us to add further features later on top
2018-09-23 16:20:24 +02:00
0be0f77c16 NotificationDisplay: wire up simple message display 2018-09-21 14:38:38 +02:00
5a7a5a5720 DOC: fix syntax of some doxygen links
seemingly we really need the \ref in the link target expression
2018-09-21 14:33:12 +02:00
8fa3eb2517 NotificationDisplay: integrate with the new Revealer-Functor (closes #1162)
after an extended digression to fix our matcher for tests on the EventLog,
the new helper abstractions gui::model::Expander and gui::model::Revealer
are now covered and ready for use.

In this special case here, the controller uses both the Expander and Revealer
inherited from model::Tangible; yet both are wired to access the actual
display widget via the getter, and delegate to the Expander rsp. Revealer
located within the widget. Which in turn are wired when creating the widget
within the InfoboxPanel.

Bottom line -- we have a generic scheme now, and the actual implementation
is filled in as lambda, at the point where the component or widget is created
2018-09-21 05:17:54 +02:00
4988153e15 Library: prevent implicit bool conversion on iterator-like objects
...it should have been this way all the time.
Generic code might otherwise be ill guided to assume a conversion
from the Iterator to its value type, while in fact an explicit dereferentiation is necessary
2018-09-14 21:06:14 +02:00
026049a13c UiElement: likewise integrate the Revealer functor (#1162) 2018-09-14 21:06:13 +02:00
41e0496576 NotificationDisplay: now able to build the expand functionality
...by delegating to an Expander placed into the ErrorLogDisplay widget
2018-09-14 21:06:13 +02:00
51a7670425 UiElement: integrate a default implementation based on the Expander functor 2018-09-14 21:06:13 +02:00
04424fb8df UiElement: code and document the functor components 2018-09-14 21:06:13 +02:00
551920e952 UiElement: decide upon the design variant to use for expand() / reveal() (#1162) 2018-09-14 21:06:13 +02:00
837c6d11ff NotificationDisplay: solve the problem with space allocation
as it turns out, we need to set the property_expand() on the child widget
within Gtk::Expander explicitly, to cause the child to grab and additional
available screen space (which obviously is what we want in case of a
log display with scrollbars)
2018-09-14 21:06:13 +02:00
bc3eb7f8da NotificationDisplay: experiment to build a collapsed display
basically Gtk::Expander will do the trick.
However, resizing of the enclosing panel is not handled properly,
the log does not expand to take up the available space, as it did
automaticall when just added directly into the frame
2018-09-14 21:06:13 +02:00
65bbc45e02 NotificationDisplay: care for lifecycle issues and expansion state persistence 2018-09-14 21:06:13 +02:00
7846460530 NotificationDisplay: code up controller protocol in NotificationHub
...mostly by delegating to (stubbed) functions in ErrorLogDisplay
2018-09-14 21:06:13 +02:00
a151f28d86 NotificationDisplay: solved that nasty topic of dock access for now
phew...
2018-09-14 21:06:13 +02:00
67ac8601d8 DockAccess: implement preliminary simplistic lookup and allocation 2018-09-14 21:06:13 +02:00
76e79c02ee NotificationDisplay: view allocation can be pushed into the access functor
no need to define a private function on Wizard anymore, it just forwards the call
to the service actually implementing the view allocation. For now this is the
PanelLocator (and eventually this will be the ViewLocator / ViewSpecDSL)
2018-09-14 21:06:13 +02:00
855944eff3 NotificationDisplay: turn the error log into an optional display 2018-09-14 21:06:13 +02:00
dcde80c4cd DockAccess: wire the new service through the Wizard 2018-09-14 21:06:13 +02:00
8755153d95 DockAccess: consider a preliminary lookup implementation within PanelLocator
PanelLocator is a sub component of the WindowLocator (top-level GUI service).
Eventually this shall become a mere widget/component access service, with the
actual lookup and allocation logic layered on top through ViewLocator, configurable
via ViewSpec-DSL.

We can not implement the full scheme right now, since we're lacking knowledge
about internals of a typical Lumiera UI widget
2018-09-14 21:06:13 +02:00
c0dca2d978 DockAccess: add lookup-by-Type function to PanelManager
...now the mess multiplies
2018-09-14 21:06:12 +02:00
987aad44c1 DockAccess: add ability to retrieve a panel via PanelManager (#1144)
This is only a premature hack, since the whole structure of PanelManager is somewhat broken.
Moreover, the ViewLocator is not really ready for use yet, so this hack at least
allows us to "reach into" a top-level window and "grab" the pannel we need.
2018-09-14 21:06:12 +02:00
e7e09a642b NotificateDisplay: delegate view allocation through a functor 2018-09-14 21:06:12 +02:00
42cbc9219f NotificateDisplay: link to a widget for error log display
The ErrorLogWidget is allocated and placed elsewhere
and not owned by the NotificationHub controller.
2018-09-14 21:06:12 +02:00
a74dc596ce WLink: finished incl. exception handling guarantees and documentation 2018-09-14 21:06:12 +02:00
ae26012bf5 WLink: implement copy operations
swap-based implementation
not sure if attachTo() should be noexcept
2018-09-14 21:06:12 +02:00