• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang termui.TermHeight函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/gizak/termui.TermHeight函数的典型用法代码示例。如果您正苦于以下问题:Golang TermHeight函数的具体用法?Golang TermHeight怎么用?Golang TermHeight使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了TermHeight函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: doLiveGraph

//doLiveGraph builds a graph in the terminal window that
//updates every graphUpdate seconds
//It will build up to maxGraphs graphs with one time-series
//per graph
func doLiveGraph(res *wavefront.QueryResponse, query *wavefront.Querying, period int64) {

	err := ui.Init()
	if err != nil {
		log.Fatal(err)
	}
	defer ui.Close()

	if maxGraphs > len(res.TimeSeries) {
		maxGraphs = len(res.TimeSeries)
	}

	var wDivisor, hDivisor int
	switch maxGraphs {
	case 1:
		wDivisor = 1
		hDivisor = 1
	case 2:
		wDivisor = 2
		hDivisor = 1
	case 3, 4:
		wDivisor = 2
		hDivisor = 2
	}

	height := ui.TermHeight() / hDivisor
	width := ui.TermWidth() / wDivisor
	xVals, yVals := calculateCoords(maxGraphs, ui.TermWidth()/wDivisor, ui.TermHeight()/hDivisor)
	graphs := buildGraphs(res, height, width, xVals, yVals)

	ui.Render(graphs...)
	ui.Handle("/sys/kbd/q", func(ui.Event) {
		// press q to quit
		ui.StopLoop()
	})

	ui.Handle("/sys/kbd/C-c", func(ui.Event) {
		// handle Ctrl + c combination
		ui.StopLoop()
	})

	ui.Handle("/timer/1s", func(e ui.Event) {
		query.SetEndTime(time.Now())
		query.SetStartTime(period)
		res, err := query.Execute()
		if err != nil {
			log.Fatal(err)
		}
		graphs := buildGraphs(res, height, width, xVals, yVals)
		ui.Render(graphs...)
	})

	ui.Loop()

}
开发者ID:spaceapegames,项目名称:go-wavefront,代码行数:59,代码来源:query.go


示例2: readMessage

func readMessage(message *imap.MessageInfo) {
	set := new(imap.SeqSet)
	set.AddNum(message.Seq)
	cmd, err := imap.Wait(c.Fetch(set, BODY_PART_NAME))
	panicMaybe(err)

	reader, err := messageReader(cmd.Data[0].MessageInfo())
	panicMaybe(err)

	scanner := bufio.NewScanner(reader)
	var lines []string
	for scanner.Scan() {
		lines = append(lines, scanner.Text())
	}
	messageBodyStr := strings.Join(lines[:min(len(lines), ui.TermHeight()-2)], "\n")

	if len(messageBodyStr) <= 0 {
		LOG.Printf("Message body was empty or could not be retrieved: +%v\n", err)
		return
	}

	msgBox := ui.NewPar(messageBodyStr)
	msgBox.Border.Label = "Reading Message"
	msgBox.Height = ui.TermHeight()
	msgBox.Width = ui.TermWidth()
	msgBox.Y = 0
	ui.Render(msgBox)

	topLineIndex := 0

	redraw := make(chan bool)

	for {
		select {
		case e := <-ui.EventCh():
			switch e.Key {
			case ui.KeyArrowDown:
				topLineIndex = max(0, min(
					len(lines)-msgBox.Height/2,
					topLineIndex+1))
				go func() { redraw <- true }()
			case ui.KeyArrowUp:
				topLineIndex = max(0, topLineIndex-1)
				go func() { redraw <- true }()
			case ui.KeyEsc:
				// back to "list messages"
				return
			}
		case <-redraw:
			messageBodyStr = strings.Join(lines[topLineIndex+1:], "\n")
			msgBox.Text = messageBodyStr
			ui.Render(msgBox)
		}
	}
}
开发者ID:llvtt,项目名称:gomail,代码行数:55,代码来源:readmail.go


示例3: Create

