Added ability to drag windows.

This commit is contained in:
Joey Payne 2014-01-29 15:51:36 -07:00
commit 4cea15f4f1
3 changed files with 129 additions and 46 deletions

View file

@ -50,6 +50,12 @@ class Position(StructureBase):
other = Position.from_value(other)
return Position(self.x-other.x, self.y-other.y)
def __eq__(self, other):
return self.x == other.x and self.y == other.y
def __ne__(self, other):
return not(self == other)
@classmethod
def from_value(cls, value):
if not value:
@ -75,6 +81,12 @@ class Size(StructureBase):
other = Size.from_value(other)
return Size(self.width-other.width, self.height-other.height)
def __eq__(self, other):
return self.width == other.width and self.height == other.height
def __ne__(self, other):
return not(self == other)
@classmethod
def from_value(cls, value):
if not value: