func (c *CheckBox) ProcessEvent(event Event) bool {
	if (!c.Active() && event.Type == EventKey) || !c.Enabled() {
		return false
	}

	if (event.Type == EventKey && event.Key == term.KeySpace) || (event.Type == EventClick) {
		if c.state == 0 {
			c.SetState(1)
		} else if c.state == 2 {
			c.SetState(0)
		} else {
			if c.allow3state {
				c.SetState(2)
			} else {
				c.SetState(0)
			}
		}
		return true
	}

	return false
}
func (c *CheckBox) ProcessEvent(event Event) bool {
	if (!c.Active() && event.Type == EventKey) || !c.Enabled() {
		return false
	}

	if (event.Type == EventKey && event.Key == term.KeySpace) || (event.Type == EventClick) {
		if c.state == 0 {
			c.SetState(1)
		} else if c.state == 2 {
			c.SetState(0)
		} else {
			if c.allow3state {
				c.SetState(2)
			} else {
				c.SetState(0)
			}
		}
		return true
	}

	return false
}
func ( c * CheckBox ) ProcessEvent ( event Event ) bool { if ( ! c . Active ( ) && event . Type == EventKey ) || ! c . Enabled ( ) { return false } if ( event . Type == EventKey && event . Key == term . KeySpace ) || ( event . Type == EventClick ) { if c . state == 0 { c . SetState ( 1 ) } else if c . state == 2 { c . SetState ( 0 ) } else { if c . allow3state { c . SetState ( 2 ) } else { c . SetState ( 0 ) } } return true } return false }
//ProcessEvent processes all events come from the control parent. If a control
//   processes an event it should return true. If the method returns false it means
//   that the control do not want or cannot process the event and the caller sends
//   the event to the control parent
ProcessEvent processes all events come from the control parent . If a control processes an event it should return true . If the method returns false it means that the control do not want or cannot process the event and the caller sends the event to the control parent