From: Vadim Zeitlin Date: Thu, 6 Aug 2009 00:00:32 +0000 (+0000) Subject: No changes, just removed the whitespace. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/41d6e8b6833f5fb9b997c0cf0f0c9c37ebc589c3?ds=inline No changes, just removed the whitespace. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h index 241f5cbf8e..19d2d3a8f5 100644 --- a/include/wx/statusbr.h +++ b/include/wx/statusbr.h @@ -57,14 +57,14 @@ class WXDLLIMPEXP_CORE wxStatusBarPane public: wxStatusBarPane(int style = wxSB_NORMAL, size_t width = 0) - : m_nStyle(style), m_nWidth(width) + : m_nStyle(style), m_nWidth(width) { m_arrStack.Add(wxEmptyString); m_bEllipsized=false; } - + int GetWidth() const { return m_nWidth; } int GetStyle() const { return m_nStyle; } - + const wxArrayString& GetStack() const { return m_arrStack; } @@ -72,7 +72,7 @@ public: bool IsEllipsized() const { return m_bEllipsized; } - // NOTE: there are no setters in wxStatusBarPane; + // NOTE: there are no setters in wxStatusBarPane; // use wxStatusBar functions to modify a wxStatusBarPane protected: @@ -114,7 +114,7 @@ public: // field text // ---------- - // NOTE: even if it is not pure virtual, SetStatusText() must be overloaded by + // NOTE: even if it is not pure virtual, SetStatusText() must be overloaded by // the derived classes to update the given text in the native control virtual void SetStatusText(const wxString& text, int number = 0) { m_panes[number].GetStack().Last() = text; } @@ -136,7 +136,7 @@ public: // negative width according to the abs value of the width (field with width // -2 grows twice as much as one with width -1 &c) virtual void SetStatusWidths(int n, const int widths[]); - + int GetStatusWidth(int n) const { return m_panes[n].GetWidth(); } @@ -148,7 +148,7 @@ public: // appears flat or wxSB_POPOUT to make the field appear raised. // Setting field styles only works on wxMSW virtual void SetStatusStyles(int n, const int styles[]); - + int GetStatusStyle(int n) const { return m_panes[n].GetStyle(); } @@ -164,18 +164,18 @@ public: // get the dimensions of the horizontal and vertical borders virtual int GetBorderX() const = 0; virtual int GetBorderY() const = 0; - + wxSize GetBorders() const { return wxSize(GetBorderX(), GetBorderY()); } // miscellaneous // ------------- - + const wxStatusBarPane& GetField(int n) const { return m_panes[n]; } - + // wxWindow overrides: - + // don't want status bars to accept the focus at all virtual bool AcceptsFocus() const { return false; } @@ -194,7 +194,7 @@ protected: wxWindow::DoSetToolTip(tip); } #endif - + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } @@ -202,7 +202,7 @@ protected: // calculate the real field widths for the given total available size wxArrayInt CalculateAbsWidths(wxCoord widthTotal) const; - + // an internal utility used to keep track of which panes have labels // which were last rendered as ellipsized... void SetEllipsizedFlag(int n, bool ellipsized) diff --git a/interface/wx/statusbr.h b/interface/wx/statusbr.h index 7fef6ce079..4e99cdfecc 100644 --- a/interface/wx/statusbr.h +++ b/interface/wx/statusbr.h @@ -8,7 +8,7 @@ /** @class wxStatusBarPane - + A status bar pane data container used by wxStatusBar. @library{wxcore} @@ -33,14 +33,14 @@ public: Returns the pane style. */ int GetStyle() const; - + /** Returns the stack of strings pushed on this pane. - + Note that this stack does include also the string currently displayed in this pane as the version stored in the native status bar control is possibly ellipsized. - - Also note that GetStack().Last() is the top of the stack (i.e. the string shown + + Also note that GetStack().Last() is the top of the stack (i.e. the string shown in the status bar). */ const wxArrayString& GetStack() const; @@ -52,7 +52,7 @@ public: A status bar is a narrow window that can be placed along the bottom of a frame to give small amounts of status information. It can contain one or more fields, one or more of which can be variable length according to the size of the window. - + wxStatusBar also maintains an independent stack of status texts for each field (see PushStatusText() and PopStatusText()). @@ -76,8 +76,8 @@ public: Replace the end of the status texts with an ellipsis when the status text widths exceed the status bar pane's widths (uses wxControl::Ellipsize). @style{wxSTB_DEFAULT_STYLE} - The default style: includes - @c wxSTB_SIZEGRIP|wxSTB_SHOW_TIPS|wxSTB_ELLIPSIZE_END|wxFULL_REPAINT_ON_RESIZE. + The default style: includes + @c wxSTB_SIZEGRIP|wxSTB_SHOW_TIPS|wxSTB_ELLIPSIZE_END|wxFULL_REPAINT_ON_RESIZE. @endStyleTable @remarks @@ -144,26 +144,26 @@ public: @see wxRect */ virtual bool GetFieldRect(int i, wxRect& rect) const; - + /** - Returns the number of fields in the status bar. + Returns the number of fields in the status bar. */ int GetFieldsCount() const; - + /** Returns the wxStatusBarPane representing the @a n-th field. */ const wxStatusBarPane& GetField(int n) const; - + /** Returns the horizontal and vertical borders used when rendering the field text inside the field area. - + Note that the rect returned by GetFieldRect() already accounts for the presence of horizontal and vertical border returned by this function. */ wxSize GetBorders() const; - + /** Returns the string associated with a status bar field. @@ -180,25 +180,25 @@ public: /** Returns the stack of strings pushed (see PushStatusText()) on the @a n-th field. - + See wxStatusBarPane::GetStack() for more info. */ const wxArrayString& GetStatusStack(int n) const; /** Returns the width of the @a n-th field. - + See wxStatusBarPane::GetWidth() for more info. */ int GetStatusWidth(int n) const; /** Returns the style of the @a n-th field. - + See wxStatusBarPane::GetStyle() for more info. */ int GetStatusStyle(int n) const; - + /** Sets the field text to the top of the stack, and pops the stack of saved strings. @@ -243,7 +243,7 @@ public: The number of fields in the status bar. Must be equal to the number passed to SetFieldsCount() the last time it was called. @param styles - Contains an array of @a n integers with the styles for each field. + Contains an array of @a n integers with the styles for each field. There are three possible styles: - @c wxSB_NORMAL (default): The field appears sunken with a standard 3D border. - @c wxSB_FLAT: No border is painted around the field so that it appears flat. @@ -253,7 +253,7 @@ public: /** Sets the status text for the @a i-th field. - + The given text will replace the current text. Note that unlike PushStatusText() this function won't save the current text (and calling PopStatusText() won't restore it!). diff --git a/samples/statbar/statbar.cpp b/samples/statbar/statbar.cpp index db21938159..eda69aa897 100644 --- a/samples/statbar/statbar.cpp +++ b/samples/statbar/statbar.cpp @@ -163,7 +163,7 @@ class MyFrame : public wxMDIParentFrame void OnSetStatusTexts(wxCommandEvent& event); void OnSetStatusFont(wxCommandEvent& event); void OnRecreateStatusBar(wxCommandEvent& event); - + void OnSetPaneStyle(wxCommandEvent& event); void OnSetStyle(wxCommandEvent& event); @@ -207,7 +207,7 @@ enum // menu items StatusBar_Quit = wxID_EXIT, StatusBar_About = wxID_ABOUT, - + StatusBar_SetFields = wxID_HIGHEST+1, StatusBar_SetTexts, StatusBar_SetFont, @@ -220,7 +220,7 @@ enum StatusBar_SetPaneStyleNormal, StatusBar_SetPaneStyleFlat, StatusBar_SetPaneStyleRaised, - + StatusBar_SetStyleSizeGrip, StatusBar_SetStyleEllipsizeStart, StatusBar_SetStyleEllipsizeMiddle, @@ -254,7 +254,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(StatusBar_SetPaneStyleNormal, MyFrame::OnSetPaneStyle) EVT_MENU(StatusBar_SetPaneStyleFlat, MyFrame::OnSetPaneStyle) EVT_MENU(StatusBar_SetPaneStyleRaised, MyFrame::OnSetPaneStyle) - + EVT_MENU(StatusBar_SetStyleSizeGrip, MyFrame::OnSetStyle) EVT_MENU(StatusBar_SetStyleEllipsizeStart, MyFrame::OnSetStyle) EVT_MENU(StatusBar_SetStyleEllipsizeMiddle, MyFrame::OnSetStyle) @@ -343,7 +343,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) menuFile->Append(StatusBar_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program")); wxMenu *statbarMenu = new wxMenu; - + wxMenu *statbarStyleMenu = new wxMenu; statbarStyleMenu->Append(StatusBar_SetStyleSizeGrip, wxT("wxSTB_SIZE_GRIP"), wxT("Toggles the wxSTB_SIZE_GRIP style"), true); statbarStyleMenu->Append(StatusBar_SetStyleShowTips, wxT("wxSTB_SHOW_TIPS"), wxT("Toggles the wxSTB_SHOW_TIPS style"), true); @@ -413,7 +413,7 @@ void MyFrame::DoCreateStatusBar(MyFrame::StatusBarKind kind, long style) statbarNew = new wxStatusBar(this, wxID_ANY, style, "wxStatusBar"); statbarNew->SetFieldsCount(2); break; - + case StatBar_Custom: statbarNew = new MyStatusBar(this, style); break; @@ -440,7 +440,7 @@ void MyFrame::OnUpdateForDefaultStatusbar(wxUpdateUIEvent& event) wxStatusBar *sb = GetStatusBar(); if (!sb) return; - + event.Enable(sb->GetName() == "wxStatusBar"); } @@ -540,7 +540,7 @@ void MyFrame::OnResetFieldsWidth(wxCommandEvent& WXUNUSED(event)) wxStatusBar *pStat = GetStatusBar(); if (!pStat) return; - + int n = pStat->GetFieldsCount(); pStat->SetStatusWidths(n, NULL); for (int i=0; iGetFieldsCount(); int *styles = new int[fields]; @@ -672,7 +672,7 @@ void MyFrame::OnSetStyle(wxCommandEvent& event) oldStyle = GetStatusBar()->GetWindowStyle(); #define STB_ELLIPSIZE_MASK (wxSTB_ELLIPSIZE_START|wxSTB_ELLIPSIZE_MIDDLE|wxSTB_ELLIPSIZE_END) - + long newStyle = oldStyle; long newStyleBit = 0; switch (event.GetId()) @@ -697,7 +697,7 @@ void MyFrame::OnSetStyle(wxCommandEvent& event) newStyle &= ~STB_ELLIPSIZE_MASK; break; } - + newStyle = event.IsChecked() ? (newStyle | newStyleBit) : (newStyle & ~newStyleBit); if (newStyle != oldStyle) diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index cfbe9c9364..c2dc115f02 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -195,7 +195,7 @@ void wxStatusBarBase::PushStatusText(const wxString& text, int number) m_panes[number].m_arrStack.push_back(text); SetStatusText(text, number); - // update current status text (which will possibly be ellipsized) + // update current status text (which will possibly be ellipsized) // also in the native control // SetStatusText() typically has an optimization built-in to avoid flickering