Public Member Functions | Static Public Member Functions | Data Fields

# DropDownListStringItem Class Reference

Common string list item. More...

`#include <dropdown_type.h>`

Inheritance diagram for DropDownListStringItem:

## Public Member Functions
| DropDownListStringItem (StringID string, int result, bool masked)
virtual bool | Selectable () const
virtual uint | Width () const
virtual void | Draw (int left, int right, int top, int bottom, bool sel, int bg_colour) const
virtual StringID | String () const
## Static Public Member Functions
static int CDECL | NatSortFunc (const DropDownListItem *const *first, const DropDownListItem *const *second)
| Natural sorting comparator function for DropDownList::sort().
## Data Fields
StringID | string
| String ID of item.

## Detailed Description

Common string list item.

Definition at line 41 of file dropdown_type.h.

## Member Function Documentation

int DropDownListStringItem::NatSortFunc | ( | const DropDownListItem *const * | first,
|  | const DropDownListItem *const * | second |
| ) |  |  | `[static]`

Natural sorting comparator function for DropDownList::sort().

Parameters:

  | first | Left side of comparison.
  | second | Right side of comparison.

Returns:
  true if first precedes second.

Warning:
  All items in the list need to be derivates of DropDownListStringItem.

Definition at line 51 of file dropdown.cpp.

References lastof, and strnatcmp().

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

- src/widgets/dropdown_type.h
- src/widgets/dropdown.cpp