Commit graph

4991 commits

Author SHA1 Message Date
dfd3dc1275 DiffMessage: reshape IterAdapter to allow for custom diagnostics
since we do not want to increase the footprint, we're bound to reuse
an existing VTable -- so IterAdapter itself is our only option.
Unfortunately we'll need to pass that through one additional
decoration layer, which is here the iterator; to be able to
add our string conversion there, we need to turn that into
a derived class and add a call to access the underlying
container, which gets us into element type definition mess....
2017-08-11 16:56:18 +02:00
88b2260496 DiffMessage: draft test steps to drive refactoring 2017-08-11 15:48:28 +02:00
f6baef16c5 DiffMessage: consider to unite the handling of mutation messages (#1066) 2017-08-11 15:23:33 +02:00
f498f3be1b mark next steps to address
- error handling
 - settle MutationMessage
2017-08-11 02:37:29 +02:00
fdcf431a9b DiffMesage: use as payload within MutationMessage and pass Diff by RValue
now this highlights the unsettled decision still the more,
as can be seen by all that unnecessary copying. Basically we move the
Diff into the lambda-closure, from there into an anonymous instance,
from there into the embedded Buffer in MutationMessage, which again
just happens to sit in the closure storage when the action is invoked.
And all of this copying just to move the DiffMessage for consumption
into the TreeMutator...

thus by #1066 we should really get rid of the MutationMessage class altogether!
2017-08-11 02:00:54 +02:00
fd0a011ea4 DiffMessage: bold attempt towards a way to produce diffs (#1066)
actually I do not know much regarding the actual situation when,
within the Builder run, we're able to detect a change and generate
a diff description. However, as a first step, I'll pick IterSrouce
as a base interface and use a "generation context", which is to be
passed by shared-ptr
2017-08-11 00:59:10 +02:00
ae5e324a93 Commands: switch default invocation path to variadic templates (#967) 2017-08-10 22:17:02 +02:00
c324d2e594 Proc-Commands: remove a function we likely won't need ever (closes #291) 2017-08-10 21:52:51 +02:00
2344d5b03f UI-top-level: implement external UI-Shutdown-Trigger 2017-08-10 20:58:00 +02:00
5299185c2b differentiate the severity levels for user notification (#1102)
basically we want a non-modal notification box in the UI,
which normally stays out of the way. A good example of how such
can be accomplished can be found in the Ardour UI.

This leads to the conclusion that we want to differentiate between
varoius degees of severity; some error conditions just can not be
ignored, and must be indicated in an obvious way, e.g. a prominent
nonmodal pop-up to appear for some seconds, while others just warant
an unobstrusive warning sign
2017-08-10 20:57:59 +02:00
805e6047ba UI-Dispatch: document some implementation intricacies 2017-08-10 20:57:59 +02:00
d8c19c7a32 UI-Dispatch: complete implementation of the hand-over (closes #1098)
...by integrating and wiring a Glib::Dispatcher
2017-08-10 20:57:43 +02:00
768a07f181 UI-Dispatch: draft the dispatcher invocation 2017-08-10 17:14:44 +02:00
07c9ed15e8 UI-Dispatch: how to integrate into the NotificationService
WIP setup of an empty framework
2017-08-10 16:24:36 +02:00
46fc900980 UI-Dispatch: get the multithreded test to work (#1098)
the (trivial) implementation turned out to be correct as written,
but it was (again) damn challenging to get the mulithreaded chaotic
test fixture and especially the lambda captures to work correct.
2017-08-07 05:19:58 +02:00
a7ad82c935 Library: can optimise IterStack pop()
...by moving out the element to be extracted;
because of RVO it will in fact be move constructed into
the storage of the caller
2017-08-07 00:20:55 +02:00
70e1a5b922 convert ScopedCollection to rely on C++11
- variadic templates
- type traits
- use uniqe_ptr to manage storage (instead of boost::scoped_array)
2017-08-06 18:21:25 +02:00
0b621e71c5 Library: fix a suptle misconception in the design of IterAdapter
again surprising how such fundamental bugs can hide for years...

Here the reason is that IterAdapter leaves the representation of "NIL" to
its instantiation / users; some users (here in for example the ScopedCollection)
can choose to allow for different representations of "NIL", but the comparison
provided by IterAdapter just compares the embedded pos by face value.
2017-08-06 16:58:22 +02:00
908d1a8faa test need to be linked against liblumierabackend
...while tests in the library subdirectory are linked only against
liblumierasupport, which does not provide the multithreading support

In this special case here the actual facility to be tested does not rely
on thread support, only on locking. But the stress test obviously needs
to create several threads. Simple workaround is to move the test into
a test collection linked against all of the application core...
2017-08-06 15:30:01 +02:00
4095cd8cf3 Ui-Dispatch: draft multithreaded stress test for call dispatcher queue
for the simplistic implementation we're using right now this effort might look
exaggerated, but we should consider using a lock-free implementation at some
point in the future, at which point it is good to have a stress test in place
2017-08-06 15:21:31 +02:00
87dc04f324 UI-Dispatch: verify consistency of argument data handling 2017-08-05 18:44:25 +02:00
c96fcc1c6a UI-Dispatch: basic CallQueue implementation PASS 2017-08-05 17:59:55 +02:00
56def9f6d7 Library: expose some diagnostics on IterStack / IterQueue by default
seems like most usages will want to expose this kind of diagnostics for unit testing
and in fact the queue or stack nature is the primary nature of this entity,
while iterability comes as additional trait
2017-08-05 17:57:25 +02:00
3dea3c0fa0 UI-Dispatch: draft basic interface of a queue helper (#1098) 2017-08-05 17:36:32 +02:00
9b285a95c0 UI-Integration: plan the next steps to drive this topic ahead (#1099, #1098)
- concept for a first preliminary implementation of dispatch into the UI thread
 - define an integration effort to build a complete working communication chain
2017-08-05 17:36:32 +02:00
1e81b8d61a Settle proper activation of the external UI interfaces (#1098)
This change was caused by investigation of UI event loop dispatch;
since the GTK UI is designed to run single threaded, any invocation
from other threads need to be diepatched explicitly.

A possible way to achieve this is to use Glib::Dispatcher, which
in turn requires that the current thread (which is in this case the UI thread)
already holds a Glib::MainContext

This prompted me to create a tight link between the external facade interfaces
of the UI and the event loop itself. What remains to be settled is how
to hand over arguments to the action in the main loop
2017-08-05 17:36:32 +02:00
74ca087cd3 Remove the public C++ interface of the GUI-starter plugin
This plugin is essentially an implementation detail, and there is no
mechanism yet to use several different implementations of the interface.

Thus it is pointless to expose the lifecycle methods on a public interface,
while there is no way to obtain an instance of this interface, since the
latter is confined to the internals of the UI subsystem lifecycle
2017-08-03 23:11:01 +02:00
9cf868c9cd after a long break: find my way back into what has to be done.... 2017-08-03 20:34:42 +02:00
c96845ab65 GTK evolution: abandon Gtk::Main and start event loop directly (closes #1032)
After investigation of current GTK and GIO code, I came to the conclusion
that we do *not* want to rely on the shiny new Gtk::Application, which
provides a lot of additional "convenience" functionality we do neither
need nor want. Most notably, we do not want extended desktop integration
like automatically connecting to D-Bus or exposing application actions
as desktop events.

After stripping away all those optional functions and extensions, it turns
out the basic code to operate the GTK main event loop is quite simple.
This changeset extracts this code from the (deprecated) Gtk::Main and
integrates it directly in Lumiera's UI framework object (UiManager).
2017-05-19 23:42:55 +02:00
f089a34934 UI-Lifecycle: tie UI-Bus and UI-Manager directly to GtkLumiera
this is just a tiny change to make things more othogonal.
Now the unwinding and calls to any GTK / Widget dtors happen *after*
emitting the term signal from UI shutdown. Which means, the other subsystems
are shutting down (in their dedicated threads) as well, thus lowering
the probability of some action still using the UI and triggering an exception
2017-05-19 18:12:58 +02:00
5e172ff6a0 UI-top-level: reactivate the updateActionState function as NOP
as it turned out, the former functionality was deactivated in 2009
with changeset 6151415

The whole concept seems to be unfinished, and needs to be reworked
and integrated with "Views and Perspectives" (whatever that is...)

See also #1097
2017-05-19 17:00:41 +02:00
a3ed982da4 UI-top-level: fix GTK framework initialisation order 2017-05-19 17:00:41 +02:00
09dec65950 UI-top-level: drop the UI Application singleton
integrate the remaining functionality of GtkLumiera into the GUI starter plug-in
2017-05-19 17:00:37 +02:00
1ed4bd2c4c UI-top-level: the former Application Object (GtkLumiera) is obsoleted now
All the backbone functionality has been factored out into dedicated facilities
2017-05-19 16:57:16 +02:00
e59e8d0ab5 UI-top-level: consider how to rework the UI main object (#1067)
Gtk::Main is deprecated, but the new solution, instantiating a
Gtk::Application object does not match our use case, since we handle
all application concerns already and just need a Gtk main loop to run.

Anyway, it became clear that the "main object" will be the new UiManager.
As a first step, I've now moved the (deprecated) Gtk::Main object
down there. Next step (planned) will be to inherit from Gio::Application
and clone some functionality from Gtk::Application
2017-05-03 02:37:48 +02:00
0c073ad6e2 fix diagnostic type formatting
...again to make it work with GCC-5,
also to allow more leeway using various compilers

Explanation: we use a helper function to abbreviate the
demangled type names to make diagnostic ouput more readable.
Obviously such a function needs to be adjusted to the
way concrete compilers generate their type output; GCC-5
slightly differs to GCC-4.9 here, so I've made the regular
expressions a bit more flexible
2017-05-02 21:01:41 +02:00
46192cadbf fix some issues with static initialisation order
...also uncovered by compiling with GCC-5
2017-05-02 21:01:41 +02:00
d29e4e2d6f GCC-5 compatibility: ambiguity in overload resolution
we have a catch-all template operator to get a string converted
or pretty printed output from "any object". Unfortunately
this overload counts equivalent to another overload by
the IO manipulators. Solution is to define both operarators
similar in the first argument, thus turing the overload
for the IO manipulators into the more specific overload
due to the explicitly given second argument
2017-05-02 00:09:48 +02:00
37cdfaba54 GCC-5 compatibility: remove the last remaining auto_ptrs 2017-05-01 21:43:10 +02:00
9262af1346 GCC-5 compatibility: remove unnecessary forward declaration
a bit over the top anyway: string will inevitably be included sooner or later
2017-05-01 18:38:52 +02:00
5cb5ad3507 Menu-Actions: just log unimplemented actions for now (closes #1085)
this topic is basically settled by now.
Mostly by delegating to other entites not-yet-implemented :-D
2017-04-23 18:46:58 +02:00
e29a31a32a Menu-Actions: relocate some further global operations
...which do not really belong into the Actions class,
but can be delegated within the global context
2017-04-23 18:28:32 +02:00
790530bc2d Menu-Actions: inline the directly forwarded actions (#1085)
as a result of the preceding refactorings, we have created a
top level UI context, and most actions are now just forwarede
to a dedicated entity within this globalCtx, mostly to the
InteractionDirector.

Thus we're able to get rid of the one-liner functions in
the Actions class by directly delegating to the respective
entity from within the menu definition lambda.

Is this safe?
Under the assumption that the global context outlives the
GTK main loop, this is safe.
2017-04-23 18:26:23 +02:00
216fd9d882 Menu-Actions: write action definition more compact with helper lambda
- get rid of some syntactic noise
- move the defining closure to the begin and the varargs to the end
2017-04-23 16:24:56 +02:00
1ccf54fa41 CmdAccess: draft some further command invocations
...which opens more questions than it solves at the moment.
Especially note #1096, the question how to refer to object-IDs
Maybe we need to enable sending EntryIDs via GenNode?

Anyway, the magic spell is broken now: we have a way how to
establish commands and how to issue them from the UI, with full integration
of UI-Bus, layer separation facade, instance management and ProcDispatcher

Looks like a stepping stone
2017-04-17 23:16:57 +02:00
4e7c64bf39 CmdAccess: **Big Bang** wire the first real command from UI down into the Session
...just the implementation within SessManagerImpl is not yet there P-)
So everything remains as defunct as before, but at least: "yes we can"
2017-04-17 21:54:36 +02:00
6a80053395 CmdAccess: reworked draft for context-bound commands and resolver expressions 2017-04-17 21:20:51 +02:00
10c2e4b9a9 CmdAccess: rename the front-end to CmdContext to clarify the purpose 2017-04-17 20:00:07 +02:00
82d66cef73 CmdAccess: discard the InvocationTrail concept
after extended analysis, it turned out to be a "placeholder concept"
and introduces an indirection, which can be removed altogether

- simple command invocation happens at gui::model::Tangible
- it is based on the command (definition) ID
- instance management happens automatically and transparently
- the extended case of context-bound commands will be treated later,
  and is entirely self-contained
2017-04-17 18:21:52 +02:00
8c7ac997de CmdAccess: replace existing usages of InvocationTrail 2017-04-17 16:57:09 +02:00