Package wx :: Class Size
[frames | no frames]

Type Size

object --+
         |
        Size


wx.Size is a useful data structure used to represent the size of something. It simply contains integer width and height properties. In most places in wxPython where a wx.Size is expected a (width, height) tuple can be used instead.


Method Summary
Size __init__(self, w, h)
Creates a size object.
Size __add__(self, sz)
Add sz's proprties to this and return the result.
  __del__(self)
bool __eq__(self, other)
Test for equality of wx.Size objects.
  __getitem__(self, index)
  __len__(self)
bool __ne__(self, other)
Test for inequality of wx.Size objects.
  __nonzero__(self)
  __reduce__(self)
  __repr__(self)
  __setitem__(self, index, val)
  __str__(self)
Size __sub__(self, sz)
Subtract sz's properties from this and return the result.
  asTuple(*args, **kwargs)
asTuple is deprecated, use Get instead
  DecBy(self, dx, dy)
  DecTo(self, sz)
Decrements this object so that both of its dimensions are not greater than the corresponding dimensions of the size.
(width,height) Get()
Returns the width and height properties as a tuple.
int GetHeight(self)
int GetWidth(self)
  IncBy(self, dx, dy)
  IncTo(self, sz)
Increments this object so that both of its dimensions are not less than the corresponding dimensions of the size.
bool IsFullySpecified(self)
Returns True if both components of the size are non-default values.
  Scale(self, xscale, yscale)
Scales the dimensions of this object by the given factors.
  Set(self, w, h)
Set both width and height.
  SetDefaults(self, size)
Combine this size with the other one replacing the default components of this object (i.e.
  SetHeight(self, h)
  SetWidth(self, w)

Property Summary
  height
  thisown: The membership flag
  width
  x
  y

Class Variable Summary
bool __safe_for_unpickling__ = True

Method Details

__init__(self, w=0, h=0)
(Constructor)

Creates a size object.

Parameters:
w
           (type=int)

h
           (type=int)

Returns:
Size
Overrides:
__builtin__.object.__init__

__add__(self, sz)
(Addition operator)

Add sz's proprties to this and return the result.

Parameters:
sz
           (type=Size)

Returns:
Size

__eq__(self, other)
(Equality operator)

Test for equality of wx.Size objects.

Parameters:
other
           (type=PyObject)

Returns:
bool

__ne__(self, other)

Test for inequality of wx.Size objects.

Parameters:
other
           (type=PyObject)

Returns:
bool

__sub__(self, sz)
(Subtraction operator)

Subtract sz's properties from this and return the result.

Parameters:
sz
           (type=Size)

Returns:
Size

asTuple(*args, **kwargs)

asTuple is deprecated, use Get instead

DecTo(self, sz)

Decrements this object so that both of its dimensions are not greater than the corresponding dimensions of the size.

Parameters:
sz
           (type=Size)

Get()

Returns the width and height properties as a tuple.

Returns:
(width,height)

IncTo(self, sz)

Increments this object so that both of its dimensions are not less than the corresponding dimensions of the size.

Parameters:
sz
           (type=Size)

IsFullySpecified(self)

Returns True if both components of the size are non-default values.

Returns:
bool

Scale(self, xscale, yscale)

Scales the dimensions of this object by the given factors.

Parameters:
xscale
           (type=float)

yscale
           (type=float)

Set(self, w, h)

Set both width and height.

Parameters:
w
           (type=int)

h
           (type=int)

SetDefaults(self, size)

Combine this size with the other one replacing the default components of this object (i.e. equal to -1) with those of the other.

Parameters:
size
           (type=Size)


Property Details

thisown

The membership flag


Class Variable Details

__safe_for_unpickling__

Type:
bool
Value:
True                                                                   

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:51:53 2009 http://epydoc.sf.net