2014-07-30 01:06:01 -05:00
|
|
|
// 30 july 2014
|
|
|
|
|
|
|
|
package ui
|
|
|
|
|
2014-07-30 11:36:00 -05:00
|
|
|
// Control represents a control.
|
|
|
|
type Control interface {
|
2014-10-02 09:05:53 -05:00
|
|
|
setParent(p *controlParent) // controlParent defined per-platform
|
2014-07-30 11:36:00 -05:00
|
|
|
controlSizing
|
|
|
|
}
|
|
|
|
|
2014-08-03 08:18:35 -05:00
|
|
|
// this is the same across all platforms
|
|
|
|
func baseallocate(c Control, x int, y int, width int, height int, d *sizing) []*allocation {
|
|
|
|
return []*allocation{&allocation{
|
2014-10-02 09:05:53 -05:00
|
|
|
x: x,
|
|
|
|
y: y,
|
|
|
|
width: width,
|
|
|
|
height: height,
|
|
|
|
this: c,
|
2014-08-03 08:18:35 -05:00
|
|
|
}}
|
2014-07-30 19:38:01 -05:00
|
|
|
}
|