OpenTTD Source: DropDownListItem Class Reference

OpenTTD Source 15.0-beta1

Public Member Functions | Data Fields
DropDownListItem Class Reference

Base list item class from which others are derived. More...

`#include <dropdown_type.h>`

Inheritance diagram for DropDownListItem:

## Public Member Functions
| DropDownListItem (int result, bool masked=false, bool shaded=false)
virtual bool | Selectable () const
virtual uint | Height () const
virtual uint | Width () const
virtual void | Draw (const Rect &full, const Rect &, bool, Colours bg_colour) const
TextColour | GetColour (bool sel) const

## Data Fields
int | result
| Result value to return to window on selection.
bool | masked
| Masked and unselectable item.
bool | shaded
| Shaded item, affects text colour.

## Detailed Description

Base list item class from which others are derived.

Definition at line 22 of file dropdown_type.h.

## Constructor & Destructor Documentation

## ◆ DropDownListItem()

DropDownListItem::DropDownListItem | ( | int | result,
|  | bool | masked = `false`,
|  | bool | shaded = `false`
| ) |  |
| inlineexplicit

Definition at line 28 of file dropdown_type.h.

## Member Function Documentation

## ◆ Draw()

virtual void DropDownListItem::Draw | ( | const Rect & | full,
|  | const Rect & | ,
|  | bool | ,
|  | Colours | bg_colour
| ) |  | const
| inlinevirtual

Definition at line 35 of file dropdown_type.h.

## ◆ GetColour()

TextColour DropDownListItem::GetColour | ( | bool | sel | ) | const
| inline

Definition at line 40 of file dropdown_type.h.

## ◆ Height()

virtual uint DropDownListItem::Height | ( |  | ) | const
| inlinevirtual

Definition at line 32 of file dropdown_type.h.

## ◆ Selectable()

virtual bool DropDownListItem::Selectable | ( |  | ) | const
| inlinevirtual

Definition at line 31 of file dropdown_type.h.

## ◆ Width()

virtual uint DropDownListItem::Width | ( |  | ) | const
| inlinevirtual

Definition at line 33 of file dropdown_type.h.

## Field Documentation

## ◆ masked

bool DropDownListItem::masked

Masked and unselectable item.

Definition at line 25 of file dropdown_type.h.

## ◆ result

int DropDownListItem::result

Result value to return to window on selection.

Definition at line 24 of file dropdown_type.h.

## ◆ shaded

bool DropDownListItem::shaded

Shaded item, affects text colour.

Definition at line 26 of file dropdown_type.h.

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

- src/dropdown_type.h