OpenTTD
network_content_gui.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * 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.
4  * 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.
5  * 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/>.
6  */
7 
10 #ifndef NETWORK_CONTENT_GUI_H
11 #define NETWORK_CONTENT_GUI_H
12 
13 #include "network_content.h"
14 #include "../window_gui.h"
15 #include "../widgets/network_content_widget.h"
16 
19 protected:
20  uint total_bytes;
22  uint total_files;
24 
25  uint32 cur_id;
26  char name[48];
27 
28 public:
34 
39 
40  void DrawWidget(const Rect &r, int widget) const override;
41  void OnDownloadProgress(const ContentInfo *ci, int bytes) override;
42 };
43 
45 
46 #endif /* NETWORK_CONTENT_GUI_H */
void BuildContentTypeStringList()
Build array of all strings corresponding to the content types.
~BaseNetworkContentDownloadStatusWindow()
Free everything associated with this window.
void DrawWidget(const Rect &r, int widget) const override
Draw the contents of a nested widget.
High level window description.
Definition: window_gui.h:166
Callbacks for notifying others about incoming data.
Data structure for an opened window.
Definition: window_gui.h:276
void OnDownloadProgress(const ContentInfo *ci, int bytes) override
We have progress in the download of a file.
Part of the network protocol handling content distribution.
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:54