# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

win_displayer.h

Go to the documentation of this file.
00001 
00007 /* Copyright, 2001 Nevrax Ltd.
00008  *
00009  * This file is part of NEVRAX NEL.
00010  * NEVRAX NEL is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2, or (at your option)
00013  * any later version.
00014 
00015  * NEVRAX NEL is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00018  * General Public License for more details.
00019 
00020  * You should have received a copy of the GNU General Public License
00021  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00023  * MA 02111-1307, USA.
00024  */
00025 
00026 #ifndef NL_WIN_DISPLAYER_H
00027 #define NL_WIN_DISPLAYER_H
00028 
00029 #include "nel/misc/types_nl.h"
00030 
00031 #ifdef NL_OS_WINDOWS
00032 
00033 #define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
00034 #include <windows.h>
00035 #undef min
00036 #undef max
00037 
00038 #include "nel/misc/displayer.h"
00039 #include "nel/misc/reader_writer.h"
00040 
00041 #include "window_displayer.h"
00042 
00043 namespace NLMISC {
00044 
00045 
00053 class CWinDisplayer : public NLMISC::CWindowDisplayer
00054 {
00055 public:
00056 
00057         CWinDisplayer (const char *displayerName = "") : CWindowDisplayer(displayerName), Exit(false)
00058         {
00059                 needSlashR = true;
00060         }
00061 
00062         virtual ~CWinDisplayer ();
00063 
00064 private:
00065 
00066         // called by DT only
00067         void    resizeLabels ();
00068         // called by DT only
00069         void    updateLabels ();
00070 
00071         // called by DT only
00072         void    open (std::string WindowNameEx, sint x, sint y, sint w, sint h, sint hs);
00073         // called by DT only
00074         void    clear ();
00075         // called by DT only
00076         void    display_main ();
00077 
00078         // all these variables above is used only by the DT
00079 
00080         HWND _HEdit, _HWnd, _HInputEdit;
00081         HFONT _HFont;
00082         HMODULE _HLibModule;
00083         HWND _HClearBtn;
00084         HWND _HLabel1;
00085 
00086         // the MT must set the value to true to exit the thread
00087         bool Exit;
00088 
00089         friend LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
00090 };
00091 
00092 } // NLMISC
00093 
00094 #endif // NL_OS_WINDOWS
00095 
00096 #endif // NL_WIN_DISPLAYER_H
00097 
00098 /* End of win_displayer.h */