Golang NewArea - 已找到6个示例。
这些是从开源项目中提取的最受好评的github.com/andlabs/ui.NewArea现实Golang示例。
您可以评价示例,以帮助我们提高示例质量。
Togglenavigation
HotExamplesZHENRUDEFRESPTITJPZH
GoPHPC#JavaGoC++PythonJSTS
搜索GolangNewArea示例GolangNewArea-已找到6个示例。
这些是从开源项目中提取的最受好评的github.com/andlabs/ui.NewArea现实Golang示例。
您可以评价示例,以帮助我们提高示例质量。
编程语言:Golang命名空间/包名称:github.com/andlabs/ui方法/功能:NewAreahotexamples.com的示例:6reportthisad相关NewHeatMapJsonResultExistsPopulateQueryParametersIsValidPriorityglGetTexParameterfvFindConfigCheckIfUserExistsBytesToStringAttachServerreportthisadRelatedinlangsMysqlStorageManager(PHP)common_rememberme(PHP)Core.Services.MailService(C#)Book(C#)layer_get_frame(C++)vasprintf(C++)StudentDTO(Java)MainActivity(Java)ProfileEditForm(Python)glPushMatrix(Python)reportthisad示例#11显示文件文件:
main.go
项目:
plumbum/go-samplesfuncinitGUI(){
/*
ff:=ui.ListFontFamilies()
fori:=0;i100{
progressCounter=0
}
}
}()
timeTicker:=time.NewTicker(time.Millisecond*10)
gofunc(){
fort:=rangetimeTicker.C{
//Чтобызаписатьзначениеввиджетиспользуемпотокобезопасныйвызов
ui.QueueMain(func(){
labelTime.SetText(t.Format(time.StampMilli))
})
}
}()
hystogrammTicker:=time.NewTicker(time.Millisecond*500)
gofunc(){
for_=rangehystogrammTicker.C{
//Чтобызаписатьзначениеввиджетиспользуемпотокобезопасныйвызов
ui.QueueMain(func(){
areaHandler.Push(rand.Intn(100))
area.QueueRedrawAll()
})
}
}()
log.Println("InitGUIdone")
}示例#20显示文件文件:
main.go
项目:
BenLubar/videofuncshowPreview(img*image.RGBA){
w2=ui.NewWindow("Stuff",img.Bounds().Dx(),img.Bounds().Dy(),ui.NewArea(img.Bounds().Dx(),img.Bounds().Dy(),(*imageArea)(img)))
w2.OnClosing(func()bool{
ui.Stop()
returntrue
})
w2.Show()
}示例#30显示文件文件:
uidoc.go
项目:
duckbrain/uidoc//CreatesanewUIDoccontrol.Thiscanbeaddedtoaui.Window,ui.Box,etc.
funcNew()*UIDoc{
r:=&UIDoc{}
r.area=ui.NewScrollingArea(&drawHandler{r},400,400)
r.measureArea=ui.NewArea(&measureHandler{r})
r.box=ui.NewVerticalBox()
toolbarContainer:=ui.NewHorizontalBox()
toolbarHeightRetainer:=ui.NewHorizontalSeparator()
toolbarContainer.Append(toolbarHeightRetainer,false)
toolbarContainer.Append(r.measureArea,true)
r.box.Append(r.area,true)
r.box.Append(toolbarContainer,false)
returnr
}示例#40显示文件文件:
song.go
项目:
Depado/gofip//Createsthetabforthespecifiedsong.CallsupdateLabelsandupdateCover
//withthecreateargumenttotrue.Definestwogrids:igridandogrid
//igridcontainsallthelabels
//ogridgroupstheareacontainingtheimagehandlerandtheigrid
func(s*song)createTab(){
s.generateLabels(true)
s.generateCover(true)
//InsideGrid
igrid:=ui.NewGrid()
igrid.Add(s.title,nil,ui.South,false,ui.LeftTop,false,ui.LeftTop,1,1)
igrid.Add(s.album,nil,ui.South,false,ui.LeftTop,false,ui.LeftTop,1,1)
igrid.Add(s.artist,nil,ui.South,false,ui.LeftTop,false,ui.LeftTop,1,1)
igrid.Add(s.year,nil,ui.South,false,ui.LeftTop,false,ui.LeftTop,1,1)
//OutsideGrid
ogrid:=ui.NewGrid()
ogrid.Add(ui.NewArea(100,100,&areaHandler{s.cover}),nil,ui.South,false,ui.LeftTop,true,ui.LeftTop,1,1)
ogrid.Add(igrid,nil,ui.East,false,ui.LeftTop,true,ui.LeftTop,1,1)
s.stack=ui.NewVerticalStack(ogrid)
}示例#50显示文件文件:
main.go
项目:
NotBadPad/uifuncinitGUI(){
b:=ui.NewButton("Button")
c:=ui.NewCheckbox("Checkbox")
tf:=ui.NewTextField()
tf.SetText("TextField")
pf:=ui.NewPasswordField()
pf.SetText("PasswordField")
l:=ui.NewStandaloneLabel("Label")
t:=ui.NewTab()
t.Append("Tab1",ui.Space())
t.Append("Tab2",ui.Space())
t.Append("Tab3",ui.Space())
g:=ui.NewGroup("Group",ui.Space())
icons,il:=readIcons()
table:=ui.NewTable(reflect.TypeOf(icons[0]))
table.Lock()
d:=table.Data().(*[]icon)
*d=icons
table.Unlock()
table.LoadImageList(il)
area:=ui.NewArea(200,200,&areaHandler{tileImage(20)})
stack:=ui.NewVerticalStack(
b,
c,
tf,
pf,
l,
t,
g,
table,
area)
stack.SetStretchy(5)
stack.SetStretchy(6)
stack.SetStretchy(7)
stack.SetStretchy(8)
w=ui.NewWindow("Window",400,500,stack)
w.OnClosing(func()bool{
ui.Stop()
returntrue
})
w.Show()
}示例#60显示文件文件:
main.go
项目:
JamesDunne/eminor2funcmain(){
simulation.Init()
timer_10ms:=time.Tick(10*time.Millisecond)
goui.Do(func(){
widthFloat:=float64(inWidth*dpi)
heightFloat:=float64(inHeight*dpi)
width:=int(widthFloat)
height:=int(heightFloat)
//Giveourselvesadrawablecanvas:
canvas:=&canvasArea{
img:image.NewRGBA(image.Rect(0,0,width,height)),
}
area:=ui.NewArea(width,height,canvas)
w:=ui.NewWindow("e-minorv2",width+8*2,height+28*2,area)
w.SetMargined(false)
w.OnClosing(func()bool{
ui.Stop()
returntrue
})
w.Show()
//This*should*beinthemainUImessageloop,butthe'ui'packagedoesnotexposethemessageloop.
gofunc(){
for{
select{
case