Go to the documentation of this file.
99 WWB_PUSHBUTTON = 1 << 7,
136 virtual bool IsHighlighted()
const {
return false; }
137 virtual TextColour GetHighlightColour()
const {
return TC_INVALID; }
138 virtual void SetHighlighted(
TextColour highlight_colour) {}
147 inline void SetPadding(uint8 top, uint8 right, uint8 bottom, uint8 left)
161 Rect GetCurrentRect()
const
164 r.left = this->
pos_x;
296 void SetIndex(
int index);
300 inline void SetLowered(
bool lowered);
301 inline bool IsLowered()
const;
302 inline void SetDisabled(
bool disabled);
303 inline bool IsDisabled()
const;
305 void FillNestedArray(
NWidgetBase **array, uint length)
override;
307 bool IsHighlighted()
const override;
308 TextColour GetHighlightColour()
const override;
309 void SetHighlighted(
TextColour highlight_colour)
override;
418 void SetIndex(
int index);
447 void SetPIP(uint8 pip_pre, uint8 pip_inter, uint8 pip_post);
449 void Draw(
const Window *w)
override;
506 void SetIndex(
int index);
507 void SetColour(Colours
colour);
530 void GetScrollOffsets(
int &start_x,
int &start_y,
int &base_offs_x,
int &base_offs_y);
560 void SetPIP(uint8 pip_pre, uint8 pip_inter, uint8 pip_post);
686 if (num < 0) num = 0;
687 if (num < this->
pos) this->pos = num;
697 assert(capacity > 0);
700 this->cap = capacity;
701 if (this->cap + this->pos > this->count) this->pos = std::max(0, this->count - this->cap);
712 assert(position >= 0);
713 assert(this->count <= this->
cap ? (position == 0) : (position + this->cap <= this->
count));
714 this->pos = position;
725 if (difference == 0)
return;
728 case SS_BIG: difference *= this->
cap;
break;
731 this->
SetPosition(
Clamp(this->pos + difference, 0, std::max(this->count - this->cap, 0)));
766 static void InvalidateDimensionCache();
768 static Dimension GetHorizontalDimension();
809 if (base >= max_space || step == 0)
return base;
810 if (step == 1)
return max_space;
811 uint increment = max_space - base;
812 increment -= increment % step;
813 return base + increment;
886 uint8 top, right, bottom,
left;
997 part.u.
xy.x = fill_x;
998 part.u.
xy.y = fill_y;
1062 part.u.
padding.bottom = bottom;
1075 return SetPadding(padding, padding, padding, padding);
1090 part.u.
pip.pre = pre;
1091 part.u.
pip.inter = inter;
uint8 lines
Number of text lines.
Dimensions (a width and height) of a rectangle in 2D.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
TextColour
Colour of the strings, see _string_colourmap in table/string_colours.h or docs/ottd-colourtext-palett...
ZoomLevel
All zoom levels we know.
#define SETBITS(x, y)
Sets several bits in a variable.
@ FS_NORMAL
Index of the normal font in the font tables.
static bool IsInsideBS(const T x, const size_t base, const size_t size)
Checks if a value is between a window started at some base point.
Base class that provides memory initialization on dynamically created objects.
Widget part for storing minimal text line data.
Coordinates of a point in 2D.
uint8 spacing
Extra spacing around lines.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
static T Clamp(const T a, const T min, const T max)
Clamp a value between an interval.
#define MAX_UVALUE(type)
The largest value that can be entered in a variable.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
FontSize
Available font sizes.
Data structure for an opened window.
Specification of a rectangle with absolute coordinates of all edges.
FontSize size
Font size of text lines.
#define CLRBITS(x, y)
Clears several bits in a variable.