diff options
Diffstat (limited to 'Swift/Controllers/HighlightAction.h')
-rw-r--r-- | Swift/Controllers/HighlightAction.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Swift/Controllers/HighlightAction.h b/Swift/Controllers/HighlightAction.h index bfbed74..de1f201 100644 --- a/Swift/Controllers/HighlightAction.h +++ b/Swift/Controllers/HighlightAction.h @@ -5,8 +5,17 @@ */ +/* + * Copyright (c) 2014 Kevin Smith and Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + #pragma once #include <string> +#include <boost/archive/text_oarchive.hpp> +#include <boost/archive/text_iarchive.hpp> + namespace Swift { @@ -20,7 +29,13 @@ namespace Swift { void setHighlightText(bool highlightText); + /** + * Gets the foreground highlight color. If the string is empty, assume a default color. + */ const std::string& getTextColor() const { return textColor_; } void setTextColor(const std::string& textColor) { textColor_ = textColor; } + /** + * Gets the background highlight color. If the string is empty, assume a default color. + */ const std::string& getTextBackground() const { return textBackground_; } void setTextBackground(const std::string& textBackground) { textBackground_ = textBackground; } @@ -29,4 +44,7 @@ namespace Swift { void setPlaySound(bool playSound); + /** + * Gets the sound filename. If the string is empty, assume a default sound file. + */ const std::string& getSoundFile() const { return soundFile_; } void setSoundFile(const std::string& soundFile) { soundFile_ = soundFile; } @@ -35,4 +53,7 @@ namespace Swift { private: + friend class boost::serialization::access; + template<class Archive> void serialize(Archive & ar, const unsigned int version); + bool highlightText_; std::string textColor_; @@ -43,3 +64,13 @@ namespace Swift { }; + template<class Archive> + void HighlightAction::serialize(Archive& ar, const unsigned int /*version*/) + { + ar & highlightText_; + ar & textColor_; + ar & textBackground_; + ar & playSound_; + ar & soundFile_; + } + } |