wxWidgets: wxMessageDialog::ButtonLabel Class Reference

| Version: 3.0.4

Public Member Functions | List of all members
wxMessageDialog::ButtonLabel Class Reference

`#include </usr/src/ports/wxWidgets3.0/wxWidgets3.0-3.0.4-1.x86_64/src/wxWidgets-3.0.4/interface/wx/msgdlg.h>`

## Detailed Description

Helper class allowing to use either stock id or string labels.

This class should never be used explicitly and is not really part of wxWidgets API but rather is just an implementation helper allowing the methods such as SetYesNoLabels() and SetOKCancelLabels() below to be callable with either stock ids (e.g. wxID_CLOSE) or strings ("&Close").

## Public Member Functions
| ButtonLabel (int stockId)
| Construct the label from a stock id. More...
| ButtonLabel (const wxString &label)
| Construct the label from the specified string. More...
wxString | GetAsString () const
| Return the associated label as string. More...
int | GetStockId () const
| Return the stock id or wxID_NONE if this is not a stock label. More...

## Constructor & Destructor Documentation

## ◆ ButtonLabel() [1/2]

wxMessageDialog::ButtonLabel::ButtonLabel | ( | int | stockId | ) |

Construct the label from a stock id.

## ◆ ButtonLabel() [2/2]

wxMessageDialog::ButtonLabel::ButtonLabel | ( | const wxString & | label | ) |

Construct the label from the specified string.

## Member Function Documentation

## ◆ GetAsString()

wxString wxMessageDialog::ButtonLabel::GetAsString | ( |  | ) | const

Return the associated label as string.

Get the string label, whether it was originally specified directly or as a stock id – this is only useful for platforms without native stock items id support

## ◆ GetStockId()

int wxMessageDialog::ButtonLabel::GetStockId | ( |  | ) | const

Return the stock id or wxID_NONE if this is not a stock label.