diff options
| author | Pietro Gagliardi <[email protected]> | 2016-05-30 00:14:46 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2016-05-30 00:14:46 -0400 |
| commit | 52f7d276a6bb04b8827ac019ad1e135b43819cea (patch) | |
| tree | 5f0ebbfdf5885ef832e77e243b5916e59f46ba18 /prev/textbox_windows.go | |
| parent | c9b32c1333e4009b342eedc5f5b39127a724fb42 (diff) | |
Removed prev/.
Diffstat (limited to 'prev/textbox_windows.go')
| -rw-r--r-- | prev/textbox_windows.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/prev/textbox_windows.go b/prev/textbox_windows.go deleted file mode 100644 index 0a68052..0000000 --- a/prev/textbox_windows.go +++ /dev/null @@ -1,40 +0,0 @@ -// 23 october 2014 - -package ui - -// #include "winapi_windows.h" -import "C" - -type textbox struct { - *controlSingleHWNDWithText -} - -// TODO autohide scrollbars -func newTextbox() Textbox { - hwnd := C.newControl(editclass, - // TODO ES_AUTOHSCROLL/ES_AUTOVSCROLL as well? - // TODO word wrap - C.ES_LEFT | C.ES_MULTILINE | C.ES_NOHIDESEL | C.ES_WANTRETURN | C.WS_HSCROLL | C.WS_VSCROLL, - C.WS_EX_CLIENTEDGE) - t := &textbox{ - controlSingleHWNDWithText: newControlSingleHWNDWithText(hwnd), - } - t.fpreferredSize = t.xpreferredSize - C.controlSetControlFont(t.hwnd) - return t -} - -func (t *textbox) Text() string { - return t.text() -} - -func (t *textbox) SetText(text string) { - t.setText(text) -} - -// just reuse the preferred textfield width -// TODO allow alternate widths -// TODO current height probably can be better calculated -func (t *textbox) xpreferredSize(d *sizing) (width, height int) { - return fromdlgunitsX(textfieldWidth, d), fromdlgunitsY(textfieldHeight, d) * 3 -} |
