parameters: (self, parent, id, pos, size, caption="",
                   foldIcons=None, cbstyle=None,
                   rightIndent=FPB_BMP_RIGHTSPACE,
                   iconWidth=16, iconHeight=16, collapsed=False)
docstring: Default class constructor.
  
          :param `parent`: the :class:`CaptionBar` parent window;
          :param `id`: an identifier for the control: a value of -1 is taken to mean a default;
          :param `pos`: the control position. A value of (-1, -1) indicates a default position,
           chosen by either the windowing system or wxPython, depending on platform;
          :param `size`: the control size. A value of (-1, -1) indicates a default size,
           chosen by either the windowing system or wxPython, depending on platform;
          :param `caption`: the string to be displayed in :class:`CaptionBar`;
          :param `foldIcons`: an instance of :class:`ImageList` containing the icons to display
           next to the caption text;
          :param `cbstyle`: the :class:`CaptionBar` window style. Must be an instance of
           :class:`CaptionBarStyle`;
          :param `rightIndent`: number of pixels of the bmp to be aligned from the right filled
           with space;
          :param `iconWidth`: the :class:`CaptionBar` icon width;
          :param `iconHeight`: the :class:`CaptionBar` icon height;        
          :param `collapsed`: ``True`` if the :class:`CaptionBar` should start in the collapsed state,
           ``False`` otherwise.
docstring_summary: Default class constructor.
docstring_tokens: Default class constructor .
function: def __init__(self, parent, id, pos, size, caption="",
                   foldIcons=None, cbstyle=None,
                   rightIndent=FPB_BMP_RIGHTSPACE,
                   iconWidth=16, iconHeight=16, collapsed=False):
          """
          Default class constructor.
  
          :param `parent`: the :class:`CaptionBar` parent window;
          :param `id`: an identifier for the control: a value of -1 is taken to mean a default;
          :param `pos`: the control position. A value of (-1, -1) indicates a default position,
           chosen by either the windowing system or wxPython, depending on platform;
          :param `size`: the control size. A value of (-1, -1) indicates a default size,
           chosen by either the windowing system or wxPython, depending on platform;
          :param `caption`: the string to be displayed in :class:`CaptionBar`;
          :param `foldIcons`: an instance of :class:`ImageList` containing the icons to display
           next to the caption text;
          :param `cbstyle`: the :class:`CaptionBar` window style. Must be an instance of
           :class:`CaptionBarStyle`;
          :param `rightIndent`: number of pixels of the bmp to be aligned from the right filled
           with space;
          :param `iconWidth`: the :class:`CaptionBar` icon width;
          :param `iconHeight`: the :class:`CaptionBar` icon height;        
          :param `collapsed`: ``True`` if the :class:`CaptionBar` should start in the collapsed state,
           ``False`` otherwise.
          """
          
          wx.Window.__init__(self, parent, wx.ID_ANY, pos=pos,
                             size=(20,20), style=wx.NO_BORDER)
  
          self._controlCreated = False
          self._collapsed = collapsed
          self.ApplyCaptionStyle(cbstyle, True)
  
          if foldIcons is None:
              foldIcons = wx.ImageList(16, 16)
  
              bmp = ExpandedIcon.GetBitmap()
              foldIcons.Add(bmp)
              bmp = CollapsedIcon.GetBitmap()
              foldIcons.Add(bmp)
  
          # set initial size
          if foldIcons:
              assert foldIcons.GetImageCount() > 1
              iconWidth, iconHeight = foldIcons.GetSize(0)
  
          self._caption = caption
          self._foldIcons = foldIcons
          self._style = cbstyle
          self._rightIndent = rightIndent
          self._iconWidth = iconWidth
          self._iconHeight = iconHeight
          self._oldSize = wx.Size(20,20)
  
          self._controlCreated = True
  
          self.Bind(wx.EVT_PAINT, self.OnPaint)
          self.Bind(wx.EVT_SIZE, self.OnSize)
          self.Bind(wx.EVT_MOUSE_EVENTS, self.OnMouseEvent)
          self.Bind(wx.EVT_CHAR, self.OnChar)
function_tokens: def __init__ ( self , parent , id , pos , size , caption = "" , foldIcons = None , cbstyle = None , rightIndent = FPB_BMP_RIGHTSPACE , iconWidth = 16 , iconHeight = 16 , collapsed = False ) : wx . Window . __init__ ( self , parent , wx . ID_ANY , pos = pos , size = ( 20 , 20 ) , style = wx . NO_BORDER ) self . _controlCreated = False self . _collapsed = collapsed self . ApplyCaptionStyle ( cbstyle , True ) if foldIcons is None : foldIcons = wx . ImageList ( 16 , 16 ) bmp = ExpandedIcon . GetBitmap ( ) foldIcons . Add ( bmp ) bmp = CollapsedIcon . GetBitmap ( ) foldIcons . Add ( bmp ) # set initial size if foldIcons : assert foldIcons . GetImageCount ( ) > 1 iconWidth , iconHeight = foldIcons . GetSize ( 0 ) self . _caption = caption self . _foldIcons = foldIcons self . _style = cbstyle self . _rightIndent = rightIndent self . _iconWidth = iconWidth self . _iconHeight = iconHeight self . _oldSize = wx . Size ( 20 , 20 ) self . _controlCreated = True self . Bind ( wx . EVT_PAINT , self . OnPaint ) self . Bind ( wx . EVT_SIZE , self . OnSize ) self . Bind ( wx . EVT_MOUSE_EVENTS , self . OnMouseEvent ) self . Bind ( wx . EVT_CHAR , self . OnChar )