00001
00002
00003
00004
00005
00006 #include <wx-2.6/wx/window.h>
00007 #include <wx-2.6/wx/image.h>
00008 #include <wx-2.6/wx/dcclient.h>
00009 #include <wx-2.6/wx/dcmemory.h>
00010 #include <wx-2.6/wx/wx.h>
00011
00012 #include "ImgButton.h"
00013 #include "cardbox.h"
00014 #include "question-db.h"
00015 #include "global.h"
00016 #include <config.h>
00017 #include <stdlib.h>
00018 #include <string>
00019 #include <stdio.h>
00020 #include <time.h>
00021
00022 #ifndef _STARTSCREEN_H_
00023 #define _STARTSCREEN_H_
00024
00025 using namespace Limiro;
00026
00027 class exercise
00028 {
00029 public:
00030 exercise();
00031 void initialise(wxWindow *screen, SCR scr_quit, SCR scr_help, SCR scr_check, std::string temp);
00032 void show_statistics();
00033 void destroy();
00034 bool check();
00035 protected:
00036 Cardbox *cards;
00037 char* ans;
00038 const Question* question;
00039 wxStaticText* question_btn;
00040 wxTextCtrl* entry_btn;
00041 wxButton* help_btn;
00042 wxButton* check_btn;
00043 wxButton* quit_btn;
00044 wxWindow* window;
00045 int richtig;
00046 int anzahl;
00047 };
00048
00049 class control
00050 {
00051 public:
00052 control();
00053 void initialise(wxWindow *screen, SCR scr_control, std::string temp);
00054 void show_statistics(int anzahl, int richtig);
00055 void destroy();
00056 bool check();
00057 protected:
00058 Cardbox *cards;
00059 wxString** answers;
00060 const Question* question;
00061 wxStaticText** question_btn;
00062 wxTextCtrl** entry_btn;
00063 wxStaticText* caption_btn;
00064 wxButton* quit_btn;
00065 wxWindow* window;
00066 int richtig;
00067 int anzahl;
00068 int anzahl_fragen;
00069 };
00070
00071 class statistics
00072 {
00073 public:
00074
00075 protected:
00076
00077 };
00078
00079 class StartScreen : public wxWindow
00080 {
00081 public:
00082 StartScreen(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition);
00083 void start();
00084 void Paint();
00085 void Quit();
00086 void show_buttons(bool draw);
00087 void set_file(std::string temp);
00088 void OnPaint(wxPaintEvent& event);
00089 void OnMouseEvent(wxMouseEvent& event);
00090 void OnQuit(wxCommandEvent& event);
00091 void OnCheck(wxCommandEvent& event);
00092 void OnControl(wxCommandEvent& event);
00093 void OnHelp(wxCommandEvent& event);
00094 DECLARE_EVENT_TABLE()
00095
00096 private:
00097 wxBitmap *bg_bitmap;
00098 ImgButton *exercise_btn, *control_btn, *stat_btn;
00099 bool button;
00100 exercise exercise_manager;
00101 control control_manager;
00102 statistics statistics_manager;
00103 std::string file;
00104 };
00105
00106 #endif // _STARTSCREEN_H_