#1067 closed todo (done)

rearrange GUI Application top-level

Reported by: Ichthyostega Owned by: Ichthyostega
Priority: grave Milestone: 0integration
Component: lumieraGui Keywords: integration gui architecture sanity
Sub Tickets: #1032, #1064, #1069, #1085, #1126, #1127 Parent Tickets: #1014, #1031, #1048, #1068, #1078, #1080, #1083, #1135, #1144

Description (last modified by Ichthyostega)

The current setup of the top level classes within the GTK UI works fine, but highlights some tension and mismatches in the overall design

  • we support multiple windows, yet from reading the code, you'd rather get the impression we aren't really aware we have multiple top-level windows
  • the WindowManager is the core UI manager, which feels like a mix-up in concerns
  • the WorkspaceWindow::createUI() does the global UI initialisation. Again, we have multiple workspace windows.
  • GtkLumiera::main() creates a Model and a Controller in local function scope, but stores the WindowManager in an object field.
  • it seems, for that very reason, GtlLumiera needed to be a singleton, to allow by-name access to "the" WindowManager
  • needless to say, this causes a host of problems when shutting down the UI.

Refactoring Plan

Create a new WorkspaceManager class to act as main hub for all central management aspects pertaining to the UI toolkit internals. Pass this as ctor parameter to anyone in need of its services. Strictly use RAII on all top-level UI entities. Get rid of any "initialised" / "not yet ready" state. Then inherit GtkLumiera from Gtk::Application. Which means, GtkLumiera is the Application. It lives solely in the call stack of the GuiRunner and no one else has to talk to GtkLumiera anymore. We have public facades for that

Change history (19)

comment:1 by Ichthyostega, at 2017-01-26T17:45:53Z

Status: newaccepted

created gui::workspace::UiManager and factored out part of the WindowManagers existing code....

Last edited at 2017-01-26T17:48:20Z by Ichthyostega (previous) (diff)

comment:2 by Ichthyostega, at 2017-01-26T19:19:15Z

blocking: 1014, 10481014, 1048, 1068

comment:3 by Ichthyostega, at 2017-01-27T20:49:14Z

blockedby: 1032, 10641032, 1064, 1069

comment:4 by Ichthyostega, at 2017-01-27T20:55:57Z

blockedby: 1032, 1064, 10691032, 1064, 1069, 1070

comment:5 by Ichthyostega, at 2017-02-14T01:06:50Z

meanwhile I've invented another top-level controller to serve as link betweeen the model aspect and the state aspect. As a consequence, we get a quite cohesive top-level context -- and the UiManagerwill basically serve as the maintainer of this context.

comment:6 by Ichthyostega, at 2017-02-18T01:28:22Z

blocking: 1014, 1048, 10681014, 1048, 1068, 1078

comment:7 by Ichthyostega, at 2017-02-18T01:39:36Z

blocking: 1014, 1048, 1068, 10781014, 1048, 1068, 1078, 1080

comment:8 by Ichthyostega, at 2017-02-19T01:15:09Z

blocking: 1014, 1048, 1068, 1078, 10801014, 1048, 1068, 1078, 1080, 1083

comment:9 by Ichthyostega, at 2017-03-02T02:44:05Z

blockedby: 1032, 1064, 1069, 10701032, 1064, 1069, 1070, 1085

comment:10 by Ichthyostega, at 2017-03-02T02:44:44Z

blockedby: 1032, 1064, 1069, 1070, 10851032, 1064, 1069, 1085

comment:11 by Ichthyostega, at 2017-03-11T00:02:57Z

blockedby: 1032, 1064, 1069, 10851032, 1064, 1069, 1085, 1090

comment:12 by Ichthyostega, at 2017-05-19T23:22:47Z

New UI Backbone

After several rounds of refactoring, gradually a new structure for the UI Backbone emerges, which seems more adequate. The lifecycle and dependency problems related to our "UI main" object have been resolved, and the now obsoleted model is mostly retracted (still waiting for removal of the old and defunct timeline widget).

  • GtkLumiera is now the GUI-Plugin object itself
  • it creates the UI-Bus and the UiManager
  • UiManager becomes the new framework backbone object
  • it initialises the GTK and GLib framework directly and performs the GTK event loop.
  • we try to avoid the framework aspects of GTK as much as possible and use it as mere UI toolkit.
  • moreover, there is a rather cohesive top-level UI context, consisting of several mutually dependent service objects for our core concerns (window list, menu and action registration, style manager)
  • one of those service objects is the InteractionDirector, which also is a controller and corresponds to the model root element. From here we start into the dynamic UI population by diff messages pushed up from the lower layers. Most notably, it holds the timeline widgets as children.
Last edited at 2017-05-19T23:23:12Z by Ichthyostega (previous) (diff)

comment:13 by Ichthyostega, at 2017-08-31T15:22:44Z

blockedby: 1032, 1064, 1069, 1085, 10901032, 1064, 1069, 1085, 1090, 1104

comment:14 by Ichthyostega, at 2018-02-01T18:38:01Z

blockedby: 1032, 1064, 1069, 1085, 1090, 11041032, 1064, 1069, 1085, 1090, 1104, 1126

comment:15 by Ichthyostega, at 2018-02-01T18:46:18Z

blockedby: 1032, 1064, 1069, 1085, 1090, 1104, 11261032, 1064, 1069, 1085, 1090, 1104, 1126, 1127

comment:16 by Ichthyostega, at 2018-04-14T16:42:43Z

blocking: 1014, 1048, 1068, 1078, 1080, 10831014, 1048, 1068, 1078, 1080, 1083, 1135

comment:17 by Ichthyostega, at 2018-06-17T12:44:20Z

blockedby: 1032, 1064, 1069, 1085, 1090, 1104, 1126, 11271032, 1064, 1069, 1085, 1090, 1104, 1126, 1127, 1144

comment:18 by Ichthyostega, at 2023-02-02T02:35:55Z

blockedby: 1032, 1064, 1069, 1085, 1090, 1104, 1126, 1127, 11441032, 1064, 1069, 1085, 1126, 1127
blocking: 1014, 1048, 1068, 1078, 1080, 1083, 11351014, 1031, 1048, 1068, 1078, 1080, 1083, 1135, 1144
Description: modified (diff)
Resolution: done
Status: acceptedclosed

Consider this task as basically settled by now...

  • Based on this new structure, meanwhile I was able to build the basic framework for a very flexible timeline UI, with the ability to adapt to model changes published from the Session model in Steam layer....
  • some further refactoring and design work (dock handling, flexible binding of actions to panels) has been postponed for the time being

comment:19 by Undercover Agent, at 2025-12-25T00:00:00Z

blockedby: 1032, 1064, 1069, 1085, 1126, 1127
blocking: 1014, 1031, 1048, 1068, 1078, 1080, 1083, 1135, 1144
Parent Tickets: 1014, 1031, 1048, 1068, 1078, 1080, 1083, 1135, 1144
Sub Tickets: 1032, 1064, 1069, 1085, 1126, 1127

Migration MasterTickets ⟼ Subtickets-plugin

Note: See TracTickets for help on using tickets.