func (p *LabelListPage) Create() {
	ui.Clear()
	ls := ui.NewList()
	p.uiList = ls
	if p.statusBar == nil {
		p.statusBar = new(StatusBar)
	}
	if p.commandBar == nil {
		p.commandBar = commandBar
	}
	queryName := p.ActiveQuery.Name
	queryJQL := p.ActiveQuery.JQL
	p.labelCounts = countLabelsFromQuery(queryJQL)
	p.cachedResults = p.labelsAsSortedList()
	p.isPopulated = true
	p.displayLines = make([]string, len(p.cachedResults))
	ls.ItemFgColor = ui.ColorYellow
	ls.BorderLabel = fmt.Sprintf("Label view -- %s: %s", queryName, queryJQL)
	ls.Height = ui.TermHeight() - 2
	ls.Width = ui.TermWidth()
	ls.Y = 0
	p.statusBar.Create()
	p.commandBar.Create()
	p.Update()
}
开发者ID:Feriority,项目名称:go-jira-ui,代码行数:25,代码来源:label_list_page.go


示例4: BuildUI

func BuildUI() {
	ui.Init()
	defer ui.Close()

	receiveBox := CreateReceiveBox()
	sendBox := CreateSendBox()
	ui.Body.AddRows(
		ui.NewRow(ui.NewCol(12, 0, receiveBox)),
		ui.NewRow(ui.NewCol(12, 0, sendBox)),
	)

	ui.Body.Align()
	ui.Render(ui.Body)

	ui.Handle("/sys/kbd/C-x", func(e ui.Event) {
		ui.StopLoop()
	})

	ui.Handle("/timer/1s", func(e ui.Event) {
		ReceiveBoxHeight = ui.TermHeight() - SendBoxHeight
		receiveBox.Height = ReceiveBoxHeight
		ui.Body.Align()
		ui.Render(ui.Body)
	})

	// Leaving this commented out for now
	// I'd like to get this method of screen refreshing working instead of the 1s method,
	// but this crashes on resize.
	// ui.Handle("/sys/wnd/resize", func(e ui.Event) {
	//   ui.Body.Align()
	//   ui.Render(ui.Body)
	// })

	ui.Loop()
}
开发者ID:mhoc,项目名称:river,代码行数:35,代码来源:ui.go


示例5: Create

func (p *TicketListPage) Create() {
	log.Debugf("TicketListPage.Create(): self:        %s (%p)", p.Id(), p)
	log.Debugf("TicketListPage.Create(): currentPage: %s (%p)", currentPage.Id(), currentPage)
	ui.Clear()
	ls := ui.NewList()
	p.uiList = ls
	if p.statusBar == nil {
		p.statusBar = new(StatusBar)
	}
	if p.commandBar == nil {
		p.commandBar = commandBar
	}
	query := p.ActiveQuery.JQL
	if sort := p.ActiveSort.JQL; sort != "" {
		re := regexp.MustCompile(`(?i)\s+ORDER\s+BY.+$`)
		query = re.ReplaceAllString(query, ``) + " " + sort
	}
	if len(p.cachedResults) == 0 {
		p.cachedResults = JiraQueryAsStrings(query, p.ActiveQuery.Template)
	}
	if p.selectedLine >= len(p.cachedResults) {
		p.selectedLine = len(p.cachedResults) - 1
	}
	p.displayLines = make([]string, len(p.cachedResults))
	ls.ItemFgColor = ui.ColorYellow
	ls.BorderLabel = fmt.Sprintf("%s: %s", p.ActiveQuery.Name, p.ActiveQuery.JQL)
	ls.Height = ui.TermHeight() - 2
	ls.Width = ui.TermWidth()
	ls.Y = 0
	p.statusBar.Create()
	p.commandBar.Create()
	p.Update()
}
开发者ID:Feriority,项目名称:go-jira-ui,代码行数:33,代码来源:ticket_list_page.go


示例6: resize

func (ed *Editor) resize() {
	termui.Body.Width = termui.TermWidth()

	ed.applets.Height = termui.TermHeight() - 2 + 1 // offset 1 for border
	ed.desc.Y = ed.locked.Y + ed.locked.Height - 1  // offset 1 for border
	ed.desc.Height = termui.TermHeight() - ed.desc.Y - 2
	ed.title.Y = termui.TermHeight() - 2

	ed.title.Width = termui.TermWidth() + 1                     // offset 1 for border
	ed.appinfo.Width = termui.TermWidth() - ed.appinfo.X + 1    // offset 1 for border
	ed.locked.Width = termui.TermWidth() - ed.applets.Width + 1 // offset 1 for border
	ed.desc.Width = termui.TermWidth() - ed.applets.Width + 1   // offset 1 for border
	ed.desc.WrapLength = ed.desc.Width

	termui.Render(ed.applets, ed.fields, ed.appinfo, ed.locked, ed.desc, ed.title)
}
开发者ID:sqp,项目名称:godock,代码行数:16,代码来源:editui.go


