Beispiel #1
0
/**
 * Move button to the specified left and top coordinates.
 *
 * The coordinates SHOULD BE in pixels of the screen (i.e. after scaling!)
 *
 * @param ch
 * @param left    Number of pixels from the left (in screen pixels)
 * @param top     Number of pixels from the top (in screen pixels)
 */
void
KeyboardControl::move_button(TCHAR ch, PixelScalar left, PixelScalar top)
{
  ButtonWindow *kb = get_button(ch);
  if (kb)
    kb->move(left, top);
}
/**
 * Move button to the specified left and top coordinates.
 *
 * The coordinates SHOULD BE in pixels of the screen (i.e. after scaling!)
 *
 * @param ch
 * @param left    Number of pixels from the left (in screen pixels)
 * @param top     Number of pixels from the top (in screen pixels)
 */
void
KeyboardControl::move_button(TCHAR ch, int left, int top)
{
  ButtonWindow *kb = get_button(ch);
  if (kb)
    kb->move(left, top);
}
void
KeyboardControl::move_buttons_to_row(const TCHAR* buttons, int row, int offset)
{
  if (string_is_empty(buttons))
    return;

  ButtonWindow *kb;
  for (unsigned i = 0; i < _tcslen(buttons); i++) {
    kb = get_button(buttons[i]);
    if (!kb)
      continue;

    kb->move(i * button_width + offset, row * button_height);
  }
}
Beispiel #4
0
void
KeyboardControl::move_buttons_to_row(const TCHAR* buttons, int row,
                                     PixelScalar offset)
{
  if (StringIsEmpty(buttons))
    return;

  ButtonWindow *kb;
  for (unsigned i = 0; buttons[i] != _T('\0'); i++) {
    kb = get_button(buttons[i]);
    if (!kb)
      continue;

    kb->move(i * button_width + offset, row * button_height);
  }
}
Beispiel #5
0
 virtual void OnResize(UPixelScalar width, UPixelScalar height) {
   SingleWindow::OnResize(width, height);
   key_code_dumper.move(0, 0, width, (height + 1) / 2);
   close_button.move(0, (height + 1) / 2, width, height / 2);
 }
Beispiel #6
0
 virtual bool on_resize(unsigned width, unsigned height) {
   SingleWindow::on_resize(width, height);
   key_code_dumper.move(0, 0, width, (height + 1) / 2);
   close_button.move(0, (height + 1) / 2, width, height / 2);
   return true;
 }