// Pressed returns whether the Button is currently pressed down.
184193
func (w *Window) Pressed(button Button) bool {
	return w.currInp.buttons[button]
}
670442
func (s *Stack) Push(value interface{}) *Stack {
	s.values.PushBack(value)
	return s
}
986699
func (m *Meta) WasTouched(field string) bool {
	m.detectTouchedFlags()
	ptr, ok := m.fieldsMap()[field]
	if !ok {
		panic(fmt.Sprintf("no such meta field %s", field))
	}
	_, yes := m.touched[ptr]
	return yes
}
520986
func (h Handler) Touch(cmd common.TouchRequest) error {
	_, err := h.doRequest(cmd, common.RequestTouch)
	return err
}
398531
func (a *DispatchMouseEventArgs) SetButton(button string) *DispatchMouseEventArgs {
	a.Button = &button
	return a
}
601697
func (s *stack) Push(vs ...interface{}) {
	s.values = append(s.values, vs...)
}
1189674
func (w *compressWriter) Push(target string, opts *http.PushOptions) error {
	if w, ok := w.ResponseWriter.(http.Pusher); ok {
		return w.Push(target, opts)
	}
	return http.ErrNotSupported
}
402545
func (c *Connection) connected(status bool) {
	c.connectedLock.Lock()
	defer c.connectedLock.Unlock()
	c.Connected = status
}
1047841
func (self *Form) send(buttonName, buttonValue string) bool {

	values := make(url.Values, len(self.fields)+1)
	for name, vals := range self.fields {
		values[name] = vals
	}
	if buttonName != "" {
		values.Set(buttonName, buttonValue)
	}
	valsStr := values.Encode()
	if self.Method() == "GET" {
		self.ctx.AddQueue(&request.Request{
			Rule:   self.rule,
			Url:    self.Action() + "?" + valsStr,
			Method: self.Method(),
		})
		return true
	} else {
		enctype, _ := self.selection.Attr("enctype")
		if enctype == "multipart/form-data" {
			self.ctx.AddQueue(&request.Request{
				Rule:     self.rule,
				Url:      self.Action(),
				PostData: valsStr,
				Method:   "POST-M",
			})
			return true
		}
		self.ctx.AddQueue(&request.Request{
			Rule:     self.rule,
			Url:      self.Action(),
			PostData: valsStr,
			Method:   self.Method(),
		})
		return true
	}

	return false
}
1167619
func ButtonMiddle(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
	return p.WithButton(input.ButtonMiddle)
}
175096
func (btn Button) String() string {
	ret := "<button" + btn.Attrs()
	if len(btn.PostBack) > 0 {
		ret += " onclick=\"sendEvent(" + params(btn.PostBack) + ")\""
	}
	ret += ">"
	if btn.HTMLEncode {
		ret += html.EscapeString(btn.Text)
	} else {
		ret += btn.Text
	}
	ret += "</button>"
	return ret
}
1249284
func KeyPress(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "keypress", Listener: listener}
}
180750
func (q *Queue) Push(object interface{}) error {
	q.Lock()
	defer q.Unlock()

	if q.maxLen == 0 || q.len() < q.maxLen {
		q.queue = append(q.queue, object)
		return nil
	}

	// q.maxLen > 0 && q.len() == q.maxLen

	switch q.mode {
	case modeNormal:
		return ErrQueueOverflowed
	case modeDrop:
		if _, err := q.pop(); err != nil {
			return ErrFailedToDrop(err)
		}
		q.queue = append(q.queue, object)
		return nil
	}
	return nil
}
28137
func (c *Context) EditPressedInlineButton(newState int, newText string) error {
	log.WithField("newText", newText).WithField("newState", newState).Info("EditPressedInlineButton")
	if c.Callback == nil {
		return errors.New("EditPressedInlineButton: Callback is not presented")
	}

	return c.EditInlineStateButton(c.Callback.Message, c.Callback.Message.InlineKeyboardMarkup.State, c.Callback.State, c.Callback.Data, newState, newText)
}
1367511
func Push(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "push", Listener: listener}
}
855625
func Submit(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "submit", Listener: listener}
}
19722
func (buttons *InlineButtons) Append(data string, text string) {
	if len(data) > 64 {
		log.WithField("text", text).Errorf("InlineButton data '%s' extends 64 bytes limit", data)
	}
	*buttons = append(*buttons, InlineButton{Data: data, Text: text})
}