aboutsummaryrefslogtreecommitdiffstats
path: root/app/dialog.go
blob: 8ec6405ab59e85e45461e1cf90d4c641c0697b4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package app

import (
	"git.sr.ht/~rjarry/aerc/lib/ui"
)

type Dialog interface {
	ui.DrawableInteractive
	ContextHeight() (func(int) int, func(int) int)
}

type dialog struct {
	ui.DrawableInteractive
	y func(int) int
	h func(int) int
}

func (d *dialog) ContextHeight() (func(int) int, func(int) int) {
	return d.y, d.h
}

func NewDialog(d ui.DrawableInteractive, y func(int) int, h func(int) int) Dialog {
	return &dialog{DrawableInteractive: d, y: y, h: h}
}