Rewrote wxRibbonPage realisation and layout code to avoid setting the position and size of panels multiple times.

Fixed memory leak in wxRibbonToolBar::Realize().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Peter Cawley
2009-12-09 18:48:41 +00:00
parent 021efd6510
commit 960615f410
3 changed files with 173 additions and 132 deletions

View File

@@ -66,6 +66,7 @@ protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
bool DoActualLayout();
void OnEraseBackground(wxEraseEvent& evt);
void OnPaint(wxPaintEvent& evt);
void OnSize(wxSizeEvent& evt);
@@ -76,6 +77,7 @@ protected:
void HideScrollButtons();
void CommonInit(const wxString& label, const wxBitmap& icon);
void PopulateSizeCalcArray(wxSize (wxWindow::*get_size)(void) const);
wxArrayRibbonControl m_collapse_stack;
wxBitmap m_icon;
@@ -83,6 +85,8 @@ protected:
// NB: Scroll button windows are siblings rather than children (to get correct clipping of children)
wxRibbonPageScrollButton* m_scroll_left_btn;
wxRibbonPageScrollButton* m_scroll_right_btn;
wxSize* m_size_calc_array;
size_t m_size_calc_array_size;
int m_scroll_amount;
int m_scroll_amount_limit;
int m_size_in_major_axis_for_children;