4#ifndef _Stroika_Frameworks_Led_SimpleLed_h_
5#define _Stroika_Frameworks_Led_SimpleLed_h_ 1
15#if !defined(__PowerPlant__) && !defined(_MFC_VER) && !defined(_WIN32)
16#error "This file provides a simple to use wrapper on one of the above class libraries"
17#error "But you don't seem to be using any of them. Be sure to set the proper defines"
18#error "if you ARE in fact using one of the supported class libraries."
21#include "Stroika/Frameworks/StroikaPreComp.h"
23#include "ChunkedArrayTextStore.h"
25#include "SimpleTextInteractor.h"
26#include "WordProcessor.h"
28#if defined(__PowerPlant__)
30#elif defined(_MFC_VER)
32#include "Led_MFC_WordProcessor.h"
34#include "Platform/Windows.h"
37#include "WordProcessor.h"
39namespace Stroika::Frameworks::Led {
41 DISABLE_COMPILER_MSC_WARNING_START (4250)
54 class SimpleLedWordProcessor
55#if defined(__PowerPlant__)
56 :
public Led_PPView_X<WordProcessor, Led_PPView_Traits_Default>
57#elif defined(_MFC_VER)
58 :
public Led_MFC_X<WordProcessor>
60 :
public Platform::Led_Win32_SimpleWndProc_Helper<Platform::Led_Win32_Helper<WordProcessor>>
64#if defined(__PowerPlant__)
65 using inherited = Led_PPView_X<WordProcessor, Led_PPView_Traits_Default>;
66#elif defined(_MFC_VER)
67 using inherited = Led_MFC_X<WordProcessor>;
69 using inherited = Platform::Led_Win32_SimpleWndProc_Helper<Platform::Led_Win32_Helper<WordProcessor>>;
72 SimpleLedWordProcessor ();
73 ~SimpleLedWordProcessor ();
75#if qCannotSafelyCallLotsOfComplexVirtMethodCallsInsideCTORDTOR
78 virtual void OnInitialUpdate ()
override;
79 virtual void PostNcDestroy ()
override;
81 virtual LRESULT OnCreate_Msg (LPCREATESTRUCT createStruct)
override;
82 virtual void OnNCDestroy_Msg ()
override;
90 ChunkedArrayTextStore fTextStore;
91 MultiLevelUndoCommandHandler fCommandHandler;
95 DECLARE_MESSAGE_MAP ()
96 DECLARE_DYNCREATE (SimpleLedWordProcessor)
100 DISABLE_COMPILER_MSC_WARNING_END (4250)
102 DISABLE_COMPILER_MSC_WARNING_START (4250)
115 class SimpleLedLineEditor
116#if defined(__PowerPlant__)
117 :
public Led_PPView_X<SimpleTextInteractor, Led_PPView_Traits_Default>
118#elif defined(_MFC_VER)
119 :
public Led_MFC_X<SimpleTextInteractor>
121 :
public Platform::Led_Win32_SimpleWndProc_Helper<Platform::Led_Win32_Helper<SimpleTextInteractor>>
125#if defined(__PowerPlant__)
126 using inherited = Led_PPView_X<SimpleTextInteractor, Led_PPView_Traits_Default>;
127#elif defined(_MFC_VER)
128 using inherited = Led_MFC_X<SimpleTextInteractor>;
130 using inherited = Platform::Led_Win32_SimpleWndProc_Helper<Platform::Led_Win32_Helper<SimpleTextInteractor>>;
133 SimpleLedLineEditor ();
134 ~SimpleLedLineEditor ();
136#if qCannotSafelyCallLotsOfComplexVirtMethodCallsInsideCTORDTOR
139 virtual void OnInitialUpdate ()
override;
140 virtual void PostNcDestroy ()
override;
142 virtual LRESULT OnCreate_Msg (LPCREATESTRUCT createStruct)
override;
143 virtual void OnNCDestroy_Msg ()
override;
151 ChunkedArrayTextStore fTextStore;
152 MultiLevelUndoCommandHandler fCommandHandler;
156 DECLARE_MESSAGE_MAP ()
157 DECLARE_DYNCREATE (SimpleLedLineEditor)
160 DISABLE_COMPILER_MSC_WARNING_END (4250)
162 DISABLE_COMPILER_MSC_WARNING_START (4250)
173 class LedDialogText : public SimpleLedWordProcessor {
175 using inherited = SimpleLedWordProcessor;
180#if qStroika_Foundation_Common_Platform_Windows && defined(_MFC_VER)
182 virtual void PostNcDestroy ()
override;
183 virtual int OnMouseActivate (CWnd* pDesktopWnd, UINT nHitTest, UINT message)
override;
186#if qStroika_Foundation_Common_Platform_Windows && defined(_MFC_VER)
188 DECLARE_MESSAGE_MAP ()
189 DECLARE_DYNCREATE (LedDialogText)
192 DISABLE_COMPILER_MSC_WARNING_END (4250)
201#include "SimpleLed.inl"