Line 447... |
Line 447... |
447 |
bool haveListRow() { return _getListRow != nullptr; }
|
447 |
bool haveListRow() { return _getListRow != nullptr; }
|
448 |
int getSubViewID() { return st; }
|
448 |
int getSubViewID() { return st; }
|
449 |
bool getSubViewScrollbar() { return (ba == 1 ? true : false); }
|
449 |
bool getSubViewScrollbar() { return (ba == 1 ? true : false); }
|
450 |
int getSubViewScrollbarOffset() { return (ba > 0 ? bo : 0); }
|
450 |
int getSubViewScrollbarOffset() { return (ba > 0 ? bo : 0); }
|
451 |
bool getWrapSubViewPages() { return (ws != 0 ? true : false); }
|
451 |
bool getWrapSubViewPages() { return (ws != 0 ? true : false); }
|
- |
|
452 |
bool isFocused() { return mHasFocus; }
|
- |
|
453 |
int getTextCursorPosition() { return mCursorPosition; }
|
452 |
SUBVIEW_POSITION_t getSubViewAnchor();
|
454 |
SUBVIEW_POSITION_t getSubViewAnchor();
|
453 |
std::function<std::vector<std::string>(ulong handle, int ap, int ta, int ti, int rows, int columns)> getCallbackListContent() { return _getListContent; }
|
455 |
std::function<std::vector<std::string>(ulong handle, int ap, int ta, int ti, int rows, int columns)> getCallbackListContent() { return _getListContent; }
|
454 |
std::function<std::string(int ti, int row)> getCallbackListRow() { return _getListRow; }
|
456 |
std::function<std::string(int ti, int row)> getCallbackListRow() { return _getListRow; }
|
455 |
std::function<void (TButton *button)> getCallbackGlobalSettings() { return _getGlobalSettings; };
|
457 |
std::function<void (TButton *button)> getCallbackGlobalSettings() { return _getGlobalSettings; };
|
456 |
|
458 |
|
Line 609... |
Line 611... |
609 |
* @return
|
611 |
* @return
|
610 |
* On error returns FALSE.
|
612 |
* On error returns FALSE.
|
611 |
*/
|
613 |
*/
|
612 |
bool appendText(const std::string& txt, int instance);
|
614 |
bool appendText(const std::string& txt, int instance);
|
613 |
/**
|
615 |
/**
|
- |
|
616 |
* @brief setTextCursorPosition - Set curso position
|
- |
|
617 |
* If the button element is of type TEXT_INPUT, this method sets
|
- |
|
618 |
* the cursor position. This position comes usually from an input
|
- |
|
619 |
* line managed by the graphical surface.
|
- |
|
620 |
* If the \b newPos is less then 0 the curser is set in front of the
|
- |
|
621 |
* first character. If the value \b newPos is grater then the number
|
- |
|
622 |
* of characters then the curser is set after the last character.
|
- |
|
623 |
*
|
- |
|
624 |
* @param oldPos The old position of the cursor
|
- |
|
625 |
* @param newPos The new position of the cursor
|
- |
|
626 |
*/
|
- |
|
627 |
void setTextCursorPosition(int oldPos, int newPos);
|
- |
|
628 |
/**
|
- |
|
629 |
* @brief setTextFocus - Focus of input line changed
|
- |
|
630 |
* If the button element is of type TEXT_INPUT, this signals the
|
- |
|
631 |
* state of the focus. If \b in is TRUE then the input line got
|
- |
|
632 |
* the focus. The ON state of the button is send. If there is
|
- |
|
633 |
* a keyboard present the line is then related to this keyboard.
|
- |
|
634 |
* If \b in is FALSE the input line lost the focus. The off state
|
- |
|
635 |
* is displayed and no more characters are received from a
|
- |
|
636 |
* keyboard.
|
- |
|
637 |
* If this input line is a system input line, the focus is ignored.
|
- |
|
638 |
* It then receives always the keystrokes from a keyboard.
|
- |
|
639 |
*
|
- |
|
640 |
* @param in TRUE: Input line got focus, FALSE: input line
|
- |
|
641 |
* lost focus.
|
- |
|
642 |
*/
|
- |
|
643 |
void setTextFocus(bool in);
|
- |
|
644 |
/**
|
614 |
* @brief setBorderColor Set the border color.
|
645 |
* @brief setBorderColor Set the border color.
|
615 |
* Set the border color to the specified color. Only if the
|
646 |
* Set the border color to the specified color. Only if the
|
616 |
* specified border color is not the same as the current color.
|
647 |
* specified border color is not the same as the current color.
|
617 |
* Note: Color can be assigned by color name (without spaces),
|
648 |
* Note: Color can be assigned by color name (without spaces),
|
618 |
* number or R,G,B value (RRGGBB or RRGGBBAA).
|
649 |
* number or R,G,B value (RRGGBB or RRGGBBAA).
|
Line 932... |
Line 963... |
932 |
bool doClick(int x, int y, bool pressed);
|
963 |
bool doClick(int x, int y, bool pressed);
|
933 |
/**
|
964 |
/**
|
934 |
* Creates a button but uses the informations in the structure
|
965 |
* Creates a button but uses the informations in the structure
|
935 |
* instead of reading it from a file.
|
966 |
* instead of reading it from a file.
|
936 |
*
|
967 |
*
|
937 |
* @param bt A structure containing all informations to create a button.
|
968 |
* @param bt A structure containing all information to create a button.
|
938 |
* @return On success returns TRUE, else FALSE.
|
969 |
* @return On success returns TRUE, else FALSE.
|
939 |
*/
|
970 |
*/
|
940 |
bool createSoftButton(const EXTBUTTON_t& bt);
|
971 |
bool createSoftButton(const EXTBUTTON_t& bt);
|
941 |
/**
|
972 |
/**
|
942 |
* Returns the image in mLastImage as a pixel array with the defined
|
973 |
* Returns the image in mLastImage as a pixel array with the defined
|
Line 1281... |
Line 1312... |
1281 |
std::vector<std::string> mListContent; // The content of a list, if this button is one
|
1312 |
std::vector<std::string> mListContent; // The content of a list, if this button is one
|
1282 |
bool mDrawBlock{false}; // TRUE = the method drawButton() is busy.
|
1313 |
bool mDrawBlock{false}; // TRUE = the method drawButton() is busy.
|
1283 |
std::vector<_DRAW_BLOCK_t> mDrawQueue;
|
1314 |
std::vector<_DRAW_BLOCK_t> mDrawQueue;
|
1284 |
bool mDrawQueueBusy{false};
|
1315 |
bool mDrawQueueBusy{false};
|
1285 |
bool mSubViewPart{false}; // TRUE = The button is part of a subview item.
|
1316 |
bool mSubViewPart{false}; // TRUE = The button is part of a subview item.
|
- |
|
1317 |
int mCursorPosition{0}; // The cursor position if this is of type TEXT_INPUT
|
- |
|
1318 |
bool mHasFocus{false}; // If this is of type TEXT_INPUT this holds the focus state
|
1286 |
};
|
1319 |
};
|
1287 |
|
1320 |
|
1288 |
typedef struct BUTTONS_T
|
1321 |
typedef struct BUTTONS_T
|
1289 |
{
|
1322 |
{
|
1290 |
TButton *button{nullptr};
|
1323 |
TButton *button{nullptr};
|