Added dialog for selecting a new stylesheet if the one from a set is not found;

'availible' is not a word

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@657 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-09-01 21:11:56 +00:00
parent a08d4e5a1b
commit c38166c2bd
8 changed files with 169 additions and 9 deletions
+39 -2
View File
@@ -12,7 +12,9 @@
#include <util/prec.hpp>
class PackageList;
class Game;
DECLARE_POINTER_TYPE(Set);
DECLARE_POINTER_TYPE(StyleSheet);
// ----------------------------------------------------------------------------- : NewSetWindow
@@ -33,8 +35,6 @@ class NewSetWindow : public wxDialog {
// gui items
PackageList* game_list, *stylesheet_list;
wxStaticText* game_text, *stylesheet_text;
Window* ok_button;
// --------------------------------------------------- : events
@@ -52,5 +52,42 @@ class NewSetWindow : public wxDialog {
void done();
};
// ----------------------------------------------------------------------------- : SelectStyleSheetWindow
// very similair, so in the same file
/// Show the select stylesheet window, return the selected stylesheet, if any
StyleSheetP select_stylesheet(const Game& game, const String& failed_name);
/// "Create a new set" dialog. First select game, then matching style.
class SelectStyleSheetWindow : public wxDialog {
public:
/// The selected stylesheet, if any
StyleSheetP stylesheet;
SelectStyleSheetWindow(Window* parent, const Game& game, const String& failed_name);
// --------------------------------------------------- : data
private:
DECLARE_EVENT_TABLE();
const Game& game;
// gui items
PackageList* stylesheet_list;
// --------------------------------------------------- : events
void onStyleSheetSelect (wxCommandEvent&);
void onStyleSheetActivate(wxCommandEvent&);
virtual void OnOK(wxCommandEvent&);
void onUpdateUI(wxUpdateUIEvent&);
void onIdle(wxIdleEvent&);
// we are done, close the window
void done();
};
// ----------------------------------------------------------------------------- : EOF
#endif