OpenQuizz
Une application de gestion des contenus pédagogiques
MapWindow Class Reference
Inheritance diagram for MapWindow:
Collaboration diagram for MapWindow:

Public Member Functions

def __init__ (self, offset, size)
 
def __repr__ (self)
 
def from_region (cls, region)
 
def ofs_end (self)
 
def align (self)
 
def extend_left_to (self, window, max_size)
 
def extend_right_to (self, window, max_size)
 

Data Fields

 ofs
 
 size
 

Detailed Description

Utility type which is used to snap windows towards each other, and to adjust their size

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  offset,
  size 
)

Member Function Documentation

◆ __repr__()

def __repr__ (   self)

◆ align()

def align (   self)
Assures the previous window area is contained in the new one

◆ extend_left_to()

def extend_left_to (   self,
  window,
  max_size 
)
Adjust the offset to start where the given window on our left ends if possible,
but don't make yourself larger than max_size.
The resize will assure that the new window still contains the old window area

◆ extend_right_to()

def extend_right_to (   self,
  window,
  max_size 
)
Adjust the size to make our window end where the right window begins, but don't
get larger than max_size

◆ from_region()

def from_region (   cls,
  region 
)
:return: new window from a region

◆ ofs_end()

def ofs_end (   self)

Field Documentation

◆ ofs

ofs

◆ size

size

The documentation for this class was generated from the following file: