Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
TextInteractorMixIns.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
5namespace Stroika::Frameworks::Led {
6
7#if qStroika_Frameworks_Led_SupportGDI
8 /*
9 ********************************************************************************
10 ********************* InteractorImagerMixinHelper<IMAGER> **********************
11 ********************************************************************************
12 */
13 template <typename IMAGER>
14 void InteractorImagerMixinHelper<IMAGER>::Draw (const Led_Rect& subsetToDraw, bool printing)
15 {
16 DrawBefore (subsetToDraw, printing);
17 TextInteractor::Draw (subsetToDraw, printing);
18 IMAGER::Draw (subsetToDraw, printing);
19 DrawAfter (subsetToDraw, printing);
20 }
21 template <typename IMAGER>
22 void InteractorImagerMixinHelper<IMAGER>::AboutToUpdateText (const UpdateInfo& updateInfo)
23 {
24 IMAGER::AboutToUpdateText (updateInfo);
25 TextInteractor::AboutToUpdateText (updateInfo);
26 }
27 template <typename IMAGER>
28 void InteractorImagerMixinHelper<IMAGER>::DidUpdateText (const UpdateInfo& updateInfo) noexcept
29 {
30 IMAGER::DidUpdateText (updateInfo);
31 TextInteractor::DidUpdateText (updateInfo);
32 }
33 template <typename IMAGER>
34 void InteractorImagerMixinHelper<IMAGER>::HookLosingTextStore ()
35 {
36 /*
37 * NB: See SPR#0836 - order of Imager/Interactor reversed compared to HookGainedNewTextStore () intentionally (mimic CTOR/DTOR ordering).
38 * Now DO imager first, then interactor in GAINING text store, and - as always - reverse that order for the LosingTextStore code.
39 */
40 TextInteractor::HookLosingTextStore ();
41 IMAGER::HookLosingTextStore ();
42 }
43 template <typename IMAGER>
44 void InteractorImagerMixinHelper<IMAGER>::HookGainedNewTextStore ()
45 {
46 IMAGER::HookGainedNewTextStore ();
47 TextInteractor::HookGainedNewTextStore ();
48 }
49
50 // class InteractorInteractorMixinHelper<INTERACTOR1,INTERACTOR2>
51 template <typename INTERACTOR1, typename INTERACTOR2>
52 InteractorInteractorMixinHelper<INTERACTOR1, INTERACTOR2>::InteractorInteractorMixinHelper ()
53 : INTERACTOR1 ()
54 , INTERACTOR2 ()
55 {
56 }
57 template <typename INTERACTOR1, typename INTERACTOR2>
58 void InteractorInteractorMixinHelper<INTERACTOR1, INTERACTOR2>::HookLosingTextStore ()
59 {
60 INTERACTOR1::HookLosingTextStore ();
61 INTERACTOR2::HookLosingTextStore ();
62 }
63 template <typename INTERACTOR1, typename INTERACTOR2>
64 void InteractorInteractorMixinHelper<INTERACTOR1, INTERACTOR2>::HookGainedNewTextStore ()
65 {
66 INTERACTOR1::HookGainedNewTextStore ();
67 INTERACTOR2::HookGainedNewTextStore ();
68 }
69 template <typename INTERACTOR1, typename INTERACTOR2>
70 void InteractorInteractorMixinHelper<INTERACTOR1, INTERACTOR2>::DidUpdateText (const MarkerOwner::UpdateInfo& updateInfo) noexcept
71 {
72 INTERACTOR1::DidUpdateText (updateInfo);
73 INTERACTOR2::DidUpdateText (updateInfo);
74 }
75#endif
76
77}