parameters: (self, direction, relative_to)
return_statement: return size
docstring: Implementation of :meth:`RibbonControl.GetNextLargerSize() <lib.agw.ribbon.control.RibbonControl.GetNextLargerSize>`.
  
          Controls which have non-continuous sizing must override this virtual function
          rather than :meth:`RibbonControl.GetNextLargerSize() <lib.agw.ribbon.control.RibbonControl.GetNextLargerSize>`.
docstring_summary: Implementation of :meth:`RibbonControl.GetNextLargerSize() <lib.agw.ribbon.control.RibbonControl.GetNextLargerSize>`.
docstring_tokens: Implementation of : meth : RibbonControl . GetNextLargerSize () <lib . agw . ribbon . control . RibbonControl . GetNextLargerSize > .
function: def DoGetNextLargerSize(self, direction, relative_to):
          """
          Implementation of :meth:`RibbonControl.GetNextLargerSize() <lib.agw.ribbon.control.RibbonControl.GetNextLargerSize>`.
  
          Controls which have non-continuous sizing must override this virtual function
          rather than :meth:`RibbonControl.GetNextLargerSize() <lib.agw.ribbon.control.RibbonControl.GetNextLargerSize>`.
          """
  
          if self._art == None:
              return relative_to
  
          dc = wx.MemoryDC()
          client, d1, d2, d3, d4 = self._art.GetGalleryClientSize(dc, self, wx.Size(*relative_to))
  
          # No need to grow if the given size can already display every item
          nitems = (client.GetWidth()/self._bitmap_padded_size.x)*(client.GetHeight()/self._bitmap_padded_size.y)
          
          if nitems >= len(self._items):
              return relative_to
  
          if direction == wx.HORIZONTAL:
              client.IncBy(self._bitmap_padded_size.x, 0)
          elif direction == wx.VERTICAL:
              client.IncBy(0, self._bitmap_padded_size.y)
          elif direction == wx.BOTH:
              client.IncBy(self._bitmap_padded_size)
  
          client.x = (client.x / self._bitmap_padded_size.x) * self._bitmap_padded_size.x
          client.y = (client.y / self._bitmap_padded_size.y) * self._bitmap_padded_size.y
  
          size = self._art.GetGallerySize(dc, self, wx.Size(*client))
          minimum = self.GetMinSize()
  
          if size.GetWidth() < minimum.GetWidth() or size.GetHeight() < minimum.GetHeight():
              return relative_to
          
          if direction == wx.HORIZONTAL:
              size.SetHeight(relative_to.GetHeight())
          if direction == wx.VERTICAL:
              size.SetWidth(relative_to.GetWidth())
  
          return size
function_tokens: def DoGetNextLargerSize ( self , direction , relative_to ) : if self . _art == None : return relative_to dc = wx . MemoryDC ( ) client , d1 , d2 , d3 , d4 = self . _art . GetGalleryClientSize ( dc , self , wx . Size ( * relative_to ) ) # No need to grow if the given size can already display every item nitems = ( client . GetWidth ( ) / self . _bitmap_padded_size . x ) * ( client . GetHeight ( ) / self . _bitmap_padded_size . y ) if nitems >= len ( self . _items ) : return relative_to if direction == wx . HORIZONTAL : client . IncBy ( self . _bitmap_padded_size . x , 0 ) elif direction == wx . VERTICAL : client . IncBy ( 0 , self . _bitmap_padded_size . y ) elif direction == wx . BOTH : client . IncBy ( self . _bitmap_padded_size ) client . x = ( client . x / self . _bitmap_padded_size . x ) * self . _bitmap_padded_size . x client . y = ( client . y / self . _bitmap_padded_size . y ) * self . _bitmap_padded_size . y size = self . _art . GetGallerySize ( dc , self , wx . Size ( * client ) ) minimum = self . GetMinSize ( ) if size . GetWidth ( ) < minimum . GetWidth ( ) or size . GetHeight ( ) < minimum . GetHeight ( ) : return relative_to if direction == wx . HORIZONTAL : size . SetHeight ( relative_to . GetHeight ( ) ) if direction == wx . VERTICAL : size . SetWidth ( relative_to . GetWidth ( ) ) return size