//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright            : (C) 2008 by Eran Ifrah                            
// file name            : abbreviationssettingsdlg.h              
//                                                                          
// -------------------------------------------------------------------------
// A                                                                        
//              _____           _      _     _ _                            
//             /  __ \         | |    | |   (_) |                           
//             | /  \/ ___   __| | ___| |    _| |_ ___                      
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )                     
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/                     
//              \____/\___/ \__,_|\___\_____/_|\__\___|                     
//                                                                          
//                                                  F i l e                 
//                                                                          
//    This program is free software; you can redistribute it and/or modify  
//    it under the terms of the GNU General Public License as published by  
//    the Free Software Foundation; either version 2 of the License, or     
//    (at your option) any later version.                                   
//                                                                          
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

#ifndef __abbreviationssettingsdlg__
#define __abbreviationssettingsdlg__

/**
@file
Subclass of AbbreviationsSettingsBase, which is generated by wxFormBuilder.
*/

#include "abbreviationssettingsbase.h"
class IManager;

/** Implementing AbbreviationsSettingsBase */
class AbbreviationsSettingsDlg : public AbbreviationsSettingsBase
{
	IManager *m_mgr;
	bool m_dirty;
	wxString m_activeItemName;
	int m_currSelection;
	
protected:
	// Handlers for AbbreviationsSettingsBase events.
	void OnItemSelected( wxCommandEvent& event );
	void OnButtonOk( wxCommandEvent& event );
	void OnNew(wxCommandEvent &e);
	void OnMarkDirty( wxCommandEvent& event );
	void OnDelete( wxCommandEvent& event );
	void OnDeleteUI( wxUpdateUIEvent& event );
	void OnSave( wxCommandEvent& event );
	void OnSaveUI( wxUpdateUIEvent& event );
	
private:	
	void DoPopulateItems();
	void DoSelectItem(int item);
	void DoSaveCurrent();
	void DoDeleteEntry(const wxString &name);
	
public:
	/** Constructor */
	AbbreviationsSettingsDlg( wxWindow* parent, IManager *mgr );
	virtual ~AbbreviationsSettingsDlg();
};

#endif // __abbreviationssettingsdlg__
