r12841 | wh11204 | 2022-06-29 14:34:36 +0200 (Wed, 29 Jun 2022) | 4 lines * Fix compilation of wx3.1.6 and later with Clang (thanks AndrewCot). See https://forums.codeblocks.org/index.php/topic,25004.msg170429.html#msg170429 Also fix some typos in documentation. r12842 | wh11204 | 2022-06-30 11:36:18 +0200 (Thu, 30 Jun 2022) | 3 lines - Complete previous commit, InsertPage() must be fixed too. It appeared in the diff, but I forgot about it when editing. Index: src/include/cbauibook.h --- src/include/cbauibook.h.orig +++ src/include/cbauibook.h @@ -57,14 +57,14 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook /** \brief Loads serialized notebook layout * \param layout the serialized layout * \param mergeLayouts try to merge the tab-layouts - * \return bool true if successfull + * \return bool true if successful * */ bool LoadPerspective(const wxString& layout, bool mergeLayouts = false); - /** \brief Get the tab index from tooltiptext + /** \brief Get the tab index from tooltip text * \param text the notebooks name * \return int the tab's index - * @remarks We use the name internally to store the tooltip-text. To use it + * @remarks We use the name internally to store the tooltip text. To use it * in this function, we create a unique string from the relative filename * and the projects title. So it should be unique even after a * restart of C::B. @@ -78,7 +78,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook * \return int the visible position */ int GetTabPositionFromIndex(int index); - /** \brief Minmize free horizontal page + /** \brief Minimize free horizontal page * * Moves the active tab of all tabCtrl's to the rightmost place, * to show as many tabs as possible. @@ -87,21 +87,21 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook /** \brief Delete Page * * Calls the base-class function and after that - * MinmizeFreeSpace(), needed to hook into the close-events. + * MinimizeFreeSpace(), needed to hook into the close-events. * The system generated close event has to be veto'd, and Close() * has to be called manually, so we can handle it ourselves. * \param The index of the tab to be closed - * \return true if successfull + * \return true if successful */ bool DeletePage(size_t page) override; /** \brief Remove Page * * Calls the base-class function and after that - * MinmizeFreeSpace(), needed to hook into the close-events. + * MinimizeFreeSpace(), needed to hook into the close-events. * The system generated close event has to be veto'd, and Close() * has to be called manually, so we can handle it ourselves. * \param The index of the tab to be closed - * \return true if successfull + * \return true if successful */ bool RemovePage(size_t page) override; /** \brief Move page @@ -109,44 +109,52 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook * Moves the tab containing page to new_idx * \param page The page to move (e.g. cbEditor*) * \param new_idx The index the page should be moved to - * \return true if successfull + * \return true if successful */ bool MovePage(wxWindow* page, size_t new_idx); /** \brief Add Page * * Calls the base-class function and after that - * MinmizeFreeSpace(). + * MinimizeFreeSpace(). * \param page The page to add * \param caption The caption of the page * \param select If true the page gets selected - * \param bitmap The bitmap of the tab - * \return true if successfull + * \param bitmap The bitmap (or bitmap bundle since wx3.1.6) of the tab + * \return true if successful */ bool AddPage(wxWindow* page, const wxString& caption, bool select = false, +#if wxCHECK_VERSION(3, 1, 6) + const wxBitmapBundle& bitmap = wxBitmapBundle()); +#else const wxBitmap& bitmap = wxNullBitmap); +#endif /** \brief Insert Page * * Calls the base-class function and after that - * MinmizeFreeSpace(). + * MinimizeFreeSpace(). * \param page_idx The index where the page should be inserted * \param page The page to add * \param caption The caption of the page * \param select If true the page gets selected - * \param bitmap The bitmap of the tab - * \return true if successfull + * \param bitmap The bitmap (or bitmap bundle since wx3.1.6) of the tab + * \return true if successful */ bool InsertPage(size_t page_idx, wxWindow* page, const wxString& caption, bool select = false, +#if wxCHECK_VERSION(3, 1, 6) + const wxBitmapBundle& bitmap = wxBitmapBundle()); +#else const wxBitmap& bitmap = wxNullBitmap); - /** \brief Set zoomfactor for builtin editors +#endif + /** \brief Set zoom factor for builtin editors * - * Sets the zoomfactor for all visible builtin + * Sets the zoom factor for all visible builtin * editors. - * \param zoom zoomfactor to use + * \param zoom zoom factor to use */ void SetZoom(int zoom); /** \brief Set Focus on the tabCtrl belonging to the active tab @@ -165,7 +173,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook /** \brief Create a unique id from the tooltip-text * * Tries to create a unique id from the tooltip. - * Find the projectfile, geet the relative filename and put it + * Find the projectfile, get the relative filename and put it * together with the projects name. * We use it to save and load the pane layout. * By using the relative filename, it works even if the project @@ -173,7 +181,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook * \param text The tooltip text */ wxString UniqueIdFromTooltip(const wxString& text); - /** \brief Minmize free horizontal page of tabCtrl + /** \brief Minimize free horizontal page of tabCtrl * * Moves the active tab of tabCtrl to the rightmost place, * to show as many tabs as possible. @@ -194,7 +202,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook void OnIdle(cb_unused wxIdleEvent& event); /** \brief Catch doubleclick-events from wxTabCtrl * - * Sends cbEVT_CBAUIBOOK_LEFT_DCLICK, if doubleclick was on a tab, + * Sends cbEVT_CBAUIBOOK_LEFT_DCLICK, if double click was on a tab, * event-Id is the notebook-Id, event-object is the pointer to the window the * tab belongs to. * \param event holds the wxTabCtrl, that sends the event @@ -202,7 +210,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook void OnTabCtrlDblClick(wxMouseEvent& event); /** \brief Catch mousewheel-events from wxTabCtrl * - * Sends cbEVT_CBAUIBOOK_MOUSEWHEEL, if doubleclick was on a tab, + * Sends cbEVT_CBAUIBOOK_MOUSEWHEEL, if double click was on a tab, * event-Id is the notebook-Id, event-object is the pointer to the window the * tab belongs to. * \param event holds the wxTabCtrl, that sends the event @@ -229,7 +237,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook * \param event holds the wxTabCtrl, that sends the event */ void OnLeaveTabCtrl(wxMouseEvent& event); - // hack needed on wxMSW, because only focused windows get mousewheel-events + // hack needed on wxMSW, because only focused windows get mouse wheel-events /** \brief Checks the old focus * * Checks whether the old focused window or one of it's @@ -276,7 +284,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook // needed for wxMSW-hack, see above /** \brief Last selected tab * - * Used to determine whether the tab-selection has changed btween mouseenter + * Used to determine whether the tab-selection has changed between mouseenter * and mouseleave-event. */ int m_LastSelected; @@ -308,7 +316,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook * \param use If true tooltips are allowed */ static void UseToolTips(bool use = true); - /** \brief Enable or disable tab-scrolling with mousewheel + /** \brief Enable or disable tab-scrolling with mouse wheel * * \param allow If true scrolling is allowed */ @@ -316,15 +324,15 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook /** \brief Sets the modifier keys for scrolling */ static void SetModKeys(wxString keys = _T("Strg")); - /** \brief Use modkey to advance through tabs with mousewheel + /** \brief Use modkey to advance through tabs with mouse wheel */ static void UseModToAdvance(bool use = false); - /** \brief Change direction of tab-advancing with mousewheel + /** \brief Change direction of tab-advancing with mouse wheel * * \param invert If true advance direction is inverted */ static void InvertAdvanceDirection(bool invert = false); - /** \brief Change direction of tab-moving with mousewheel + /** \brief Change direction of tab-moving with mouse wheel * * \param invert If true move direction is inverted */ @@ -333,7 +341,7 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook /** \brief Enable or disable tab tooltips */ static bool s_UseTabTooltips; - /** \brief Enable or disable scrolling tabs with mousewheel + /** \brief Enable or disable scrolling tabs with mouse wheel */ static bool s_AllowMousewheel; /** \brief Holds an array of all existing cbAuiNotebooks @@ -342,13 +350,13 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook /** \brief Holds the modifier keys for scrolling */ static wxString s_modKeys; - /** \brief Use modkey to advance through tabs with mousewheel + /** \brief Use modkey to advance through tabs with mouse wheel */ static bool s_modToAdvance; - /** \brief Mousewheel move direction: negative => invert + /** \brief Mouse wheel move direction: negative => invert */ static int s_moveDirection; - /** \brief Mouseweheel advance direction: negative => invert + /** \brief Mouse wheel advance direction: negative => invert */ static int s_advanceDirection;