示例7: initHomeLeft

func (ui *tatui) initHomeLeft() {

	textURL := viper.GetString("url")
	if textURL == "" {
		textURL = "[Invalid URL, please check your config file](fg-red)"
	}

	p := termui.NewPar(`                            TEXT AND TAGS
            ----------------------------------------------
            ----------------------------------------------
                     |||                     |||
                     |||                     |||
                     |||         |||         |||
                     |||         |||         |||
                     |||                     |||
                     |||         |||         |||
                     |||         |||         |||
                     |||                     |||
                     |||                     |||

                       Tatcli Version: ` + internal.VERSION + `
                    https://github.com/ovh/tatcli
                TAT Engine: https://github.com/ovh/tat
								Current Tat Engine: ` + textURL + `
								Current config file: ` + internal.ConfigFile + `
 Shortcuts:
 - Ctrl + a to view all topics. Cmd /topics in send box
 - Ctrl + b to go back to messsages list, after selected a message
 - Ctrl + c clears filters and UI on current messages list
 - Ctrl + f to view favorites topics. Cmd /favorites
 - Ctrl + h to go back home. Cmd /home or /help
 - Ctrl + t hide or show top menu. Cmd /toggle-top
 - Ctrl + y hide or show actionbox menu. Cmd /toggle-bottom
 - Ctrl + o open current message on tatwebui with a browser. Cmd /open
	          Use option tatwebui-url in config file. See /set-tatwebui-url
 - Ctrl + p open links in current message with a browser. Cmd /open-links
 - Ctrl + j / Ctrl + k (for reverse action):
	    if mode run is enabled, set a msg from open to doing,
	        from doing to done from done to open.
	    if mode monitoring is enabled, set a msg from UP to AL,
	        from AL to UP.
 - Ctrl + q to quit. Cmd /quit
 - Ctrl + r to view unread topics. Cmd /unread
 - Ctrl + u display/hide usernames in messages list. Cmd /toggle-usernames
 - UP / Down to move into topics & messages list
 - UP / Down to navigate through history of action box
 - <tab> to go to next section on screen`)

	p.Height = termui.TermHeight() - uiHeightTop - uiHeightSend
	p.TextFgColor = termui.ColorWhite
	p.BorderTop = true
	p.BorderLeft = false
	p.BorderBottom = false
	ui.homeLeft = p
}
开发者ID:ovh,项目名称:tatcli,代码行数:55,代码来源:home.go


示例8: Create

func (p *CommandBar) Create() {
	ls := ui.NewList()
	p.uiList = ls
	ls.ItemFgColor = ui.ColorGreen
	ls.Border = false
	ls.Height = 1
	ls.Width = ui.TermWidth()
	ls.X = 0
	ls.Y = ui.TermHeight() - 1
	p.Update()
}
开发者ID:Feriority,项目名称:go-jira-ui,代码行数:11,代码来源:command_bar.go


示例9: adjustDimensions

func adjustDimensions() {
	termui.Body.Width = termui.TermWidth()
	height := termui.TermHeight()
	parMap["moveHistory"].Height = height - 23 - 4
	parMap["output"].Height = height - 23
	if height < 31 {
		parMap["board"].Height = height - 8
		parMap["moveHistory"].Height = 2
		parMap["output"].Height = 6
	}
}
开发者ID:marktai,项目名称:T9-Terminal,代码行数:11,代码来源:ui.go


示例10: Create

