00001
00002
00003
00004 #include <config.h>
00005
00006 #ifdef WIN32
00007 #include <wx/window.h>
00008 #include <wx/image.h>
00009 #include <wx/dcclient.h>
00010 #include <wx/dcmemory.h>
00011 #include <wx/wx.h>
00012 #else
00013 #include <wx-2.6/wx/window.h>
00014 #include <wx-2.6/wx/image.h>
00015 #include <wx-2.6/wx/dcclient.h>
00016 #include <wx-2.6/wx/dcmemory.h>
00017 #include <wx-2.6/wx/wx.h>
00018 #endif
00019
00020 #include "ImgButton.h"
00021 #include "MyCounter.h"
00022 #include "MyDate.h"
00023 #include "global.h"
00024 #include "exercise.h"
00025 #include "control.h"
00026 #include "statistics.h"
00027 #include "MyTheme.h"
00028 #include "MyClass.h"
00029 #include "MySubject.h"
00030 #include "Logger.h"
00031 #include <config.h>
00032 #include <stdlib.h>
00033 #include <string>
00034 #include <vector>
00035 #include <stdio.h>
00036 #include <time.h>
00037
00038 #ifndef _MYFRAME_H_
00039 #define _MYFRAME_H_
00040
00041 using namespace Limiro;
00042
00043 class MyFrame : public wxFrame
00044 {
00045 public:
00046 MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
00047
00048 void OnQuit(wxCommandEvent& event);
00049 void OnAbout(wxCommandEvent& event);
00050 void OnOpen(wxCommandEvent& event);
00051 void OnPaint(wxPaintEvent& event);
00052 void OnMouseEvent(wxMouseEvent& event);
00053 void OnEnd(wxCommandEvent& event);
00054 void OnCheck(wxCommandEvent& event);
00055 void OnControl(wxCommandEvent& event);
00056 void OnOut(wxCommandEvent& out);
00057 void OnHelp(wxCommandEvent& event);
00058 void OnInfo(wxCommandEvent& event);
00059 void OnEnter(wxCommandEvent& event);
00060 void OnStatistics(wxCommandEvent& event);
00061 void OnQuitStatistics(wxCommandEvent& event);
00062 void OnTimer(wxTimerEvent& event);
00063 void OnSize(wxSizeEvent& event);
00064 DECLARE_EVENT_TABLE();
00065 protected:
00066 void start();
00067 void Open();
00068 void show_buttons(bool draw);
00069 void LayoutButtons();
00070 void Paint();
00071 void QuitExercise();
00072 void QuitControl();
00073 void QuitStatistics();
00074 void Quit();
00075 void check_exercise();
00076
00077 MyTheme *my_theme;
00078 MyClass *my_class;
00079 MySubject *my_subject;
00080
00081 wxBitmap *bg_bitmap;
00082 ImgButton *open_btn, *exercise_btn, *control_btn, *stat_btn, *quit_btn;
00083 bool first_time;
00084 bool button;
00085 bool statistic;
00086
00087 exercise exercise_manager;
00088 control control_manager;
00089 statistics statistics_manager;
00090 CatalogList catalogs;
00091
00092 int width,height;
00093 };
00094
00095 #endif // _MYFRAME_H_