10 #ifndef TEXTFILE_GUI_H 11 #define TEXTFILE_GUI_H 26 std::vector<const char *>
lines;
36 void OnClick(
Point pt,
int widget,
int click_count)
override;
40 void Reset()
override;
bool Monospace() override
Whether to search for a monospace font or not.
Functions related to OTTD's strings.
ResizeInfo resize
Resize information.
Subdirectory
The different kinds of subdirectories OpenTTD uses.
char * text
Lines of text from the NewGRF's textfile.
void OnClick(Point pt, int widget, int click_count) override
A click with the left mouse button has been made on the window.
fluid_settings_t * settings
FluidSynth settings handle.
void DrawWidget(const Rect &r, int widget) const override
Draw the contents of a nested widget.
Functions, definitions and such used only by the GUI.
Settings for the freetype fonts.
Types for Standard In/Out file operations.
Data structure for an opened window.
Bottom offset of the text of the frame.
uint GetContentHeight()
Get the total height of the content displayed in this window, if wrapping is disabled.
FontSize DefaultSize() override
Get the default (font) size of the string.
uint search_iterator
Iterator for the font check search.
const char * NextString() override
Get the next string to search through.
void SetFontNames(FreeTypeSettings *settings, const char *font_name, const void *os_data) override
Set the right font names.
A searcher for missing glyphs.
static const int BOTTOM_SPACING
Additional spacing at the bottom of the WID_TF_BACKGROUND widget.
virtual void LoadTextfile(const char *textfile, Subdirectory dir)
Loads the textfile text from file and setup lines.
TextfileType
Additional text files accompanying Tar archives.
Top offset of the text of the frame.
static const int TOP_SPACING
Additional spacing at the top of the WID_TF_BACKGROUND widget.
Scrollbar * hscroll
Horizontal scrollbar.
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
Update size and resize step of a widget in the window.
void SetupScrollbars()
Set scrollbars to the right lengths.
Window for displaying a textfile.
void Reset() override
Reset the search, i.e.
TextfileType file_type
Type of textfile to view.
FontSize
Available font sizes.
Scrollbar * vscroll
Vertical scrollbar.
Coordinates of a point in 2D.
std::vector< const char * > lines
text, split into lines in a table with lines.
const char * GetTextfile(TextfileType type, Subdirectory dir, const char *filename)
Search a textfile file next to the given content.
Specification of a rectangle with absolute coordinates of all edges.
Types related to textfiles.
Dimensions (a width and height) of a rectangle in 2D.
void OnResize() override
Called after the window got resized.