當前位置: 首頁>>代碼示例>>Golang>>正文


Golang Key.Name方法代碼示例

本文整理匯總了Golang中github.com/BurntSushi/wingo/wini.Key.Name方法的典型用法代碼示例。如果您正苦於以下問題:Golang Key.Name方法的具體用法?Golang Key.Name怎麽用?Golang Key.Name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/BurntSushi/wingo/wini.Key的用法示例。


在下文中一共展示了Key.Name方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: loadSlimOption

func loadSlimOption(X *xgbutil.XUtil, theme *theme, k wini.Key) {
	switch k.Name() {
	case "border_size":
		setInt(k, &theme.slim.borderSize)
	case "a_border_color":
		setNoGradient(k, &theme.slim.aBorderColor)
	case "i_border_color":
		setNoGradient(k, &theme.slim.iBorderColor)
	}
}
開發者ID:dlintw,項目名稱:wingo,代碼行數:10,代碼來源:theme.go

示例2: loadSlimOption

func loadSlimOption(theme *ThemeConfig, k wini.Key) {
	switch k.Name() {
	case "border_size":
		setInt(k, &theme.Slim.borderSize)
	case "a_border_color":
		setNoGradient(k, &theme.Slim.aBorderColor)
	case "i_border_color":
		setNoGradient(k, &theme.Slim.iBorderColor)
	}
}
開發者ID:BurntSushi,項目名稱:wingo,代碼行數:10,代碼來源:theme.go

示例3: loadBorderOption

func loadBorderOption(X *xgbutil.XUtil, theme *theme, k wini.Key) {
	switch k.Name() {
	case "border_size":
		setInt(k, &theme.borders.borderSize)
	case "a_thin_color":
		setNoGradient(k, &theme.borders.aThinColor)
	case "i_thin_color":
		setNoGradient(k, &theme.borders.iThinColor)
	case "a_border_color":
		setGradient(k, &theme.borders.aBorderColor)
	case "i_border_color":
		setGradient(k, &theme.borders.iBorderColor)
	}
}
開發者ID:dlintw,項目名稱:wingo,代碼行數:14,代碼來源:theme.go

示例4: loadBorderOption

func loadBorderOption(theme *ThemeConfig, k wini.Key) {
	switch k.Name() {
	case "border_size":
		setInt(k, &theme.Borders.borderSize)
	case "a_thin_color":
		setNoGradient(k, &theme.Borders.aThinColor)
	case "i_thin_color":
		setNoGradient(k, &theme.Borders.iThinColor)
	case "a_border_color":
		setGradient(k, &theme.Borders.aBorderColor)
	case "i_border_color":
		setGradient(k, &theme.Borders.iBorderColor)
	}
}
開發者ID:BurntSushi,項目名稱:wingo,代碼行數:14,代碼來源:theme.go

示例5: loadFullOption

func loadFullOption(theme *ThemeConfig, k wini.Key) {
	switch k.Name() {
	case "font":
		setFont(k, &theme.Full.font)
	case "font_size":
		setFloat(k, &theme.Full.fontSize)
	case "a_font_color":
		setNoGradient(k, &theme.Full.aFontColor)
	case "i_font_color":
		setNoGradient(k, &theme.Full.iFontColor)
	case "title_size":
		setInt(k, &theme.Full.titleSize)
	case "title_top_margin":
		logger.Warning.Printf("title_top_margin option has been removed.")
	case "a_title_color":
		setGradient(k, &theme.Full.aTitleColor)
	case "i_title_color":
		setGradient(k, &theme.Full.iTitleColor)
	case "close":
		setImage(k, &theme.Full.aCloseButton)
		setImage(k, &theme.Full.iCloseButton)
	case "a_close_color":
		setNoGradient(k, &theme.Full.aCloseColor)
	case "i_close_color":
		setNoGradient(k, &theme.Full.iCloseColor)
	case "maximize":
		setImage(k, &theme.Full.aMaximizeButton)
		setImage(k, &theme.Full.iMaximizeButton)
	case "a_maximize_color":
		setNoGradient(k, &theme.Full.aMaximizeColor)
	case "i_maximize_color":
		setNoGradient(k, &theme.Full.iMaximizeColor)
	case "minimize":
		setImage(k, &theme.Full.aMinimizeButton)
		setImage(k, &theme.Full.iMinimizeButton)
	case "a_minimize_color":
		setNoGradient(k, &theme.Full.aMinimizeColor)
	case "i_minimize_color":
		setNoGradient(k, &theme.Full.iMinimizeColor)
	case "border_size":
		setInt(k, &theme.Full.borderSize)
	case "a_border_color":
		setNoGradient(k, &theme.Full.aBorderColor)
	case "i_border_color":
		setNoGradient(k, &theme.Full.iBorderColor)
	}
}
開發者ID:BurntSushi,項目名稱:wingo,代碼行數:47,代碼來源:theme.go

