network_content_gui.h

Go to the documentation of this file.
00001 /* $Id$ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
00006  * OpenTTD 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.
00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
00008  */
00009 
00012 #ifndef NETWORK_CONTENT_GUI_H
00013 #define NETWORK_CONTENT_GUI_H
00014 
00015 #include "network_content.h"
00016 #include "../window_gui.h"
00017 
00019 enum NetworkContentDownloadStatusWindowWidgets {
00020   NCDSWW_BACKGROUND, 
00021   NCDSWW_CANCELOK,   
00022 };
00023 
00025 class BaseNetworkContentDownloadStatusWindow : public Window, ContentCallback {
00026 protected:
00027   uint total_bytes;      
00028   uint downloaded_bytes; 
00029   uint total_files;      
00030   uint downloaded_files; 
00031 
00032   uint32 cur_id; 
00033   char name[48]; 
00034 
00035 public:
00040   BaseNetworkContentDownloadStatusWindow(const WindowDesc *desc);
00041 
00045   ~BaseNetworkContentDownloadStatusWindow();
00046 
00047   virtual void DrawWidget(const Rect &r, int widget) const;
00048   virtual void OnDownloadProgress(const ContentInfo *ci, int bytes);
00049 };
00050 
00051 #endif /* NETWORK_CONTENT_GUI_H */