No changes, just removed the whitespace.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-08-06 00:00:32 +00:00
parent 9e89b438fe
commit 41d6e8b683
4 changed files with 46 additions and 46 deletions

View File

@@ -57,14 +57,14 @@ class WXDLLIMPEXP_CORE wxStatusBarPane
public: public:
wxStatusBarPane(int style = wxSB_NORMAL, size_t width = 0) 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; } { m_arrStack.Add(wxEmptyString); m_bEllipsized=false; }
int GetWidth() const int GetWidth() const
{ return m_nWidth; } { return m_nWidth; }
int GetStyle() const int GetStyle() const
{ return m_nStyle; } { return m_nStyle; }
const wxArrayString& GetStack() const const wxArrayString& GetStack() const
{ return m_arrStack; } { return m_arrStack; }
@@ -72,7 +72,7 @@ public:
bool IsEllipsized() const bool IsEllipsized() const
{ return m_bEllipsized; } { return m_bEllipsized; }
// NOTE: there are no setters in wxStatusBarPane; // NOTE: there are no setters in wxStatusBarPane;
// use wxStatusBar functions to modify a wxStatusBarPane // use wxStatusBar functions to modify a wxStatusBarPane
protected: protected:
@@ -114,7 +114,7 @@ public:
// field text // 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 // the derived classes to update the given text in the native control
virtual void SetStatusText(const wxString& text, int number = 0) virtual void SetStatusText(const wxString& text, int number = 0)
{ m_panes[number].GetStack().Last() = text; } { m_panes[number].GetStack().Last() = text; }
@@ -136,7 +136,7 @@ public:
// negative width according to the abs value of the width (field with width // negative width according to the abs value of the width (field with width
// -2 grows twice as much as one with width -1 &c) // -2 grows twice as much as one with width -1 &c)
virtual void SetStatusWidths(int n, const int widths[]); virtual void SetStatusWidths(int n, const int widths[]);
int GetStatusWidth(int n) const int GetStatusWidth(int n) const
{ return m_panes[n].GetWidth(); } { return m_panes[n].GetWidth(); }
@@ -148,7 +148,7 @@ public:
// appears flat or wxSB_POPOUT to make the field appear raised. // appears flat or wxSB_POPOUT to make the field appear raised.
// Setting field styles only works on wxMSW // Setting field styles only works on wxMSW
virtual void SetStatusStyles(int n, const int styles[]); virtual void SetStatusStyles(int n, const int styles[]);
int GetStatusStyle(int n) const int GetStatusStyle(int n) const
{ return m_panes[n].GetStyle(); } { return m_panes[n].GetStyle(); }
@@ -164,18 +164,18 @@ public:
// get the dimensions of the horizontal and vertical borders // get the dimensions of the horizontal and vertical borders
virtual int GetBorderX() const = 0; virtual int GetBorderX() const = 0;
virtual int GetBorderY() const = 0; virtual int GetBorderY() const = 0;
wxSize GetBorders() const wxSize GetBorders() const
{ return wxSize(GetBorderX(), GetBorderY()); } { return wxSize(GetBorderX(), GetBorderY()); }
// miscellaneous // miscellaneous
// ------------- // -------------
const wxStatusBarPane& GetField(int n) const const wxStatusBarPane& GetField(int n) const
{ return m_panes[n]; } { return m_panes[n]; }
// wxWindow overrides: // wxWindow overrides:
// don't want status bars to accept the focus at all // don't want status bars to accept the focus at all
virtual bool AcceptsFocus() const { return false; } virtual bool AcceptsFocus() const { return false; }
@@ -194,7 +194,7 @@ protected:
wxWindow::DoSetToolTip(tip); wxWindow::DoSetToolTip(tip);
} }
#endif #endif
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
@@ -202,7 +202,7 @@ protected:
// calculate the real field widths for the given total available size // calculate the real field widths for the given total available size
wxArrayInt CalculateAbsWidths(wxCoord widthTotal) const; wxArrayInt CalculateAbsWidths(wxCoord widthTotal) const;
// an internal utility used to keep track of which panes have labels // an internal utility used to keep track of which panes have labels
// which were last rendered as ellipsized... // which were last rendered as ellipsized...
void SetEllipsizedFlag(int n, bool ellipsized) void SetEllipsizedFlag(int n, bool ellipsized)

