19 #include <ubit/uattr.hpp> 41 bool isEditable()
const;
45 bool isCaretVisible()
const;
49 UColor* getCaretColor()
const;
75 UStr* getCaretStr()
const;
76 UStr* getCaretStr(
int& pos_in_str)
const;
86 UEdit& setCaretStr(
UStr* str,
int pos_in_str);
117 void deletePreviousChar(
UElem& container,
UView* view);
118 void deleteChar(
UElem& container,
UView* view);
120 bool previousChar(
UElem& container,
UView* view);
122 void beginningOfLine(
UElem& container,
UView* view);
123 void endOfLine(
UElem& container,
UView* view);
136 void setCaretStr(
UStr*,
int pos_in_str,
bool update,
UView* view);
152 bool is_editable, is_visible;
153 mutable bool repainted;
Base class for attributes.
Definition: uattr.hpp:97
keyboard events
Definition: uevent.hpp:316
text selection.
Definition: uselection.hpp:25
long getCaretPos() const
returns the caret position.
Definition: uedit.cpp:152
UEdit()
creates a new UEdit property;
Definition: uedit.cpp:39
class for drawing on widgets.
Definition: ugraph.hpp:44
2D Rectangle.
Definition: ugeom.hpp:165
Text editing and caret controller.
Definition: uedit.hpp:30
Color attribute of an element or a widget.
Definition: ucolor.hpp:73
UEdit & setCaretPos(long pos)
changes the caret position.
Definition: uedit.cpp:172
static UStr * getNextStr(UStr *from, UElem &container)
[unstable] returns the string before/after 'from' in this 'container'.
Definition: uedit.cpp:309
UEdit & setCaretVisible(bool=true)
get/set caret visibility.
Definition: uedit.cpp:59
UEdit & setCaretColor(UColor *)
get/set the color used to render the caret.
Definition: uedit.cpp:60
lightweight general purpose container.
Definition: uelem.hpp:44
static UStr * getParagraphLastStr(UStr *from, int &pos, UElem &container)
[unstable] returns the first/last string in the same paragraph than 'from'.
Definition: uedit.cpp:363
Smart Pointer for UObject instances (.
Definition: uobject.hpp:365
static UStr * getParagraphFirstStr(UStr *from, int &pos, UElem &container)
Definition: uedit.cpp:317
virtual void addingTo(UChild &, UElem &parent)
called when this object is added to a parent.
Definition: uedit.cpp:64
void previousLine(UElem &container, UView *view)
Definition: uedit.cpp:500
Box View.
Definition: uview.hpp:65
virtual void removingFrom(UChild &, UElem &parent)
called when this object is removed from a parent (SEE DETAILS IF YOU REDEFINE THIS METHOD)...
Definition: uedit.cpp:90
Definition: uupdatecontext.hpp:32
Definition: uhardfont.hpp:31
virtual void update()
updates parents graphics.
Definition: uedit.cpp:118
virtual void putProp(UUpdateContext *, UElem &)
[impl] changes corresponding value in the UUpdateContext
Definition: uedit.cpp:107
void nextLine(UElem &container, UView *view)
[impl] moves the caret in the expected way.
Definition: uedit.cpp:516
UEdit & setEditable(bool=true)
get/set text editing mode
Definition: uedit.cpp:58
Ubit String.
Definition: ustr.hpp:72
mouse events
Definition: uevent.hpp:172
[impl] Internal implementation of a child node.
Definition: uchild.hpp:23