﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-银色月光下-文章分类-GUI</title><link>http://www.cppblog.com/lichking/category/20833.html</link><description>漫漫长夜</description><language>zh-cn</language><lastBuildDate>Fri, 15 Jul 2016 16:15:58 GMT</lastBuildDate><pubDate>Fri, 15 Jul 2016 16:15:58 GMT</pubDate><ttl>60</ttl><item><title>一个新的UI-------YAUI</title><link>http://www.cppblog.com/lichking/articles/YAUI.html</link><dc:creator>lichking</dc:creator><author>lichking</author><pubDate>Thu, 17 Apr 2014 02:44:00 GMT</pubDate><guid>http://www.cppblog.com/lichking/articles/YAUI.html</guid><wfw:comment>http://www.cppblog.com/lichking/comments/206614.html</wfw:comment><comments>http://www.cppblog.com/lichking/articles/YAUI.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lichking/comments/commentRss/206614.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lichking/services/trackbacks/206614.html</trackback:ping><description><![CDATA[<h2><span style="font-weight: normal;"><span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;"><br /></span></span></h2><h2><span style="font-weight: normal;"><span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15px; line-height: 23.18181800842285px;">这是我最近完成的UI<br />(</span><span style="font-size: 14px; color: #333333;">https://github.com/TheWindX/YAUI</span><span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;">)</span></span></h2><h2>YAUI</h2><h2><span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;">YAUI（</span><strong style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px; box-sizing: border-box;">Y</strong><span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;">&nbsp;et&nbsp;</span><strong style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px; box-sizing: border-box;">A</strong><span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;">&nbsp;nother&nbsp;</span><strong style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px; box-sizing: border-box;">UI</strong><span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;">), 是一个新思路GUI系统, 它参考了传统GUI和HTML的设计</span></h2><p style="box-sizing: border-box; margin: 15px 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;">以下是它的特点:</p><ul style="box-sizing: border-box; padding: 0px 0px 0px 30px; margin: 15px 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;"><li style="box-sizing: border-box;">较完备的<strong style="box-sizing: border-box;">layout</strong>, GUI比较麻烦的地方，在于排版布局，YAUI的布局系统类似HTML;</li><li style="box-sizing: border-box;"><strong style="box-sizing: border-box;">组合性</strong>，并不直接提供高级控件(目前)，而是基础绘制图元，通过控件模板容易地组合出高级控件，属性继承的提供类似css的功能;</li><li style="box-sizing: border-box;"><strong style="box-sizing: border-box;">可捡图元</strong>对象和变换，可用于提供可视化对象的编辑功能;</li><li style="box-sizing: border-box;"><strong style="box-sizing: border-box;">XML</strong>&nbsp;layout desc, 使用<strong style="box-sizing: border-box;">query</strong>, 事件绑定;</li></ul><p style="box-sizing: border-box; margin: 15px 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;">代码示例;</p><pre style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 13px; margin-top: 15px; margin-bottom: 15px; background-color: #f8f8f8; border: 1px solid #dddddd; line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-wrap: normal; color: #333333;"><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin: 0px; border: none; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; padding: 0px; word-wrap: normal; display: inline; line-height: inherit;">  var strXML = @"
     &lt;div layout='vertical, shrink'&gt;
       &lt;label id='lb' text='touch me!'&gt;&lt;label&gt;<br />       &lt;label id='lb2' text='touch me again!'&gt;&lt;label&gt;<br />       &lt;label id='lb3' text='donnot touch me!'&gt;&lt;label&gt;<br />     &lt;/div&gt;";                                //layout  </code></pre><pre style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 13px; margin-top: 15px; margin-bottom: 15px; background-color: #f8f8f8; border: 1px solid #dddddd; line-height: 19px; overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-wrap: normal; color: #333333;"><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin: 0px; border: none; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; padding: 0px; word-wrap: normal; display: inline; line-height: inherit;">  var ui = UI.loadXML(strXML);<br />  var lb = ui.findByID('lb1') as UILable;    //query<br />  lb.text = "touch me!";                     //属性<br />  lb.evtClick = ()=&gt;print("i am touched!");  //事件 </code></pre><h2><a name="user-content-demo" href="https://github.com/TheWindX/YAUI#demo" style="box-sizing: border-box; color: rgb(65, 131, 196); text-decoration: none; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; cursor: pointer; position: absolute; top: 0px; left: 0px; bottom: 0px;"></a>demo</h2><p style="box-sizing: border-box; margin: 15px 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;"><a href="https://raw.githubusercontent.com/TheWindX/YAUI/master/demo.zip" style="box-sizing: border-box; color: #4183c4; text-decoration: none;">download</a></p><p style="box-sizing: border-box; margin: 15px 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;"><a href="https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo21.png" target="_blank" style="box-sizing: border-box; color: #4183c4; text-decoration: none;"><img src="https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo21.png" alt="demo pic" style="box-sizing: border-box; border: 0px; max-width: 100%;" /><br /></a><a href="https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo3.png" target="_blank" style="box-sizing: border-box; color: #4183c4; text-decoration: none;"><img src="https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo3.png" alt="demo pic" style="box-sizing: border-box; border: 0px; max-width: 100%;" /><br /></a><a href="https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo4.png" target="_blank" style="box-sizing: border-box; color: #4183c4; text-decoration: none;"><img src="https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo4.png" alt="demo pic" style="box-sizing: border-box; border: 0px; max-width: 100%;" /><br /></a><a href="https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo5.png" target="_blank" style="box-sizing: border-box; color: #4183c4; text-decoration: none;"><img src="https://raw.githubusercontent.com/TheWindX/YAUI/master/doc/demo5.png" alt="demo pic" style="box-sizing: border-box; border: 0px; max-width: 100%;" /><br /></a></p><h2><a name="user-content-todo-list" href="https://github.com/TheWindX/YAUI#todo-list" style="box-sizing: border-box; color: rgb(65, 131, 196); text-decoration: none; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; cursor: pointer; position: absolute; top: 0px; left: 0px; bottom: 0px;"></a>todo list</h2><ul style="box-sizing: border-box; padding: 0px 0px 0px 30px; margin: 15px 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;"><li style="box-sizing: border-box;">more feathers, 位图支持, 渐变色填充，xml定义控件，预置控件(window style)...</li><li style="box-sizing: border-box;">修改dirty rect 实现, 优化;</li><li style="box-sizing: border-box;">(visula) runtime, demo.</li><li style="box-sizing: border-box;">渲染支持，render by cairo or direct2D，direct3D/openGL/opengl es?</li><li style="box-sizing: border-box;">layered window? app UI system?</li><li style="box-sizing: border-box;">canvas(in html5) version?</li><li style="box-sizing: border-box;">c++ &amp; scripts version?</li></ul><h2><a name="user-content-version" href="https://github.com/TheWindX/YAUI#version" style="box-sizing: border-box; color: rgb(65, 131, 196); text-decoration: none; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; cursor: pointer; position: absolute; top: 0px; left: 0px; bottom: 0px;"></a>Version</h2><p style="box-sizing: border-box; margin: 15px 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;">0.1</p><h2><a name="user-content-license" href="https://github.com/TheWindX/YAUI#license" style="box-sizing: border-box; color: rgb(65, 131, 196); text-decoration: none; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; cursor: pointer; position: absolute; top: 0px; left: 0px; bottom: 0px;"></a>License</h2><p style="box-sizing: border-box; margin: 15px 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px;">MIT</p><h2><a name="user-content-me" href="https://github.com/TheWindX/YAUI#me" style="box-sizing: border-box; color: rgb(65, 131, 196); text-decoration: none; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; cursor: pointer; position: absolute; top: 0px; left: 0px; bottom: 0px;"></a>me</h2><blockquote style="box-sizing: border-box; margin-top: 15px; margin-right: 0px; margin-left: 0px; border-left-width: 4px; border-left-color: #dddddd; padding: 0px 15px; color: #777777; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 15.454545021057129px; line-height: 23.18181800842285px; margin-bottom: 0px !important;"><p style="box-sizing: border-box; margin: 0px 0px 15px;"><a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#108;&#120;&#102;&#48;&#53;&#50;&#53;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;" style="box-sizing: border-box; color: #4183c4; text-decoration: none;">lxf0525@gmail.com</a></p><p style="box-sizing: border-box; margin: 15px 0px 0px;"><a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#52;&#53;&#51;&#53;&#56;&#56;&#48;&#48;&#54;&#64;&#113;&#113;&#46;&#99;&#111;&#109;" style="box-sizing: border-box; color: #4183c4; text-decoration: none;">453588006@qq.com</a></p></blockquote><img src ="http://www.cppblog.com/lichking/aggbug/206614.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lichking/" target="_blank">lichking</a> 2014-04-17 10:44 <a href="http://www.cppblog.com/lichking/articles/YAUI.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>unity3D里制作2D</title><link>http://www.cppblog.com/lichking/articles/205937.html</link><dc:creator>lichking</dc:creator><author>lichking</author><pubDate>Tue, 25 Feb 2014 11:51:00 GMT</pubDate><guid>http://www.cppblog.com/lichking/articles/205937.html</guid><wfw:comment>http://www.cppblog.com/lichking/comments/205937.html</wfw:comment><comments>http://www.cppblog.com/lichking/articles/205937.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lichking/comments/commentRss/205937.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lichking/services/trackbacks/205937.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 一些概述：我们考虑选择一款游戏引擎，会考虑它的全面性&#8212;&#8212;全平台，有丰富资源文档，社区，有良好灵活的开发方式，易上手但也可充分hack，适合开发各种游戏等，从综合角度上说，unity3D是很好的选择.unity相比其它引擎的好处是&#8212;&#8212;3D引擎可以用来做2D，而2D游戏引擎却不可能够制作3D，有人会提出，3D引擎做2D会不会不够专业，优化得不够好，资源开...&nbsp;&nbsp;<a href='http://www.cppblog.com/lichking/articles/205937.html'>阅读全文</a><img src ="http://www.cppblog.com/lichking/aggbug/205937.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lichking/" target="_blank">lichking</a> 2014-02-25 19:51 <a href="http://www.cppblog.com/lichking/articles/205937.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>谈谈GUI</title><link>http://www.cppblog.com/lichking/articles/204184.html</link><dc:creator>lichking</dc:creator><author>lichking</author><pubDate>Sun, 10 Nov 2013 02:31:00 GMT</pubDate><guid>http://www.cppblog.com/lichking/articles/204184.html</guid><wfw:comment>http://www.cppblog.com/lichking/comments/204184.html</wfw:comment><comments>http://www.cppblog.com/lichking/articles/204184.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lichking/comments/commentRss/204184.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lichking/services/trackbacks/204184.html</trackback:ping><description><![CDATA[<div><span style="font-size: 14px;">最早感到编程的神奇之处，是知道有GUI这个东西，程序不再是命令行，字符串处理，算法，固定的问题，而是一个你能看，你能摸的东西，这是一件很奇妙的事情啊，<br /><br /></span></div><div></div><div>起初的GUI编程很困难，就是xx昭著的win32 开发，API，让人感慨当初的程序员是面对的是那样晦涩难解的API，windows窗体概念，事件模型...，</div><div>然后是MFC, 也很xx昭著，我从来没感觉真正掌握过，win32开发窗口系统简直是一种学问啊，&nbsp;</div><div>然后是游戏里面的GUI，不是个很好用的东西，但起码你能看到，D3D实现的2D绘制，input 事件的分发，控件，哦，GUI是这么回事，</div><div>然后用起html, 和自己撸的那个 lua gui, 设计思想类似嘛，发现，显然，layout是一个GUI设计的基本方式，</div><div>(layout 是什么，我今天理解，layout 是层级场景，还有空间anchor属性等）</div><div>今天我们谈论GUI应用，一般是使用 xml like 这样的DSL语言，看看html/css, WPF(XAML), 还有比如说 lua table layout,&nbsp;</div><div></div><div>到了现在，有了一个人机交互的需求，这实在是一件熟悉不过的事情，花了几天撸一个GUI系统，（不知道除了GUI应该叫做什么），</div><div>这个东西，它是 &#8221;图形人机交互界面&#8220;，所见即所得，交互式地操作图元对象，以完成结构和属性的编辑，它不是传统意义那种GUI，它是某种 GUI，</div><div>GUI应该是程序员深度理解的概念，GUI是一个很有启发的东西，你能用GUI做的事情很多，不只是 GUI 而已</div><img src ="http://www.cppblog.com/lichking/aggbug/204184.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lichking/" target="_blank">lichking</a> 2013-11-10 10:31 <a href="http://www.cppblog.com/lichking/articles/204184.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>