OpenTTD
network_content_gui.h
Go to the documentation of this file.
1 /* $Id: network_content_gui.h 27288 2015-05-17 19:49:35Z michi_cc $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * 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.
6  * 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.
7  * 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/>.
8  */
9 
12 #ifndef NETWORK_CONTENT_GUI_H
13 #define NETWORK_CONTENT_GUI_H
14 
15 #include "network_content.h"
16 #include "../window_gui.h"
17 #include "../widgets/network_content_widget.h"
18 
21 protected:
22  uint total_bytes;
24  uint total_files;
26 
27  uint32 cur_id;
28  char name[48];
29 
30 public:
36 
41 
42  virtual void DrawWidget(const Rect &r, int widget) const;
43  virtual void OnDownloadProgress(const ContentInfo *ci, int bytes);
44 };
45 
47 
48 #endif /* NETWORK_CONTENT_GUI_H */
void BuildContentTypeStringList()
Build array of all strings corresponding to the content types.
~BaseNetworkContentDownloadStatusWindow()
Free everything associated with this window.
High level window description.
Definition: window_gui.h:168
Callbacks for notifying others about incoming data.
Data structure for an opened window.
Definition: window_gui.h:271
virtual void DrawWidget(const Rect &r, int widget) const
Draw the contents of a nested widget.
Part of the network protocol handling content distribution.
virtual void OnDownloadProgress(const ContentInfo *ci, int bytes)
We have progress in the download of a file.
uint total_bytes
Number of bytes to download.
char name[48]
The current name of the downloaded file.
uint downloaded_files
Number of files downloaded.
uint total_files
Number of files to download.
uint downloaded_bytes
Number of bytes downloaded.
Specification of a rectangle with absolute coordinates of all edges.
BaseNetworkContentDownloadStatusWindow(WindowDesc *desc)
Create the window with the given description.
Base window for showing the download status of content.
uint32 cur_id
The current ID of the downloaded file.
Container for all important information about a piece of content.
Definition: tcp_content.h:58