6#define __LedItView_h__ 1
8#include "Stroika/Foundation/StroikaPreComp.h"
10#if qStroika_Foundation_Common_Platform_MacOS
11#include "Stroika/Frameworks/Led/Platform/Led_PP_WordProcessor.h"
13#include "Stroika/Frameworks/Led/Platform/MFC_WordProcessor.h"
14#elif qStroika_FeatureSupported_XWindows
15#include "Stroika/Frameworks/Led/Platform/Led_Gtk_WordProcessor.h"
18#include "LedItConfig.h"
19#include "LedItResources.h"
21#if qStroika_Foundation_Common_Platform_Windows
22class LedItControlItem;
25#if qStroika_FeatureSupported_XWindows
29#if qStroika_Foundation_Common_Platform_Windows
30using LedItViewAlmostBASE = Platform::Led_MFC_X<WordProcessor>;
33DISABLE_COMPILER_MSC_WARNING_START (4250)
35#if qStroika_Foundation_Common_Platform_MacOS
36 public Platform::WordProcessorCommonCommandHelper_PP<Led_PPView_X<WordProcessor>>
37#elif qStroika_Foundation_Common_Platform_Windows
38 public Platform::WordProcessorCommonCommandHelper_MFC<LedItViewAlmostBASE>
39#elif qStroika_FeatureSupported_XWindows
40 public Platform::WordProcessorCommonCommandHelper_Gtk<Led_Gtk_Helper<WordProcessor>>
44#if qStroika_Foundation_Common_Platform_MacOS
45 using inherited = Platform::WordProcessorCommonCommandHelper_PP<Led_PPView_X<WordProcessor>>;
46#elif qStroika_Foundation_Common_Platform_Windows
47 using inherited = Platform::WordProcessorCommonCommandHelper_MFC<LedItViewAlmostBASE>;
48#elif qStroika_FeatureSupported_XWindows
49 using inherited = Platform::WordProcessorCommonCommandHelper_Gtk<Led_Gtk_Helper<WordProcessor>>;
52#if qStroika_Foundation_Common_Platform_MacOS
55#elif qStroika_Foundation_Common_Platform_Windows
58 DECLARE_DYNCREATE (LedItView)
59#elif qStroika_FeatureSupported_XWindows
61 LedItView (LedItDocument* owningDoc);
65 virtual ~LedItView ();
67#if qStroika_Foundation_Common_Platform_Windows
69 virtual void OnInitialUpdate ()
override;
72#if qStroika_Foundation_Common_Platform_Windows
74 virtual bool OnUpdateCommand (CommandUpdater* enabler)
override;
78 nonvirtual
void SetWrapToWindow (
bool wrapToWindow);
84 virtual void GetLayoutMargins (RowReference row, CoordinateType* lhs, CoordinateType* rhs)
const override;
85 virtual void SetWindowRect (
const Led_Rect& windowRect)
override;
87#if qStroika_Foundation_Common_Platform_Windows
89 nonvirtual LedItDocument& GetDocument ()
const;
92#if qStroika_Foundation_Common_Platform_Windows
93 nonvirtual LedItControlItem* GetSoleSelectedOLEEmbedding ()
const;
96#if qStroika_Foundation_Common_Platform_MacOS
98 virtual void FindCommandStatus (CommandT inCommand, Boolean& outEnabled, Boolean& outUsesMark, UInt16& outMark, Str255 outName)
override;
101#if qStroika_Foundation_Common_Platform_Windows
103 afx_msg
void OnContextMenu (CWnd* , CPoint );
106 virtual BOOL IsSelected (
const CObject* pDocItem)
const override;
110 nonvirtual IncrementalParagraphInfo GetParaFormatSelection ();
111 nonvirtual
void SetParaFormatSelection (
const IncrementalParagraphInfo& pf);
114 virtual void OnShowHideGlyphCommand (CommandNumber cmdNum)
override;
117 virtual SearchParameters GetSearchParameters ()
const override;
118 virtual void SetSearchParameters (
const SearchParameters& sp)
override;
121 nonvirtual
void SetShowHiddenText (
bool showHiddenText);
123#if qStroika_Foundation_Common_Platform_Windows
125 afx_msg
void OnSetFocus (CWnd* pOldWnd);
126 afx_msg
void OnSize (UINT nType,
int cx,
int cy);
127 afx_msg
void OnInsertObject ();
128 afx_msg
void OnCancelEditCntr ();
129 afx_msg
void OnCancelEditSrvr ();
130 afx_msg
void OnBarReturn (NMHDR*, LRESULT*);
131 DECLARE_MESSAGE_MAP ()
135 virtual void AssertValid ()
const override;
136 virtual void Dump (CDumpContext& dc)
const override;
140DISABLE_COMPILER_MSC_WARNING_END (4250)
147#if !qStroika_Foundation_Debug_AssertionsChecked && qStroika_Foundation_Common_Platform_Windows
148inline LedItDocument& LedItView::GetDocument ()
const
150 return *(LedItDocument*)m_pDocument;