Refactor wxMSW: move some code from wxMenu to wxMenuItem.
This will allow reusing it for other wxMenuItem bitmap-related operations. See #9388. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -118,6 +118,12 @@ private:
|
||||
// helper function for draw std menu check mark
|
||||
void DrawStdCheckMark(WXHDC hdc, const tagRECT* rc, wxODStatus stat);
|
||||
|
||||
// helper function to determine if the item must be owner-drawn
|
||||
bool MustUseOwnerDrawn();
|
||||
|
||||
// helper function to get a handle of bitmap associated with item
|
||||
WXHBITMAP GetHBitmapForMenu(bool checked = true);
|
||||
|
||||
#else // !wxUSE_OWNER_DRAWN
|
||||
// Provide stubs for the public functions above to ensure that the code
|
||||
// still compiles without wxUSE_OWNER_DRAWN -- it makes sense to just drop
|
||||
@@ -141,6 +147,9 @@ private:
|
||||
m_bmpDisabled;
|
||||
#endif // wxUSE_OWNER_DRAWN
|
||||
|
||||
// Give wxMenu access to our MustUseOwnerDrawn() and GetHBitmapForMenu().
|
||||
friend class wxMenu;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuItem)
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user