View File

@@ -8,7 +8,7 @@
/** /**
@class wxStatusBarPane @class wxStatusBarPane
A status bar pane data container used by wxStatusBar. A status bar pane data container used by wxStatusBar.
@library{wxcore} @library{wxcore}
@@ -33,14 +33,14 @@ public:
Returns the pane style. Returns the pane style.
*/ */
int GetStyle() const; int GetStyle() const;
/** /**
Returns the stack of strings pushed on this pane. Returns the stack of strings pushed on this pane.
Note that this stack does include also the string currently displayed in 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. 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). in the status bar).
*/ */
const wxArrayString& GetStack() const; 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 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, 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. 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 wxStatusBar also maintains an independent stack of status texts for each field
(see PushStatusText() and PopStatusText()). (see PushStatusText() and PopStatusText()).
@@ -76,8 +76,8 @@ public:
Replace the end of the status texts with an ellipsis when the status text 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). widths exceed the status bar pane's widths (uses wxControl::Ellipsize).
@style{wxSTB_DEFAULT_STYLE} @style{wxSTB_DEFAULT_STYLE}
The default style: includes The default style: includes
@c wxSTB_SIZEGRIP|wxSTB_SHOW_TIPS|wxSTB_ELLIPSIZE_END|wxFULL_REPAINT_ON_RESIZE. @c wxSTB_SIZEGRIP|wxSTB_SHOW_TIPS|wxSTB_ELLIPSIZE_END|wxFULL_REPAINT_ON_RESIZE.
@endStyleTable @endStyleTable
@remarks @remarks
@@ -144,26 +144,26 @@ public:
@see wxRect @see wxRect
*/ */
virtual bool GetFieldRect(int i, wxRect& rect) const; 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; int GetFieldsCount() const;
/** /**
Returns the wxStatusBarPane representing the @a n-th field. Returns the wxStatusBarPane representing the @a n-th field.
*/ */
const wxStatusBarPane& GetField(int n) const; const wxStatusBarPane& GetField(int n) const;
/** /**
Returns the horizontal and vertical borders used when rendering the field Returns the horizontal and vertical borders used when rendering the field
text inside the field area. text inside the field area.
Note that the rect returned by GetFieldRect() already accounts for the Note that the rect returned by GetFieldRect() already accounts for the
presence of horizontal and vertical border returned by this function. presence of horizontal and vertical border returned by this function.
*/ */
wxSize GetBorders() const; wxSize GetBorders() const;
/** /**
Returns the string associated with a status bar field. Returns the string associated with a status bar field.
@@ -180,25 +180,25 @@ public:
/** /**
Returns the stack of strings pushed (see PushStatusText()) on the Returns the stack of strings pushed (see PushStatusText()) on the
@a n-th field. @a n-th field.
See wxStatusBarPane::GetStack() for more info. See wxStatusBarPane::GetStack() for more info.
*/ */
const wxArrayString& GetStatusStack(int n) const; const wxArrayString& GetStatusStack(int n) const;
/** /**
Returns the width of the @a n-th field. Returns the width of the @a n-th field.
See wxStatusBarPane::GetWidth() for more info. See wxStatusBarPane::GetWidth() for more info.
*/ */
int GetStatusWidth(int n) const; int GetStatusWidth(int n) const;
/** /**
Returns the style of the @a n-th field. Returns the style of the @a n-th field.
See wxStatusBarPane::GetStyle() for more info. See wxStatusBarPane::GetStyle() for more info.
*/ */
int GetStatusStyle(int n) const; int GetStatusStyle(int n) const;
/** /**
Sets the field text to the top of the stack, and pops the stack of saved Sets the field text to the top of the stack, and pops the stack of saved
strings. strings.
@@ -243,7 +243,7 @@ public:
The number of fields in the status bar. Must be equal to the The number of fields in the status bar. Must be equal to the
number passed to SetFieldsCount() the last time it was called. number passed to SetFieldsCount() the last time it was called.
@param styles @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: There are three possible styles:
- @c wxSB_NORMAL (default): The field appears sunken with a standard 3D border. - @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. - @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. Sets the status text for the @a i-th field.
The given text will replace the current text. Note that unlike PushStatusText() 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 this function won't save the current text (and calling PopStatusText() won't
restore it!). restore it!).

View File

@@ -163,7 +163,7 @@ class MyFrame : public wxMDIParentFrame
void OnSetStatusTexts(wxCommandEvent& event); void OnSetStatusTexts(wxCommandEvent& event);
void OnSetStatusFont(wxCommandEvent& event); void OnSetStatusFont(wxCommandEvent& event);
void OnRecreateStatusBar(wxCommandEvent& event); void OnRecreateStatusBar(wxCommandEvent& event);
void OnSetPaneStyle(wxCommandEvent& event); void OnSetPaneStyle(wxCommandEvent& event);
void OnSetStyle(wxCommandEvent& event); void OnSetStyle(wxCommandEvent& event);
@@ -207,7 +207,7 @@ enum
// menu items // menu items
StatusBar_Quit = wxID_EXIT, StatusBar_Quit = wxID_EXIT,
StatusBar_About = wxID_ABOUT, StatusBar_About = wxID_ABOUT,
StatusBar_SetFields = wxID_HIGHEST+1, StatusBar_SetFields = wxID_HIGHEST+1,
StatusBar_SetTexts, StatusBar_SetTexts,
StatusBar_SetFont, StatusBar_SetFont,
@@ -220,7 +220,7 @@ enum
StatusBar_SetPaneStyleNormal, StatusBar_SetPaneStyleNormal,
StatusBar_SetPaneStyleFlat, StatusBar_SetPaneStyleFlat,
StatusBar_SetPaneStyleRaised, StatusBar_SetPaneStyleRaised,
StatusBar_SetStyleSizeGrip, StatusBar_SetStyleSizeGrip,
StatusBar_SetStyleEllipsizeStart, StatusBar_SetStyleEllipsizeStart,
StatusBar_SetStyleEllipsizeMiddle, StatusBar_SetStyleEllipsizeMiddle,
@@ -254,7 +254,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(StatusBar_SetPaneStyleNormal, MyFrame::OnSetPaneStyle) EVT_MENU(StatusBar_SetPaneStyleNormal, MyFrame::OnSetPaneStyle)
EVT_MENU(StatusBar_SetPaneStyleFlat, MyFrame::OnSetPaneStyle) EVT_MENU(StatusBar_SetPaneStyleFlat, MyFrame::OnSetPaneStyle)
EVT_MENU(StatusBar_SetPaneStyleRaised, MyFrame::OnSetPaneStyle) EVT_MENU(StatusBar_SetPaneStyleRaised, MyFrame::OnSetPaneStyle)
EVT_MENU(StatusBar_SetStyleSizeGrip, MyFrame::OnSetStyle) EVT_MENU(StatusBar_SetStyleSizeGrip, MyFrame::OnSetStyle)
EVT_MENU(StatusBar_SetStyleEllipsizeStart, MyFrame::OnSetStyle) EVT_MENU(StatusBar_SetStyleEllipsizeStart, MyFrame::OnSetStyle)
EVT_MENU(StatusBar_SetStyleEllipsizeMiddle, 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")); menuFile->Append(StatusBar_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
wxMenu *statbarMenu = new wxMenu; wxMenu *statbarMenu = new wxMenu;
wxMenu *statbarStyleMenu = 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_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); 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 = new wxStatusBar(this, wxID_ANY, style, "wxStatusBar");
statbarNew->SetFieldsCount(2); statbarNew->SetFieldsCount(2);
break; break;
case StatBar_Custom: case StatBar_Custom:
statbarNew = new MyStatusBar(this, style); statbarNew = new MyStatusBar(this, style);
break; break;
@@ -440,7 +440,7 @@ void MyFrame::OnUpdateForDefaultStatusbar(wxUpdateUIEvent& event)
wxStatusBar *sb = GetStatusBar(); wxStatusBar *sb = GetStatusBar();
if (!sb) if (!sb)
return; return;
event.Enable(sb->GetName() == "wxStatusBar"); event.Enable(sb->GetName() == "wxStatusBar");
} }
@@ -540,7 +540,7 @@ void MyFrame::OnResetFieldsWidth(wxCommandEvent& WXUNUSED(event))
wxStatusBar *pStat = GetStatusBar(); wxStatusBar *pStat = GetStatusBar();
if (!pStat) if (!pStat)
return; return;
int n = pStat->GetFieldsCount(); int n = pStat->GetFieldsCount();
pStat->SetStatusWidths(n, NULL); pStat->SetStatusWidths(n, NULL);
for (int i=0; i<n; i++) for (int i=0; i<n; i++)
@@ -615,7 +615,7 @@ void MyFrame::OnSetPaneStyle(wxCommandEvent& event)
m_statbarPaneStyle = wxSB_RAISED; m_statbarPaneStyle = wxSB_RAISED;
break; break;
} }
ApplyPaneStyle(); ApplyPaneStyle();
} }
@@ -624,7 +624,7 @@ void MyFrame::ApplyPaneStyle()
wxStatusBar *sb = GetStatusBar(); wxStatusBar *sb = GetStatusBar();
if (!sb) if (!sb)
return; return;
int fields = sb->GetFieldsCount(); int fields = sb->GetFieldsCount();
int *styles = new int[fields]; int *styles = new int[fields];
@@ -672,7 +672,7 @@ void MyFrame::OnSetStyle(wxCommandEvent& event)
oldStyle = GetStatusBar()->GetWindowStyle(); oldStyle = GetStatusBar()->GetWindowStyle();
#define STB_ELLIPSIZE_MASK (wxSTB_ELLIPSIZE_START|wxSTB_ELLIPSIZE_MIDDLE|wxSTB_ELLIPSIZE_END) #define STB_ELLIPSIZE_MASK (wxSTB_ELLIPSIZE_START|wxSTB_ELLIPSIZE_MIDDLE|wxSTB_ELLIPSIZE_END)
long newStyle = oldStyle; long newStyle = oldStyle;
long newStyleBit = 0; long newStyleBit = 0;
switch (event.GetId()) switch (event.GetId())
@@ -697,7 +697,7 @@ void MyFrame::OnSetStyle(wxCommandEvent& event)
newStyle &= ~STB_ELLIPSIZE_MASK; newStyle &= ~STB_ELLIPSIZE_MASK;
break; break;
} }
newStyle = event.IsChecked() ? (newStyle | newStyleBit) : newStyle = event.IsChecked() ? (newStyle | newStyleBit) :
(newStyle & ~newStyleBit); (newStyle & ~newStyleBit);
if (newStyle != oldStyle) if (newStyle != oldStyle)

View File

@@ -195,7 +195,7 @@ void wxStatusBarBase::PushStatusText(const wxString& text, int number)
m_panes[number].m_arrStack.push_back(text); m_panes[number].m_arrStack.push_back(text);
SetStatusText(text, number); 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 // also in the native control
// SetStatusText() typically has an optimization built-in to avoid flickering // SetStatusText() typically has an optimization built-in to avoid flickering