OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
TextEditorCfg.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
9#include "OTGui/GuiTypes.h"
11
12// std header
13#include <string>
14
15#pragma warning(disable:4251)
16
17namespace ot {
18
20 public:
22 TextEditorCfg(const TextEditorCfg& _other);
23 virtual ~TextEditorCfg();
24
25 TextEditorCfg& operator = (const TextEditorCfg& _other);
26
30 virtual void addToJsonObject(ot::JsonValue& _object, ot::JsonAllocator& _allocator) const override;
31
35 virtual void setFromJsonObject(const ot::ConstJsonObject& _object) override;
36
37 void setPlainText(const std::string& _text) { m_text = _text; };
38 const std::string& getPlainText(void) const { return m_text; };
39
40 void setDocumentSyntax(DocumentSyntax _syntax) { m_syntax = _syntax; };
41 DocumentSyntax getDocumentSyntax(void) const { return m_syntax; };
42
43 private:
44 std::string m_text;
45 DocumentSyntax m_syntax;
46 };
47
48}
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
Definition TextEditorCfg.h:19
void setPlainText(const std::string &_text)
Definition TextEditorCfg.h:37
DocumentSyntax getDocumentSyntax(void) const
Definition TextEditorCfg.h:41
const std::string & getPlainText(void) const
Definition TextEditorCfg.h:38
void setDocumentSyntax(DocumentSyntax _syntax)
Definition TextEditorCfg.h:40
General widget view information class. The WidgetViewBase holds the general information of a WidgetVi...
Definition WidgetViewBase.h:25
Definition Connector.h:8
DocumentSyntax
Supported document syntax. Mainly used for syntax highlighting.
Definition GuiTypes.h:149
rapidjson::Value JsonValue
Writable JSON value.
Definition JSON.h:27
rapidjson::GenericObject< true, rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > > > ConstJsonObject
Read only JSON Object.
Definition JSON.h:35
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30