Ejemplo n.º 1
0
void
KeyboardControl::OnResize(UPixelScalar width, UPixelScalar height)
{
  set_buttons_size();
  resize_buttons();
  move_buttons();
}
Ejemplo n.º 2
0
KeyboardControl::KeyboardControl(ContainerWindow &parent,
                                 const DialogLook &_look,
                                 PixelScalar x, PixelScalar y,
                                 UPixelScalar width, UPixelScalar height,
                                 OnCharacterCallback_t function,
                                 const WindowStyle _style)
  :look(_look),
  num_buttons(0),
  button_width(50), button_height(50),
  mOnCharacter(function)
{
  set(parent, x, y, width, height, _style);
  set_buttons_size();

  TCHAR caption[] = _T(" ");

  for (const TCHAR *i = keyboard_letters; !StringIsEmpty(i); ++i) {
    caption[0] = *i;

    add_button(caption);
  }

  add_button(_T(" Space "));
  add_button(_T("."));
  add_button(_T(","));
  add_button(_T("-"));

  move_buttons();
}
Ejemplo n.º 3
0
bool
KeyboardControl::on_resize(unsigned width, unsigned height)
{
  set_buttons_size();
  resize_buttons();
  move_buttons();
  return true;
}