summaryrefslogtreecommitdiffstatshomepage
path: root/lineedit.go
diff options
context:
space:
mode:
authorAlexander Neumann <an2048@gmail.com>2013-07-24 19:02:48 +0200
committerAlexander Neumann <an2048@gmail.com>2013-07-24 19:02:48 +0200
commit8681459fc4038788ccb0e65c1e43c8f8c3f3fcce (patch)
tree173f44ce826031d368b09d40cee7f0e2c7c9f0cc /lineedit.go
parentAdd stock icons, fixes #61 (diff)
downloadwireguard-windows-8681459fc4038788ccb0e65c1e43c8f8c3f3fcce.tar.xz
wireguard-windows-8681459fc4038788ccb0e65c1e43c8f8c3f3fcce.zip
Introduce Window and WindowBase as base for all windows
Diffstat (limited to 'lineedit.go')
-rw-r--r--lineedit.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/lineedit.go b/lineedit.go
index 6d937955..54a296d7 100644
--- a/lineedit.go
+++ b/lineedit.go
@@ -25,10 +25,10 @@ type LineEdit struct {
charWidth int
}
-func newLineEdit(parent Widget) (*LineEdit, error) {
+func newLineEdit(parent Window) (*LineEdit, error) {
le := new(LineEdit)
- if err := InitWidget(
+ if err := InitWindow(
le,
parent,
"EDIT",
@@ -112,11 +112,11 @@ func (le *LineEdit) SetMaxLength(value int) {
}
func (le *LineEdit) Text() string {
- return widgetText(le.hWnd)
+ return windowText(le.hWnd)
}
func (le *LineEdit) SetText(value string) error {
- return setWidgetText(le.hWnd, value)
+ return setWindowText(le.hWnd, value)
}
func (le *LineEdit) TextSelection() (start, end int) {
@@ -227,8 +227,8 @@ func (le *LineEdit) WndProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintp
}
case WM_GETDLGCODE:
- if root := rootWidget(le); root != nil {
- if dlg, ok := root.(dialogish); ok {
+ if form := ancestor(le); form != nil {
+ if dlg, ok := form.(dialogish); ok {
if dlg.DefaultButton() != nil {
// If the LineEdit lives in a Dialog that has a DefaultButton,
// we won't swallow the return key.