OpenTTD Source: RectPadding Struct Reference

OpenTTD Source 15.0-RC2

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.
constexpr uint | Vertical () const
| Get total vertical padding of RectPadding.

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

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

## Detailed Description

Padding dimensions to apply to each side of a Rect.

Definition at line 77 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 89 of file geometry_type.hpp.

Referenced by GoalListWindow::DrawListColumn(), VehicleDetailsWindow::DrawWidget(), StoryBookWindow::GetAvailablePageContentWidth(), QueryString::GetBoundingRect(), QueryString::GetCaretPosition(), QueryString::GetCharAtPosition(), TownViewWindow::GetDesiredInfoHeight(), GetDropDownListDimension(), MakeCompanyButtonRows(), IndustryCargoesWindow::OnInit(), SmallMapWindow::OnInit(), NWidgetBackground::SetupSmallestSize(), NWidgetLeaf::SetupSmallestSize(), DropdownWindow::UpdateSizeAndPosition(), BuildAirportWindow::UpdateWidgetSize(), BootstrapErrorWindow::UpdateWidgetSize(), BootstrapAskForDownloadWindow::UpdateWidgetSize(), CompanyInfrastructureWindow::UpdateWidgetSize(), BuildDocksDepotWindow::UpdateWidgetSize(), GenerateLandscapeWindow::UpdateWidgetSize(), CreateScenarioWindow::UpdateWidgetSize(), GenerateProgressWindow::UpdateWidgetSize(), GoalListWindow::UpdateWidgetSize(), BaseCargoGraphWindow::UpdateWidgetSize(), PerformanceRatingDetailWindow::UpdateWidgetSize(), IndustryCargoesWindow::UpdateWidgetSize(), PerformanceLeagueWindow::UpdateWidgetSize(), ScriptLeagueWindow::UpdateWidgetSize(), LandInfoWindow::UpdateWidgetSize(), TooltipsWindow::UpdateWidgetSize(), BaseNetworkContentDownloadStatusWindow::UpdateWidgetSize(), NetworkJoinStatusWindow::UpdateWidgetSize(), NewGRFParametersWindow::UpdateWidgetSize(), NewGRFWindow::UpdateWidgetSize(), ScanProgressWindow::UpdateWidgetSize(), NewsWindow::UpdateWidgetSize(), BuildObjectWindow::UpdateWidgetSize(), PickerWindow::UpdateWidgetSize(), BuildRailStationWindow::UpdateWidgetSize(), BuildSignalWindow::UpdateWidgetSize(), BuildRailDepotWindow::UpdateWidgetSize(), BuildRoadDepotWindow::UpdateWidgetSize(), BuildRoadStationWindow::UpdateWidgetSize(), and SubsidyListWindow::UpdateWidgetSize().

## ◆ Vertical()

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

Get total vertical padding of RectPadding.

Returns
  total vertical padding.

Definition at line 95 of file geometry_type.hpp.

Referenced by VehicleGroupWindow::ComputeGroupInfoSize(), NetworkContentListWindow::DrawDetails(), NetworkContentListWindow::DrawMatrix(), NetworkGameWindow::DrawServerLine(), BaseGraphWindow::DrawWidget(), CompanyInfrastructureWindow::FindWindowPlacementAndResize(), DropdownWindow::FitAvailableHeight(), SmallMapWindow::GetLegendHeight(), StoryBookWindow::GetPageElementFloatWidth(), StoryBookWindow::GetPageElementHeight(), GetVehicleListHeight(), MakeCompanyButtonRows(), SelectCompanyManagerFaceWindow::OnInit(), IndustryCargoesWindow::OnInit(), NWidgetBackground::SetupSmallestSize(), NWidgetLeaf::SetupSmallestSize(), DropdownWindow::UpdateSizeAndPosition(), BuildAirportWindow::UpdateWidgetSize(), BootstrapErrorWindow::UpdateWidgetSize(), BootstrapAskForDownloadWindow::UpdateWidgetSize(), BuildDocksDepotWindow::UpdateWidgetSize(), GenerateLandscapeWindow::UpdateWidgetSize(), CreateScenarioWindow::UpdateWidgetSize(), GenerateProgressWindow::UpdateWidgetSize(), GoalListWindow::UpdateWidgetSize(), BaseCargoGraphWindow::UpdateWidgetSize(), PerformanceRatingDetailWindow::UpdateWidgetSize(), IndustryCargoesWindow::UpdateWidgetSize(), PerformanceLeagueWindow::UpdateWidgetSize(), ScriptLeagueWindow::UpdateWidgetSize(), LandInfoWindow::UpdateWidgetSize(), TooltipsWindow::UpdateWidgetSize(), BaseNetworkContentDownloadStatusWindow::UpdateWidgetSize(), NetworkGameWindow::UpdateWidgetSize(), NetworkClientListWindow::UpdateWidgetSize(), NetworkJoinStatusWindow::UpdateWidgetSize(), NewGRFInspectWindow::UpdateWidgetSize(), NewGRFParametersWindow::UpdateWidgetSize(), NewGRFWindow::UpdateWidgetSize(), ScanProgressWindow::UpdateWidgetSize(), NewsWindow::UpdateWidgetSize(), MessageHistoryWindow::UpdateWidgetSize(), BuildObjectWindow::UpdateWidgetSize(), PickerWindow::UpdateWidgetSize(), BuildRailStationWindow::UpdateWidgetSize(), BuildRailDepotWindow::UpdateWidgetSize(), BuildRoadDepotWindow::UpdateWidgetSize(), BuildRoadStationWindow::UpdateWidgetSize(), ScriptDebugWindow::UpdateWidgetSize(), GameOptionsWindow::UpdateWidgetSize(), StoryBookWindow::UpdateWidgetSize(), SubsidyListWindow::UpdateWidgetSize(), and TextfileWindow::UpdateWidgetSize().

## Field Documentation

## ◆ bottom

uint8_t RectPadding::bottom = 0

Definition at line 81 of file geometry_type.hpp.

## ◆ left

uint8_t RectPadding::left = 0

Definition at line 78 of file geometry_type.hpp.

## ◆ right

uint8_t RectPadding::right = 0

Definition at line 80 of file geometry_type.hpp.

## ◆ top

uint8_t RectPadding::top = 0

Definition at line 79 of file geometry_type.hpp.

## ◆ zero

const RectPadding RectPadding::zero {}
| inlinestatic

Definition at line 98 of file geometry_type.hpp.

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

- src/core/geometry_type.hpp