#ifndef _SCHEMA_SELECTION_PAGE_H_
#define _SCHEMA_SELECTION_PAGE_H_

#include "grtui/wizard_schema_filter_page.h"

class SchemaSelectionPage : public WizardSchemaFilterPage
{
public:
  SchemaSelectionPage(WizardForm *form, const char *name= "pickSchemata")
    : WizardSchemaFilterPage(form, name), _dbplugin(0)
  {
    set_short_title(_("Select Schemata"));
    set_title(_("Select Schemata to Reverse Engineer"));
  }

  virtual void enter(bool advancing)
  {
    if (advancing)
    {
      WizardSchemaFilterPage::enter(advancing);


      std::vector<std::string> selection;

      _dbplugin->default_schemata_selection(selection);
      
      for (std::vector<std::string>::const_iterator iter= selection.begin();
           iter != selection.end(); ++iter)
        _check_list.set_selected(*iter, true);
    }
  }
  
  void set_db_plugin(Db_plugin *pl)
  {
    _dbplugin= pl;
  }

private:
  Db_plugin *_dbplugin;
};


#endif /* _SCHEMA_SELECTION_PAGE_H_ */
