CComponentsText: add function to get current text content from object

This commit is contained in:
2014-06-06 18:59:34 +02:00
committed by svenhoefer
parent 581b9c7701
commit 33202059cc

View File

@@ -139,6 +139,8 @@ class CComponentsText : public CComponentsItem, public CBox
virtual bool setTextFromFile(const std::string& path_to_textfile, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL, const fb_pixel_t& color_text = 0); virtual bool setTextFromFile(const std::string& path_to_textfile, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL, const fb_pixel_t& color_text = 0);
///get text directly from a textfile, path as string is required ///get text directly from a textfile, path as string is required
virtual std::string getTextFromFile(const std::string& path_to_textfile); virtual std::string getTextFromFile(const std::string& path_to_textfile);
///returns current text content of text/label object as std::string
virtual std::string getText(){return ct_text;};
///helper to remove linebreak chars from a string if needed ///helper to remove linebreak chars from a string if needed
virtual void removeLineBreaks(std::string& str); virtual void removeLineBreaks(std::string& str);