MCPcopy Create free account
hub / github.com/TankOs/SFGUI / HandleSizeChange

Method HandleSizeChange

src/SFGUI/Label.cpp:151–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void Label::HandleSizeChange() {
152 if( !m_wrap || ( GetAllocation().size.x <= 0 ) ) {
153 return;
154 }
155
156 WrapText();
157
158 static auto calculate_y_requisition = false;
159
160 if( !calculate_y_requisition ) {
161 calculate_y_requisition = true;
162 RequestResize();
163 }
164 else {
165 calculate_y_requisition = false;
166 }
167}
168
169std::unique_ptr<RenderQueue> Label::InvalidateImpl() const {
170 return Context::Get().GetEngine().CreateLabelDrawable( std::dynamic_pointer_cast<const Label>( shared_from_this() ) );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected