Rose
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
rose::NumberPad Class Reference

A numeric keypad KeyboardPlugin. More...

#include <Keyboard.h>

Inheritance diagram for rose::NumberPad:
Inheritance graph
[legend]
Collaboration diagram for rose::NumberPad:
Collaboration graph
[legend]

Public Member Functions

void build (std::shared_ptr< Keyboard > keyboard, Size keySize, int fontSize, const std::string &fontName) override
 Build the keyboard from the KeyboardSpec and apply any special layout rules. More...
 
- Public Member Functions inherited from rose::KeyboardPlugin
virtual void build (shared_ptr< Keyboard > keyboard, Size keySize, int fontSize, const std::string &fontName)=0
 

Protected Attributes

std::shared_ptr< Slot< Button::SignalType > > rxKey {}
 Slot to process keys.
 

Static Protected Attributes

static constexpr size_t Rows = 5
 
static constexpr size_t KeysPerRow = 3
 
static const KeyboardSpec< Rows, KeysPerRow, 1 > NumberData
 The main number pad KeyboardSpec. More...
 
static constexpr size_t SideCols = 1
 
static constexpr size_t SideKeysPerCol = 5
 
static const KeyboardSpec< SideCols, SideKeysPerCol, 1 > SideNumberData
 The side key data. More...
 

Detailed Description

A numeric keypad KeyboardPlugin.

Member Function Documentation

◆ build()

void rose::NumberPad::build ( std::shared_ptr< Keyboard keyboard,
Size  keySize,
int  fontSize,
const std::string &  fontName 
)
override

Build the keyboard from the KeyboardSpec and apply any special layout rules.

Parameters
keyboardThe Keyboard Widget to build the keyboard in.
charSlotThe slot to receive key press signals on.

Member Data Documentation

◆ NumberData

constexpr KeyboardSpec< NumberPad::Rows, NumberPad::KeysPerRow, 1 > rose::NumberPad::NumberData
staticprotected
Initial value:
= {
KeySpecRow<NumberPad::KeysPerRow, 1>{
makeKeySpec<1>(","),
makeKeySpec<1>("/"),
makeKeySpec<1>("*"),
},
KeySpecRow<NumberPad::KeysPerRow, 1>{
makeKeySpec<1>("7"),
makeKeySpec<1>("8"),
makeKeySpec<1>("9"),
},
KeySpecRow<NumberPad::KeysPerRow, 1>{
makeKeySpec<1>("4"),
makeKeySpec<1>("5"),
makeKeySpec<1>("6"),
},
KeySpecRow<NumberPad::KeysPerRow, 1>{
makeKeySpec<1>("1"),
makeKeySpec<1>("2"),
makeKeySpec<1>("3"),
},
KeySpecRow<NumberPad::KeysPerRow, 1>{
makeKeySpec<1>("0"),
makeKeySpec<1>("."),
makeKeySpec<1>(0),
},
}

The main number pad KeyboardSpec.

◆ SideNumberData

constexpr KeyboardSpec< NumberPad::SideCols, NumberPad::SideKeysPerCol, 1 > rose::NumberPad::SideNumberData
staticprotected
Initial value:
= {
KeySpecRow<NumberPad::SideKeysPerCol, 1>{
makeKeySpec<1>("-"),
makeKeySpec<1>("+"),
makeKeySpec<1>("\b"),
makeKeySpec<1>("\r"),
makeKeySpec<1>(0)
}
}

The side key data.


The documentation for this class was generated from the following files: