parameters: (self, dc, wnd, pages)
return_statement: return max(text_height, icon_height)
docstring: Calculate the height (in pixels) of the tab region of a ribbon bar.
  
          Note that as the tab region can contain scroll buttons, the height should be
          greater than or equal to the minimum height for a tab scroll button.
  
          :param `dc`: A device context to use when one is required for size calculations;
          :param `wnd`: The window onto which the tabs will eventually be drawn;
          :param `pages`: The tabs which will acquire the returned height.
docstring_summary: Calculate the height (in pixels) of the tab region of a ribbon bar.
docstring_tokens: Calculate the height ( in pixels ) of the tab region of a ribbon bar .
function: def GetTabCtrlHeight(self, dc, wnd, pages):
          """
          Calculate the height (in pixels) of the tab region of a ribbon bar.
  
          Note that as the tab region can contain scroll buttons, the height should be
          greater than or equal to the minimum height for a tab scroll button.
  
          :param `dc`: A device context to use when one is required for size calculations;
          :param `wnd`: The window onto which the tabs will eventually be drawn;
          :param `pages`: The tabs which will acquire the returned height.
  
          """
  
          text_height = 0
          icon_height = 0
  
          if len(pages) <= 1 and (self._flags & RIBBON_BAR_ALWAYS_SHOW_TABS) == 0:
              # To preserve space, a single tab need not be displayed. We still need
              # two pixels of border / padding though.
              return 2
          
          if self._flags & RIBBON_BAR_SHOW_PAGE_LABELS:        
              dc.SetFont(self._tab_label_font)
              text_height = dc.GetTextExtent("ABCDEFXj")[1] + 10
          
          if self._flags & RIBBON_BAR_SHOW_PAGE_ICONS:
              for info in pages:
                  if info.page.GetIcon().IsOk():                
                      icon_height = max(icon_height, info.page.GetIcon().GetHeight() + 4)
  
          return max(text_height, icon_height)
function_tokens: def GetTabCtrlHeight ( self , dc , wnd , pages ) : text_height = 0 icon_height = 0 if len ( pages ) <= 1 and ( self . _flags & RIBBON_BAR_ALWAYS_SHOW_TABS ) == 0 : # To preserve space, a single tab need not be displayed. We still need # two pixels of border / padding though. return 2 if self . _flags & RIBBON_BAR_SHOW_PAGE_LABELS : dc . SetFont ( self . _tab_label_font ) text_height = dc . GetTextExtent ( "ABCDEFXj" ) [ 1 ] + 10 if self . _flags & RIBBON_BAR_SHOW_PAGE_ICONS : for info in pages : if info . page . GetIcon ( ) . IsOk ( ) : icon_height = max ( icon_height , info . page . GetIcon ( ) . GetHeight ( ) + 4 ) return max ( text_height , icon_height )