From 64ad732aee27b7ec59272f048436294c8b912471 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 8 Jun 2016 12:21:40 -0400 Subject: [PATCH] Removed some unused members, made some members const --- src/toolbars/ToolBar.cpp | 6 +++--- src/toolbars/ToolBar.h | 6 +++--- src/toolbars/ToolDock.cpp | 5 ----- src/toolbars/ToolDock.h | 13 ------------- src/toolbars/ToolManager.h | 2 -- 5 files changed, 6 insertions(+), 26 deletions(-) diff --git a/src/toolbars/ToolBar.cpp b/src/toolbars/ToolBar.cpp index d98a08dcf..433d7c851 100644 --- a/src/toolbars/ToolBar.cpp +++ b/src/toolbars/ToolBar.cpp @@ -359,7 +359,7 @@ void ToolBar::SetLabel(const wxString & label) // // Returns whether the toolbar is resizable or not // -bool ToolBar::IsResizable() +bool ToolBar::IsResizable() const { return mResizable; } @@ -367,7 +367,7 @@ bool ToolBar::IsResizable() // // Returns the dock state of the toolbar // -bool ToolBar::IsDocked() +bool ToolBar::IsDocked() const { return mDock != NULL; } @@ -375,7 +375,7 @@ bool ToolBar::IsDocked() // // Returns the visibility of the toolbar // -bool ToolBar::IsVisible() +bool ToolBar::IsVisible() const { return mVisible; } diff --git a/src/toolbars/ToolBar.h b/src/toolbars/ToolBar.h index df942ce69..1e6d28575 100644 --- a/src/toolbars/ToolBar.h +++ b/src/toolbars/ToolBar.h @@ -113,9 +113,9 @@ class ToolBar /* not final */ : public wxPanel // NEW virtual: virtual bool Expose(bool show = true); - bool IsResizable(); - bool IsVisible(); - bool IsDocked(); + bool IsResizable() const; + bool IsVisible() const; + bool IsDocked() const; bool IsPositioned(){ return mPositioned; }; void SetVisible( bool bVisible ); void SetPositioned(){ mPositioned = true;}; diff --git a/src/toolbars/ToolDock.cpp b/src/toolbars/ToolDock.cpp index 0fe74c51f..6ff329d53 100644 --- a/src/toolbars/ToolDock.cpp +++ b/src/toolbars/ToolDock.cpp @@ -121,11 +121,6 @@ void ToolDock::Undock( ToolBar *bar ) } } -int ToolDock::GetBarCount() -{ - return mDockedBars.GetCount(); -} - // // Handle ToolDock events // diff --git a/src/toolbars/ToolDock.h b/src/toolbars/ToolDock.h index 3475d66f0..cadee0df6 100644 --- a/src/toolbars/ToolDock.h +++ b/src/toolbars/ToolDock.h @@ -59,7 +59,6 @@ class ToolDock final : public wxPanel void Expose( int type, bool show ); int Find(ToolBar *bar) const; int GetOrder( ToolBar *bar ); - int GetBarCount(); void Dock( ToolBar *bar, bool deflate, int ndx = -1 ); void Undock( ToolBar *bar ); int PositionBar( ToolBar *t, wxPoint & pos, wxRect & rect ); @@ -74,18 +73,6 @@ class ToolDock final : public wxPanel private: - void ReadConfig(); - void WriteConfig(); - - int FlowLayout( int cnt, - wxRect boxen[], - wxRect ideal[], - int i, - int x, - int y, - int width, - int height ); - void Updated(); int mTotalToolBarHeight; diff --git a/src/toolbars/ToolManager.h b/src/toolbars/ToolManager.h index 111f8a04f..9c3050c12 100644 --- a/src/toolbars/ToolManager.h +++ b/src/toolbars/ToolManager.h @@ -20,7 +20,6 @@ #include "ToolDock.h" #include "ToolBar.h" -class wxArrayPtrVoid; class wxBitmap; class wxCommandEvent; class wxFrame; @@ -108,7 +107,6 @@ class ToolManager final : public wxEvtHandler bool mTransition; #endif - wxArrayPtrVoid mDockedBars; ToolDock *mTopDock; ToolDock *mBotDock;