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

📄 slide029.html

📁 《Big C++ 》Third Edition电子书和代码全集-Part1
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta content="blendTrans(Duration=2)" http-equiv="Page-Enter">
	<title>Big C++: Chptr. 27 -- Graphical User Interfaces</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="Copyright" content="2005 John Wiley & Sons">
  <meta name="Author" content="Kurt Schmidt">
</head>


<body>
<div onclick="document.location='slide030.html'">
<h2><font color='#009999'>27.8 Mouse Events (cont.)</font></h2>
<ul>
  <li><font size="+1">Depending on the number of corners that have already been 
    specified, the paint handler draws </font> 
    <ul>
      <li><font size="+1">a small circle for the first mouse click</font></li>
      <li><font size="+1">a line after the first two mouse clicks</font></li>
      <li><font size="+1">a triangle after three mouse clicks</font></li>
    </ul>
  </li>
  <font size="+1"> 
  <blockquote> 
    <pre>void TriangleWindow::OnPaint(wxPaintEvent &amp; event)
{
   const int RADIUS = 2;
   wxPaintDC(this);
   if (corners == 1)
      dc.DrawEllpse(x[0] - RADIUS, y[0] - RADIUS,
         2 * RADIUS, 2 * RADIUS);
   if (corners &gt;= 2)
      dc.DrawLine(x[0], y[0], x[1], y[1]);
   if (corners &gt;= 3)
   {
      dc.DrawLine(x[1], y[1], x[2], y[2]);
      dc.DrawLine(x[2], y[2], x[0], y[0]);
   }
}
</pre>
  </blockquote>
  </font>
</ul>
<hr>
<center><small>
	<a href='slide028.html'>prev</a>
	|<a href='slide001.html'>top</a>
	|<a href='slide030.html'>next</a>
</small></center>
</div>
</body>
</html>

⌨️ 快捷键说明

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