Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func HasMod ¶
func HasMod(e EventWithModifiers, m Modifier) bool
Types ¶
type EventType ¶
type EventType C.vtk_event_type
const ( Close EventType = C.VTK_EV_CLOSE Draw EventType = C.VTK_EV_DRAW KeyPress EventType = C.VTK_EV_KEY_PRESS KeyRelease EventType = C.VTK_EV_KEY_RELEASE MouseMove EventType = C.VTK_EV_MOUSE_MOVE MousePress EventType = C.VTK_EV_MOUSE_PRESS MouseRelease EventType = C.VTK_EV_MOUSE_RELEASE Resize EventType = C.VTK_EV_RESIZE Scroll EventType = C.VTK_EV_SCROLL )
type EventWithModifiers ¶
type EventWithModifiers interface {
Mods() Modifier
}
type Key ¶
const ( Backspace Key = C.VTK_K_BACKSPACE Tab Key = C.VTK_K_TAB Return Key = C.VTK_K_RETURN Escape Key = C.VTK_K_ESCAPE Space Key = C.VTK_K_SPACE Delete Key = C.VTK_K_DELETE Insert Key = C.VTK_K_INSERT PageUp Key = C.VTK_K_PAGE_UP PageDown Key = C.VTK_K_PAGE_DOWN Home Key = C.VTK_K_HOME End Key = C.VTK_K_END Up Key = C.VTK_K_UP Down Key = C.VTK_K_DOWN Left Key = C.VTK_K_LEFT Right Key = C.VTK_K_RIGHT )
func KeyFromString ¶
type KeyEvent ¶
type KeyEvent C.struct_vtk_key_event
type Modifier ¶
type Modifier C.vtk_modifiers
const ( Shift Modifier = C.VTK_M_SHIFT CapsLock Modifier = C.VTK_M_CAPS_LOCK Control Modifier = C.VTK_M_CONTROL Alt Modifier = C.VTK_M_ALT Super Modifier = C.VTK_M_SUPER LeftButton Modifier = C.VTK_M_LEFT_BTN MiddleButton Modifier = C.VTK_M_MIDDLE_BTN RightButton Modifier = C.VTK_M_RIGHT_BTN )
func ModifierFromString ¶
type MouseButtonEvent ¶
type MouseButtonEvent C.struct_vtk_mouse_button_event
func (MouseButtonEvent) Btn ¶
func (b MouseButtonEvent) Btn() Modifier
func (MouseButtonEvent) Mods ¶
func (b MouseButtonEvent) Mods() Modifier
func (MouseButtonEvent) Pos ¶
func (m MouseButtonEvent) Pos() (x, y int)
func (MouseButtonEvent) Type ¶
func (b MouseButtonEvent) Type() EventType
type MouseMoveEvent ¶
type MouseMoveEvent C.struct_vtk_mouse_move_event
func (MouseMoveEvent) Mods ¶
func (m MouseMoveEvent) Mods() Modifier
func (MouseMoveEvent) Pos ¶
func (m MouseMoveEvent) Pos() (x, y int)
func (MouseMoveEvent) Type ¶
func (m MouseMoveEvent) Type() EventType
type ScrollEvent ¶
type ScrollEvent C.struct_vtk_scroll_event
func (ScrollEvent) Amount ¶
func (s ScrollEvent) Amount() float64
func (ScrollEvent) Type ¶
func (s ScrollEvent) Type() EventType
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func (Window) SetEventHandler ¶
Click to show internal directories.
Click to hide internal directories.