add wxSizer::SetDimension() overload taking wxPoint/wxSize instead of 4 ints

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-05-08 18:58:04 +00:00
parent fd6939a6d2
commit 49dcc246bf
3 changed files with 10 additions and 259 deletions

View File

@@ -632,7 +632,14 @@ public:
const wxSizerItemList& GetChildren() const
{ return m_children; }
void SetDimension( int x, int y, int width, int height );
void SetDimension(const wxPoint& pos, const wxSize& size)
{
m_position = pos;
m_size = size;
Layout();
}
void SetDimension(int x, int y, int width, int height)
{ SetDimension(wxPoint(x, y), wxSize(width, height)); }
wxSizerItem* GetItem( wxWindow *window, bool recursive = false );
wxSizerItem* GetItem( wxSizer *sizer, bool recursive = false );
@@ -892,36 +899,6 @@ private:
DECLARE_CLASS(wxBoxSizer)
};
//---------------------------------------------------------------------------
// wxWrapSizer - A box sizer that can wrap items on several lines when
// widths exceed available width.
//---------------------------------------------------------------------------
// Borrow unused flag value
#define wxEXTEND_LAST_ON_EACH_LINE wxFULL_REPAINT_ON_RESIZE
class WXDLLIMPEXP_CORE wxWrapSizer: public wxBoxSizer
{
public:
wxWrapSizer( int orient=wxHORIZONTAL, int flags=wxEXTEND_LAST_ON_EACH_LINE );
virtual ~wxWrapSizer();
virtual void RecalcSizes();
virtual wxSize CalcMin();
virtual bool InformFirstDirection( int direction, int size, int availableOtherDir );
protected:
int m_prim_size_last; // Size in primary direction last time
int m_n_line; // Number of lines
wxBoxSizer m_rows; // Rows of items
int m_flags;
void AdjustPropLastItem(wxSizer *psz, wxSizerItem *itemLast);
DECLARE_DYNAMIC_CLASS(wxWrapSizer)
};
//---------------------------------------------------------------------------
// wxStaticBoxSizer
//---------------------------------------------------------------------------