Example #1
0
Keyboard*
Manager::create_keyboard(const FileReader& reader, Control* parent)
{
  std::string driver = get_driver_part(reader.get_name());
                  
  Driver* drv = load_driver(driver);
  if (drv)
  {
    return drv->create_keyboard(reader, parent);
  }
  else
  {
    std::cout << "Manager: Error: Couldn't find driver: '" << driver << "'" << std::endl;
    return 0;
  }  
}
Example #2
0
std::unique_ptr<Keyboard>
Manager::create_keyboard(const ReaderObject& reader, Control* parent)
{
  std::string driver = get_driver_part(reader.get_name());

  Driver* drv = load_driver(driver);
  if (drv)
  {
    return drv->create_keyboard(reader, parent);
  }
  else
  {
    log_error("couldn't find driver: '%1%'", driver);
    return {};
  }
}
Example #3
0
Scroller*
Manager::create_scroller(const FileReader& reader, Control* parent)
{
  std::string driver = get_driver_part(reader.get_name());
                  
  Driver* drv = load_driver(driver);
  if (drv)
  {
    return drv->create_scroller(reader, parent);
  }
  else
  {
    log_error("couldn't find driver: '%1%'", driver);
    return 0;
  }
}