<?php
  $_tabControl_ = "tabControl1";
  $_Conf    = $_tabControl_ . '_Conf';
/**
 *  Lista de Eventos do Objeto (APL-Client)
 *  Evento AfterLoad
 */
  $fileName = INC . JS_DIR . $_tabControl_ . '_afterLoad.js.php';
  if( file_exists( $fileName ) )
  {
    include( $fileName );
  }// End if( file_exists( $fileName ) )

  writeTO( '  <div id="' . $_tabControl_ . '" objeto="tabControl" name="' . $_tabControl_ . '">' );
  create_tabControl( $_tabControl_, $$_Conf );

  $path  = _CFG_;
  $nFile = $path . $_tabControl_ . ".config.data.ini";
  $ix    = 0;
  $ix_ = strtolower( $_tabControl_ ) . '_aba';
  
  $arrINI = readINIfile( $nFile );
  foreach( $arrINI[ $ix_ ] as $ind_ => $val_ )
  {
    $ix ++;
    
    $nObj = $_tabControl_ . '_TAB' . $ix;
    
    writeTO( ' ' );
    writeTO( '    <div id="' . $nObj . '">' );
    
/**
 *  tabControl é um componente do tipo Container
 *
 *  Carrega os templates dos objetos incluidos neste objeto tabControl
 */
    $nObj = $_tabControl_ . '_TAB' . $ix;
    $arr = getTemplates( $projeto['projeto_nome'], $nObj );
    foreach( $arr as $_i_ => $_n_ )
    {
      include( _INC_ . $_n_ . ".tpl.php" );
    }// End foreach( $arr as $_i_ => $_n_ )
    writeTO( '    </div end="' . $nObj . '">' );
  }// End foreach( $arrINI[ $ix_ ] as $ind_ => $val_ )

  writeTO( ' ' );
  writeTO( '  </div end="' . $_tabControl_ . '">' );
  writeTO( ' ' );
/**
 *  Eventos do Objeto
 */
  $fileName = INC . JS_DIR . $_tabControl_ . ".eventos.js.php";

  if( file_exists( $fileName ) )
  {
    include( $fileName );
  }// End if( file_exists( $fileName ) )

  $fileName = INC . JS_DIR . $_tabControl_ . '_beforeLoad.js.php';
  if( file_exists( $fileName ) )
  {
    include( $fileName );
  }// End if( file_exists( $fileName ) )
?>
