📄 mybutton_8cpp-source.html
字号:
00090 p[0].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight - 3;00091 p[0].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop;00092 p[1].<a class="code" href="structFG__Point.html#o0">x</a> = p[2].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight;00093 p[1].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop + 3;00094 p[2].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom - 3;00095 p[3].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight - 3;00096 p[3].<a class="code" href="structFG__Point.html#o1">y</a> = p[4].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom;00097 p[4].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft + 3;00098 p[5].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft;00099 p[5].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom - 3;00100 pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a11">DrawPolyLine</a>(6, p, <a class="code" href="FG__X11Adaptor_8cpp.html#a0">COLOR_BLACK</a>);00101 <span class="keywordflow">break</span>;00102 00103 <span class="keywordflow">case</span> <a class="code" href="group__Frame__Style.html#ga3">FS_RECESSED</a>:00104 Rect = m_Rect;00105 pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a5">FillRect</a>(Rect, m_Background, m_Background);00106 00107 p[0].<a class="code" href="structFG__Point.html#o0">x</a> = p[1].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight - 1;00108 p[0].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop + 4;00109 p[1].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom - 4;00110 p[2].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight - 4;00111 p[2].<a class="code" href="structFG__Point.html#o1">y</a> = p[3].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom - 1;00112 p[3].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft + 4;00113 pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a11">DrawPolyLine</a>(4, p, <a class="code" href="FG__X11Adaptor_8cpp.html#a1">COLOR_GRAY</a>);00114 00115 <span class="comment">// 画高亮区</span>00116 p[0].<a class="code" href="structFG__Point.html#o0">x</a> = p[1].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight;00117 p[0].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop + 3;00118 p[1].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom - 3;00119 p[2].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight - 3;00120 p[2].<a class="code" href="structFG__Point.html#o1">y</a> = p[3].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom;00121 p[3].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft + 3;00122 pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a11">DrawPolyLine</a>(4, p, <a class="code" href="FG__X11Adaptor_8cpp.html#a2">COLOR_WHITE</a>);00123 00124 <span class="comment">// 画黑边框</span>00125 p[0].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft + 3;00126 p[0].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom;00127 p[1].<a class="code" href="structFG__Point.html#o0">x</a> = p[2].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft;00128 p[1].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom - 3;00129 p[2].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop + 3;00130 p[3].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft + 3;00131 p[3].<a class="code" href="structFG__Point.html#o1">y</a> = p[4].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop;00132 p[4].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight - 3;00133 p[5].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight;00134 p[5].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop + 3;00135 pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a11">DrawPolyLine</a>(6, p, <a class="code" href="FG__X11Adaptor_8cpp.html#a3">COLOR_DARKGRAY</a>);00136 00137 <span class="comment">// 画阴影</span>00138 p[0].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft + 4;00139 p[0].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom - 1;00140 p[1].<a class="code" href="structFG__Point.html#o0">x</a> = p[2].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft + 1;00141 p[1].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wBottom - 4;00142 p[2].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop + 4;00143 p[3].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wLeft + 4;00144 p[3].<a class="code" href="structFG__Point.html#o1">y</a> = p[4].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop + 1;00145 p[4].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight - 4;00146 p[5].<a class="code" href="structFG__Point.html#o0">x</a> = m_Rect.wRight - 1;00147 p[5].<a class="code" href="structFG__Point.html#o1">y</a> = m_Rect.wTop + 4;00148 pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a11">DrawPolyLine</a>(6, p, <a class="code" href="FG__X11Adaptor_8cpp.html#a0">COLOR_BLACK</a>);00149 <span class="keywordflow">break</span>;00150 00151 <span class="keywordflow">default</span>:00152 <span class="keywordflow">break</span>;00153 }00154 00155 <span class="keywordflow">if</span> (<a class="code" href="classFG__TextWidget.html#a3">TextLength</a>())00156 {00157 <span class="comment">// 写按钮文字</span>00158 <a class="code" href="group__Utility.html#ga1">WORD</a> x = m_Rect.<a class="code" href="structFG__Rect.html#o0">wLeft</a> + (m_Rect.<a class="code" href="structFG__Rect.html#o2">wRight</a> - m_Rect.<a class="code" href="structFG__Rect.html#o0">wLeft</a> + 1 - pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a8">GetTextWidth</a>(<a class="code" href="classFG__TextWidget.html#a1">GetText</a>())) / 2;00159 <a class="code" href="group__Utility.html#ga1">WORD</a> y = m_Rect.<a class="code" href="structFG__Rect.html#o1">wTop</a> + (m_Rect.<a class="code" href="structFG__Rect.html#o3">wBottom</a> - m_Rect.<a class="code" href="structFG__Rect.html#o1">wTop</a> + 1 - pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a9">GetTextHeight</a>(<a class="code" href="classFG__TextWidget.html#a1">GetText</a>())) / 2;00160 pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a7">DrawText</a>(<a class="code" href="classFG__TextWidget.html#a1">GetText</a>(), x, y, m_ForeColor);00161 <span class="keywordflow">if</span> (<a class="code" href="classFG__Object.html#a19">IsFocus</a>())00162 {00163 <a class="code" href="structFG__Rect.html">FG_Rect</a> rect;00164 <a class="code" href="classFG__Object.html#a3">GetClientRect</a>(rect);00165 rect -= 1;00166 pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a12">DrawDotRect</a>(rect, <a class="code" href="FG__X11Adaptor_8cpp.html#a0">COLOR_BLACK</a>);00167 }00168 }00169 00170 pAdaptor-><a class="code" href="classFG__OSAdaptor.html#a4">EndDraw</a>();00171 }00172 </pre></div><hr><center>由 DoxyGen 1.3.6 于 Wed Jun 9 22:34:42 2004 生成<br>版权所有 (C) 2003,2004 王咏武</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -