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).
This commit is contained in:
Fischlurch 2017-05-19 23:42:55 +02:00
parent f089a34934
commit c96845ab65
5 changed files with 316 additions and 59 deletions

View file

@ -27,6 +27,12 @@
** The individual menu options are bound to functors (closures), which use a _global UI context_
** to access the target objects or invoke the signals.
**
** @todo the old `Gtk::Action` and `Gtk::ActionGroup` are planned to be deprecated.
** Recommendation is to rely on `Gtk::Builder` and `Gtk::SimpleAction` instead.
** As of 5/2017, it is not clear to what extent this might force us into additional
** "desktop integration" we do not need nor want (like automatically connecting to
** D-Bus). For that reason, we'll postpone this transition for the time being /////////////////////TICKET #1068
**
** @see ui-manager.hpp
** @see gtk-lumiera.cpp
*/
@ -55,7 +61,6 @@ namespace ctrl {
using Gtk::ToggleAction;
using Gtk::AccelKey;
using Gtk::StockID;
using Gtk::Main; /////////////////////////////////////////////////////////////////////////////////////TICKET #1032 replace Main -> Application
using Glib::ustring;
using ::util::_Fmt;
using std::string;

View file

@ -55,37 +55,50 @@ namespace ctrl {
using workspace::StyleManager;
namespace { // dummy command line for GTK
int argc =0;
}
// dtors via smart-ptr invoked from here...
UiManager::~UiManager()
{ }
UiManager::~UiManager() { }
/**
* Initialise the GTK framework libraries
* Initialise the GTK framework libraries.
* @remark in 5/2017 we abandoned the (deprecated) `Gtk::Main`,
* but we did not switch to `Gtk::Application`, rather we just
* incorporated the framework initialisation code directly into
* our own code base. This allows us to ignore all the shiny new
* D-Bus and desktop integration stuff.
*/
ApplicationBase::ApplicationBase()
: Gtk::UIManager()
, gtkMain_(&argc, nullptr)
{
Glib::thread_init();
//---------------------------------------------copied from Gtk::Main
gtk_init (nullptr, nullptr);
Gtk::Main::init_gtkmm_internals();
//---------------------------------------------copied from Gtk::Main
Gdl::init();
}
ApplicationBase::~ApplicationBase()
{
//---------------------------------------------copied from Gtk::Main
// Release the gtkmm type registration tables,
// allowing Main to be instantiated again:
Glib::wrap_register_cleanup();
Glib::Error::register_cleanup();
//---------------------------------------------copied from Gtk::Main
}
/**
* Initialise the interface globally on application start.
* Setup the main application menu and bind the corresponding actions.
* Register the icon configuration and sizes and lookup all the icons.
* @see lumiera::Config
* @remark Creating the UiManager initialises the interface globally on application start.
* It wires the global services and attaches to the UI-Bus, defines the main
* application menu and binds the corresponding actions. Moreover, the StyleManager
* register the icon configuration and sizes and loads the icon definitions.
*/
UiManager::UiManager (UiBus& bus)
: ApplicationBase()
, Gtk::UIManager()
, globals_{new GlobalCtx{bus, *this}}
, actions_{new Actions{*globals_}}
, styleManager_{new StyleManager{}}
@ -96,7 +109,8 @@ namespace ctrl {
/**
* @remarks this function is invoked once from the main application object,
* immediately prior to starting the GTK event loop. */
* immediately prior to starting the GTK event loop.
*/
void
UiManager::createApplicationWindow()
{
@ -105,17 +119,33 @@ namespace ctrl {
}
/**
* Run the GTK UI.
* @remarks this function is equivalent to calling Gtk::Main::run()
* In GTK-3.0.3, the implementation is already based on libGIO;
* after possibly handling command line arguments (which does not apply
* in our case), it invokes `g_main_loop_run()`, which in turn ends up
* polling the main context via `g_main_context_iterate()`, until the
* use count drops to zero. This is the "event loop".
*/
void
UiManager::performMainLoop()
{
gtkMain_.run(); // GTK event loop
gtk_main(); // GTK event loop
}
/**
* @note this function can be invoked from an UI event, since it just
* signals shutdown to the GTK event loop by invoking `gtk_main_quit()`.
* The latter will finish processing of the current event and then return
* from the UiManager::performmainLoop() call, which eventually causes the
* UI subsystem to signal termination to the Lumiera application as a whole.
*/
void
UiManager::terminateUI()
{
gtkMain_.quit();
gtk_main_quit();
}
void

View file

@ -23,12 +23,16 @@
/** @file ui-manager.hpp
** Manager for global user interface concerns and global state.
** The central UiManager instance is owned by the GtkLumiera object and initialised in GTK-main.
** It establishes and wires the top-level entities of the UI-Layer and thus, indirectly offers
** services to provide Icons and other resources, to open and manage workspace windows, to
** form and issue (global) actions and to delve into the UI representation of top-level parts
** of the session model. Notable connections established herein:
** Manager for global user interface concerns, framework integration and global state.
** The central UiManager instance is owned by the GtkLumiera (plug-in) object and has the
** responsibility to operate the _UI framework_. It establishes and wires the top-level entities
** of the UI-Layer and thus, indirectly offers services to provide Icons and other resources, to
** open and manage workspace windows, to form and issue (global) actions and to delve into the
** UI representation of top-level parts of the session model. And, last but not least, it
** exposes the functions to start and stop the GTK event loop.
**
** The initialisation and shutdown of the framework is handled by the ApplicationBase parent,
** while the constituents of the Lumiera UI backbone are allocated as member fields:
** - connection to the [UI-Bus](\ref ui-bus.hpp)
** - the global Actions available though the menu
** - the InteractionDirector (top-level controller)
@ -67,23 +71,28 @@ namespace ctrl {
/** Framework initialisation base */
class ApplicationBase
: public Gtk::UIManager
, boost::noncopyable
: boost::noncopyable
{
protected:
Gtk::Main gtkMain_;
ApplicationBase();
~ApplicationBase();
};
/**
* Manage global concerns regarding a coherent user interface.
* Offers access to some global UI resources, and establishes
* further global services to create workspace windows, to bind
* menu / command actions and to enter the top-level model parts.
* The Lumiera UI framework and backbone object.
* Initialises the GTK and GLib framework, starts and stops the
* GTK event loop, and manages global concerns regarding a coherent user interface.
* Offers access to some global UI resources, and establishes further global services
* to create workspace windows, to bind menu / command actions and to create interface
* widgets for working with the the top-level model parts.
* @note UiManager itself is _not a model::Controller,_ and thus not directly connected
* as a first-class entity to the Bus, but it operates the GlobalCtx, and thus in
* turn holds the interact::InteractionDirector, which corresponds to the model root.
*/
class UiManager
: public ApplicationBase
, public Gtk::UIManager
{
unique_ptr<GlobalCtx> globals_;
unique_ptr<Actions> actions_;
@ -92,11 +101,10 @@ namespace ctrl {
public:
/**
* There is one global UiManager instance,
* which is created by [the Application](\ref GtkLumiera)
* and allows access to the UI-Bus backbone. The UiManager itself
* is _not a model::Controller,_ and thus not directly connected to the Bus.
* Rather, supports the top-level windows for creating a consistent interface.
* Initialise the GTK framework and the Lumiera UI backbone.
* There is one global UiManager instance, which is created by
* [the Application](\ref GtkLumiera).
* @see #performMainLoop
*/
UiManager (UiBus& bus);
~UiManager ();

View file

@ -2747,7 +2747,7 @@ Command instances are like prototypes -- thus each additional level of different
see the description in &amp;rarr; CommandSetup
</pre>
</div>
<div title="GuiConnection" modifier="Ichthyostega" created="200812050543" modified="201703031816" tags="GuiIntegration overview" changecount="9">
<div title="GuiConnection" modifier="Ichthyostega" created="200812050543" modified="201705192329" tags="GuiIntegration overview" changecount="11">
<pre>All communication between Proc-Layer and GUI has to be routed through the respective LayerSeparationInterfaces. Following a fundamental design decision within Lumiera, these interface are //intended to be language agnostic// &amp;mdash; forcing them to stick to the least common denominator. Which creates the additional problem of how to create a smooth integration without forcing the architecture into functional decomposition style. To solve this problem, we rely on ''messaging'' rather than on a //business facade// -- our facade interfaces are rather narrow and limited to lifecycle management. In addition, the UI exposes a [[notification facade|GuiNotificationFacade]] for pushing back status information created as result of the edit operations, the build process and the render tasks.
!anatomy of the Proc/GUI interface
@ -3127,7 +3127,7 @@ Applying a diff changes the structure, that is, the structure of the local model
Together this means we get a fix up stage after model changes, where the display is re-adjusted to fit the new situation. This works in concert with the [[display manager|TimelineDisplayManager]] representing only those elements as actual widgets, which get a real chance to become visible. This way we can build on the assumption that the actual number of widgets to be managed any time remains so small as to get away with simple linear list processing. It remains to be seen how far this assumption can be pushed -- the problem is that the GTK container components don't support anything beyond such simple linear list processing; there isn't even a call to remove all child widgets of a container in a single pass.
</pre>
</div>
<div title="GuiTopLevel" creator="Ichthyostega" modifier="Ichthyostega" created="201701261944" modified="201703021643" tags="GuiPattern spec draft" changecount="10">
<div title="GuiTopLevel" creator="Ichthyostega" modifier="YourName" created="201701261944" modified="201705192326" tags="GuiPattern spec draft" changecount="11">
<pre>To a large extent, the Lumiera user interface is built around a //backbone structure,// known as the UI-Bus.
But there are some dedicated top-level entities, collaborating to maintain a consistent application lifecycle
;Application
@ -3137,7 +3137,7 @@ But there are some dedicated top-level entities, collaborating to maintain a con
:the backbone of the user interface
:as central communication system, the UI-Bus has a star shaped topology with a central router and attached CoreService
;UI Manager
:maintain a coherent global interface
:maintain a coherent global interface and perform the GTK event loop
:responsible for all global framework concerns, resources and global application state
;Interaction Director
:establish the connection between global interaction state and global session state

View file

@ -635,9 +635,9 @@
</html></richcontent>
<arrowlink COLOR="#851358" DESTINATION="ID_548720270" ENDARROW="Default" ENDINCLINATION="-663;-614;" ID="Arrow_ID_325703166" STARTARROW="None" STARTINCLINATION="1209;488;"/>
<icon BUILTIN="messagebox_warning"/>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1485118623744" ID="ID_392996871" MODIFIED="1493753784816" TEXT="#1032 use gtk::Application instead of gtk::Main">
<node COLOR="#338800" CREATED="1485118623744" ID="ID_392996871" MODIFIED="1495233785382" TEXT="#1032 use gtk::Application instead of gtk::Main">
<arrowlink COLOR="#ae1856" DESTINATION="ID_206480879" ENDARROW="Default" ENDINCLINATION="715;0;" ID="Arrow_ID_926482654" STARTARROW="Default" STARTINCLINATION="134;383;"/>
<icon BUILTIN="pencil"/>
<icon BUILTIN="button_ok"/>
<node CREATED="1485118668802" ID="ID_575152579" MODIFIED="1485118676149" TEXT="WindowManager verwendet gtk::Main"/>
<node CREATED="1485118677425" ID="ID_1952311126" MODIFIED="1485118685915" TEXT="genau, um die Applikation runterzufahren"/>
<node CREATED="1485124031945" ID="ID_329247026" MODIFIED="1493753799315" TEXT="Gtk::Application">
@ -730,7 +730,7 @@
<node CREATED="1493759581123" ID="ID_1296466414" MODIFIED="1493759591685" TEXT="ich traue den Gnome-Leuten nicht &#xfc;ber den Weg"/>
</node>
</node>
<node CREATED="1493754820476" ID="ID_608560419" MODIFIED="1493754831023" TEXT="brauche ich &#xfc;berhaupt eine gtk::Application">
<node CREATED="1493754820476" ID="ID_608560419" MODIFIED="1495218626709" TEXT="brauche ich &#xfc;berhaupt eine Gtk::Application">
<icon BUILTIN="help"/>
<node CREATED="1493756483852" ID="ID_1428028027" MODIFIED="1493756499302" TEXT="naja, man kann GTK zu Fu&#xdf; verwenden"/>
<node CREATED="1493756499745" ID="ID_633405815" MODIFIED="1493756518682" TEXT="aber gtk::Application zeigt, wie"/>
@ -745,6 +745,40 @@
<icon BUILTIN="yes"/>
</node>
</node>
<node CREATED="1495215099003" ID="ID_1971256545" MODIFIED="1495218634172" TEXT="brauche ich &#xfc;berhaupt eine Gio::Application">
<icon BUILTIN="help"/>
<node CREATED="1495215111775" ID="ID_1003964020" MODIFIED="1495215119282" TEXT="initialisiert das Framework"/>
<node CREATED="1495215119685" ID="ID_1761204495" MODIFIED="1495215128480" TEXT="stellt eine dBus-Verbindung her"/>
<node CREATED="1495215129564" ID="ID_973272722" MODIFIED="1495215147125" TEXT="ist eine gio::ActionGroup">
<node CREATED="1495215149281" ID="ID_1774523135" MODIFIED="1495215163883" TEXT="man kann Aktionen hinzuf&#xfc;gen"/>
<node CREATED="1495215164279" ID="ID_1315941470" MODIFIED="1495215177034" TEXT="diese Arbeitet mit einem ApplicationWindow zusammen"/>
<node CREATED="1495215177478" ID="ID_250116811" MODIFIED="1495215190439" TEXT="beachte: nicht GtkWindow, sondern ApplicationWindow (Subclass)"/>
</node>
<node CREATED="1495215193500" ID="ID_503299515" MODIFIED="1495215207982" TEXT="Zweck (Vermutung)">
<node CREATED="1495215209066" ID="ID_1153171656" MODIFIED="1495215214357" TEXT="Desktop-Integration"/>
<node CREATED="1495215214824" ID="ID_1385031644" MODIFIED="1495215221132" TEXT="Grenzen der Applikation aufweichen"/>
<node CREATED="1495215221624" ID="ID_297065945" MODIFIED="1495215231226" TEXT="Aktionen direkt in den Desktiop integrieren"/>
</node>
<node CREATED="1495215237213" ID="ID_745229887" MODIFIED="1495215259353" TEXT="nichts von dem ist f&#xfc;r uns relevant, manches davon st&#xf6;rt">
<icon BUILTIN="yes"/>
</node>
</node>
</node>
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1495218672747" HGAP="-13" ID="ID_1786316132" MODIFIED="1495218683283" TEXT="Beschlu&#xdf;" VSHIFT="15">
<icon BUILTIN="yes"/>
<node COLOR="#2f1d56" CREATED="1495218684994" ID="ID_101574501" MODIFIED="1495218819229" TEXT="vorerst defensiv vorgehen">
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
</node>
<node CREATED="1495218699712" ID="ID_1332523704" MODIFIED="1495233774800" TEXT="den Code aus Gtk::Main in unsere Codebasis &#xfc;bernehmen">
<icon BUILTIN="button_ok"/>
</node>
<node CREATED="1495218714230" ID="ID_1371091843" MODIFIED="1495218730415" TEXT="Vorsicht mit Action / ActionGroup">
<node CREATED="1495218731435" ID="ID_1744881610" MODIFIED="1495218744350" TEXT="noch nicht deprecated"/>
<node CREATED="1495218744961" ID="ID_97034293" MODIFIED="1495218759875" TEXT="aber Abl&#xf6;sung durch Gio::SimpleAction geplant"/>
<node CREATED="1495218770694" ID="ID_644528853" MODIFIED="1495218798054" TEXT="Warnung: mit dem neuen Gtk::ApplicationWindow verkoppelt">
<icon BUILTIN="messagebox_warning"/>
</node>
</node>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1485130302095" HGAP="28" ID="ID_506541774" MODIFIED="1493752954436" TEXT="neuer UiManager" VSHIFT="14">
@ -759,7 +793,11 @@
<node CREATED="1485452536138" ID="ID_599315721" MODIFIED="1493762462420" TEXT="wird daf&#xfc;r zust&#xe4;ndig">
<icon BUILTIN="pencil"/>
<node CREATED="1493762472175" ID="ID_964179569" MODIFIED="1493762489856" TEXT="verwendet Fenster-Liste"/>
<node CREATED="1493762490205" ID="ID_869056268" MODIFIED="1493762497768" TEXT="alle noch offenen Fenster verbergen"/>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1493762490205" ID="ID_869056268" MODIFIED="1495234845817" TEXT="alle noch offenen Fenster verbergen">
<icon BUILTIN="flag-yellow"/>
<node CREATED="1495234856782" ID="ID_888480230" MODIFIED="1495234864912" TEXT="machen wir bisher nicht"/>
<node CREATED="1495234865717" ID="ID_221447493" MODIFIED="1495234889293" TEXT="ist das notwendig?"/>
</node>
<node CREATED="1493762498476" ID="ID_1290148687" MODIFIED="1493762526412" TEXT="direkt gtk_main_quit aufrufen">
<icon BUILTIN="idea"/>
</node>
@ -779,26 +817,32 @@
<node CREATED="1493763393720" ID="ID_112295077" MODIFIED="1493763393720" TEXT="wohin entwickelt sich GTK?"/>
</node>
<node CREATED="1493768460811" ID="ID_1862271811" MODIFIED="1493768464414" TEXT="Alternativen">
<node CREATED="1493768465482" ID="ID_1159523698" MODIFIED="1493768483420" TEXT="gtk_main aufrufen"/>
<node CREATED="1493768484007" ID="ID_384827553" MODIFIED="1493768826414" TEXT="von einem Gio::Application ableiten">
<node CREATED="1493768465482" ID="ID_1159523698" MODIFIED="1495234928963" TEXT="gtk_main aufrufen">
<icon BUILTIN="button_ok"/>
</node>
<node CREATED="1493768484007" ID="ID_384827553" MODIFIED="1495234932771" TEXT="von einem Gio::Application ableiten">
<arrowlink COLOR="#6d7495" DESTINATION="ID_1476863246" ENDARROW="Default" ENDINCLINATION="1126;-247;" ID="Arrow_ID_1941890495" STARTARROW="None" STARTINCLINATION="-231;14;"/>
<icon BUILTIN="button_cancel"/>
</node>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1493770418552" HGAP="68" ID="ID_346412093" MODIFIED="1493770533278" TEXT="Schritte" VSHIFT="37">
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1493770418552" HGAP="68" ID="ID_346412093" MODIFIED="1495234945038" TEXT="Schritte" VSHIFT="37">
<linktarget COLOR="#8091a3" DESTINATION="ID_346412093" ENDARROW="Default" ENDINCLINATION="-205;193;" ID="Arrow_ID_824195065" SOURCE="ID_1810145809" STARTARROW="None" STARTINCLINATION="430;0;"/>
<icon BUILTIN="pencil"/>
<icon BUILTIN="idea"/>
<node CREATED="1493770423008" ID="ID_124348052" MODIFIED="1493770490126" TEXT="erst mal Gtk::Main hierher schieben">
<icon BUILTIN="full-1"/>
</node>
<node CREATED="1493770431607" ID="ID_117937910" MODIFIED="1493770494191" TEXT="dann durch Gio::Application ersetzen">
<node CREATED="1495215269657" ID="ID_850682198" MODIFIED="1495215315827" TEXT="Implementierung aus Gtk::Main &#xfc;bernemen">
<icon BUILTIN="full-2"/>
</node>
<node CREATED="1493770431607" ID="ID_117937910" MODIFIED="1495215311571" TEXT="(bei Bedarf) sp&#xe4;ter dann durch Gio::Application ersetzen">
<icon BUILTIN="full-3"/>
</node>
</node>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1484797808349" FOLDED="true" ID="ID_389264738" MODIFIED="1493753050837" TEXT="weitere Funktionen">
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1484797808349" FOLDED="true" ID="ID_389264738" MODIFIED="1495234958874" TEXT="weitere Funktionen">
<icon BUILTIN="flag-yellow"/>
<node CREATED="1484797813373" ID="ID_536855363" MODIFIED="1484797818072" TEXT="generische Nachricht"/>
<node CREATED="1484797818780" FOLDED="true" ID="ID_354397333" MODIFIED="1488423308092" TEXT="state mark">
@ -1800,9 +1844,10 @@
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1485126506699" ID="ID_1776936645" MODIFIED="1485126569343" TEXT="#1067 rearrange GUI Application top-level">
<icon BUILTIN="flag-yellow"/>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1485126573818" ID="ID_206480879" MODIFIED="1485126655278" TEXT="#1032 use gtk::Application instead of gtk::Main">
<node COLOR="#338800" CREATED="1485126573818" ID="ID_206480879" MODIFIED="1495233795213" TEXT="#1032 use gtk::Application instead of gtk::Main">
<arrowlink COLOR="#ae182e" DESTINATION="ID_1476863246" ENDARROW="Default" ENDINCLINATION="283;-164;" ID="Arrow_ID_1851148216" STARTARROW="Default" STARTINCLINATION="481;0;"/>
<linktarget COLOR="#ae1856" DESTINATION="ID_206480879" ENDARROW="Default" ENDINCLINATION="715;0;" ID="Arrow_ID_926482654" SOURCE="ID_392996871" STARTARROW="Default" STARTINCLINATION="134;383;"/>
<icon BUILTIN="flag-yellow"/>
<icon BUILTIN="button_ok"/>
</node>
<node COLOR="#338800" CREATED="1485126609878" FOLDED="true" ID="ID_815018040" MODIFIED="1493846218724" TEXT="#1064 investigate WindowManager lifecycle">
<icon BUILTIN="button_ok"/>
@ -1909,9 +1954,8 @@
<node CREATED="1493846135327" ID="ID_832439809" MODIFIED="1493846145618" TEXT="initialisiert und startet Backbone"/>
<node CREATED="1485463537111" ID="ID_929585985" MODIFIED="1485463543226" TEXT="wird nie selber direkt angesprochen"/>
</node>
<node CREATED="1485126457025" ID="ID_1698853761" MODIFIED="1489460543116" TEXT="ctrl::UiManager">
<node CREATED="1485126457025" ID="ID_1698853761" MODIFIED="1495234793368" TEXT="ctrl::UiManager">
<linktarget COLOR="#667b93" DESTINATION="ID_1698853761" ENDARROW="Default" ENDINCLINATION="19;-86;" ID="Arrow_ID_1952755524" SOURCE="ID_40172420" STARTARROW="None" STARTINCLINATION="-290;0;"/>
<icon BUILTIN="pencil"/>
<icon BUILTIN="idea"/>
<node CREATED="1485454242368" ID="ID_482639947" MODIFIED="1485454312303" TEXT="Hub f&#xfc;r Framework">
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
@ -1924,12 +1968,46 @@
<node CREATED="1485454375917" ID="ID_1935695209" MODIFIED="1485457020772" TEXT="erbt von Gtk::UiManager">
<icon BUILTIN="messagebox_warning"/>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1485457021805" ID="ID_1476863246" MODIFIED="1493768813976" TEXT="Gtk::UiManager ist deprecated">
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1485457021805" ID="ID_1476863246" MODIFIED="1495218593390" TEXT="Gtk::UiManager ist deprecated">
<linktarget COLOR="#6d7495" DESTINATION="ID_1476863246" ENDARROW="Default" ENDINCLINATION="1126;-247;" ID="Arrow_ID_1941890495" SOURCE="ID_384827553" STARTARROW="None" STARTINCLINATION="-231;14;"/>
<linktarget COLOR="#ae182e" DESTINATION="ID_1476863246" ENDARROW="Default" ENDINCLINATION="283;-164;" ID="Arrow_ID_1851148216" SOURCE="ID_206480879" STARTARROW="Default" STARTINCLINATION="481;0;"/>
<icon BUILTIN="messagebox_warning"/>
<node CREATED="1493768617653" ID="ID_292624709" MODIFIED="1493768624808" TEXT="f&#xe4;llt anscheinend ersatzlos weg"/>
<node CREATED="1493768625564" ID="ID_1620270152" MODIFIED="1493768636606" TEXT="Verdacht: stattdessen Gtk::Application"/>
<node CREATED="1485457105010" HGAP="49" ID="ID_202831328" MODIFIED="1493768935758" TEXT="neuer Weg" VSHIFT="21">
<node CREATED="1495218227391" ID="ID_1156276489" MODIFIED="1495218527285" TEXT="Beschlu&#xdf;: vorerst Gtk::Action / ActionGroup weiter verwenden">
<richcontent TYPE="NOTE"><html>
<head>
</head>
<body>
<p>
<u>Begr&#252;ndung</u>:
</p>
<p>
Das neue System ist anscheinend fest integriert in Gio::Application.
</p>
<p>
Mir ist nicht klar, wieso ein Fenster/Widget das Interface Gio::Actionable implementieren mu&#223;.
</p>
<p>
Ich werde den Verdacht nicht los, da&#223; hier das Ziel verfolgt wird, eine &quot;Action&quot; von den
</p>
<p>
Grenzen der Applikation zu befreien und direkt in den Desktop zu integrieren.
</p>
<p>
Mit Desktop ist nat&#252;rlich der Gnome-Desktop gemeint. Was diesen Verdacht best&#228;rkt,
</p>
<p>
ist, da&#223; Gio::Application sofort auch gleich eine dBus-Verbindung hochf&#228;hrt.
</p>
</body>
</html>
</richcontent>
<icon BUILTIN="yes"/>
</node>
<node CREATED="1485457105010" HGAP="49" ID="ID_202831328" MODIFIED="1495218206128" TEXT="neuer Weg" VSHIFT="21">
<icon BUILTIN="info"/>
<node CREATED="1485457108425" ID="ID_152284167" MODIFIED="1485457124586" TEXT="man erzeugt Gio::SimpleActionGroup"/>
<node CREATED="1485457141853" ID="ID_1841602685" MODIFIED="1485457147592" TEXT="man f&#xfc;gt diese dem Fenster hinzu"/>
</node>
@ -1941,16 +2019,19 @@
<node CREATED="1485454263876" ID="ID_543704434" MODIFIED="1485454270615" TEXT="globale Keybindings"/>
</node>
<node CREATED="1493768943479" ID="ID_374108201" MODIFIED="1493768945355" TEXT="Plan">
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1493768946415" ID="ID_880915214" MODIFIED="1493769045194" TEXT="k&#xf6;nnte die UI-Main-Klasse werden">
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1493768946415" ID="ID_880915214" MODIFIED="1495234777012" TEXT="das ist die UI-Main-Klasse">
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
<icon BUILTIN="yes"/>
</node>
<node CREATED="1493768959324" ID="ID_873679558" MODIFIED="1493768964160" TEXT="sollte dann...">
<node CREATED="1493768965036" ID="ID_1457175098" MODIFIED="1493768972215" TEXT="das erste Fenster &#xf6;ffnen"/>
<node CREATED="1493768972691" ID="ID_1810145809" MODIFIED="1493770540743" TEXT="die GTK-Loop starten">
<node CREATED="1493768972691" ID="ID_1810145809" MODIFIED="1495234763048" TEXT="die GTK-Loop starten">
<arrowlink COLOR="#8091a3" DESTINATION="ID_346412093" ENDARROW="Default" ENDINCLINATION="-205;193;" ID="Arrow_ID_824195065" STARTARROW="None" STARTINCLINATION="430;0;"/>
<icon BUILTIN="button_ok"/>
</node>
<node CREATED="1493768980361" ID="ID_1478388503" MODIFIED="1495234766050" TEXT="das UI herunnterfahren">
<icon BUILTIN="button_ok"/>
</node>
<node CREATED="1493768980361" ID="ID_1478388503" MODIFIED="1493768995060" TEXT="das UI herunnterfahren"/>
</node>
</node>
</node>
@ -16619,7 +16700,7 @@
</node>
<node CREATED="1477523710854" ID="ID_1520577996" MODIFIED="1477523711882" TEXT="Grid"/>
</node>
<node CREATED="1477523714526" ID="ID_654535915" MODIFIED="1487275491415" TEXT="Application verwenden">
<node CREATED="1477523714526" ID="ID_654535915" MODIFIED="1495221457073" TEXT="Application verwenden">
<richcontent TYPE="NOTE"><html>
<head>
@ -16628,8 +16709,141 @@
<p>
...nicht mehr das <i>klassische</i>&#160;gtk::Main
</p>
<p>
</p>
<p>
Wozu das?
</p>
<ul>
<li>
Design: Main war ein Singleton; aber sein dtor hat auch Plattform-Aufr&#228;um-Arbeiten gemacht
</li>
<li>
Framework: anscheinend ist hier eine Tendenz in Richtung auf ein integriertes Framework im Gange; im Besonderen will man &quot;Aktionen&quot; direkt aus dem Desktop aufrufen k&#246;nnen<br />
</li>
</ul>
</body>
</html></richcontent>
</html>
</richcontent>
</node>
</node>
<node CREATED="1495221220040" HGAP="43" ID="ID_782313223" MODIFIED="1495224771516" TEXT="Framework" VSHIFT="-20">
<node CREATED="1495221242285" ID="ID_185528211" MODIFIED="1495221245344" TEXT="Applikation">
<node CREATED="1495221272545" ID="ID_624250153" MODIFIED="1495221279676" TEXT="Gtk::Application">
<node CREATED="1495222327564" ID="ID_175461027" MODIFIED="1495222335031" TEXT="initialisiert Gio::Application"/>
<node CREATED="1495222337235" ID="ID_348472460" MODIFIED="1495222345078" TEXT="setzt ggfs. die Applikations-ID"/>
<node CREATED="1495223436241" ID="ID_1015366549" MODIFIED="1495223444611" TEXT="Application::run">
<node CREATED="1495223445527" ID="ID_1531454773" MODIFIED="1495223451122" TEXT="optional mit Window">
<node CREATED="1495223506111" ID="ID_992095337" MODIFIED="1495223512914" TEXT="macht aber nur window-&gt;show"/>
<node CREATED="1495223513438" ID="ID_1178606368" MODIFIED="1495223596131" TEXT="allerdings im activate-Callback">
<richcontent TYPE="NOTE"><html>
<head>
</head>
<body>
<p>
warum?
</p>
<p>
nur wegen ApplictationWindow!
</p>
<p>
Denn dieses setzte eine &quot;Registrierung&quot; voraus.
</p>
<p>
Alles in ein Framework zwingen. Alternativlos, capisce?
</p>
</body>
</html>
</richcontent>
<icon BUILTIN="ksmiletris"/>
</node>
</node>
<node CREATED="1495223451598" ID="ID_1042773331" MODIFIED="1495223458873" TEXT="startet Gio::Application::run"/>
</node>
</node>
<node CREATED="1495221280336" ID="ID_1925569425" MODIFIED="1495221287043" TEXT="Gio::Application">
<node CREATED="1495221530614" ID="ID_1085605910" MODIFIED="1495221536730" TEXT="initialisiert das Framework"/>
<node CREATED="1495221537366" ID="ID_381245884" MODIFIED="1495221545280" TEXT="stellt eine dBus-Verbindung bereit"/>
<node CREATED="1495221546252" ID="ID_771692992" MODIFIED="1495221585963" TEXT="erbt von Gio::ActionGroup und ActionMap"/>
<node CREATED="1495223467588" ID="ID_666842762" MODIFIED="1495223470456" TEXT="run">
<node CREATED="1495223902619" ID="ID_11620264" MODIFIED="1495223911861" TEXT="behandelt Argumente"/>
<node CREATED="1495223912401" ID="ID_1575164060" MODIFIED="1495223926363" TEXT="falls Service: wartet auf Nachricht vom dBus"/>
<node CREATED="1495224012668" ID="ID_566886010" MODIFIED="1495224030469" TEXT="Event-Loop">
<node CREATED="1495224031057" ID="ID_1352224458" MODIFIED="1495224034093" TEXT="use-count"/>
<node CREATED="1495224034585" ID="ID_1852291898" MODIFIED="1495224040084" TEXT="bestimmt, ob die Loop weiter l&#xe4;uft"/>
<node CREATED="1495224111895" ID="ID_1808871678" MODIFIED="1495224970269" TEXT="g_main_context_iteration">
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
</node>
<node CREATED="1495224682595" HGAP="35" ID="ID_1221113124" MODIFIED="1495224749447" TEXT="g_main_context_iterate" VSHIFT="7">
<linktarget COLOR="#4da894" DESTINATION="ID_1221113124" ENDARROW="Default" ENDINCLINATION="-37;92;" ID="Arrow_ID_603815905" SOURCE="ID_355427981" STARTARROW="None" STARTINCLINATION="17;-42;"/>
</node>
</node>
</node>
</node>
</node>
<node CREATED="1495224577105" HGAP="33" ID="ID_1924897671" MODIFIED="1495224986880" TEXT="Gtk::Main" VSHIFT="10">
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1495224595638" ID="ID_1774384379" MODIFIED="1495224606876" TEXT="@deprecated">
<icon BUILTIN="messagebox_warning"/>
</node>
<node CREATED="1495224609188" ID="ID_1615155508" MODIFIED="1495224916588">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
initialisiert das
</p>
<p>
Framework
</p>
</body>
</html>
</richcontent>
<node CREATED="1495224862227" ID="ID_762530588" MODIFIED="1495224863391" TEXT="init_gtkmm_internals"/>
<node CREATED="1495224890119" ID="ID_137730290" MODIFIED="1495224898674" TEXT="statische funktion"/>
</node>
<node CREATED="1495224625466" ID="ID_668309036" MODIFIED="1495224626870" TEXT="run">
<node CREATED="1495224647071" ID="ID_660577000" MODIFIED="1495224959968" TEXT="gtk_main">
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
<node CREATED="1495224927362" ID="ID_904812640" MODIFIED="1495224934333" TEXT="Kommandozeile"/>
</node>
<node CREATED="1495224649943" ID="ID_1753452940" MODIFIED="1495224673144" TEXT="g_main_loop_run">
<node CREATED="1495224690714" ID="ID_355427981" MODIFIED="1495224759310" TEXT="g_main_context_iterate">
<arrowlink COLOR="#4da894" DESTINATION="ID_1221113124" ENDARROW="Default" ENDINCLINATION="-37;92;" ID="Arrow_ID_603815905" STARTARROW="None" STARTINCLINATION="17;-42;"/>
</node>
</node>
</node>
</node>
<node CREATED="1495224989674" HGAP="18" ID="ID_381583771" MODIFIED="1495225134340" TEXT="Verh&#xe4;ltnis beider" VSHIFT="9">
<icon BUILTIN="idea"/>
<node CREATED="1495225019502" ID="ID_1829681403" MODIFIED="1495225041024" TEXT="beide machen in etwas das Gleiche"/>
<node CREATED="1495225006920" ID="ID_1631847350" MODIFIED="1495225014650" TEXT="Application ist generischer"/>
<node CREATED="1495226503104" ID="ID_1991720691" MODIFIED="1495226552821" TEXT="es geht dabei um Desktop-Integration"/>
<node CREATED="1495225050138" ID="ID_1077152710" MODIFIED="1495225130015" TEXT="gtk_main beruht heute auf Gio">
<richcontent TYPE="NOTE"><html>
<head>
</head>
<body>
<p>
...das hei&#223;t, es wurde &quot;retrofitted&quot;.
</p>
<p>
die Lib Gio bietet ein generisches &quot;Main-Loop-Framework&quot;,
</p>
<p>
in dem ein Main-Context gepollt wird, solange, bis ein use-count auf Null geht.
</p>
<p>
Gtk-Main verwendet inzwischen den gleichen Mechanismus
</p>
</body>
</html>
</richcontent>
</node>
</node>
</node>
<node CREATED="1477785704584" ID="ID_528329491" MODIFIED="1477785711408" TEXT="event handling">