Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AIKDLG
00023 #define AIKDLG
00024
00025 #ifdef _MSC_VER
00026 #pragma warning(disable: 4786)
00027 #endif
00028
00029 #include <windows.h>
00030 #include <commctrl.h>
00031 #include <string>
00032 #include <list>
00033 #include <vector>
00034 #include "Aiksaurus.h"
00035 using namespace std;
00036
00037 #define MAX_WORD_LENGTH 50
00038
00039 class AiksaurusApp;
00040
00041 class AiksaurusDlg
00042 {
00043 public:
00044 AiksaurusDlg();
00045 virtual ~AiksaurusDlg();
00046 void runModal(AiksaurusApp * pApp);
00047 void setSearch(string word);
00048 string getReplacement();
00049
00050 static BOOL CALLBACK s_dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
00051
00052 BOOL _onInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam);
00053 BOOL _onCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
00054 BOOL _onSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam);
00055 BOOL _onDeltaPos(NM_UPDOWN * pnmud);
00056 HWND m_hDlg;
00057
00058 private:
00059 Aiksaurus thesaurus;
00060 HINSTANCE m_hInstance;
00061 HWND m_hSearch;
00062 HWND m_hBack;
00063 HWND m_hForward;
00064 HWND m_hMeanings;
00065 HWND m_hSynonyms;
00066 HWND m_hCombo;
00067 HWND m_hReplace;
00068 HWND m_hSynText;
00069 HICON m_hOrigIcon;
00070
00071 list<string> listBack;
00072 list<string> listForward;
00073 vector< list<string> > synonyms;
00074
00075 string m_szLookupWord;
00076 string m_szReplacementWord;
00077 bool m_bSearchBtnChanged;
00078 bool m_bBackBtnChanged;
00079 bool m_bForwardBtnChanged;
00080 bool m_bWordFound;
00081
00082 void _setNormalButtons();
00083 void _doSearch();
00084 void _onBack();
00085 void _onForward();
00086 void _addComboString( string str );
00087 void _clearListBoxes();
00088 void _clearSynonyms();
00089 void _clearMeanings();
00090 void _showAlternatives();
00091 void _showMeanings();
00092 void _showSynonyms( int index );
00093 void _copyToClipboard();
00094 };
00095
00096 #endif