Added wxClientDataContainer to wxSizer, so sizers can now do OOR in
wxPython too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -50,12 +50,14 @@ private:
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
// This class is a mixin that provides storage and management of "client
|
||||
// data." The client data stored can either be a pointer to a wxClientData
|
||||
// object in which case it is managed by the container (i.e. it will delete
|
||||
// the data when it's destroyed) or an untyped pointer which won't be deleted
|
||||
// by the window - but not both of them
|
||||
// by the container - but not both of them
|
||||
//
|
||||
// NOTE: This functionality is currently duplicated in wxEvtHandler in order
|
||||
// to avoid having more than one vtable in that class heirachy.
|
||||
|
||||
class WXDLLEXPORT wxClientDataContainer
|
||||
{
|
||||
@@ -92,7 +94,7 @@ protected:
|
||||
wxClientDataType m_clientDataType;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
|
@@ -61,15 +61,15 @@ public:
|
||||
{ m_ratio = (width && height) ? ((float) width / (float) height) : 1; }
|
||||
void SetRatio( wxSize size )
|
||||
{ m_ratio = (size.x && size.y) ? ((float) size.x / (float) size.y) : 1; }
|
||||
void SetRatio( float ratio )
|
||||
void SetRatio( float ratio )
|
||||
{ m_ratio = ratio; }
|
||||
float GetRatio() const
|
||||
float GetRatio() const
|
||||
{ return m_ratio; }
|
||||
|
||||
bool IsWindow();
|
||||
bool IsSizer();
|
||||
bool IsSpacer();
|
||||
|
||||
|
||||
void SetInitSize( int x, int y )
|
||||
{ m_minSize.x = x; m_minSize.y = y; }
|
||||
void SetOption( int option )
|
||||
@@ -112,7 +112,7 @@ protected:
|
||||
// is shrinked. it is safer to preserve initial value.
|
||||
float m_ratio;
|
||||
wxObject *m_userData;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxSizerItem);
|
||||
};
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
// wxSizer
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxSizer: public wxObject
|
||||
class WXDLLEXPORT wxSizer: public wxObject, public wxClientDataContainer
|
||||
{
|
||||
public:
|
||||
wxSizer();
|
||||
|
Reference in New Issue
Block a user