SavvyUI C++ UI Library
Loading...
Searching...
No Matches
TextField.h
Go to the documentation of this file.
1#pragma once
2
3#include "Component.h"
4
8class TextField : public Component
9{
10 BOOL _isPassword;
11 wstring _text;
12
13protected:
23 BOOL getCreateWindowOptions(wstring& title, UINT& widownStyles, wstring& wndClassName, BOOL& isCustomWndProc);
24
29
30public:
35
39 virtual ~TextField();
40
46 void setPassword(BOOL isPassword = TRUE);
47
53 void setText(const wstring& text);
54
60 wstring getText();
61
65 wstring getSelectedText();
66
73
81 void onDataChanged(WinHandle hTarget, const wstring& newValue, const ProcParams& procParams);
82
89};
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.
TextField()
Constructs a new TextField.
void setPassword(BOOL isPassword=TRUE)
Sets whether this text field masks input as a password.
wstring getText()
Gets the current text content.
void addDataChangedListener(DataChangeListener *l)
Adds a listener for data changed events.
void onDataChanged(WinHandle hTarget, const wstring &newValue, const ProcParams &procParams)
Handles data changed events.
void windowCreated()
Called when the window is created.
void setText(const wstring &text)
Sets the text content of the field.
int getPreferredHeight()
Gets the preferred height of the text field control.
virtual ~TextField()
Destructor.
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Retrieves window creation options.