Repository navigation
Expand file tree
/
Copy pathLineEdit.nimpl
More file actions
69 lines (58 loc) · 1.88 KB
/
Copy pathLineEdit.nimpl
File metadata and controls
69 lines (58 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module LineEdit;
import Object;
import Widget;
import Common;
import Icon;
import Enums;
namedbits SignalMask extends Widget.SignalMask {
CursorPositionChanged,
EditingFinished,
InputRejected,
ReturnPressed,
SelectionChanged,
TextChanged,
TextEdited
}
interface SignalHandler {
// Object:
void destroyed(Object.Handle obj);
void objectNameChanged(string objectName);
// Widget:
void customContextMenuRequested(Point pos);
void windowIconChanged(Icon.Handle icon);
void windowTitleChanged(string title);
// LineEdit:
void cursorPositionChanged(int oldPos, int newPos);
void editingFinished();
void inputRejected();
void returnPressed();
void selectionChanged();
void textChanged(string text);
void textEdited(string text);
}
enum EchoMode { Normal, NoEcho, Password, PasswordEchoOnEdit }
opaque Handle extends Widget.Handle {
bool hasAcceptableInput(); // read-only
void setAlignment(Alignment align);
void setClearButtonEnabled(bool enabled);
void setCursorMoveStyle(CursorMoveStyle style);
void setCursorPosition(int pos);
string displayText(); // read-only
void setDragEnabled(bool enabled);
void setEchoMode(EchoMode mode);
void setFrame(bool enabled);
bool hasSelectedText(); // read-only
void setInputMask(string mask);
void setMaxLength(int length);
// not sure about these two, might not need the setter?
bool isModified();
void setModified(bool modified);
void setPlaceholderText(string text);
void setReadOnly(bool value);
bool isRedoAvailable(); // read-only
string selectedText(); // read-only
void setText(string text);
bool isUndoAvailable(); // read-only
void setSignalMask(SignalMask mask);
}
Handle create(SignalHandler handler);