MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ReflowContent

Method ReflowContent

src/textfile_gui.cpp:110–120  ·  view source on GitHub ↗

* Reset the reflow process to start on the next UI tick. */

Source from the content-addressed store, hash-verified

108 * Reset the reflow process to start on the next UI tick.
109 */
110void TextfileWindow::ReflowContent()
111{
112 /* Minimum number of lines that will be flowed. */
113 if (this->num_lines == 0) this->num_lines = std::size(this->lines);
114
115 auto it = this->GetIteratorFromPosition(this->vscroll->GetPosition());
116
117 auto adapter = AlternatingView{this->lines, it};
118 this->reflow_iter = adapter.begin();
119 this->reflow_end = adapter.end();
120}
121
122/* virtual */ void TextfileWindow::UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize)
123{

Callers 6

OnResizeMethod · 0.95
OnInitMethod · 0.95
OnInvalidateDataMethod · 0.95
OnScrollbarScrollMethod · 0.95
ScrollToLineMethod · 0.95
LoadTextMethod · 0.95

Calls 5

GetPositionMethod · 0.80
sizeFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected