From 1badd5368128f5fef3e12b800f40a276a7553c4a Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 5 Aug 2014 17:46:42 -0400 Subject: Renamed textField to textfield; this is just for the private implementation. --- redo/textfield_unix.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'redo/textfield_unix.go') diff --git a/redo/textfield_unix.go b/redo/textfield_unix.go index 8f609f5..e802947 100644 --- a/redo/textfield_unix.go +++ b/redo/textfield_unix.go @@ -13,59 +13,59 @@ import ( // extern void checkboxToggled(GtkToggleButton *, gpointer); import "C" -type textField struct { +type textfield struct { _widget *C.GtkWidget entry *C.GtkEntry } -func startNewTextField() *textField { +func startNewTextField() *textfield { widget := C.gtk_entry_new() - return &textField{ + return &textfield{ _widget: widget, entry: (*C.GtkEntry)(unsafe.Pointer(widget)), } } -func newTextField() *textField { +func newTextField() *textfield { return startNewTextField() } -func newPasswordField() *textField { +func newPasswordField() *textfield { t := startNewTextField() C.gtk_entry_set_visibility(t.entry, C.FALSE) return t } -func (t *textField) Text() string { +func (t *textfield) Text() string { return fromgstr(C.gtk_entry_get_text(t.entry)) } -func (t *textField) SetText(text string) { +func (t *textfield) SetText(text string) { ctext := togstr(text) defer freegstr(ctext) C.gtk_entry_set_text(t.entry, ctext) } -func (t *textField) widget() *C.GtkWidget { +func (t *textfield) widget() *C.GtkWidget { return t._widget } -func (t *textField) setParent(p *controlParent) { +func (t *textfield) setParent(p *controlParent) { basesetParent(t, p) } -func (t *textField) allocate(x int, y int, width int, height int, d *sizing) []*allocation { +func (t *textfield) allocate(x int, y int, width int, height int, d *sizing) []*allocation { return baseallocate(t, x, y, width, height, d) } -func (t *textField) preferredSize(d *sizing) (width, height int) { +func (t *textfield) preferredSize(d *sizing) (width, height int) { return basepreferredSize(t, d) } -func (t *textField) commitResize(a *allocation, d *sizing) { +func (t *textfield) commitResize(a *allocation, d *sizing) { basecommitResize(t, a, d) } -func (t *textField) getAuxResizeInfo(d *sizing) { +func (t *textfield) getAuxResizeInfo(d *sizing) { basegetAuxResizeInfo(t, d) } -- cgit v1.2.3