mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
Dummy HTML export window
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@373 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -0,0 +1,47 @@
|
|||||||
|
//+----------------------------------------------------------------------------+
|
||||||
|
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
|
||||||
|
//| Copyright: (C) 2001 - 2007 Twan van Laarhoven |
|
||||||
|
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||||
|
//+----------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------- : Includes
|
||||||
|
|
||||||
|
#include <gui/html_export_window.hpp>
|
||||||
|
#include <gui/control/package_list.hpp>
|
||||||
|
#include <util/error.hpp>
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------- : HtmlExportWindow
|
||||||
|
|
||||||
|
HtmlExportWindow::HtmlExportWindow(Window* parent, const SetP& set)
|
||||||
|
: wxDialog(parent,wxID_ANY,_TITLE_("export html"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE)
|
||||||
|
{
|
||||||
|
// init controls
|
||||||
|
list = new PackageList (this, wxID_ANY);
|
||||||
|
// init sizers
|
||||||
|
wxSizer* s = new wxBoxSizer(wxVERTICAL);
|
||||||
|
s->Add(new wxStaticText(this, wxID_ANY, _LABEL_("html template")), 0, wxALL, 4);
|
||||||
|
s->Add(list, 0, wxEXPAND | wxALL & ~wxTOP, 4);
|
||||||
|
s->Add(CreateButtonSizer(wxOK | wxCANCEL) , 0, wxEXPAND | wxALL, 8);
|
||||||
|
s->SetSizeHints(this);
|
||||||
|
SetSizer(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HtmlExportWindow::onOk(wxCommandEvent&) {
|
||||||
|
handle_error(Error(_("HTML export is not implemented yet, sorry")));
|
||||||
|
/*;//%%
|
||||||
|
String name = fileSelector(_("Exort to html"),_(""),_(""),_(""), {
|
||||||
|
_("HTML files (*.html)|*.html"),
|
||||||
|
wxSAVE | wxOVERWRITE_PROMPT);
|
||||||
|
}
|
||||||
|
if (!name.empty()) {
|
||||||
|
HtmlExportWindow wnd(&this, set, name);
|
||||||
|
wnd.showModal();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
// Done
|
||||||
|
EndModal(wxID_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(HtmlExportWindow,wxDialog)
|
||||||
|
EVT_BUTTON (wxID_OK, HtmlExportWindow::onOk)
|
||||||
|
END_EVENT_TABLE ()
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
//+----------------------------------------------------------------------------+
|
||||||
|
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
|
||||||
|
//| Copyright: (C) 2001 - 2007 Twan van Laarhoven |
|
||||||
|
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||||
|
//+----------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
#ifndef HEADER_GUI_HTML_EXPORT_WINDOW
|
||||||
|
#define HEADER_GUI_HTML_EXPORT_WINDOW
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------- : Includes
|
||||||
|
|
||||||
|
#include <util/prec.hpp>
|
||||||
|
#include <data/export_template.hpp>
|
||||||
|
|
||||||
|
class PackageList;
|
||||||
|
DECLARE_POINTER_TYPE(Set);
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------- : HtmlExportWindow
|
||||||
|
|
||||||
|
class HtmlExportWindow : public wxDialog {
|
||||||
|
public:
|
||||||
|
HtmlExportWindow(Window* parent, const SetP& set);
|
||||||
|
|
||||||
|
private:
|
||||||
|
PackageList* list; ///< List of templates
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
|
void onOk(wxCommandEvent&);
|
||||||
|
};
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------- : EOF
|
||||||
|
#endif
|
||||||
@@ -31,8 +31,8 @@ NewSetWindow::NewSetWindow(Window* parent)
|
|||||||
// init controls
|
// init controls
|
||||||
game_list = new PackageList (this, ID_GAME_LIST);
|
game_list = new PackageList (this, ID_GAME_LIST);
|
||||||
stylesheet_list = new PackageList (this, ID_STYLESHEET_LIST);
|
stylesheet_list = new PackageList (this, ID_STYLESHEET_LIST);
|
||||||
game_text = new wxStaticText(this, ID_GAME_LIST, _("&Game type:"));
|
game_text = new wxStaticText(this, ID_GAME_LIST, _LABEL_("game type"));
|
||||||
stylesheet_text = new wxStaticText(this, ID_STYLESHEET_LIST, _("&Card style:"));
|
stylesheet_text = new wxStaticText(this, ID_STYLESHEET_LIST, _LABEL_("style type"));
|
||||||
// init sizer
|
// init sizer
|
||||||
wxSizer* s = new wxBoxSizer(wxVERTICAL);
|
wxSizer* s = new wxBoxSizer(wxVERTICAL);
|
||||||
s->Add(game_text, 0, wxALL, 4);
|
s->Add(game_text, 0, wxALL, 4);
|
||||||
|
|||||||
+3
-12
@@ -22,6 +22,7 @@
|
|||||||
#include <gui/preferences_window.hpp>
|
#include <gui/preferences_window.hpp>
|
||||||
#include <gui/print_window.hpp>
|
#include <gui/print_window.hpp>
|
||||||
#include <gui/images_export_window.hpp>
|
#include <gui/images_export_window.hpp>
|
||||||
|
#include <gui/html_export_window.hpp>
|
||||||
#include <gui/icon_menu.hpp>
|
#include <gui/icon_menu.hpp>
|
||||||
#include <gui/util.hpp>
|
#include <gui/util.hpp>
|
||||||
#include <util/io/package_manager.hpp>
|
#include <util/io/package_manager.hpp>
|
||||||
@@ -484,18 +485,8 @@ void SetWindow::onFileExportImages(wxCommandEvent&) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SetWindow::onFileExportHTML(wxCommandEvent&) {
|
void SetWindow::onFileExportHTML(wxCommandEvent&) {
|
||||||
// HtmlExportWindow wnd(&this, set);
|
HtmlExportWindow wnd(this, set);
|
||||||
// wnd.ShowModal();
|
wnd.ShowModal();
|
||||||
/*;//%%
|
|
||||||
String name = fileSelector(_("Exort to html"),_(""),_(""),_(""), {
|
|
||||||
_("HTML files (*.html)|*.html"),
|
|
||||||
wxSAVE | wxOVERWRITE_PROMPT);
|
|
||||||
}
|
|
||||||
if (!name.empty()) {
|
|
||||||
HtmlExportWindow wnd(&this, set, name);
|
|
||||||
wnd.showModal();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetWindow::onFileExportApprentice(wxCommandEvent&) {
|
void SetWindow::onFileExportApprentice(wxCommandEvent&) {
|
||||||
|
|||||||
Reference in New Issue
Block a user