[l10n] Updated German doc translation
[dasher.git] / Src / Win32 / DasherWindow.h
blob1e28e0a64fac43179dc43510947472514d41ed80
1 // DasherWindow.h
2 //
3 /////////////////////////////////////////////////////////////////////////////
4 //
5 // Copyright (c) 2002 Iain Murray, Inference Group, Cavendish, Cambridge.
6 //
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef __DasherWindow_h__
10 #define __DasherWindow_h__
12 #include "resource.h"
14 #include "Widgets/Splitter.h"
15 #include "Widgets/StatusControl.h"
16 #include "Widgets/Menu.h"
17 #include "Widgets/SplashScreen.h"
18 #include "Widgets/WindowSelect.h"
19 #include "DasherMouseInput.h"
20 #include "AppSettings.h"
22 #include "../Common/WinOptions.h"
24 class CToolbar;
25 namespace Dasher {
26 class CDasher;
29 // Abstract interfaces to the Dasher engine
30 #include "../../DasherCore/DasherInterfaceBase.h"
32 #ifdef _WIN32_WCE
33 class CDasherWindow :
34 public ATL::CWindowImpl<CDasherWindow, CWindow, CWinTraits< WS_CLIPCHILDREN | WS_CLIPSIBLINGS> >,
35 public CSplitterOwner
37 #else
38 class CDasherWindow :
39 public ATL::CWindowImpl<CDasherWindow>,
40 public CSplitterOwner
42 #endif
43 public:
44 //, CWindow, CFrameWinTraits>,
46 CDasherWindow();
47 ~CDasherWindow();
49 DECLARE_WND_CLASS(_T("DASHER"))
51 BEGIN_MSG_MAP( CDasherWindow )
52 MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
53 MESSAGE_HANDLER(WM_COMMAND, OnCommand)
54 MESSAGE_HANDLER(WM_CLOSE, OnClose)
55 MESSAGE_HANDLER(WM_SIZE, OnSize)
56 #ifndef _WIN32_WCE
57 MESSAGE_HANDLER(WM_GETMINMAXINFO,OnGetMinMaxInfo)
58 #endif
59 MESSAGE_HANDLER(WM_INITMENUPOPUP,OnInitMenuPopup)
60 MESSAGE_HANDLER(WM_SETFOCUS,OnSetFocus)
61 MESSAGE_RANGE_HANDLER(0xC000,0xFFFF,OnOther)
62 END_MSG_MAP()
64 LRESULT OnSetFocus(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
65 LRESULT OnInitMenuPopup(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
66 #ifndef _WIN32_WCE
67 LRESULT OnGetMinMaxInfo(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
68 #endif
69 LRESULT OnOther(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
70 LRESULT OnDasherFocus(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
71 LRESULT OnSize(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
72 LRESULT OnDestroy(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
73 LRESULT OnClose(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
74 LRESULT OnCommand(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
77 // Create window (and children)
78 // failure returns NULL
79 HWND Create();
81 void Show(int nCmdShow);
83 int MessageLoop();
85 #ifndef _WIN32_WCE
86 void HandleWinEvent(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd,
87 LONG idObject, LONG idChild, DWORD dwEventThread, DWORD dwmsEventTime);
88 #endif
90 ///ACL making these public so can be called directly from CDasher,
91 /// rather than sending a windows message.
92 void HandleParameterChange(int iParameter);
94 private:
96 // Main processing function, called by MessageLoop
97 void Main();
99 void SaveWindowState() const;
100 bool LoadWindowState();
102 Dasher::CDasher *m_pDasher;
104 HACCEL hAccelTable;
106 // Widgets:
107 CToolbar *m_pToolbar;
108 CEdit *m_pEdit;
109 //CCanvas *m_pCanvas;
110 CSplitter *m_pSplitter;
111 CStatusControl *m_pSpeedAlphabetBar;
112 CMenu WinMenu;
113 //CSplash *Splash;
115 CAppSettings *m_pAppSettings;
117 HICON m_hIconSm;
119 HMENU m_hMenu;
121 LPCWSTR AutoOffset;
122 LPCWSTR DialogCaption;
123 char tmpAutoOffset[25];
125 // Misc window handling
126 void Layout();
129 #endif /* #ifdef __MainWindow_h__ */