示例6: loadPromptOption

func loadPromptOption(X *xgbutil.XUtil, theme *theme, k wini.Key) {
	switch k.Name() {
	case "bg_color":
		setNoGradient(k, &theme.prompt.bgColor)
	case "border_color":
		setNoGradient(k, &theme.prompt.borderColor)
	case "border_size":
		setInt(k, &theme.prompt.borderSize)
	case "padding":
		setInt(k, &theme.prompt.padding)
	case "font":
		setFont(k, &theme.prompt.font)
	case "font_size":
		setFloat(k, &theme.prompt.fontSize)
	case "font_color":
		setNoGradient(k, &theme.prompt.fontColor)
	case "cycle_icon_size":
		setInt(k, &theme.prompt.cycleIconSize)
	case "cycle_icon_border_size":
		setInt(k, &theme.prompt.cycleIconBorderSize)
	case "cycle_icon_transparency":
		setInt(k, &theme.prompt.cycleIconTransparency)

		// naughty!
		if theme.prompt.cycleIconTransparency < 0 ||
			theme.prompt.cycleIconTransparency > 100 {
			logger.Warning.Printf("Illegal value '%s' provided for " +
				"'cycle_icon_transparency'. Transparency " +
				"values must be in the range [0, 100], " +
				"inclusive. Using 100 by default.")
			theme.prompt.cycleIconTransparency = 100
		}
	case "select_active_font_color":
		setNoGradient(k, &theme.prompt.selectActiveFontColor)
	case "select_active_bg_color":
		setNoGradient(k, &theme.prompt.selectActiveBgColor)
	case "select_group_bg_color":
		setNoGradient(k, &theme.prompt.selectGroupBgColor)
	case "select_group_font":
		setFont(k, &theme.prompt.selectGroupFont)
	case "select_group_font_size":
		setFloat(k, &theme.prompt.selectGroupFontSize)
	case "select_group_font_color":
		setNoGradient(k, &theme.prompt.selectGroupFontColor)
	}
}
開發者ID:dlintw,項目名稱:wingo,代碼行數:46,代碼來源:theme.go

示例7: loadFullOption

func loadFullOption(X *xgbutil.XUtil, theme *theme, k wini.Key) {
	switch k.Name() {
	case "font":
		setFont(k, &theme.full.font)
	case "font_size":
		setFloat(k, &theme.full.fontSize)
	case "a_font_color":
		setNoGradient(k, &theme.full.aFontColor)
	case "i_font_color":
		setNoGradient(k, &theme.full.iFontColor)
	case "title_size":
		setInt(k, &theme.full.titleSize)
	case "a_title_color":
		setGradient(k, &theme.full.aTitleColor)
	case "i_title_color":
		setGradient(k, &theme.full.iTitleColor)
	case "close":
		setImage(X, k, &theme.full.aCloseButton)
		setImage(X, k, &theme.full.iCloseButton)
	case "a_close_color":
		setNoGradient(k, &theme.full.aCloseColor)
	case "i_close_color":
		setNoGradient(k, &theme.full.iCloseColor)
	case "maximize":
		setImage(X, k, &theme.full.aMaximizeButton)
		setImage(X, k, &theme.full.iMaximizeButton)
	case "a_maximize_color":
		setNoGradient(k, &theme.full.aMaximizeColor)
	case "i_maximize_color":
		setNoGradient(k, &theme.full.iMaximizeColor)
	case "minimize":
		setImage(X, k, &theme.full.aMinimizeButton)
		setImage(X, k, &theme.full.iMinimizeButton)
	case "a_minimize_color":
		setNoGradient(k, &theme.full.aMinimizeColor)
	case "i_minimize_color":
		setNoGradient(k, &theme.full.iMinimizeColor)
	case "border_size":
		setInt(k, &theme.full.borderSize)
	case "a_border_color":
		setNoGradient(k, &theme.full.aBorderColor)
	case "i_border_color":
		setNoGradient(k, &theme.full.iBorderColor)
	}
}
開發者ID:dlintw,項目名稱:wingo,代碼行數:45,代碼來源:theme.go

示例8: loadMiscOption

func loadMiscOption(X *xgbutil.XUtil, theme *theme, k wini.Key) {
	switch k.Name() {
	case "default_icon":
		setImage(X, k, &theme.defaultIcon)
	}
}
開發者ID:dlintw,項目名稱:wingo,代碼行數:6,代碼來源:theme.go

示例9: loadMiscOption

func loadMiscOption(theme *ThemeConfig, k wini.Key) {
	switch k.Name() {
	case "default_icon":
		setImage(k, &theme.DefaultIcon)
	}
}
開發者ID:BurntSushi,項目名稱:wingo,代碼行數:6,代碼來源:theme.go


注:本文中的github.com/BurntSushi/wingo/wini.Key.Name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。