Stroika Library 3.0d25
 
Loading...
Searching...
No Matches
SimpleLed.cpp
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2026. All rights reserved
3 */
4#include "Stroika/Frameworks/StroikaPreComp.h"
5
6#include <stdlib.h>
7#include <string.h>
8
9#include "SimpleLed.h"
10
11using namespace Stroika::Foundation;
12using namespace Stroika::Frameworks;
13using namespace Stroika::Frameworks::Led;
14
15/*
16 ********************************************************************************
17 ***************************** SimpleLedWordProcessor ***************************
18 ********************************************************************************
19 */
20SimpleLedWordProcessor::SimpleLedWordProcessor ()
21 : inherited ()
22 , fCommandHandler (kMaxUndoLevels)
23 , fTextStore ()
24{
25 SpecifyTextStore (&fTextStore);
26 SetCommandHandler (&fCommandHandler);
27}
28
29SimpleLedWordProcessor::~SimpleLedWordProcessor ()
30{
31 SetCommandHandler (NULL);
32 SpecifyTextStore (NULL);
33}
34
35#if defined(_MFC_VER)
36IMPLEMENT_DYNCREATE (SimpleLedWordProcessor, CView)
37BEGIN_MESSAGE_MAP (SimpleLedWordProcessor, SimpleLedWordProcessor::inherited)
38END_MESSAGE_MAP ()
39#endif
40
41/*
42 ********************************************************************************
43 ******************************** SimpleLedLineEditor ***************************
44 ********************************************************************************
45 */
46SimpleLedLineEditor::SimpleLedLineEditor ()
47 : inherited ()
48 , fCommandHandler (kMaxUndoLevels)
49 , fTextStore ()
50{
51 SpecifyTextStore (&fTextStore);
52 SetCommandHandler (&fCommandHandler);
53 SetScrollBarType (h, eScrollBarAlways);
54 SetScrollBarType (v, eScrollBarAlways);
55}
56
57SimpleLedLineEditor::~SimpleLedLineEditor ()
58{
59 SpecifyTextStore (NULL);
60}
61
62#if defined(_MFC_VER)
63IMPLEMENT_DYNCREATE (SimpleLedLineEditor, CView)
64BEGIN_MESSAGE_MAP (SimpleLedLineEditor, SimpleLedLineEditor::inherited)
65END_MESSAGE_MAP ()
66#endif
67
68/*
69 ********************************************************************************
70 ********************************* LedDialogText ********************************
71 ********************************************************************************
72 */
73
74LedDialogText::LedDialogText ()
75 : inherited ()
76{
77}
78
79#if qStroika_Platform_Windows && defined(_MFC_VER)
80void LedDialogText::PostNcDestroy ()
81{
82 // Don't auto-delete ourselves!
83 CWnd::PostNcDestroy ();
84}
85int LedDialogText::OnMouseActivate (CWnd* pDesktopWnd, UINT nHitTest, UINT message)
86{
87 // Don't do CView::OnMouseActiveate() cuz that assumes our parent is a frame window,
88 // and tries to make us the current view in the document...
89 int nResult = CWnd::OnMouseActivate (pDesktopWnd, nHitTest, message);
90 return nResult;
91}
92#endif
93
94#if qStroika_Platform_Windows && defined(_MFC_VER)
95IMPLEMENT_DYNCREATE (LedDialogText, CView)
96BEGIN_MESSAGE_MAP (LedDialogText, LedDialogText::inherited)
97ON_WM_MOUSEACTIVATE ()
98END_MESSAGE_MAP ()
99#endif