func (p *TicketShowPage) Create() {
	log.Debugf("TicketShowPage.Create(): self:        %s (%p)", p.Id(), p)
	log.Debugf("TicketShowPage.Create(): currentPage: %s (%p)", currentPage.Id(), currentPage)
	p.opts = getJiraOpts()
	if p.TicketId == "" {
		p.TicketId = ticketListPage.GetSelectedTicketId()
	}
	if p.MaxWrapWidth == 0 {
		if m := p.opts["max_wrap"]; m != nil {
			p.MaxWrapWidth = uint(m.(int64))
		} else {
			p.MaxWrapWidth = defaultMaxWrapWidth
		}
	}
	ui.Clear()
	ls := ui.NewList()
	if p.statusBar == nil {
		p.statusBar = new(StatusBar)
	}
	if p.commandBar == nil {
		p.commandBar = commandBar
	}
	p.uiList = ls
	if p.Template == "" {
		if templateOpt := p.opts["template"]; templateOpt == nil {
			p.Template = "jira_ui_view"
		} else {
			p.Template = templateOpt.(string)
		}
	}
	innerWidth := uint(ui.TermWidth()) - 3
	if innerWidth < p.MaxWrapWidth {
		p.WrapWidth = innerWidth
	} else {
		p.WrapWidth = p.MaxWrapWidth
	}
	if p.apiBody == nil {
		p.apiBody, _ = FetchJiraTicket(p.TicketId)
	}
	p.cachedResults = WrapText(JiraTicketAsStrings(p.apiBody, p.Template), p.WrapWidth)
	p.displayLines = make([]string, len(p.cachedResults))
	if p.selectedLine >= len(p.cachedResults) {
		p.selectedLine = len(p.cachedResults) - 1
	}
	ls.ItemFgColor = ui.ColorYellow
	ls.Height = ui.TermHeight() - 2
	ls.Width = ui.TermWidth()
	ls.Border = true
	ls.BorderLabel = fmt.Sprintf("%s %s", p.TicketId, p.ticketTrailAsString())
	ls.Y = 0
	p.statusBar.Create()
	p.commandBar.Create()
	p.Update()
}
开发者ID:Feriority,项目名称:go-jira-ui,代码行数:54,代码来源:ticket_show_page.go


示例11: Create

func (p *StatusBar) Create() {
	ls := ui.NewList()
	p.uiList = ls
	ls.ItemFgColor = ui.ColorWhite
	ls.ItemBgColor = ui.ColorRed
	ls.Bg = ui.ColorRed
	ls.Border = false
	ls.Height = 1
	ls.Width = ui.TermWidth()
	ls.X = 0
	ls.Y = ui.TermHeight() - 2
	p.Update()
}
开发者ID:Feriority,项目名称:go-jira-ui,代码行数:13,代码来源:status_bar.go


示例12: Create

func (p *BaseListPage) Create() {
	ui.Clear()
	ls := ui.NewList()
	p.uiList = ls
	p.cachedResults = make([]string, 0)
	p.displayLines = make([]string, len(p.cachedResults))
	ls.ItemFgColor = ui.ColorYellow
	ls.BorderLabel = "Updating, please wait"
	ls.Height = ui.TermHeight()
	ls.Width = ui.TermWidth()
	ls.Y = 0
	p.Update()
}
开发者ID:Feriority,项目名称:go-jira-ui,代码行数:13,代码来源:base_list_page.go


示例13: initHomeRight

func (ui *tatui) initHomeRight() {
	p := termui.NewPar(`Action Box

  Keywords:
   - /help display this page
   - /me show information about you
   - /version to show tatcli and engine version

  On messages list:
   - /label eeeeee yourLabel to add a label on selected message
   - /unlabel yourLabel to remove label "yourLabel" on selected message
   - /voteup, /votedown, /unvoteup, /unvotedown to vote up or down, or remove vote
   - /task, /untask to add or remove selected message as a personal task
   - /like, /unlike to add or remove like on selected message
   - /filter label:labelA,labelB andtag:tag,tagb
   - /mode (run|monitoring): enable Ctrl + l shortcut, see on left side for help
   - /codereview splits screen into fours panes:
     label:OPENED label:APPROVED label:MERGED label:DECLINED
   - /monitoring splits screen into three panes: label:UP, label:AL, notlabel:AL,UP
     This is the same as two commands:
      - /split label:UP label:AL notlabel:AL,UP
      - /mode monitoring
   - /run <tag> splits screen into three panes: label:open, label:doing, label:done
     /run AA,BB is the same as two commands:
      - /split tag:AA,BB;label:open tag:AA,BB;label:doing tag:AA,BB;label:done
      - /mode run
   - /set-tatwebui-url <urlOfTatWebUI> sets tatwebui-url in tatcli config file. This
      url is used by Ctrl + o shortcut to open message with a tatwebui instance.
   - /split <criteria> splits screen with one section per criteria delimited by space, ex:
      /split label:labelA label:labelB label:labelC
      /split label:labelA,labelB andtag:tag,tagb
      /split tag:myTag;label:labelA,labelB andtag:tag,tagb;label:labelC
   - /save saves current filters in tatcli config file
   - /toggle-usernames displays or hides username in messages list

  For /split and /filter, see all parameters on https://github.com/ovh/tat#parameters

  On topics list, ex:
   - /filter topic:/Private/firstname.lastname
  			see all parameters on https://github.com/ovh/tat#parameters-4

`)

	p.Height = termui.TermHeight() - uiHeightTop - uiHeightSend
	p.TextFgColor = termui.ColorWhite
	p.BorderTop = true
	p.BorderLeft = false
	p.BorderRight = false
	p.BorderBottom = false
	ui.homeRight = p
}
开发者ID:ovh,项目名称:tatcli,代码行数:51,代码来源:home.go


