Google
Web alhem.net
Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

TextDialog.cpp

Go to the documentation of this file.
00001 00006 /* 00007 Copyright (C) 2004 Anders Hedstrom 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 #include <stdincl.h> 00024 00025 #include "client.h" 00026 #include "Globals.h" 00027 #include "TextDialog.h" 00028 00029 00030 #define W 400 00031 #define H 100 00032 #define X XMAX / 2 - W / 2 00033 #define Y YMAX / 2 - H / 2 00034 00035 TextDialog::TextDialog(Surface *s) 00036 :Dialog(s, X, Y, W, H) 00037 ,m_output(this,5,5, W - SBSIZE - 10, H - 10) 00038 ,m_vbar(this) //, W-SBSIZE, 0, SBSIZE, H) 00039 { 00040 SetText("TextDialog"); 00041 CreateTemporaryScreen(); 00042 00043 SetBgColor(255,255,255); 00044 SetFgColor(0,0,0); 00045 00046 SetMoveable(true); 00047 00048 m_output.SetFrameWidth(0); 00049 // m_output.AddLine("Testing test test..."); 00050 AddChild(&m_output); 00051 AddChild(&m_vbar); 00052 00053 SDL_Rect *area = GetClientRectPtr(); 00054 Uint32 color = GetBgColor(); 00055 00056 SDL_FillRect(m_screen, area, color); 00057 // DrawAll(); 00058 } 00059 00060 00061 TextDialog::~TextDialog() 00062 { 00063 } 00064 00065 00066 void TextDialog::Draw() 00067 { 00068 } 00069 00070 00071 void TextDialog::AddLine(const string &str) 00072 { 00073 m_output.AddLine(str); 00074 // Output::AddLine invalidates... 00075 // RedrawEv(); 00076 // InvalidateEv(); 00077 } 00078 00079

Generated for SDL C++ GUI by doxygen 1.3.6