2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2008-03-08 14:43:31 +00:00
|
|
|
// Name: stockitem.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of global functions
|
2008-03-08 14:43:31 +00:00
|
|
|
// Author: wxWidgets team
|
2010-07-13 13:29:13 +00:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 14:43:31 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-07-25 16:40:56 +00:00
|
|
|
/**
|
|
|
|
Possible values for flags parameter of wxGetStockLabel().
|
|
|
|
|
|
|
|
The elements of this enum are bit masks and may be combined with each other
|
|
|
|
(except when specified otherwise).
|
|
|
|
*/
|
|
|
|
enum wxStockLabelQueryFlag
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
Indicates absence of wxSTOCK_WITH_MNEMONIC and wxSTOCK_WITH_ACCELERATOR.
|
|
|
|
|
|
|
|
Requests just the label (e.g. "Print...").
|
|
|
|
*/
|
|
|
|
wxSTOCK_NOFLAGS = 0,
|
|
|
|
|
|
|
|
/**
|
|
|
|
Request the label with mnemonics character.
|
2010-02-04 01:33:32 +00:00
|
|
|
|
|
|
|
E.g. "&Print...".
|
2009-07-25 16:40:56 +00:00
|
|
|
*/
|
|
|
|
wxSTOCK_WITH_MNEMONIC = 1,
|
|
|
|
|
|
|
|
/**
|
|
|
|
Return the label with accelerator following it after TAB.
|
|
|
|
|
|
|
|
E.g. "Print...\tCtrl-P". This can be combined with
|
|
|
|
wxSTOCK_WITH_MNEMONIC to get "&Print...\tCtrl-P".
|
|
|
|
*/
|
2009-07-25 16:41:05 +00:00
|
|
|
wxSTOCK_WITH_ACCELERATOR = 2,
|
|
|
|
|
2010-02-04 01:33:32 +00:00
|
|
|
/**
|
|
|
|
Return the label without any ellipsis at the end.
|
|
|
|
|
|
|
|
By default, stock items text is returned with ellipsis, if appropriate,
|
|
|
|
this flag allows to avoid having it. So using the same example as
|
|
|
|
above, the returned string would be "Print" or "&Print" if
|
|
|
|
wxSTOCK_WITH_MNEMONIC were also used.
|
|
|
|
|
|
|
|
This flag can't be combined with wxSTOCK_WITH_ACCELERATOR.
|
|
|
|
|
|
|
|
@since 2.9.1
|
|
|
|
*/
|
|
|
|
wxSTOCK_WITHOUT_ELLIPSIS = 4,
|
|
|
|
|
2009-07-25 16:41:05 +00:00
|
|
|
/**
|
|
|
|
Return the label appropriate for a button and not a menu item.
|
|
|
|
|
|
|
|
Currently the main difference is that the trailing ellipsis used in
|
|
|
|
some stock labels is never included in the returned label. Also, the
|
|
|
|
mnemonics is included if this flag is used. So the returned value for
|
|
|
|
wxID_PRINT when this flag is used is "&Print".
|
|
|
|
|
|
|
|
This flag can't be combined with wxSTOCK_WITH_ACCELERATOR.
|
2010-02-04 01:33:32 +00:00
|
|
|
|
|
|
|
@since 2.9.1
|
2009-07-25 16:41:05 +00:00
|
|
|
*/
|
2010-02-04 01:33:32 +00:00
|
|
|
wxSTOCK_FOR_BUTTON = wxSTOCK_WITHOUT_ELLIPSIS | wxSTOCK_WITH_MNEMONIC
|
2009-07-25 16:40:56 +00:00
|
|
|
};
|
|
|
|
|
2009-01-05 20:48:06 +00:00
|
|
|
/** @addtogroup group_funcmacro_misc */
|
2008-03-23 18:24:32 +00:00
|
|
|
//@{
|
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
/**
|
2008-03-23 18:24:32 +00:00
|
|
|
Returns label that should be used for given @a id element.
|
|
|
|
|
|
|
|
@param id
|
|
|
|
Given id of the wxMenuItem, wxButton, wxToolBar tool, etc.
|
2009-07-25 16:40:56 +00:00
|
|
|
@param flags
|
|
|
|
Combination of the elements of wxStockLabelQueryFlag.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-23 18:24:32 +00:00
|
|
|
@header{wx/stockitem.h}
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2009-07-25 16:40:56 +00:00
|
|
|
wxString wxGetStockLabel(wxWindowID id, long flags = wxSTOCK_WITH_MNEMONIC);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
2008-03-23 18:24:32 +00:00
|
|
|
//@}
|
2008-03-08 13:52:38 +00:00
|
|
|
|