00001 /* 00002 * Copyright (c) 2012 Mateusz Piękos 00003 * Licensed under the simplified BSD license. 00004 * See Documentation/Licenses/BSD-simplified.txt for more information. 00005 */ 00006 00007 #pragma once 00008 00009 #include <Swiften/Elements/Whiteboard/WhiteboardElement.h> 00010 #include <Swiften/Elements/Whiteboard/WhiteboardColor.h> 00011 00012 namespace Swift { 00013 class WhiteboardTextElement : public WhiteboardElement { 00014 public: 00015 typedef boost::shared_ptr<WhiteboardTextElement> ref; 00016 public: 00017 WhiteboardTextElement(int x, int y) { 00018 x_ = x; 00019 y_ = y; 00020 } 00021 00022 void setText(const std::string text) { 00023 text_ = text; 00024 } 00025 00026 const std::string& getText() const { 00027 return text_; 00028 } 00029 00030 int getX() const { 00031 return x_; 00032 } 00033 00034 int getY() const { 00035 return y_; 00036 } 00037 00038 const WhiteboardColor& getColor() const { 00039 return color_; 00040 } 00041 00042 void setColor(const WhiteboardColor& color) { 00043 color_ = color; 00044 } 00045 00046 int getSize() const { 00047 return size_; 00048 } 00049 00050 void setSize(const int size) { 00051 size_ = size; 00052 } 00053 00054 void accept(WhiteboardElementVisitor& visitor) { 00055 visitor.visit(*this); 00056 } 00057 00058 private: 00059 int x_, y_; 00060 int size_; 00061 std::string text_; 00062 WhiteboardColor color_; 00063 }; 00064 }