📄 wg__window_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>wg_window.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> </center><hr><h1>wg_window.h</h1><div class="fragment"><pre>00001 <span class="comment">// wg_window.h</span>00002 <span class="comment">//</span>00003 <span class="comment">// CWindow interface</span>00004 <span class="comment">// this serves as the base of all window derived classes</span>00005 <span class="comment">//</span>00006 <span class="comment">// Copyright (c) 2002 Rob Wiskow</span>00007 <span class="comment">// rob-dev@boxedchaos.com</span>00008 <span class="comment">//</span>00009 <span class="comment">// This library is free software; you can redistribute it and/or</span>00010 <span class="comment">// modify it under the terms of the GNU Lesser General Public</span>00011 <span class="comment">// License as published by the Free Software Foundation; either</span>00012 <span class="comment">// version 2.1 of the License, or (at your option) any later version.</span>00013 <span class="comment">//</span>00014 <span class="comment">// This library is distributed in the hope that it will be useful,</span>00015 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>00016 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>00017 <span class="comment">// Lesser General Public License for more details.</span>00018 <span class="comment">//</span>00019 <span class="comment">// You should have received a copy of the GNU Lesser General Public</span>00020 <span class="comment">// License along with this library; if not, write to the Free Software</span>00021 <span class="comment">// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>00022 <span class="comment">//</span>00023 00024 00025 <span class="preprocessor">#ifndef _WG_WINDOW_H_</span>00026 <span class="preprocessor"></span><span class="preprocessor">#define _WG_WINDOW_H_</span>00027 <span class="preprocessor"></span>00028 <span class="preprocessor">#include "wg_rect.h"</span>00029 <span class="preprocessor">#include "wg_color.h"</span>00030 <span class="preprocessor">#include "wg_message_client.h"</span>00031 <span class="preprocessor">#include <string></span>00032 <span class="preprocessor">#include <list></span>00033 <span class="preprocessor">#include "SDL.h"</span>00034 00035 00036 <span class="keyword">namespace </span>wGui00037 {00038 00040 00044 <a name="l00045"></a><a class="code" href="classwGui_1_1CWindow.html">00045</a> <span class="keyword">class </span><a class="code" href="classwGui_1_1CWindow.html">CWindow</a> : <span class="keyword">public</span> <a class="code" href="classwGui_1_1CMessageClient.html">CMessageClient</a>00046 {00047 <span class="keyword">public</span>:00052 <a class="code" href="classwGui_1_1CWindow.html#a0">CWindow</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRect.html">CRect</a>& WindowRect, <a class="code" href="classwGui_1_1CWindow.html">CWindow</a>* pParent);00053 00055 <span class="keyword">virtual</span> <a class="code" href="classwGui_1_1CWindow.html#a1">~CWindow</a>(<span class="keywordtype">void</span>);00056 00059 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classwGui_1_1CWindow.html#a2">SetWindowRect</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRect.html">CRect</a>& WindowRect);00060 <a name="l00062"></a><a class="code" href="classwGui_1_1CWindow.html#a3">00062</a> <span class="keyword">virtual</span> <a class="code" href="classwGui_1_1CRect.html">CRect</a> <a class="code" href="classwGui_1_1CWindow.html#a3">GetWindowRect</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classwGui_1_1CWindow.html#n1">m_WindowRect</a>; }00063 00066 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classwGui_1_1CWindow.html#a4">MoveWindow</a>(<span class="keyword">const</span> CPoint& MoveDistance);00067 00073 <span class="keyword">virtual</span> CRect <a class="code" href="classwGui_1_1CWindow.html#a5">GetClientRect</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;00074 <a name="l00077"></a><a class="code" href="classwGui_1_1CWindow.html#a6">00077</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classwGui_1_1CWindow.html#a6">SetBGColor</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRGBColor.html">CRGBColor</a>& Color) { <a class="code" href="classwGui_1_1CWindow.html#n2">m_BGColor</a> = Color; }00078 <a name="l00081"></a><a class="code" href="classwGui_1_1CWindow.html#a7">00081</a> <span class="keyword">virtual</span> <a class="code" href="classwGui_1_1CRGBColor.html">CRGBColor</a> <a class="code" href="classwGui_1_1CWindow.html#a7">GetBGColor</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> <a class="code" href="classwGui_1_1CWindow.html#n2">m_BGColor</a>; }00082 <a name="l00084"></a><a class="code" href="classwGui_1_1CWindow.html#s2">00084</a> <span class="keyword">enum</span> <a class="code" href="classwGui_1_1CWindow.html#s2">EAncestor</a> {00085 <a class="code" href="classwGui_1_1CWindow.html#s2s0">PARENT</a>, 00086 <a class="code" href="classwGui_1_1CWindow.html#s2s1">ROOT</a> 00087 };00091 <span class="keyword">virtual</span> <a class="code" href="classwGui_1_1CWindow.html#a0">CWindow</a>* <a class="code" href="classwGui_1_1CWindow.html#a8">GetAncestor</a>(<a class="code" href="classwGui_1_1CWindow.html#s2">EAncestor</a> eAncestor) <span class="keyword">const</span>;00092 00096 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classwGui_1_1CWindow.html#a9">IsChildOf</a>(<a class="code" href="classwGui_1_1CWindow.html#a0">CWindow</a>* pWindow) <span class="keyword">const</span>;00097 <a name="l00100"></a><a class="code" href="classwGui_1_1CWindow.html#a10">00100</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classwGui_1_1CWindow.html#a10">IsVisible</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> <a class="code" href="classwGui_1_1CWindow.html#n7">m_bVisible</a>; }00101 00104 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classwGui_1_1CWindow.html#a11">SetVisible</a>(<span class="keywordtype">bool</span> bVisible);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -