OpenTTD Source
1.11.0-beta2
|
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)
286 void SetIndex(
int index);
290 inline void SetLowered(
bool lowered);
291 inline bool IsLowered()
const;
292 inline void SetDisabled(
bool disabled);
293 inline bool IsDisabled()
const;
295 void FillNestedArray(
NWidgetBase **array, uint length)
override;
297 bool IsHighlighted()
const override;
298 TextColour GetHighlightColour()
const override;
299 void SetHighlighted(
TextColour highlight_colour)
override;
408 void SetIndex(
int index);
437 void SetPIP(uint8 pip_pre, uint8 pip_inter, uint8 pip_post);
439 void Draw(
const Window *w)
override;
496 void SetIndex(
int index);
497 void SetColour(Colours
colour);
520 void GetScrollOffsets(
int &start_x,
int &start_y,
int &base_offs_x,
int &base_offs_y);
550 void SetPIP(uint8 pip_pre, uint8 pip_inter, uint8 pip_post);
676 if (num < 0) num = 0;
677 if (num < this->
pos) this->pos = num;
687 assert(capacity > 0);
690 this->cap = capacity;
691 if (this->cap + this->pos > this->count) this->pos = std::max(0, this->count - this->cap);
702 assert(position >= 0);
703 assert(this->count <= this->
cap ? (position == 0) : (position + this->cap <= this->
count));
704 this->pos = position;
715 if (difference == 0)
return;
718 case SS_BIG: difference *= this->
cap;
break;
721 this->
SetPosition(
Clamp(this->pos + difference, 0, std::max(this->count - this->cap, 0)));
756 static void InvalidateDimensionCache();
758 static Dimension GetHorizontalDimension();
799 if (base >= max_space || step == 0)
return base;
800 if (step == 1)
return max_space;
801 uint increment = max_space - base;
802 increment -= increment % step;
803 return base + increment;
876 uint8 top, right, bottom,
left;
987 part.u.
xy.x = fill_x;
988 part.u.
xy.y = fill_y;
1052 part.u.
padding.bottom = bottom;
1065 return SetPadding(padding, padding, padding, padding);
1080 part.u.
pip.pre = pre;
1081 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.
FontSize size
Font size of text lines.
#define CLRBITS(x, y)
Clears several bits in a variable.