OpenTTD Source 20260206-master-g4d4e37dbf1
DropDownCheck< TBase, TEnd, TFs > Class Template Reference

Drop down checkmark component. More...

#include <dropdown_common_type.h>

Inheritance diagram for DropDownCheck< TBase, TEnd, TFs >:
DropDownIndent< DropDownCheck< DropDownString< DropDownListItem > > >

Public Member Functions

template<typename... Args>
 DropDownCheck (bool checked, Args &&... args)
uint Height () const override
uint Width () const override
int OnClick (const Rect &r, const Point &pt) const override
void Draw (const Rect &full, const Rect &r, bool sel, int click_result, Colours bg_colour) const override

Private Attributes

bool checked
 Is item checked.
Dimension dim
 Dimension of checkmark.

Detailed Description

template<class TBase, bool TEnd = false, FontSize TFs = FS_NORMAL>
class DropDownCheck< TBase, TEnd, TFs >

Drop down checkmark component.

Template Parameters
TBaseBase component.
TFsFont size.
TEndPosition checkmark at end if true, or start if false.

Definition at line 157 of file dropdown_common_type.h.

Constructor & Destructor Documentation

◆ DropDownCheck()

template<class TBase, bool TEnd = false, FontSize TFs = FS_NORMAL>
template<typename... Args>
DropDownCheck< TBase, TEnd, TFs >::DropDownCheck ( bool checked,
Args &&... args )
inlineexplicit

Definition at line 162 of file dropdown_common_type.h.

Member Function Documentation

◆ Draw()

template<class TBase, bool TEnd = false, FontSize TFs = FS_NORMAL>
void DropDownCheck< TBase, TEnd, TFs >::Draw ( const Rect & full,
const Rect & r,
bool sel,
int click_result,
Colours bg_colour ) const
inlineoverride

Definition at line 176 of file dropdown_common_type.h.

◆ Height()

template<class TBase, bool TEnd = false, FontSize TFs = FS_NORMAL>
uint DropDownCheck< TBase, TEnd, TFs >::Height ( ) const
inlineoverride

Definition at line 167 of file dropdown_common_type.h.

◆ OnClick()

template<class TBase, bool TEnd = false, FontSize TFs = FS_NORMAL>
int DropDownCheck< TBase, TEnd, TFs >::OnClick ( const Rect & r,
const Point & pt ) const
inlineoverride

Definition at line 170 of file dropdown_common_type.h.

◆ Width()

template<class TBase, bool TEnd = false, FontSize TFs = FS_NORMAL>
uint DropDownCheck< TBase, TEnd, TFs >::Width ( ) const
inlineoverride

Definition at line 168 of file dropdown_common_type.h.

Field Documentation

◆ checked

template<class TBase, bool TEnd = false, FontSize TFs = FS_NORMAL>
bool DropDownCheck< TBase, TEnd, TFs >::checked
private

Is item checked.

Definition at line 158 of file dropdown_common_type.h.

◆ dim

template<class TBase, bool TEnd = false, FontSize TFs = FS_NORMAL>
Dimension DropDownCheck< TBase, TEnd, TFs >::dim
private

Dimension of checkmark.

Definition at line 159 of file dropdown_common_type.h.


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