David Vogel
0dda9f7767
- Remove license headers - Update example pages - Move ButtonNav into navigation package as SidebarEntry - Add sidebar collapse and hide functionality - Add click event - Add click handler to button - Add ButtonFullscreen to navigation package - Fix resulting suffix space in CodeInline - Fix CSS class of Code - Update icon sketches.cdr
22 lines
514 B
Go
22 lines
514 B
Go
package input
|
|
|
|
import "github.com/vugu/vugu"
|
|
|
|
type ClickEvent struct {
|
|
vugu.DOMEvent
|
|
}
|
|
|
|
// ClickHandler is the interface for things that can handle ClickEvent.
|
|
type ClickHandler interface {
|
|
ClickHandle(event ClickEvent)
|
|
}
|
|
|
|
// ClickFunc implements ClickHandler as a function.
|
|
type ClickFunc func(event ClickEvent)
|
|
|
|
// ClickHandle implements the ClickHandler interface.
|
|
func (f ClickFunc) ClickHandle(event ClickEvent) { f(event) }
|
|
|
|
// assert ClickFunc implements ClickHandler.
|
|
var _ ClickHandler = ClickFunc(nil)
|