summaryrefslogtreecommitdiff
path: root/listbox.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-25 22:17:26 -0400
committerPietro Gagliardi <[email protected]>2014-06-25 22:17:26 -0400
commit057f0eaf53f2f7f40113e4a0952750d85f689521 (patch)
tree309e5c880b40b70d605f129a6901a75ef98b4f98 /listbox.go
parente4992dbcb2292a07c7d901dbe21f2d40f6af7a95 (diff)
Migrated existing controls to the new sizing system.
Diffstat (limited to 'listbox.go')
-rw-r--r--listbox.go20
1 files changed, 14 insertions, 6 deletions
diff --git a/listbox.go b/listbox.go
index dc4cb70..cd7aab1 100644
--- a/listbox.go
+++ b/listbox.go
@@ -150,16 +150,24 @@ func (l *Listbox) make(window *sysData) (err error) {
return nil
}
-func (l *Listbox) setRect(x int, y int, width int, height int, rr *[]resizerequest) {
- *rr = append(*rr, resizerequest{
- sysData: l.sysData,
+func (l *Listbox) allocate(x int, y int, width int, height int, d *sysSizeData) []*allocation {
+ return []*allocation{&allocation{
x: x,
y: y,
width: width,
height: height,
- })
+ this: l,
+ }}
}
-func (l *Listbox) preferredSize() (width int, height int, yoff int) {
- return l.sysData.preferredSize()
+func (l *Listbox) preferredSize(d *sysSizeData) (width int, height int) {
+ return l.sysData.preferredSize(d)
+}
+
+func (l *Listbox) commitResize(a *allocation, d *sysSizeData) {
+ l.sysData.preferredSize(a, d)
+}
+
+func (l *Listbox) getAuxResizeInfo(d *sysSizeData) {
+ l.sysData.getAuxResizeInfo(d)
}