OpenTTD Source 20241224-master-gee860a5c8e
DropDownCheck< TBase, TEnd, TFs > Class Template Reference

Drop down checkmark component. More...

#include <dropdown_common_type.h>

Inheritance diagram for DropDownCheck< TBase, TEnd, TFs >:

Public Member Functions

template<typename... Args>
 DropDownCheck (bool checked, Args &&... args)
 
uint Height () const override
 
uint Width () const override
 
void Draw (const Rect &full, const Rect &r, bool sel, 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 149 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 154 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,
Colours  bg_colour 
) const
inlineoverride

Definition at line 162 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 159 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 160 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 150 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 151 of file dropdown_common_type.h.


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