1 \section{\class{wxMenuItem
}}\label{wxmenuitem
}
3 A menu item represents an item in a popup menu. Note that the majority of this
4 class is only implemented under Windows so far, but everything except fonts, colours and
5 bitmaps can be achieved via wxMenu on all platforms.
7 \wxheading{Derived from
}
9 wxOwnerDrawn (Windows only)\\
10 \helpref{wxObject
}{wxobject
}
14 \helpref{wxMenuBar
}{wxmenubar
},
\helpref{wxMenu
}{wxmenu
},
\helpref{wxOwnerDrawn
}{wxownerdrawn
}
16 \latexignore{\rtfignore{\wxheading{Members
}}}
18 \membersection{wxMenuItem::wxMenuItem
}\label{wxmenuitemconstr
}
20 \func{}{wxMenuItem
}{\param{wxMenu*
}{ parentMenu = NULL
},
\param{int
}{ id = ID
\_SEPARATOR},
21 \param{const wxString\&
}{text = ""
},
\param{const wxString\&
}{helpString = ""
},
22 \param{bool
}{checkable = FALSE
},
\param{wxMenu*
}{ subMenu = NULL
},
}
24 Constructs a wxMenuItem object.
26 \wxheading{Parameters
}
28 \docparam{parentMenu
}{Menu that the menu item belongs to.
}
30 \docparam{id
}{Identifier for this menu item, or ID
\_SEPARATOR to indicate a separator.
}
32 \docparam{text
}{Text for the menu item, as shown on the menu.
}
34 \docparam{helpString
}{Optional help string that will be shown on the status bar.
}
36 \docparam{checkable
}{TRUE if this menu item is checkable.
}
38 \docparam{subMenu
}{If non-NULL, indicates that the menu item is a submenu.
}
40 \membersection{wxMenuItem::
\destruct{wxMenuItem
}}
42 \func{}{\destruct{wxMenuItem
}}{\void}
46 \membersection{wxMenuItem::Check
}\label{wxmenuitemcheck
}
48 \func{void
}{Check
}{\param{bool
}{ check
}}
50 Checks or unchecks the menu item.
52 \membersection{wxMenuItem::DeleteSubMenu
}\label{wxmenuitemdeletesubmenu
}
54 \func{void
}{DeleteSubMenu
}{\void}
56 Deletes the submenu, if any.
58 \membersection{wxMenuItem::Enable
}\label{wxmenuitemenable
}
60 \func{void
}{Enable
}{\param{bool
}{ enable
}}
62 Enables or disables the menu item.
64 \membersection{wxMenuItem::GetBackgroundColour
}\label{wxmenuitemgetbackgroundcolour
}
66 \constfunc{wxColour\&
}{GetBackgroundColour
}{\void}
68 Returns the background colour associated with the menu item (Windows only).
70 \membersection{wxMenuItem::GetBitmap
}\label{wxmenuitemgetbitmap
}
72 \constfunc{wxBitmap\&
}{GetBitmap
}{\param{bool
}{ checked = TRUE
}}
74 Returns the checked or unchecked bitmap (Windows only).
76 \membersection{wxMenuItem::GetFont
}\label{wxmenuitemgetfont
}
78 \constfunc{wxFont\&
}{GetFont
}{\void}
80 Returns the font associated with the menu item (Windows only).
82 \membersection{wxMenuItem::GetHelp
}\label{wxmenuitemgethelp
}
84 \constfunc{wxString
}{GetHelp
}{\void}
86 Returns the help string associated with the menu item.
88 \membersection{wxMenuItem::GetId
}\label{wxmenuitemgetid
}
90 \constfunc{int
}{GetId
}{\void}
92 Returns the menu item identifier.
94 \membersection{wxMenuItem::GetMarginWidth
}\label{wxmenuitemgetmarginwidth
}
96 \constfunc{int
}{GetMarginWidth
}{\void}
98 Gets the width of the menu item checkmark bitmap (Windows only).
100 \membersection{wxMenuItem::GetName
}\label{wxmenuitemgetname
}
102 \constfunc{wxString
}{GetName
}{\void}
104 Returns the text associated with the menu item.
106 \membersection{wxMenuItem::GetSubMenu
}\label{wxmenuitemgetsubmenu
}
108 \constfunc{wxMenu*
}{GetSubMenu
}{\void}
110 Returns the submenu associated with the menu item, or NULL if there isn't one.
112 \membersection{wxMenuItem::GetTextColour
}\label{wxmenuitemgettextcolour
}
114 \constfunc{wxColour\&
}{GetTextColour
}{\void}
116 Returns the text colour associated with the menu item (Windows only).
118 \membersection{wxMenuItem::IsCheckable
}\label{wxmenuitemischeckable
}
120 \constfunc{bool
}{IsCheckable
}{\void}
122 Returns TRUE if the item is checkable.
124 \membersection{wxMenuItem::IsChecked
}\label{wxmenuitemischecked
}
126 \constfunc{bool
}{IsChecked
}{\void}
128 Returns TRUE if the item is checked.
130 \membersection{wxMenuItem::IsEnabled
}\label{wxmenuitemisenabled
}
132 \constfunc{bool
}{IsEnabled
}{\void}
134 Returns TRUE if the item is enabled.
136 \membersection{wxMenuItem::IsSeparator
}\label{wxmenuitemisseparator
}
138 \constfunc{bool
}{IsSeparator
}{\void}
140 Returns TRUE if the item is a separator.
142 \membersection{wxMenuItem::SetBackgroundColour
}\label{wxmenuitemsetbackgroundcolour
}
144 \constfunc{void
}{SetBackgroundColour
}{\param{const wxColour\&
}{colour
}}
146 Sets the background colour associated with the menu item (Windows only).
148 \membersection{wxMenuItem::SetBitmaps
}\label{wxmenuitemsetbitmaps
}
150 \constfunc{void
}{SetBitmaps
}{\param{const wxBitmap\&
}{checked
},
151 \param{const wxBitmap\&
}{unchecked = wxNullBitmap
}}
153 Sets the checked/unchecked bitmaps for the menu item (Windows only). The first bitmap
154 is also used as the single bitmap for uncheckable menu items.
156 \membersection{wxMenuItem::SetFont
}\label{wxmenuitemsetfont
}
158 \constfunc{void
}{SetFont
}{\param{const wxFont\&
}{font
}}
160 Sets the font associated with the menu item (Windows only).
162 \membersection{wxMenuItem::SetHelp
}\label{wxmenuitemsethelp
}
164 \constfunc{void
}{SetHelp
}{\param{const wxString\&
}{helpString
}}
166 Sets the help string.
168 \membersection{wxMenuItem::SetMarginWidth
}\label{wxmenuitemsetmarginwidth
}
170 \constfunc{void
}{SetMarginWidth
}{\param{int
}{ width
}}
172 Sets the width of the menu item checkmark bitmap (Windows only).
174 \membersection{wxMenuItem::SetName
}\label{wxmenuitemsetname
}
176 \constfunc{void
}{SetName
}{\param{const wxString\&
}{text
}}
178 Sets the text associated with the menu item.
180 \membersection{wxMenuItem::SetTextColour
}\label{wxmenuitemsettextcolour
}
182 \constfunc{void
}{SetTextColour
}{\param{const wxColour\&
}{colour
}}
184 Sets the text colour associated with the menu item (Windows only).
190 %%% TeX-master: "referenc"