Only declare wxTextCtrl::MSWCreateContextMenu() if wxUSE_RICHEDIT==1

This method is only used, and defined, when using rich edit controls, so don't
declare it if wxUSE_RICHEDIT==0.

This should fix a link error in this build variant.

Closes https://github.com/wxWidgets/wxWidgets/pull/452
This commit is contained in:
Vadim Zeitlin
2017-04-04 15:27:05 +02:00
parent 1fb0b9c01f
commit 2b026e02e8

View File

@@ -171,10 +171,12 @@ public:
// EDIT control has one already) // EDIT control has one already)
void OnContextMenu(wxContextMenuEvent& event); void OnContextMenu(wxContextMenuEvent& event);
#if wxUSE_RICHEDIT
// Create context menu for RICHEDIT controls. This may be called once during // Create context menu for RICHEDIT controls. This may be called once during
// the control's lifetime or every time the menu is shown, depending on // the control's lifetime or every time the menu is shown, depending on
// implementation. // implementation.
virtual wxMenu *MSWCreateContextMenu(); virtual wxMenu *MSWCreateContextMenu();
#endif // wxUSE_RICHEDIT
// be sure the caret remains invisible if the user // be sure the caret remains invisible if the user
// called HideNativeCaret() before // called HideNativeCaret() before