OpenTTD Source: RectPadding Struct Reference

OpenTTD Source 14.0-RC3

Public Member Functions | Data Fields | Static Public Attributes
RectPadding Struct Reference

Padding dimensions to apply to each side of a Rect. More...

`#include <geometry_type.hpp>`

Inheritance diagram for RectPadding:

## Public Member Functions
constexpr uint | Horizontal () const
| Get total horizontal padding of RectPadding. More...
constexpr uint | Vertical () const
| Get total vertical padding of RectPadding. More...

## Data Fields
uint8_t | left
uint8_t | top
uint8_t | right
uint8_t | bottom

## Static Public Attributes
static const RectPadding | zero {}

## Detailed Description

Padding dimensions to apply to each side of a Rect.

Definition at line 51 of file geometry_type.hpp.

## Member Function Documentation

## ◆ Horizontal()

constexpr uint RectPadding::Horizontal | ( |  | ) | const
| inlineconstexpr

Get total horizontal padding of RectPadding.

Returns
  total horizontal padding.

Definition at line 63 of file geometry_type.hpp.

Referenced by TextfileWindow::CheckHyperlinkClick(), GoalListWindow::DrawListColumn(), StoryBookWindow::GetAvailablePageContentWidth(), GetDropDownListDimension(), IndustryDirectoryWindow::GetIndustryListWidth(), SelectCompanyManagerFaceWindow::OnInit(), IndustryCargoesWindow::OnInit(), TextfileWindow::ReflowContent(), NWidgetLeaf::SetupSmallestSize(), and DropdownWindow::UpdateSizeAndPosition().

## ◆ Vertical()

constexpr uint RectPadding::Vertical | ( |  | ) | const
| inlineconstexpr

Get total vertical padding of RectPadding.

Returns
  total vertical padding.

Definition at line 69 of file geometry_type.hpp.

Referenced by NetworkContentListWindow::DrawDetails(), SmallMapWindow::GetLegendHeight(), StoryBookWindow::GetPageElementFloatWidth(), StoryBookWindow::GetPageElementHeight(), GetVehicleListHeight(), SelectCompanyManagerFaceWindow::OnInit(), IndustryCargoesWindow::OnInit(), NWidgetLeaf::SetupSmallestSize(), and DropdownWindow::UpdateSizeAndPosition().

The documentation for this struct was generated from the following file:

- src/core/geometry_type.hpp