]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/stockitem.h
Define __VISUALC__ for ICC under Windows again.
[wxWidgets.git] / interface / wx / stockitem.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: stockitem.h
3 // Purpose: interface of global functions
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
7
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 */
14 enum 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.
25
26 E.g. "&Print...".
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 */
36 wxSTOCK_WITH_ACCELERATOR = 2,
37
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
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.
61
62 @since 2.9.1
63 */
64 wxSTOCK_FOR_BUTTON = wxSTOCK_WITHOUT_ELLIPSIS | wxSTOCK_WITH_MNEMONIC
65 };
66
67 /** @addtogroup group_funcmacro_misc */
68 //@{
69
70 /**
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.
75 @param flags
76 Combination of the elements of wxStockLabelQueryFlag.
77
78 @header{wx/stockitem.h}
79 */
80 wxString wxGetStockLabel(wxWindowID id, long flags = wxSTOCK_WITH_MNEMONIC);
81
82 //@}
83