| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
#pragma once |
| 22 |
|
| 23 |
#include <string> |
| 24 |
|
| 25 |
#include "Server/Web/HtmlTag.h" |
| 26 |
#include "Server/Web/HtmlTagLabel.h" |
| 27 |
#include "Server/Web/HtmlTagSelectOrientation.h" |
| 28 |
|
| 29 |
namespace Server { namespace Web |
| 30 |
{ |
| 31 |
class HtmlTagSelectOrientationWithLabel : public HtmlTag |
| 32 |
{ |
| 33 |
public: |
| 34 |
HtmlTagSelectOrientationWithLabel(const std::string& name, const Languages::TextSelector label, const Orientation defaultValue = OrientationRight) |
| 35 |
: HtmlTag() |
| 36 |
{ |
| 37 |
AddChildTag(HtmlTagLabel(label, "s_" + name)); |
| 38 |
AddChildTag(HtmlTagSelectOrientation(name, defaultValue)); |
| 39 |
} |
| 40 |
|
| 41 |
virtual ~HtmlTagSelectOrientationWithLabel() {} |
| 42 |
|
| 43 |
virtual inline HtmlTag AddAttribute(const std::string& name, const std::string& value) override |
| 44 |
{ |
| 45 |
childTags[1].AddAttribute(name, value); |
| 46 |
return *this; |
| 47 |
} |
| 48 |
|
| 49 |
virtual inline bool IsAttributeSet(const std::string& name) override |
| 50 |
{ |
| 51 |
return childTags[1].IsAttributeSet(name); |
| 52 |
} |
| 53 |
|
| 54 |
virtual inline HtmlTag AddClass(const std::string& _class) override |
| 55 |
{ |
| 56 |
childTags[1].AddClass(_class); |
| 57 |
return *this; |
| 58 |
} |
| 59 |
}; |
| 60 |
}} |
| 61 |
|