7#ifndef __HDI_CORE_TEXTVIEW__
8#define __HDI_CORE_TEXTVIEW__
70 TextView(
const Rect& frame_,
const std::string& text_,
const bool edit_ =
true);
186 virtual std::unique_ptr<Label>
label()
const;
335 typedef std::unique_ptr<TextView> TextViewUP;
336 typedef std::shared_ptr<TextView> TextViewSP;
337 typedef std::weak_ptr<TextView> TextViewWP;
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Label widget, for simply displaying text or images inside a window.
Definition: hdicoreLabel.h:29
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition: hdicoreRect.h:34
Text view widget, which allows the user to enter a large amount of arbitrary text (also useful for di...
Definition: hdicoreTextView.h:24
virtual bool editable() const
Gets whether the text view is read-only.
TextView()
Constructs an empty TextView object.
virtual Alignment alignment() const
Gets the current alignment of the text view.
virtual TextView * clone() const
Convenience method to clone a TextView object on the heap.
virtual void setBold(const bool bold_)
Sets the font weight.
virtual void setAlignment(const Alignment alignment_)
Sets the current alignment of the text view.
virtual void setSelectionRange(const uint32_t pos_, const uint32_t len_)
Sets the selection range of the text in the view, in UTF-8 (and focuses it)
virtual void setValueChangingCallback(const Callback &callback_)
Sets the value changing callback.
virtual void setSelectionRangeUTF32(const uint32_t pos_, const uint32_t len_)
Sets the selection range of the text in the view, in UTF-32 (and focuses it)
virtual void valueChanged()
Simulates the text view having its value changed.
virtual void setItalic(const bool italic_)
Sets the font style.
virtual std::unique_ptr< Label > label() const
If the target text view has been associated with a label, this gets said label.
virtual bool italic() const
Gets whether the text is italicized.
virtual TextView & operator=(const TextView &rhs_)
Allows one TextView object to be assigned from another.
virtual bool selectionRange(uint32_t &pos__, uint32_t &len__) const
Gets the selection range of the text in the view, if any, in UTF-8.
virtual void removeLabel()
Removes the label that, when clicked, would have focused the target text view.
virtual Callback *const valueChangedCallback() const
Gets the value changed callback for the text view.
virtual void setValueChangedCallback(const Callback &callback_)
Sets the value changed callback.
virtual bool selectionRangeUTF32(uint32_t &pos__, uint32_t &len__) const
Gets the selection range of the text in the view, if any, in UTF-32.
virtual std::string lastCharTyped() const
Gets the last character typed into the view.
virtual bool bold() const
Gets whether the text is bold.
virtual void setLabel(Label &label_)
Sets the label that, when clicked, will focus the target text view.
Alignment
Text alignment options.
Definition: hdicoreTextView.h:32
virtual void valueChanging()
Simulates the value of the text view changing.
virtual ~TextView()
TextView destructor.
virtual Callback *const valueChangingCallback() const
Gets the value changing callback for the text view.
TextView(const TextView &view_)
Constructs a new TextView object from an existing TextView object (copy constructor)
virtual TextView * duplicate() const
Convenience method to duplicate a TextView object, creating a new and identical UI element to the tar...
TextView(const Rect &frame_, const std::string &text_, const bool edit_=true)
Constructs a text view, which can be editable or read-only.