Telegram Bot Api Client  0.6.1
Client_for_accessing_Telegram's_Bot_API
Public Member Functions | Private Attributes | List of all members
TBCKeyBoard Class Reference

Public Member Functions

 TBCKeyBoard (uint count, bool oneTime=false, bool resize=false)
 Constructor. More...
 
 ~TBCKeyBoard ()
 Destructor. More...
 
TBCKeyBoardpush (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
 
TBCKeyBoardRowRows
 
bool OneTime = false
 
bool Resize = false
 

Constructor & Destructor Documentation

◆ TBCKeyBoard()

TBCKeyBoard::TBCKeyBoard ( uint  count,
bool  oneTime = false,
bool  resize = false 
)

Constructor.

Constructor, initializing all members

Parameters
countThe number of rows in keyboard.
oneTimevalue for OneTime
resizevalue for Resize

◆ ~TBCKeyBoard()

TBCKeyBoard::~TBCKeyBoard ( )

Destructor.

Destructor

Member Function Documentation

◆ get()

const String TBCKeyBoard::get ( const uint  row,
const uint  col 
)

Gets a button text.

Parameters
[in]rowIndex of row to fetch button text from
[in]colIndex of column to fetch button text from
Returns
button text

Gets the text of a button in given row and column

◆ getOneTime()

const bool TBCKeyBoard::getOneTime ( )
inline

Gets value of OneTime.

Returns
Value of OneTime

See OneTime, this methods makes it read only.

◆ getResize()

const bool TBCKeyBoard::getResize ( )
inline

Gets value of Resize.

Returns
Value of Resize

See Resize, this methods makes it read only.

◆ length() [1/2]

const int TBCKeyBoard::length ( const uint  row)

Length of row.

Parameters
[in]rowIndex of row to get length
Returns
return length of row

Gets the length of the row at the given index The length of a row is the number of buttons in this row.

◆ length() [2/2]

const int TBCKeyBoard::length ( )

Length of keyboard.

Returns
return length of keyboard

Gets the length of the keyboard The length of a keyboard is the number of rows in this keyboard.

◆ push()

TBCKeyBoard & TBCKeyBoard::push ( uint  count,
const String  buttons[] 
)

Adds a row to the keyboard.

Parameters
[in]countNumber of buttons passend in buttons
[in]buttonsButton to be displayed in this row
Returns
The keyboard itself

Adds a row to the keyboard containing buttons displaying the string passed in buttons[]

Member Data Documentation

◆ OneTime

bool TBCKeyBoard::OneTime = false
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.

https://core.telegram.org/bots/api#replykeyboardmarkup

◆ Resize

bool TBCKeyBoard::Resize = 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.

https://core.telegram.org/bots/api#replykeyboardmarkup


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