code: def on_size(self, event):
          '''handle window size changes'''
          state = self.state
          size = event.GetSize()
          state.width = size.width
          state.height = size.height
          self.redraw_map(f on_size(self, event):
          '''handle window size changes'''
          state = self.state
          size = event.GetSize()
          state.width = size.width
          state.height = size.height
          self.redraw_map()
docs: handle window size changes