(self, enable)
Expands the main application window to full screen or minimizes it.

    Args:
      enable: Boolean flag, True expands the window to full-screen mode, False
        minimizes it to its former size.
Expands the main application window to full screen or minimizes it.
Expands the main application window to full screen or minimizes it .
def set_full_screen(self, enable):
    """Expands the main application window to full screen or minimizes it.

    Args:
      enable: Boolean flag, True expands the window to full-screen mode, False
        minimizes it to its former size.
    """
    if enable == self.is_full_screen:
      return

    if enable:
      self._oldsize = list(self.position) + list(self.shape)
      def enable_full_screen(window):
        display = glfw.get_primary_monitor()
        videomode = glfw.get_video_mode(display)
        glfw.set_window_monitor(window, display, 0, 0, videomode[0][0],
                                videomode[0][1], videomode[2])
      with self._context.make_current() as ctx:
        ctx.call(enable_full_screen, self._context.window)
    else:
      with self._context.make_current() as ctx:
        ctx.call(glfw.set_window_monitor,
                 self._context.window, None, self._oldsize[0],
                 self._oldsize[1], self._oldsize[2],
                 self._oldsize[3], 0)
      self._oldsize = None
def set_full_screen ( self , enable ) : if enable == self . is_full_screen : return if enable : self . _oldsize = list ( self . position ) + list ( self . shape ) def enable_full_screen ( window ) : display = glfw . get_primary_monitor ( ) videomode = glfw . get_video_mode ( display ) glfw . set_window_monitor ( window , display , 0 , 0 , videomode [ 0 ] [ 0 ] , videomode [ 0 ] [ 1 ] , videomode [ 2 ] ) with self . _context . make_current ( ) as ctx : ctx . call ( enable_full_screen , self . _context . window ) else : with self . _context . make_current ( ) as ctx : ctx . call ( glfw . set_window_monitor , self . _context . window , None , self . _oldsize [ 0 ] , self . _oldsize [ 1 ] , self . _oldsize [ 2 ] , self . _oldsize [ 3 ] , 0 ) self . _oldsize = None