<p>I realize there isn't a mature GUI lib available at this time but I was wondering if there a good choice out there now with the following capabilities?</p>
<ul>
<li>scrollable viewport in window.<br/></li>
<li>draw lines, polygons, circles, rectangles </li>
<li>line width and color control on all objects</li>
<li>draw text and calculate text widths and heights</li>
<li>handle mouse and key events</li>
</ul>
<p>This is for a commercial application so I ruled out Qt because of the license cost. </p>
<p>Thanks in advance for any suggestions you might have.</p>
<hr/>**评论:**<br/><br/>peterhellberg: <pre><p>The short answer is unfortunately no.</p>
<p>Are you considering rendering the interface using OpenGL? Would a browser based interface (using for example Electron) work for your use case?</p></pre>dfab54: <pre><p>I would consider either if they would provide the capabilities mentioned above. The viewport would be a view into a large cad drawing. I have looked at Nuklear and the go language bindings but I'm not sure if it would work for my application. I do like the idea of immediate mode GUIs. I also heard that the performance when scrolling large drawings with browser based GUIs is not good. </p>
<p>What do you think? </p></pre>mwholt: <pre><p>At dotGo last year, Dmitri Shuralyov gave a demo of a WebGL app written in Go running natively in the browser and natively on Mac -- not that you have to use GopherJS, but just pointing out that if you use the right technologies, 3D rendering in the browser isn't too bad.</p></pre>peterhellberg: <pre><p>It sounds like you would need hardware accelerated rendering of the interface in either case. And having an immediate mode GUI toolkit would probably be useful. Not sure how well Go-bindings to stuff like Nuklear work as of now. (And what benefit you would get over just writing the interface part of the application in the native language of your platform)</p>
<p>You are right about there being some performance issues when it comes to rendering more complex stuff in an embedded browser framework, you'll probably have to experiment for a bit.</p></pre>SupersonicSpitfire: <pre><p>I thought Qt was completely open source now?</p></pre>goomba_gibbon: <pre><p>Not sure what licence qt uses but it might require payment for commercial use and still be open source.</p></pre>tk8333: <pre><p>U can use Qt for closed source app without paying anything, It's LGPLv3 so you have to dynlink to it, that's the restriction</p></pre>goomba_gibbon: <pre><p>Thanks</p></pre>SupersonicSpitfire: <pre><p>No, you can choose between a commercial license, LGPL or GPL.</p></pre>SupersonicSpitfire: <pre><p>If you use open source software, how can they require payment?</p></pre>goomba_gibbon: <pre><p>I assumed there were some restrictive licenses that meant, although the source was public, the commercial use was restricted. It seems that's the definition of open source!</p>
<p>I stand corrected.</p></pre>weberc2: <pre><p>I'm not sure, but QML might be able to get you where you need to go. I'm not aware of any licensing restrictions aside from perhaps dynamic linking.</p></pre>int32_t: <pre><p>What is your target platform?</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传