-
-
Notifications
You must be signed in to change notification settings - Fork 10
Crow.Label
Jean-Philippe Bruyère edited this page Oct 26, 2021
·
4 revisions
Simple label widget possibly multiline but without tabulation handling.
namespace: Crow
-
Label
public class Label : Widget, IEditableTextWidget
⬜ | prototype | description |
---|---|---|
Label (Interface iface, string style=null) |
__ |
⬜ | name | description |
---|---|---|
CurrentColumn |
__ | |
CurrentLine |
__ | |
Multiline |
If 'true', linebreaks will be interpreted. If 'false', linebreaks are threated as unprintable unicode characters. Default value is 'False'. | |
SelectedText |
__ | |
Selection |
Current Selected text span. May be used to set current position, or current selection. | |
SelectionBackground |
Background color for selected text inside this label. | |
SelectionForeground |
Selected text color inside this label. | |
SelectionIsEmpty |
__ | |
Text |
Text to display in this label. May include linebreaks if Multiline is 'true'. If Multiline is false, linebreaks will be treated as unrecognized unicode char. | |
TextAlignment |
If measure is not 'Fit', align text inside the bounds of this label. |
⬜ | prototype | description |
---|---|---|
bool DrawCursor(Context ctx, out Rectangle rect) |
Draw text cursor in widget with screen coordinates. This interface when implemented is called automatically by the Interface to make the cursor blink. The blinking frequency is controlled by Interface.TEXT_CURSOR_BLINK_FREQUENCY static field. | |
void GotoWordEnd() |
__ | |
void GotoWordStart() |
__ | |
bool LineMove(int lineDiff) |
__ | |
int measureRawSize(LayoutingType lt) |
return size of content + margins | |
bool MoveLeft() |
Moves cursor one char to the left. | |
bool MoveRight() |
__ | |
void onKeyDown(object sender, KeyEventArgs e) |
__ | |
void onMouseDoubleClick(object sender, MouseButtonEventArgs e) |
Default mouse double click method. A double click is two consecutive press and release without mouving combination. within a delay defined by Interface.DOUBLECLICK_TRESHOLD |
|
void onMouseDown(object sender, MouseButtonEventArgs e) |
Default mouse button press method. The MouseDown event is raised from withing it. |
|
void onMouseEnter(object sender, MouseMoveEventArgs e) |
__ | |
void onMouseMove(object sender, MouseMoveEventArgs e) |
__ | |
void onMouseUp(object sender, MouseButtonEventArgs e) |
Default mouse button release method. The MouseUp event is raised from withing it. |
|
void OnTextChanged(Object sender, TextChangeEventArgs e) |
__ | |
void SetCursorPosition(int position) |
Set current cursor position in label. | |
bool UpdateLayout(LayoutingType layoutType) |
Update layout component only one at a time, this is where the computation of alignement and size take place. The redrawing will only be triggered if final slot size has changed |
⬜ | name | description |
---|---|---|
TextChanged |
Occurs when Text has changed. |