Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/grahamtallen/windowtracker

My solution to a coding interview challenge: Design a simple data structure to keep track of windows for a 2D windows system similar to what is seen in Windows or MacOSX.
https://github.com/grahamtallen/windowtracker

Last synced: 26 days ago
JSON representation

My solution to a coding interview challenge: Design a simple data structure to keep track of windows for a 2D windows system similar to what is seen in Windows or MacOSX.

Awesome Lists containing this project

README

        

My solution to a coding interview challenge:

Design a simple data structure to keep track of windows for a 2D windows system similar to what is seen in Windows or MacOSX. The windows should have a parent child relationship, and 2D position (x,y) and size (w,h) dimensions. Child
windows should be positioned relative to their parent (if their parent x,y moves then the child position should change).
Each window should have a getGlobalPosition() method which gives its position in screen space, and a
getLocalPosition method which gives its position relative to its parent. There should be a way to output a
report of all windows, their names, and both their global and local positions.