From a0e1115ff683c369ba607592195e09d4292e2f17 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Tue, 26 May 2020 21:55:22 +0200 Subject: [PATCH] Added FApplication::processExternalUserEvent() --- ChangeLog | 2 ++ src/fapplication.cpp | 7 +++++++ src/include/final/fapplication.h | 1 + 3 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 334d9513..e9d814ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2020-05-26 Markus Gans * FWidgetColors now uses polymorphism, so you can now easily create your own widget color theme + * FApplication has got the new virtual method processExternalUserEvent() + for user code 2020-05-24 Markus Gans * New class FStringStream implements input and output operations diff --git a/src/fapplication.cpp b/src/fapplication.cpp index eb4710a1..984ac34e 100644 --- a/src/fapplication.cpp +++ b/src/fapplication.cpp @@ -262,6 +262,12 @@ bool FApplication::removeQueuedEvent (const FObject* receiver) return retval; } +//---------------------------------------------------------------------- +void FApplication::processExternalUserEvent() +{ + // This method can be overloaded and replaced by own code +} + //---------------------------------------------------------------------- FWidget* FApplication::processParameters (const int& argc, char* argv[]) { @@ -1154,6 +1160,7 @@ bool FApplication::processNextEvent() processTerminalUpdate(); processCloseWidget(); processLogger(); + processExternalUserEvent(); sendQueuedEvents(); num_events += processTimerEvent(); diff --git a/src/include/final/fapplication.h b/src/include/final/fapplication.h index 565ce44e..62e028b6 100644 --- a/src/include/final/fapplication.h +++ b/src/include/final/fapplication.h @@ -129,6 +129,7 @@ class FApplication : public FWidget void sendQueuedEvents(); bool eventInQueue(); bool removeQueuedEvent (const FObject*); + virtual void processExternalUserEvent(); static FWidget* processParameters (const int&, char*[]); static void showParameterUsage () #if defined(__clang__) || defined(__GNUC__)