From ff85f47ac99954508e7759999880f684bb09a673 Mon Sep 17 00:00:00 2001 From: twanvl Date: Mon, 14 May 2007 17:21:39 +0000 Subject: [PATCH] Dummy HTML export window git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@373 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/gui/html_export_window.cpp | 47 ++++++++++++++++++++++++++++++++++ src/gui/html_export_window.hpp | 33 ++++++++++++++++++++++++ src/gui/new_window.cpp | 4 +-- src/gui/set/window.cpp | 15 +++-------- 4 files changed, 85 insertions(+), 14 deletions(-) create mode 100644 src/gui/html_export_window.cpp create mode 100644 src/gui/html_export_window.hpp diff --git a/src/gui/html_export_window.cpp b/src/gui/html_export_window.cpp new file mode 100644 index 00000000..86512216 --- /dev/null +++ b/src/gui/html_export_window.cpp @@ -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 +#include +#include + +// ----------------------------------------------------------------------------- : 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 () diff --git a/src/gui/html_export_window.hpp b/src/gui/html_export_window.hpp new file mode 100644 index 00000000..91bf29ed --- /dev/null +++ b/src/gui/html_export_window.hpp @@ -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 +#include + +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 diff --git a/src/gui/new_window.cpp b/src/gui/new_window.cpp index 4dc837e0..a78e00fc 100644 --- a/src/gui/new_window.cpp +++ b/src/gui/new_window.cpp @@ -31,8 +31,8 @@ NewSetWindow::NewSetWindow(Window* parent) // init controls game_list = new PackageList (this, ID_GAME_LIST); stylesheet_list = new PackageList (this, ID_STYLESHEET_LIST); - game_text = new wxStaticText(this, ID_GAME_LIST, _("&Game type:")); - stylesheet_text = new wxStaticText(this, ID_STYLESHEET_LIST, _("&Card style:")); + game_text = new wxStaticText(this, ID_GAME_LIST, _LABEL_("game type")); + stylesheet_text = new wxStaticText(this, ID_STYLESHEET_LIST, _LABEL_("style type")); // init sizer wxSizer* s = new wxBoxSizer(wxVERTICAL); s->Add(game_text, 0, wxALL, 4); diff --git a/src/gui/set/window.cpp b/src/gui/set/window.cpp index 98d5982f..4d59dc60 100644 --- a/src/gui/set/window.cpp +++ b/src/gui/set/window.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -484,18 +485,8 @@ void SetWindow::onFileExportImages(wxCommandEvent&) { } void SetWindow::onFileExportHTML(wxCommandEvent&) { -// HtmlExportWindow wnd(&this, set); -// 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(); - } - */ + HtmlExportWindow wnd(this, set); + wnd.ShowModal(); } void SetWindow::onFileExportApprentice(wxCommandEvent&) {