]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/stockitem.h
Ensure that the overall table border doesn't get overdrawn by cell borders with a...
[wxWidgets.git] / interface / wx / stockitem.h
CommitLineData
23324ae1 1/////////////////////////////////////////////////////////////////////////////
7c913512 2// Name: stockitem.h
e54c96f1 3// Purpose: interface of global functions
7c913512 4// Author: wxWidgets team
526954c5 5// Licence: wxWindows licence
7c913512
FM
6/////////////////////////////////////////////////////////////////////////////
7
34a9a024
VZ
8/**
9 Possible values for flags parameter of wxGetStockLabel().
10
11 The elements of this enum are bit masks and may be combined with each other
12 (except when specified otherwise).
13 */
14enum wxStockLabelQueryFlag
15{
16 /**
17 Indicates absence of wxSTOCK_WITH_MNEMONIC and wxSTOCK_WITH_ACCELERATOR.
18
19 Requests just the label (e.g. "Print...").
20 */
21 wxSTOCK_NOFLAGS = 0,
22
23 /**
24 Request the label with mnemonics character.
95ad763a
VZ
25
26 E.g. "&Print...".
34a9a024
VZ
27 */
28 wxSTOCK_WITH_MNEMONIC = 1,
29
30 /**
31 Return the label with accelerator following it after TAB.
32
33 E.g. "Print...\tCtrl-P". This can be combined with
34 wxSTOCK_WITH_MNEMONIC to get "&Print...\tCtrl-P".
35 */
e94ee791
VZ
36 wxSTOCK_WITH_ACCELERATOR = 2,
37
95ad763a
VZ
38 /**
39 Return the label without any ellipsis at the end.
40
41 By default, stock items text is returned with ellipsis, if appropriate,
42 this flag allows to avoid having it. So using the same example as
43 above, the returned string would be "Print" or "&Print" if
44 wxSTOCK_WITH_MNEMONIC were also used.
45
46 This flag can't be combined with wxSTOCK_WITH_ACCELERATOR.
47
48 @since 2.9.1
49 */
50 wxSTOCK_WITHOUT_ELLIPSIS = 4,
51
e94ee791
VZ
52 /**
53 Return the label appropriate for a button and not a menu item.
54
55 Currently the main difference is that the trailing ellipsis used in
56 some stock labels is never included in the returned label. Also, the
57 mnemonics is included if this flag is used. So the returned value for
58 wxID_PRINT when this flag is used is "&Print".
59
60 This flag can't be combined with wxSTOCK_WITH_ACCELERATOR.
95ad763a
VZ
61
62 @since 2.9.1
e94ee791 63 */
95ad763a 64 wxSTOCK_FOR_BUTTON = wxSTOCK_WITHOUT_ELLIPSIS | wxSTOCK_WITH_MNEMONIC
34a9a024
VZ
65};
66
b21126db 67/** @addtogroup group_funcmacro_misc */
7fa7088e
BP
68//@{
69
7c913512 70/**
7fa7088e
BP
71 Returns label that should be used for given @a id element.
72
73 @param id
74 Given id of the wxMenuItem, wxButton, wxToolBar tool, etc.
34a9a024
VZ
75 @param flags
76 Combination of the elements of wxStockLabelQueryFlag.
7c913512 77
7fa7088e 78 @header{wx/stockitem.h}
23324ae1 79*/
34a9a024 80wxString wxGetStockLabel(wxWindowID id, long flags = wxSTOCK_WITH_MNEMONIC);
23324ae1 81
7fa7088e 82//@}
23324ae1 83