(svn r27953) -Cleanup: Adjust other languages for r27952
[openttd.git] / src / network / network_content_gui.h
blob139701001984bab6e9e3fd7ccd3ce376d54638e4
1 /* $Id$ */
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 */
10 /** @file network_content_gui.h User interface for downloading files. */
12 #ifndef NETWORK_CONTENT_GUI_H
13 #define NETWORK_CONTENT_GUI_H
15 #include "network_content.h"
16 #include "../window_gui.h"
17 #include "../widgets/network_content_widget.h"
19 /** Base window for showing the download status of content */
20 class BaseNetworkContentDownloadStatusWindow : public Window, ContentCallback {
21 protected:
22 uint total_bytes; ///< Number of bytes to download
23 uint downloaded_bytes; ///< Number of bytes downloaded
24 uint total_files; ///< Number of files to download
25 uint downloaded_files; ///< Number of files downloaded
27 uint32 cur_id; ///< The current ID of the downloaded file
28 char name[48]; ///< The current name of the downloaded file
30 public:
31 /**
32 * Create the window with the given description.
33 * @param desc The description of the window.
35 BaseNetworkContentDownloadStatusWindow(WindowDesc *desc);
37 /**
38 * Free everything associated with this window.
40 ~BaseNetworkContentDownloadStatusWindow();
42 virtual void DrawWidget(const Rect &r, int widget) const;
43 virtual void OnDownloadProgress(const ContentInfo *ci, int bytes);
46 void BuildContentTypeStringList();
48 #endif /* NETWORK_CONTENT_GUI_H */