Ocean
Loading...
Searching...
No Matches
TextWindow.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_PLATFORM_WIN_TEXT_WINDOW_H
9#define META_OCEAN_PLATFORM_WIN_TEXT_WINDOW_H
10
13
14namespace Ocean
15{
16
17namespace Platform
18{
19
20namespace Win
21{
22
23/**
24 * This class implements a text window.
25 * @ingroup platformwin
26 */
27class OCEAN_PLATFORM_WIN_EXPORT TextWindow : virtual public Window
28{
29 public:
30
31 /**
32 * Creates a new text window.
33 * @param instance Application instance
34 * @param name The name of the window
35 * @param isChild True, if the window is intended to be a child window
36 */
37 TextWindow(HINSTANCE instance, const std::wstring& name, const bool isChild = false);
38
39 /**
40 * Destructs the text window.
41 */
42 ~TextWindow() override;
43
44 /**
45 * Returns the text of this window.
46 * @return The text of this window
47 */
48 virtual std::string text() const;
49
50 /**
51 * Sets the text of this text window.
52 * @param text The text to be set
53 * @return True, if succeeded
54 */
55 virtual bool setText(const std::string& text);
56
57 /**
58 * Appends text to this text window.
59 * @param text The text to be appended
60 * @return True, if succeeded
61 */
62 virtual bool appendText(const std::string& text);
63
64 /**
65 * Clears the text of this text window.
66 */
67 virtual bool clearText();
68
69 protected:
70
71 /**
72 * Creates the window itself using the registered window class.
73 * @return True, if succeeded
74 */
75 bool createWindow() override;
76};
77
78}
79
80}
81
82}
83
84#endif // META_OCEAN_PLATFORM_WIN_TEXT_WINDOW_H
This class implements a text window.
Definition TextWindow.h:28
bool createWindow() override
Creates the window itself using the registered window class.
virtual std::string text() const
Returns the text of this window.
virtual bool setText(const std::string &text)
Sets the text of this text window.
TextWindow(HINSTANCE instance, const std::wstring &name, const bool isChild=false)
Creates a new text window.
~TextWindow() override
Destructs the text window.
virtual bool clearText()
Clears the text of this text window.
virtual bool appendText(const std::string &text)
Appends text to this text window.
This class is the base class for all windows.
Definition Window.h:31
The namespace covering the entire Ocean framework.
Definition Accessor.h:15