• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

AiksaurusDlg.h

Go to the documentation of this file.
00001 /*
00002  * AiksaurusDlg - A Win32 interface to the AikSaurus library
00003  * Copyright (C) 2001 by Jared Davis, Michael D. Pritchett
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018  * 02110-1301 USA.
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

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1