⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 migrate_to_4x.html

📁 嵌入式GUI 系统.
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2">  <title>Migrate_to_ver4</title></head><body><table cellpadding="2" cellspacing="2" border="0" style="width: 660px; text-align: left; margin-left: auto; margin-right: auto;">  <tbody>    <tr>      <td style="vertical-align: top;">      <h2 style="color: rgb(51, 51, 255);">Migrate to OpenGUI     4.0.4and obove from older versions</h2>      <p><strong>(18.march 2003)</strong></p>      <p>NOTE: If you don't need QNX 4.x compatibility, stay with    version 3.x.of OpenGUI.</p>      <p><br>There are big changes because of rewriting some parts of the library toget better     performance clean design and the reentrant code.<br>      <br>      <span style="font-weight: bold;">Changes for 4.x in short:</span><br>      </p>      <ul>        <li><font face="Arial">the NASM assembler utility is no morerequired for compiling on any         platform</font></li>        <font face="Arial"> <li><font face="Arial">reentrant code forall windowed code</font></li>        <li><font face="Arial">thread-safe locking on critical sections</font></li>        <li><font face="Arial">each drawable object contains PAPER,INK, FONT and PPOP and only         these are used for drawing on them. <font face="Arial" style="font-weight: bold;">DrawBuffer::</font><span style="font-weight: bold;">set_fcolor()</span>, </font></li>        </font><font face="Arial" style="font-weight: bold;">DrawBuffer::</font><font face="Arial"><span style="font-weight: bold;">set_bcolor()</span>, </font><font face="Arial" style="font-weight: bold;">DrawBuffer::</font><font face="Arial"><span style="font-weight: bold;">set_ppop()</span> &amp; </font><font face="Arial" style="font-weight: bold;">DrawBuffer::</font><font face="Arial"><font face="Arial"><span style="font-weight: bold;">set_font()</span>asthe DrawBuffer methods</font> <li value="5"><font face="Arial">globalversion of <span style="font-weight: bold;">set_fcolor()</span>,      <span style="font-weight: bold;">set_bcolor()</span>, <span style="font-weight: bold;">set_ppop()</span> &amp; <span style="font-weight: bold;">set_font()</span>, will be removed - affectonly         non object code (<span style="font-weight: bold;">draw_line()</span>, <span style="font-weight: bold;">fill_box()</span> etc)</font></li>        <li><font face="Arial">no -fPIC compile flags are necessaryunder LINUX &amp; shared linking</font></li>        <li><font face="Arial">the API has been cleaned and changes areminor (and well documented)</font></li>        <li><font face="Arial">the classes FileDialog() and ColorDialogmay be instatiated more than         once at the same time</font></li>        <li><font face="Arial">on now there are no Watcom C++ or QNX OSsupport (because of banking         video modes)</font></li>        <li><font face="Arial">only C++ language is supported</font></li>        <li><font face="Arial">the active EditBoxes are per window now</font></li>        <li>most of static variables are removed.</li>        </font> <li><font face="Arial"></font>this version is still notvery well optimized for speed </li>        <li><font face="Arial">added macros for differentiate versionsFG_MINOR, FG_MAJOR, FG_PATCH</font></li>        <li><font face="Arial">you can remove file OpenGUI.def fromyour WIN32 projects</font></li>      </ul>      <p><font face="Arial">Convenience:<br>      </font></p>      <ul>        <li style="color: rgb(255, 0, 0);">the old code or code toremove with new port is marked         red</li>        <li><span style="color: rgb(51, 51, 255);">the new code ismarked blue</span><br>        </li>      </ul>      <p><code><font face="Arial"><span style="font-weight: bold;">1.redundant set_ppop() with     global scope - this funcion is no moreneeded.</span><br>      <br>      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp; static voidInstalaterProc(GuiEvent     *p)</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     switch(p-&gt;GetType()) {</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;     case INITEVENT:</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;     &nbsp;&nbsp;&nbsp; </span><span style="color: rgb(255, 0, 0); font-style: italic;">set_ppop(_GSET);</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;     &nbsp;&nbsp;&nbsp;p-&gt;wnd-&gt;AddPushButton(464, 168+36, 128, 23, "Koniec",     'k',Control::Quit);</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;     &nbsp;&nbsp;&nbsp; break;</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;     case TERMINATEEVENT:</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;     &nbsp;&nbsp;&nbsp; break;</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;">      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp; }</span><br style="font-style: italic;">      <br style="font-weight: bold;">      <span style="font-weight: bold;">2. replacement &amp; newprototypes</span><br>      <br>      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;outp() -&gt;<strong> <font color="#0000ff">outpb();</font></strong></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;inp() -&gt;<strong> <font color="#0000ff">inpb();</font></strong></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;X_width -&gt;<strong> <font color="#0000ff">GetXRes();</font></strong></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;Y_width -&gt;<strong> <font color="#0000ff">GetYRes();</font></strong></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;X_max -&gt;<strong> <font color="#0000ff">(GetXRes()-1);</font></strong></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;Y_max -&gt;<strong> <font color="#0000ff">(GetYRes()-1);</font></strong></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;videobase     -&gt;<strong> <font color="#0000ff">GetFrameBuffer();</font></strong></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;class ListBox     -&gt;<strong> <font color="#0000ff">class FGListBox;</font></strong></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;template     FGList&lt;&gt; -&gt;<strong> <font color="#0000ff">templatestd::list&lt;&gt; ( or     std::vector&lt;&gt; )</font></strong></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <br style="font-style: italic;">      <span style="font-style: italic;"><span style="color: rgb(51, 51, 255); font-weight: bold;">&nbsp;&nbsp;&nbsp; fill_convex(vrcholov, pp, CGRAYED, _GSET);</span><br>      </span><br>      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;set_fcolor(CGRAYED);</span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp; set_ppop(_GSET);</span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;fill_convex(vrcholov, pp);</span><br style="font-style: italic; color: rgb(255, 0, 0);">      <br style="font-style: italic;">      <span style="font-style: italic;"><span style="color: rgb(51, 51, 255); font-weight: bold;">&nbsp;&nbsp;&nbsp; fill_convex(vrcholov, pp, CGRAYED, _GSET);</span><br>      </span><br>      <br>      <span style="font-style: italic;">&nbsp;&nbsp;&nbsp; <span style="color: rgb(255, 0, 0);">set_fcolor(CGRAYED);</span></span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;set_ppop(_GXOR);</span><br style="font-style: italic; color: rgb(255, 0, 0);">      <span style="font-style: italic; color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;draw_convex(vrcholov, pp);</span><br style="font-style: italic;">      <br style="font-style: italic;">      <span style="font-style: italic; font-weight: bold; color: rgb(51, 51, 255);">&nbsp;&nbsp;&nbsp;draw_convex(vrcholov, pp, CGRAYED, _GXOR);</span><br style="font-style: italic;">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -