fix build with wxUSE_MENU==0 (closes #10330)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-01-11 00:34:09 +00:00
parent 349c045ab3
commit faef508f6a
2 changed files with 14 additions and 0 deletions

View File

@ -121,6 +121,7 @@ public:
// UI helpers
// ----------
#if wxUSE_MENU
// show the popup menu containing all columns with check marks for the ones
// which are currently shown and return true if something was done using it
// (in this case UpdateColumnVisibility() will have been called) or false
@ -140,6 +141,7 @@ public:
// the ids of the items corresponding to the columns are consecutive and
// start from idColumnsBase
void AddColumnsItems(wxMenu& menu, int idColumnsBase = 0);
#endif // wxUSE_MENU
// show the columns customization dialog and return true if something was
// changed using it (in which case UpdateColumnVisibility() and/or
@ -221,7 +223,9 @@ private:
// event handlers
void OnSeparatorDClick(wxHeaderCtrlEvent& event);
#if wxUSE_MENU
void OnRClick(wxHeaderCtrlEvent& event);
#endif // wxUSE_MENU
DECLARE_EVENT_TABLE()
};

View File

@ -71,7 +71,9 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxHeaderCtrlNameStr[] = "wxHeaderCtrl";
BEGIN_EVENT_TABLE(wxHeaderCtrlBase, wxControl)
EVT_HEADER_SEPARATOR_DCLICK(wxID_ANY, wxHeaderCtrlBase::OnSeparatorDClick)
#if wxUSE_MENU
EVT_HEADER_RIGHT_CLICK(wxID_ANY, wxHeaderCtrlBase::OnRClick)
#endif // wxUSE_MENU
END_EVENT_TABLE()
void wxHeaderCtrlBase::ScrollWindow(int dx,
@ -116,6 +118,8 @@ void wxHeaderCtrlBase::OnSeparatorDClick(wxHeaderCtrlEvent& event)
UpdateColumn(col);
}
#if wxUSE_MENU
void wxHeaderCtrlBase::OnRClick(wxHeaderCtrlEvent& event)
{
if ( !HasFlag(wxHD_ALLOW_HIDE) )
@ -127,6 +131,8 @@ void wxHeaderCtrlBase::OnRClick(wxHeaderCtrlEvent& event)
ShowColumnsMenu(ScreenToClient(wxGetMousePosition()));
}
#endif // wxUSE_MENU
// ----------------------------------------------------------------------------
// wxHeaderCtrlBase column reordering
// ----------------------------------------------------------------------------
@ -263,6 +269,8 @@ wxHeaderCtrlBase::DoResizeColumnIndices(wxArrayInt& colIndices, unsigned int cou
// wxHeaderCtrl extra UI
// ----------------------------------------------------------------------------
#if wxUSE_MENU
void wxHeaderCtrlBase::AddColumnsItems(wxMenu& menu, int idColumnsBase)
{
const unsigned count = GetColumnCount();
@ -310,6 +318,8 @@ bool wxHeaderCtrlBase::ShowColumnsMenu(const wxPoint& pt, const wxString& title)
return true;
}
#endif // wxUSE_MENU
bool wxHeaderCtrlBase::ShowCustomizeDialog()
{
// prepare the data for showing the dialog