Beispiel #1
0
func (t *textEntry) SetSelection(from int, to int) {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_SetSelection(p, C.long(from), C.long(to))
}
Beispiel #2
0
func (t *textEntry) InsertionPoint() int {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return 0
	}
	return int(C.wxTextEntry_GetInsertionPoint(p))
}
Beispiel #3
0
func (t *textEntry) Hint() string {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return ""
	}
	return goString(C.wxTextEntry_GetHint(p))
}
Beispiel #4
0
func (t *textEntry) AutoComplete(choices []string) bool {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return false
	}
	return goBool(C.wxTextEntry_AutoComplete(p, cStringSlice(&choices)))
}
Beispiel #5
0
func (t *textEntry) StringSelection() string {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return ""
	}
	return goString(C.wxTextEntry_GetStringSelection(p))
}
Beispiel #6
0
func (t *textEntry) SetHint(hint string) bool {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return false
	}
	return goBool(C.wxTextEntry_SetHint(p, cString(&hint)))
}
Beispiel #7
0
func (t *textEntry) CanUndo() bool {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return false
	}
	return goBool(C.wxTextEntry_CanUndo(p))
}
Beispiel #8
0
func (t *textEntry) Cut() {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_Cut(p)
}
Beispiel #9
0
func (t *textEntry) SetInsertionPoint(pos int) {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_SetInsertionPoint(p, C.long(pos))
}
Beispiel #10
0
func (t *textEntry) WriteText(text string) {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_WriteText(p, cString(&text))
}
Beispiel #11
0
func (t *textEntry) Replace(from int, to int, value string) {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_Replace(p, C.long(from), C.long(to), cString(&value))
}
Beispiel #12
0
func (t *textEntry) SetEditable(editable bool) {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_SetEditable(p, cBool(editable))
}
Beispiel #13
0
func (t *textEntry) Remove(from int, to int) {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_Remove(p, C.long(from), C.long(to))
}
Beispiel #14
0
func (t *textEntry) Paste() {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_Paste(p)
}
Beispiel #15
0
func (t *textEntry) IsEmpty() bool {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return false
	}
	return goBool(C.wxTextEntry_IsEmpty(p))
}
Beispiel #16
0
func (t *textEntry) Margins() *Point {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return nil
	}
	return goPoint(C.wxTextEntry_GetMargins(p))
}
Beispiel #17
0
func (t *textEntry) SetInsertionPointEnd() {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_SetInsertionPointEnd(p)
}
Beispiel #18
0
func (t *textEntry) Undo() {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_Undo(p)
}
Beispiel #19
0
func (t *textEntry) SetMaxLength(len uint) {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_SetMaxLength(p, C.ulong(len))
}
Beispiel #20
0
func (t *textEntry) SetMargins(left int, top int) bool {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return false
	}
	return goBool(C.wxTextEntry_SetMargins(p, C.int(left), C.int(top)))
}
Beispiel #21
0
func (t *textEntry) Range(from int, to int) string {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return ""
	}
	return goString(C.wxTextEntry_GetRange(p, C.long(from), C.long(to)))
}
Beispiel #22
0
func (t *textEntry) ChangeValue(value string) {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_ChangeValue(p, cString(&value))
}
Beispiel #23
0
func (t *textEntry) SelectNone() {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	C.wxTextEntry_SelectNone(p)
}
Beispiel #24
0
func (t *textEntry) LastPosition() int {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return 0
	}
	return int(C.wxTextEntry_GetLastPosition(p))
}
Beispiel #25
0
func (t *textEntry) Selection() (from int, to int) {
	p := C.WxTextEntryPtr(pointer(t))
	if p == nil {
		return
	}
	var (
		fromLong, toLong C.long
	)
	C.wxTextEntry_GetSelection(p, &fromLong, &toLong)
	return int(fromLong), int(toLong)
}