Files
MagicSetEditor2/src/gui/packages_window.hpp
T
coppro b73f081b60 Updated copyright information (2009 + my real name)
MSE now handles opening more gracefully - can handle directories and failures
Changed behavior to always save cards to separate files with intent to add VCS later (note: shouldn't do this for zip, but can't see a good way to approach this)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1388 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-06-19 03:09:05 +00:00

58 lines
2.2 KiB
C++

//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2009 Twan van Laarhoven and Sean Hunt |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_GUI_PACKAGES_WINDOW
#define HEADER_GUI_PACKAGES_WINDOW
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <data/installer.hpp>
class PackageUpdateList;
class PackageInfoPanel;
// ----------------------------------------------------------------------------- : Packages window
/// A window that displays the installed packages and updates to them
class PackagesWindow : public wxDialog {
public:
/// Show the packages window, optionally downloading the package database from the website
PackagesWindow(Window* parent, bool download_package_list = true);
/// Show the packages window for an installer
PackagesWindow(Window* parent, const InstallerP& installer);
~PackagesWindow();
private:
PackageUpdateList* package_list; ///< List of available packages
PackageInfoPanel* package_info; ///< Description of the selected package
/// List of the packages shown in this window
InstallablePackages installable_packages;
InstallablePackageP package; ///< Selected package
PackageAction where; ///< Where to install? (PACKAGE_LOCAL or PACKAGE_GLOBAL)
bool waiting_for_list; ///< waiting for the list of installers?
DECLARE_EVENT_TABLE();
void onOk(wxCommandEvent&);
void onActionChange(wxCommandEvent&);
void onPackageSelect(wxCommandEvent&);
void onUpdateUI(wxUpdateUIEvent&);
void onIdle(wxIdleEvent&);
/// Window initialization
void init(Window* parent, bool show_only_installable);
/// Check whether we have downloaded the list of installers
/** If the download is (partially) complete, update the installable_packages list */
bool checkInstallerList(bool refresh = true);
};
// ----------------------------------------------------------------------------- : EOF
#endif