offerComplete pops up a menu of possible completions
()
| 1205 | |
| 1206 | // offerComplete pops up a menu of possible completions |
| 1207 | func (tf *TextField) offerComplete() { |
| 1208 | if tf.complete == nil { |
| 1209 | return |
| 1210 | } |
| 1211 | s := string(tf.editText[0:tf.cursorPos]) |
| 1212 | cpos := tf.charRenderPos(tf.cursorPos, true).ToPoint() |
| 1213 | cpos.X += 5 |
| 1214 | cpos.Y = tf.Geom.TotalBBox.Max.Y |
| 1215 | tf.complete.SrcLn = 0 |
| 1216 | tf.complete.SrcCh = tf.cursorPos |
| 1217 | tf.complete.Show(tf, cpos, s) |
| 1218 | } |
| 1219 | |
| 1220 | // cancelComplete cancels any pending completion -- call this when new events |
| 1221 | // have moved beyond any prior completion scenario |
no test coverage detected