示例14: Create

func (p *BaseInputBox) Create() {
	ls := ui.NewList()
	var strs []string
	p.uiList = ls
	ls.Items = strs
	ls.ItemFgColor = ui.ColorGreen
	ls.BorderFg = ui.ColorRed
	ls.Height = 1
	ls.Width = 30
	ls.Overflow = "wrap"
	ls.X = ui.TermWidth()/2 - ls.Width/2
	ls.Y = ui.TermHeight()/2 - ls.Height/2
	p.Update()
}
开发者ID:Feriority,项目名称:go-jira-ui,代码行数:14,代码来源:base_input_box.go


示例15: Create

func (p *PasswordInputBox) Create() {
	ls := ui.NewList()
	p.uiList = ls
	var strs []string
	ls.Items = strs
	ls.ItemFgColor = ui.ColorGreen
	ls.BorderLabel = "Enter Password:"
	ls.BorderFg = ui.ColorRed
	ls.Height = 3
	ls.Width = 30
	ls.X = ui.TermWidth()/2 - ls.Width/2
	ls.Y = ui.TermHeight()/2 - ls.Height/2
	p.Update()
}
开发者ID:Feriority,项目名称:go-jira-ui,代码行数:14,代码来源:password_input_box.go


示例16: refresh

func refresh() {
	prompt.Text = promptMsg

	nreport := ui.TermHeight() - 13
	ls.Height = nreport
	if len(reportItems) > nreport*reportPage {
		// can seek to the page
		ls.Items = reportItems[nreport*reportPage : len(reportItems)]
	} else {
		ls.Items = []string{}
	}

	ui.Body.Align()
	ui.Render(ui.Body)
}
开发者ID:ZhiqinYang,项目名称:gom,代码行数:15,代码来源:gom.go


示例17: setupBody

func setupBody() {

	height := termui.TermHeight() - 23

	prompt := termui.NewPar("")
	prompt.Height = 1
	prompt.Border = false
	parMap["prompt"] = prompt

	input := termui.NewPar("")
	input.Height = 3
	input.BorderLabel = "Input"
	input.BorderFg = termui.ColorYellow
	parMap["input"] = input

	moveHistory := termui.NewPar("")
	moveHistory.Height = height - 4
	moveHistory.BorderLabel = "Move History"
	moveHistory.BorderFg = termui.ColorBlue
	parMap["moveHistory"] = moveHistory
	linesMap["moveHistory"] = NewLines()

	output := termui.NewPar("")
	output.Height = height
	output.BorderLabel = "Output"
	output.BorderFg = termui.ColorGreen
	parMap["output"] = output
	linesMap["output"] = NewLines()

	board := termui.NewPar("")
	board.Height = 23
	board.Width = 37
	board.BorderLabel = "Board"
	board.BorderFg = termui.ColorRed
	parMap["board"] = board

	// build layout
	termui.Body.AddRows(
		termui.NewRow(
			termui.NewCol(6, 0, parMap["prompt"], parMap["input"], parMap["moveHistory"]),
			termui.NewCol(6, 0, parMap["output"]),
		),
		termui.NewRow(
			termui.NewCol(12, 0, parMap["board"]),
		),
	)
	changeState(0)
}
开发者ID:marktai,项目名称:T9-Terminal,代码行数:48,代码来源:ui.go


