// EditInlineButton edit the outgoing message's inline button
167621
func (c *Context) EditInlineButton(om *OutgoingMessage, kbState string, buttonData string, newButtonText string) error {
	return c.EditInlineStateButton(om, kbState, 0, buttonData, 0, newButtonText)

}
936195
func (element *Element) inline() error {
	// compute declarations
	declarations, err := element.computeDeclarations()
	if err != nil {
		return err
	}

	// set style attribute
	styleValue := computeStyleValue(declarations)
	if styleValue != "" {
		element.elt.SetAttr("style", styleValue)
	}

	// set additionnal attributes
	element.setAttributesFromStyle(declarations)

	return nil
}
411299
func (f *Fpdf) SetLineJoinStyle(styleStr string) {
	var joinStyle int
	switch styleStr {
	case "round":
		joinStyle = 1
	case "bevel":
		joinStyle = 2
	default:
		joinStyle = 0
	}
	f.joinStyle = joinStyle
	if f.page > 0 {
		f.outf("%d j", f.joinStyle)
	}
}
864736
func (c *Context) EditInlineKeyboard(om *OutgoingMessage, fromState string, kb InlineKeyboard) error {

	bot := c.Bot()
	if om.MsgID != 0 {
		log.WithField("msgID", om.MsgID).Debug("EditMessageTextAndInlineKeyboard")
	} else {
		om.ChatID = 0
		log.WithField("inlineMsgID", om.InlineMsgID).Debug("EditMessageTextAndInlineKeyboard")
	}
	var msg OutgoingMessage

	_, err := c.db.C("messages").Find(bson.M{"_id": om.ID, "$or": []bson.M{{"inlinekeyboardmarkup.state": fromState}, {"inlinekeyboardmarkup": bson.M{"$exists": false}}}}).Apply(mgo.Change{Update: bson.M{"$set": bson.M{"inlinekeyboardmarkup": kb}}}, &msg)

	if msg.BotID == 0 {
		return fmt.Errorf("EditInlineKeyboard – message (botid=%v id=%v state %s) not found", bot.ID, om.MsgID, fromState)
	}

	tgKeyboard := kb.tg()
	prevTGKeyboard := om.InlineKeyboardMarkup.tg()
	if whetherTGInlineKeyboardsAreEqual(prevTGKeyboard, tgKeyboard) {
		c.Log().Debugf("EditMessageTextAndInlineKeyboard – message (_id=%s botid=%v id=%v state %s) not updated both text and kb have not changed", om.ID, bot.ID, om.MsgID, fromState)
		return nil
	}

	_, err = bot.API.Send(tg.EditMessageReplyMarkupConfig{
		BaseEdit: tg.BaseEdit{
			ChatID:          om.ChatID,
			MessageID:       om.MsgID,
			InlineMessageID: om.InlineMsgID,
			ReplyMarkup:     &tg.InlineKeyboardMarkup{InlineKeyboard: tgKeyboard},
		},
	})

	if err != nil {
		if err.(tg.Error).IsCantAccessChat() || err.(tg.Error).ChatMigrated() {
			if c.Callback != nil {
				c.AnswerCallbackQuery("Message can be outdated. Bot can't edit messages created before converting to the Super Group", false)
			}
		} else if err.(tg.Error).IsAntiFlood() {
			c.Log().WithError(err).Warn("TG Anti flood activated")
		}
		// Oops. error is occurred – revert the original keyboard
		err := c.db.C("messages").Update(bson.M{"_id": msg.ID}, bson.M{"$set": bson.M{"inlinekeyboardmarkup": msg.InlineKeyboardMarkup}})
		return err
	}

	return nil

}
419387
func logoutButton(r *messenger.Response) error {
	buttons := &[]messenger.StructuredMessageButton{
		{
			Type: "account_unlink",
		},
	}
	return r.ButtonTemplate("Unlink your account.", buttons, messenger.ResponseType)
}
1069194
func (s *CodeSigningCertificateChain) SetInlineDocument(v string) *CodeSigningCertificateChain {
	s.InlineDocument = &v
	return s
}
556155
func drawButton(out *command.Buffer, bounds rect.Rect, state nstyle.WidgetStates, style *nstyle.Button) *nstyle.Item {
	var background *nstyle.Item
	if state&nstyle.WidgetStateHovered != 0 {
		background = &style.Hover
	} else if state&nstyle.WidgetStateActive != 0 {
		background = &style.Active
	} else {
		background = &style.Normal
	}

	if background.Type == nstyle.ItemImage {
		out.DrawImage(bounds, background.Data.Image)
	} else {
		out.FillRect(bounds, style.Rounding, style.BorderColor)
		out.FillRect(shrinkRect(bounds, style.Border), style.Rounding, background.Data.Color)
	}

	return background
}
398531
func (a *DispatchMouseEventArgs) SetButton(button string) *DispatchMouseEventArgs {
	a.Button = &button
	return a
}
1207117
func (c *CodebaseController) Edit(ctx *app.EditCodebaseContext) error {
	listWorkspacesContext := app.ListWorkspacesCodebaseContext{ctx.Context, ctx.ResponseData, ctx.RequestData, ctx.CodebaseID}
	return c.ListWorkspaces(&listWorkspacesContext)
}
794699
func NewEditMessageText(chatID int64, messageID int, text string) EditMessageTextConfig {
	return EditMessageTextConfig{
		BaseEdit: BaseEdit{
			ChatID:    chatID,
			MessageID: messageID,
		},
		Text: text,
	}
}
1369349
func InlineEdit(I18n *i18n.I18n, locale string, isInline bool) func(string, ...interface{}) template.HTML {
	return func(key string, args ...interface{}) template.HTML {
		// Get Translation Value
		var value template.HTML
		var defaultValue string
		if len(args) > 0 {
			if args[0] == nil {
				defaultValue = key
			} else {
				defaultValue = fmt.Sprint(args[0])
			}
			value = I18n.Default(defaultValue).T(locale, key, args[1:]...)
		} else {
			value = I18n.T(locale, key)
		}

		// Append inline-edit script/tag
		if isInline {
			var editType string
			if len(value) > 25 {
				editType = "data-type=\"textarea\""
			}
			prefix := I18n.Resource.GetAdmin().GetRouter().Prefix
			assetsTag := fmt.Sprintf("<script data-prefix=\"%v\" src=\"%v/assets/javascripts/i18n-checker.js?theme=i18n\"></script>", prefix, prefix)
			return template.HTML(fmt.Sprintf("%s<span class=\"qor-i18n-inline\" %s data-locale=\"%s\" data-key=\"%s\">%s</span>", assetsTag, editType, locale, key, string(value)))
		}
		return value
	}
}
1258265
func (w *Window) UpdateInput() {
	mainthread.Call(func() {
		glfw.PollEvents()
	})

	w.prevInp = w.currInp
	w.currInp = w.tempInp

	w.tempInp.repeat = [KeyLast + 1]bool{}
	w.tempInp.scroll = pixel.ZV
	w.tempInp.typed = ""

	w.updateJoystickInput()
}
1238110
func DrawButton(x, y int, text string, active bool) {
	color := BUTTONTEXT
	if active {
		color = BUTTONFOCUS
	}
	Write(x, y, "<  ", color, BG)
	Write(x+3, y, text, color, BG)
	Write(x+3+len(text), y, "  >", color, BG)
}
293268
func (btn *Button) SetMiniprogramButton(name, url, appID, pagePath string) {
	btn.Type = "miniprogram"
	btn.Name = name
	btn.URL = url
	btn.AppID = appID
	btn.PagePath = pagePath

	btn.Key = ""
	btn.MediaID = ""
	btn.SubButtons = nil
}
1002977
func (p *PostRef) Edit(params url.Values) error {
	return EditPost(p.client, p.BlogName, p.Id, params)
}
659346
func (inliner *Inliner) Inline() (string, error) {
	// parse HTML document
	if err := inliner.parseHTML(); err != nil {
		return "", err
	}

	// parse stylesheets
	if err := inliner.parseStylesheets(); err != nil {
		return "", err
	}

	// collect elements and style rules
	inliner.collectElementsAndRules()

	// inline css
	if err := inliner.inlineStyleRules(); err != nil {
		return "", err
	}

	// insert raw stylesheet
	inliner.insertRawStylesheet()

	// generate HTML document
	return inliner.genHTML()
}
1252788
func (bot *BotAPI) AnswerInlineQuery(config InlineConfig) (APIResponse, error) {
	v := url.Values{}

	v.Add("inline_query_id", config.InlineQueryID)
	v.Add("cache_time", strconv.Itoa(config.CacheTime))
	v.Add("is_personal", strconv.FormatBool(config.IsPersonal))
	v.Add("next_offset", config.NextOffset)
	data, err := json.Marshal(config.Results)
	if err != nil {
		return APIResponse{}, err
	}
	v.Add("results", string(data))
	v.Add("switch_pm_text", config.SwitchPMText)
	v.Add("switch_pm_parameter", config.SwitchPMParameter)

	bot.debugLog("answerInlineQuery", v, nil)

	return bot.MakeRequest("answerInlineQuery", v)
}