implement state class
context class to contain the application and documents. display info class for getting window res and dpi for renderingw