Skip to content

Commit 919e001

Browse files
committed
elements/textbox: add currentText()
1 parent 9174fa1 commit 919e001

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/hyprtoolkit/element/Textbox.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ namespace Hyprtoolkit {
4242
Hyprutils::Memory::CSharedPointer<CTextboxBuilder> rebuild();
4343
virtual Hyprutils::Math::Vector2D size();
4444
void focus(bool focus = true);
45+
std::string_view currentText();
4546

4647
private:
4748
static Hyprutils::Memory::CSharedPointer<CTextboxElement> create(const STextboxData& data);

src/element/textbox/Textbox.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ void CTextboxElement::init() {
246246
impl->grouped = true;
247247
}
248248

249+
std::string_view CTextboxElement::currentText() {
250+
return m_impl->data.text;
251+
}
252+
249253
void STextboxImpl::updateLabel() {
250254
if (data.text.empty()) {
251255
bgInnerCont->removeChild(text);

0 commit comments

Comments
 (0)