📄 testframe2.cpp
字号:
// TestFrame2.cpp//// test view for the wGui library////// Copyright (c) 2002 Rob Wiskow// rob-dev@boxedchaos.com//// This library is free software; you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public// License as published by the Free Software Foundation; either// version 2.1 of the License, or (at your option) any later version.//// This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU// Lesser General Public License for more details.//// You should have received a copy of the GNU Lesser General Public// License along with this library; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA//#include "TestFrame2.h"const long int CLEAR_EDIT_BOX_1 = 10;const long int FILL_EDIT_BOX_1 = 11;const long int CLEAR_EDIT_BOX_2 = 12;const long int FILL_EDIT_BOX_2 = 13;const long int EXIT_APP = 14;CSimpleTestFrame::CSimpleTestFrame(wGui::CPoint Location, wGui::CView* pParent, wGui::CFontEngine* pFontEngine) : wGui::CFrame(wGui::CRect(0, 0, 140, 80) + Location, pParent, pFontEngine, "Simple Frame", false){ m_pButton = new wGui::CButton(ClientToScreen(wGui::CRect(20, 20, 150, 40)), this, "Test Button");}CTestWindow::CTestWindow(const wGui::CRect& WindowRect, wGui::CWindow* pParent) : CWindow(WindowRect, pParent){ m_ClientRect.Grow(-1);}void CTestWindow::Draw(void) const{ CWindow::Draw(); wGui::CPainter Painter(m_pSDLSurface); Painter.DrawRect(m_WindowRect, false, wGui::COLOR_WHITE); Painter.DrawRect(GetClientRect(), false, wGui::COLOR_RED);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -