SavvyUI C++ UI Library
Loading...
Searching...
No Matches
TextArea.h
Go to the documentation of this file.
1#pragma once
2
3#include "Component.h"
4
8class TextArea : public Component
9{
10 wstring _text;
11
12protected:
22 BOOL getCreateWindowOptions(wstring& title, UINT& widownStyles, wstring& wndClassName, BOOL& isCustomWndProc);
23
28
29public:
34
38 virtual ~TextArea();
39
45 void setText(const wstring& text);
46
52 wstring getText();
53
57 void getLines(vector<wstring>& lines);
58
62 wstring getSelectedText();
63
68
72 void setTextLimit(int textLimit);
73
80
88 void onDataChanged(WinHandle hTarget, const wstring& newValue, const ProcParams& procParams);
89
96};
HWND WinHandle
Definition Common.h:16
Component()
Constructs a new Component instance.
Definition EventListeners.h:15
Definition Component.h:9
wstring getSelectedText()
Gets the selected text content.
int getTextLimit()
Gets the max allowed length of the text.
void onDataChanged(WinHandle hTarget, const wstring &newValue, const ProcParams &procParams)
Handles data changed events.
wstring getText()
Gets the current text content.
void addDataChangedListener(DataChangeListener *l)
Adds a listener for data changed events.
void windowCreated()
Called when the window is created.
void setText(const wstring &text)
Sets the text content of the field.
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Retrieves window creation options.
virtual ~TextArea()
Destructor.
void setTextLimit(int textLimit)
Sets the max allowed length of the text.
int getPreferredHeight()
Gets the preferred height of the text field control.
TextArea()
Constructs a new TextArea.
void getLines(vector< wstring > &lines)
Gets the text as separate lines.