Visual studio 2005 thinks that long long int is 64 bit. The difference between
[dasher.git] / Src / Win32 / Dasher.h
blob5b10f4953f9ac2d4705112280b8bf75c29819c8a
1 #pragma once
3 #include "Common/wincommon.h"
4 #include "../DasherCore/DasherInterfaceBase.h"
5 #include "../DasherCore/UserLog.h"
7 #include <string>
8 #include <vector>
10 extern CONST UINT WM_DASHER_EVENT;
11 #define _WM_DASHER_EVENT (LPCWSTR)"wm_dasher_event"
13 extern CONST UINT WM_DASHER_FOCUS;
14 #define _WM_DASHER_FOCUS (LPCWSTR)"wm_dasher_focus"
16 extern CONST UINT WM_DASHER_GAME_MESSAGE;
17 #define _WM_DASHER_GAME_MESSAGE (LPCWSTR)"wm_dasher_game_message"
20 class CCanvas;
21 class CSlidebar;
22 class CDashEditbox;
24 namespace Dasher {
25 class CDasher : public CDasherInterfaceBase
27 public:
28 CDasher(HWND Parent);
29 ~CDasher(void);
31 // The following functions will not be part of the final interface
32 // In order to get rid of this, it'll be necessary to make this class
33 // act more like a UI widget.
35 //CCanvas *GetCanvas() {
36 // return m_pCanvas;
37 //}
39 // TODO: Can some of these be obtained by inheriting from something?
40 void Move(int iX, int iY, int iWidth, int iHeight);
41 void TakeFocus();
43 void SetEdit(CDashEditbox * pEdit);
45 void ExternalEventHandler(Dasher::CEvent *pEvent);
46 void GameMessageOut(int message, const void* messagedata);
48 virtual void WriteTrainFile(const std::string &strNewText);
50 void Main();
53 private:
55 virtual void ScanAlphabetFiles(std::vector<std::string> &vFileList);
56 virtual void ScanColourFiles(std::vector<std::string> &vFileList);
57 virtual void SetupPaths();
58 virtual void SetupUI();
59 virtual void CreateLocalFactories();
60 virtual void StartTimer();
61 virtual void ShutdownTimer();
62 void CreateSettingsStore();
64 virtual int GetFileSize(const std::string &strFileName);
65 void ScanDirectory(const Tstring &strMask, std::vector<std::string> &vFileList);
66 bool GetWindowSize(int* pTop, int* pLeft, int* pBottom, int* pRight);
67 void Log(); // Does the logging
69 CCanvas *m_pCanvas;
70 CDashEditbox *m_pEdit;
72 HWND m_hParent;