5namespace Stroika::Frameworks::Led {
12 inline shared_ptr<FlavorPackageInternalizer> HidableTextMarkerOwner::GetInternalizer ()
const
16 inline shared_ptr<FlavorPackageExternalizer> HidableTextMarkerOwner::GetExternalizer ()
const
20 inline void HidableTextMarkerOwner::Invariant ()
const
22#if qStroika_Foundation_Debug_AssertionsChecked
32 inline HidableTextMarkerOwner::HidableTextMarker::HidableTextMarker ()
37 inline HidableTextMarkerOwner& HidableTextMarkerOwner::HidableTextMarker::GetOwner ()
const
39 MarkerOwner* mo = inherited::GetOwner ();
40 HidableTextMarkerOwner* hmo =
dynamic_cast<HidableTextMarkerOwner*
> (mo);
44 inline void HidableTextMarkerOwner::HidableTextMarker::Hide ()
47 GetOwner ().CollapseMarker (
this);
51 inline void HidableTextMarkerOwner::HidableTextMarker::Show ()
54 GetOwner ().ReifyMarker (
this);
58 inline bool HidableTextMarkerOwner::HidableTextMarker::IsShown ()
const
68 template <
typename BASECLASS>
69 int HidableTextMarkerHelper<BASECLASS>::GetPriority ()
const
74#if qStroika_Frameworks_Led_SupportGDI
75 template <
typename BASECLASS>
76 void HidableTextMarkerHelper<BASECLASS>::DrawSegment (
const StyledTextImager* imager,
const StyleRunElement& runElement, Tablet* tablet,
77 size_t from,
size_t to,
const TextLayoutBlock& text,
const Led_Rect& drawInto,
78 const Led_Rect& invalidRect, CoordinateType useBaseLine, DistanceType* pixelsDrawn)
80 if (this->IsShown ()) {
81 inherited::DrawSegment (imager, runElement, tablet, from, to, text, drawInto, invalidRect, useBaseLine, pixelsDrawn);
87 template <
typename BASECLASS>
88 void HidableTextMarkerHelper<BASECLASS>::MeasureSegmentWidth (
const StyledTextImager* imager,
const StyleRunElement& runElement,
size_t from,
89 size_t to,
const Led_tChar* text, DistanceType* distanceResults)
const
91 if (this->IsShown ()) {
92 inherited::MeasureSegmentWidth (imager, runElement, from, to, text, distanceResults);
95 size_t len = to - from;
96 for (
size_t i = 0; i < len; ++i) {
97 distanceResults[i] = 0;
101 template <
typename BASECLASS>
102 DistanceType HidableTextMarkerHelper<BASECLASS>::MeasureSegmentHeight (
const StyledTextImager* imager,
103 const StyleRunElement& runElement,
size_t from,
size_t to)
const
105 if (this->IsShown ()) {
106 return inherited::MeasureSegmentHeight (imager, runElement, from, to);
112 template <
typename BASECLASS>
113 DistanceType HidableTextMarkerHelper<BASECLASS>::MeasureSegmentBaseLine (
const StyledTextImager* imager,
114 const StyleRunElement& runElement,
size_t from,
size_t to)
const
116 if (this->IsShown ()) {
117 return inherited::MeasureSegmentBaseLine (imager, runElement, from, to);
130 inline HidableTextMarkerOwner::FontSpecHidableTextMarker::FontSpecHidableTextMarker (
const IncrementalFontSpecification& styleInfo)
132 , fFontSpecification{styleInfo}
141 inline bool UniformHidableTextMarkerOwner::IsHidden ()
const
151 inline ColoredUniformHidableTextMarkerOwner::ColoredUniformHidableTextMarkerOwner (TextStore& textStore)
152 : inherited{textStore}
153 , fColor{Color::kRed}
157 inline Color ColoredUniformHidableTextMarkerOwner::GetColor ()
const
161 inline void ColoredUniformHidableTextMarkerOwner::SetColor (
const Color& color)
166 inline bool ColoredUniformHidableTextMarkerOwner::GetColored ()
const
170 inline void ColoredUniformHidableTextMarkerOwner::SetColored (
bool colored)