Telegram Bot Api Client
0.6.1
Client_for_accessing_Telegram's_Bot_API
|
Public Member Functions | |
TBCKeyBoard (uint count, bool oneTime=false, bool resize=false) | |
Constructor. More... | |
~TBCKeyBoard () | |
Destructor. More... | |
TBCKeyBoard & | push (uint count, const String buttons[]) |
Adds a row to the keyboard. More... | |
const String | get (const uint row, const uint col) |
Gets a button text. More... | |
const int | length (const uint row) |
Length of row. More... | |
const int | length () |
Length of keyboard. More... | |
const bool | getOneTime () |
Gets value of OneTime. More... | |
const bool | getResize () |
Gets value of Resize. More... | |
Private Attributes | |
uint | Count |
uint | Counter |
TBCKeyBoardRow * | Rows |
bool | OneTime = false |
bool | Resize = false |
TBCKeyBoard::TBCKeyBoard | ( | uint | count, |
bool | oneTime = false , |
||
bool | resize = false |
||
) |
Constructor.
Constructor, initializing all members
count | The number of rows in keyboard. |
oneTime | value for OneTime |
resize | value for Resize |
TBCKeyBoard::~TBCKeyBoard | ( | ) |
Destructor.
Destructor
const String TBCKeyBoard::get | ( | const uint | row, |
const uint | col | ||
) |
Gets a button text.
[in] | row | Index of row to fetch button text from |
[in] | col | Index of column to fetch button text from |
Gets the text of a button in given row and column
|
inline |
Gets value of OneTime.
See OneTime, this methods makes it read only.
|
inline |
Gets value of Resize.
See Resize, this methods makes it read only.
const int TBCKeyBoard::length | ( | const uint | row | ) |
Length of row.
[in] | row | Index of row to get length |
Gets the length of the row at the given index The length of a row is the number of buttons in this row.
const int TBCKeyBoard::length | ( | ) |
Length of keyboard.
Gets the length of the keyboard The length of a keyboard is the number of rows in this keyboard.
TBCKeyBoard & TBCKeyBoard::push | ( | uint | count, |
const String | buttons[] | ||
) |
Adds a row to the keyboard.
[in] | count | Number of buttons passend in buttons |
[in] | buttons | Button to be displayed in this row |
Adds a row to the keyboard containing buttons displaying the string passed in buttons[]
|
private |
Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again.
Defaults to false.
|
private |
Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.
Defaults to false.