+ /**
+ Show the popup menu allowing the user to show or hide the columns.
+
+ This functions shows the popup menu containing all columns with check
+ marks for the ones which are currently shown and allows the user to
+ check or uncheck them to toggle their visibility. It is called from the
+ default EVT_HEADER_RIGHT_CLICK handler for the controls which have
+ wxHD_ALLOW_HIDE style. And if the column has wxHD_ALLOW_REORDER style
+ as well, the menu also contains an item to customize the columns shown
+ using which results in ShowCustomizeDialog() being called, please see
+ its description for more details.
+
+ If a column was toggled, UpdateColumnVisibility() virtual function is
+ called so it must be implemented for the controls with wxHD_ALLOW_HIDE
+ style or if you call this function explicitly.
+
+ @param pt
+ The position of the menu, in the header window coordinates.
+ @param title
+ The title for the menu if not empty.
+ @return
+ @true if a column was shown or hidden or @false if nothing was
+ done, e.g. because the menu was cancelled.
+ */
+ bool ShowColumnsMenu(const wxPoint& pt, const wxString& title = wxString());
+
+ /**
+ Helper function appending the checkable items corresponding to all the
+ columns to the given menu.
+
+ This function is used by ShowColumnsMenu() but can also be used if you
+ show your own custom columns menu and still want all the columns shown
+ in it. It appends menu items with column labels as their text and
+ consecutive ids starting from @a idColumnsBase to the menu and checks
+ the items corresponding to the currently visible columns.
+
+ Example of use:
+ @code
+ wxMenu menu;
+ menu.Append(100, "Some custom command");
+ menu.AppendSeparator();
+ AddColumnsItems(menu, 200);
+ const int rc = GetPopupMenuSelectionFromUser(menu, pt);
+ if ( rc >= 200 )
+ ... toggle visibility of the column rc-200 ...
+ @endcode
+
+ @param menu
+ The menu to append the items to. It may be currently empty or not.
+ @param idColumnsBase
+ The id for the menu item corresponding to the first column, the
+ other ones are consecutive starting from it. It should be positive.
+ */
+ void AddColumnsItems(wxMenu& menu, int idColumnsBase = 0);
+
+ /**
+ Show the column customization dialog.
+
+ This function displays a modal dialog containing the list of all
+ columns which the user can use to reorder them as well as show or hide
+ individual columns.
+
+ If the user accepts the changes done in the dialog, the virtual
+ methods UpdateColumnVisibility() and UpdateColumnsOrder() will be
+ called so they must be overridden in the derived class if this method
+ is ever called. Please notice that the user will be able to invoke it
+ interactively from the header popup menu if the control has both
+ wxHD_ALLOW_HIDE and wxHD_ALLOW_REORDER styles.
+
+ @see wxRearrangeDialog
+ */
+ bool ShowCustomizeDialog();
+
+ /**
+ Returns width needed for given column's title.
+
+ @since 2.9.4
+ */
+ int GetColumnTitleWidth(const wxHeaderColumn& col);
+