00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
#ifndef _MAIN_H
00024
#define _MAIN_H
00025
00026
#ifdef WIN32
00027
#include "WinSockInit.h"
00028
#endif
00029
00030
00031
00032 #define SDL_USEREVENT_ADDFORM 1
00033 #define SDL_USEREVENT_DISCONNECT 2
00034
00035 #define UICOMMAND_QUIT 1
00036 #define UICOMMAND_XMLSAVE 2
00037
00038
00039 typedef std::vector<Form::Form *>
forms_t;
00040
00041
using iotm::IOMessage;
00042
using gui::SDLControl;
00043
using gui::GuiEvent;
00044
00045
class WinSockInit;
00046
class InitSDL;
00047
class MainWindow;
00048
class ConnectThread;
00049
00050 class Main :
public gui::GuiEvent
00051 {
00052
public:
00053
Main(
int argc,
char *argv[]);
00054
~Main();
00055
bool IsOK();
00056
void MainLoop();
00057
MainWindow *
GetWindow();
00058
00059
private:
00060
void AddForm(IOMessage *);
00061
void KeyboardEvent(SDL_KeyboardEvent &);
00062
void UserEvent(SDL_UserEvent &);
00063
00064
#ifdef WIN32
00065
WinSockInit m_clWinSock;
00066
#endif
00067
00068 SDLControl
m_clControl;
00069 MainWindow *
m_pclMainWindow;
00070
00071
00072 double m_angle1;
00073 double m_angle2;
00074 };
00075
00076
00077
#endif // _MAIN_H