Stroika Library 3.0d18
 
Loading...
Searching...
No Matches
LedLineItApplication.h
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#ifndef __LedLineItApplication_h__
5#define __LedLineItApplication_h__ 1
6
7#include "Stroika/Frameworks/StroikaPreComp.h"
8
9DISABLE_COMPILER_MSC_WARNING_START (5054)
10#include <afxole.h>
11DISABLE_COMPILER_MSC_WARNING_END (5054)
12
13#if qStroika_Foundation_Common_Platform_Windows
14#include "Stroika/Foundation/Execution/Platform/Windows/COM.h"
15#endif
17
18#include "Stroika/Frameworks/Led/Support.h"
19#include "Stroika/Frameworks/Led/TextStore.h"
20
21#include "LedLineItConfig.h"
22
23#if qIncludeBasicSpellcheckEngine
24#include "Stroika/Frameworks/Led/SpellCheckEngine_Basic.h"
25#endif
26
27// Later put into prefs object!
28extern bool gSupportAutoIdent;
29
30class LedLineItApplication : public CWinApp {
31private:
32 using inherited = CWinApp;
33
34public:
35 LedLineItApplication ();
36 ~LedLineItApplication ();
37
38public:
39 static LedLineItApplication& Get ();
40
41private:
42 static LedLineItApplication* sThe;
43
44public:
45 virtual BOOL InitInstance () override;
46
47#if qIncludeBasicSpellcheckEngine
48public:
49 shared_ptr<SpellCheckEngine_Basic_Simple> fSpellCheckEngine;
50#endif
51
52public:
53 virtual void WinHelpInternal (DWORD_PTR dwData, UINT nCmd = HELP_CONTEXT) override;
54
55 // handle exceptions....
56public:
57 virtual BOOL PumpMessage () override;
58
59 nonvirtual void HandleMFCException (CException* e) noexcept;
60 nonvirtual void HandleBadAllocException () noexcept;
61 nonvirtual void HandleBadUserInputException () noexcept;
62 nonvirtual void HandleUnknownException () noexcept;
63
64private:
65 nonvirtual void AddDocTemplateForString (const char* tmplStr, bool connectToServer);
66
67 COleTemplateServer fOleTemplateServer;
68
69private:
70 nonvirtual BOOL ProcessShellCommand (CCommandLineInfo& rCmdInfo);
71
72private:
73 afx_msg void OnAppAbout ();
74 afx_msg void OnGotoLedLineItWebPageCommand ();
75 afx_msg void OnGotoSophistsWebPageCommand ();
76 afx_msg void OnCheckForUpdatesWebPageCommand ();
77 afx_msg void OnToggleAutoIndentOptionCommand ();
78 afx_msg void OnToggleAutoIndentOptionUpdateCommandUI (CCmdUI* pCmdUI);
79 afx_msg void OnToggleTreatTabAsIndentCharOptionCommand ();
80 afx_msg void OnToggleTreatTabAsIndentCharOptionUpdateCommandUI (CCmdUI* pCmdUI);
81 afx_msg void OnToggleSmartCutNPasteOptionCommand ();
82 afx_msg void OnToggleSmartCutNPasteOptionUpdateCommandUI (CCmdUI* pCmdUI);
83#if qSupportSyntaxColoring
84 afx_msg void OnSyntaxColoringOptionCommand (UINT cmdNum);
85 afx_msg void OnSyntaxColoringOptionUpdateCommandUI (CCmdUI* pCmdUI);
86#endif
87 afx_msg void OnChooseDefaultFontCommand ();
88
89private:
90 nonvirtual void UpdateViewsForPrefsChange ();
91
92#if qStroika_Foundation_Common_Platform_Windows
93private:
94 Execution::Platform::Windows::COMInitializer fCOMInitializer_{COINIT_APARTMENTTHREADED};
95#endif
96private:
97 Execution::Logger::Activator fLogMgrActivator_;
98
99private:
100 DECLARE_MESSAGE_MAP ()
101};
102
103/*
104 ********************************************************************************
105 ***************************** Implementation Details ***************************
106 ********************************************************************************
107 */
108
109#endif /*__LedLineItApplication_h__*/