CComponentsText: use separated function to get text fro a file

This commit is contained in:
2013-10-19 01:11:02 +02:00
parent 11d77c3030
commit a1e5a60184
2 changed files with 16 additions and 4 deletions

View File

@@ -118,6 +118,8 @@ class CComponentsText : public CComponentsItem, public CBox
virtual void setText(const int digit, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
///set text directly from a textfile, path as string is required
virtual bool setTextFromFile(const std::string& path_to_textfile, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
///get text directly from a textfile, path as string is required
virtual std::string getTextFromFile(const std::string& path_to_textfile);
///helper to remove linebreak chars from a string if needed
virtual void removeLineBreaks(std::string& str);