4#include "Stroika/Frameworks/StroikaPreComp.h"
6#include "WordWrappedTextInteractor.h"
10using namespace Stroika::Frameworks;
11using namespace Stroika::Frameworks::Led;
13#if qStroika_Frameworks_Led_SupportGDI
23void WordWrappedTextInteractor::OnTypedNormalCharacter (Led_tChar theChar,
bool optionPressed,
bool shiftPressed,
bool commandPressed,
24 bool controlPressed,
bool altKeyPressed)
26 if (theChar ==
'\n' and shiftPressed) {
31 bool savedSuppressFlag = GetSuppressTypedControlCharacters ();
32 SetSuppressTypedControlCharacters (
false);
34 inherited::OnTypedNormalCharacter (kSoftLineBreakChar, optionPressed, shiftPressed, commandPressed, controlPressed, altKeyPressed);
37 SetSuppressTypedControlCharacters (savedSuppressFlag);
40 SetSuppressTypedControlCharacters (savedSuppressFlag);
43 inherited::OnTypedNormalCharacter (theChar, optionPressed, shiftPressed, commandPressed, controlPressed, altKeyPressed);
47void WordWrappedTextInteractor::SetTopRowInWindow (
size_t newTopRow)
49 PreScrollInfo preScrollInfo;
50 PreScrollHelper (eDefaultUpdate, &preScrollInfo);
51 WordWrappedTextImager::SetTopRowInWindow (newTopRow);
52 PostScrollHelper (preScrollInfo);
55void WordWrappedTextInteractor::SetTopRowInWindow (RowReference row)
57 PreScrollInfo preScrollInfo;
58 PreScrollHelper (eDefaultUpdate, &preScrollInfo);
59 WordWrappedTextImager::SetTopRowInWindow (row);
60 PostScrollHelper (preScrollInfo);
63void WordWrappedTextInteractor::SetTopRowInWindowByMarkerPosition (
size_t markerPos, UpdateMode updateMode)
65 SetTopRowInWindow (GetRowReferenceContainingPosition (markerPos), updateMode);