Version: 3.0.2
wxMessageDialog::ButtonLabel Class Reference

#include <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.
 
 ButtonLabel (const wxString &label)
 Construct the label from the specified string.
 
wxString GetAsString () const
 Return the associated label as string.
 
int GetStockId () const
 Return the stock id or wxID_NONE if this is not a stock label.
 

Constructor & Destructor Documentation

wxMessageDialog::ButtonLabel::ButtonLabel ( int  stockId)

Construct the label from a stock id.

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

Construct the label from the specified string.

Member Function Documentation

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

int wxMessageDialog::ButtonLabel::GetStockId ( ) const

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