示例18: showSubreddit

func showSubreddit(subredditName string) error {
	r := geddit.NewSession("r by /u/bnadland")

	submissions, err := r.SubredditSubmissions(subredditName, geddit.HotSubmissions, geddit.ListingOptions{})
	if err != nil {
		return err
	}

	isActive := true

	cursor := 3
	for isActive {

		entries := []string{}
		for i, submission := range submissions {
			entries = append(entries, fmt.Sprintf("%s %s", isActiveCursor(cursor, i), submission.Title))
		}

		ls := termui.NewList()
		ls.Items = entries
		ls.ItemFgColor = termui.ColorDefault
		ls.Border.Label = fmt.Sprintf("Subreddit: %s", subredditName)
		ls.Height = termui.TermHeight()
		ls.Width = termui.TermWidth()
		ls.Y = 0
		termui.Render(ls)
		event := <-termui.EventCh()
		if event.Type == termui.EventKey {
			switch event.Key {
			case termui.KeyArrowLeft:
				isActive = false
			case termui.KeyArrowDown:
				cursor = cursor + 1
				if cursor > len(submissions) {
					cursor = len(submissions)
				}
			case termui.KeyArrowUp:
				cursor = cursor - 1
				if cursor < 0 {
					cursor = 0
				}
			}
		}
	}
	return nil
}
开发者ID:bnadland,项目名称:r,代码行数:46,代码来源:main.go


示例19: main

func main() {
	if len(os.Args) < 2 {
		log.Fatal("Usage: ", os.Args[0], " <sparkyfish server hostname/IP>[:port]")
	}

	dest := os.Args[1]
	i := last(dest, ':')
	if i < 0 {
		dest = fmt.Sprint(dest, ":7121")
	}

	// Initialize our screen
	err := termui.Init()
	if err != nil {
		panic(err)
	}

	if termui.TermWidth() < 60 || termui.TermHeight() < 28 {
		fmt.Println("sparkyfish needs a terminal window at least 60x28 to run.")
		os.Exit(1)
	}

	defer termui.Close()

	// 'q' quits the program
	termui.Handle("/sys/kbd/q", func(termui.Event) {
		termui.StopLoop()
	})
	// 'Q' also works
	termui.Handle("/sys/kbd/Q", func(termui.Event) {
		termui.StopLoop()
	})

	sc := newsparkyClient()
	sc.serverHostname = dest

	sc.prepareChannels()

	sc.wr = newwidgetRenderer()

	// Begin our tests
	go sc.runTestSequence()

	termui.Loop()
}
开发者ID:mephux,项目名称:sparkyfish,代码行数:45,代码来源:sparkyfish-cli.go


示例20: initMessage

func (ui *tatui) initMessage() {
	strs := []string{"[Loading...](fg-black,bg-white)"}

	ls := termui.NewList()
	ls.BorderTop, ls.BorderLeft, ls.BorderRight, ls.BorderBottom = true, false, false, false
	ls.Items = strs
	ls.ItemFgColor = termui.ColorWhite
	ls.BorderLabel = "Message"
	ls.Overflow = "wrap"
	ls.Width = 25
	ls.Y = 0
	ls.Height = termui.TermHeight() - uiHeightTop - uiHeightSend
	_, ok := ui.uilists[uiMessages][ui.selectedPaneMessages]
	if ok && ui.uilists[uiMessages][ui.selectedPaneMessages].position >= 0 && ui.uilists[uiMessages][ui.selectedPaneMessages].position < len(ui.currentListMessages[ui.selectedPaneMessages]) {
		ui.currentMessage = ui.currentListMessages[ui.selectedPaneMessages][ui.uilists[uiMessages][ui.selectedPaneMessages].position]
		ui.uilists[uiMessage][0] = &uilist{uiType: uiMessage, list: ls, position: 0, page: 0, update: ui.updateMessage}
	}
}
开发者ID:ovh,项目名称:tatcli,代码行数:18,代码来源:message.go



注:本文中的github.com/gizak/termui.TermHeight函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang termui.TermWidth函数代码示例发布时间:2022-05-23
下一篇:
Golang termui.StopLoop函数代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap