/*
** 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 1, or (at your option)
** any later version.

** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.

** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

/*
 * Author : V.Antonevich <v_antonevich@hotmail.com>
 */

#if !defined(AFX_TOOLBARCOMBO_H__3AE857F3_B4BD_11D4_8200_005004D6EF6C__INCLUDED_)
#define AFX_TOOLBARCOMBO_H__3AE857F3_B4BD_11D4_8200_005004D6EF6C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ToolbarCombo.h : header file
//

#include "BrowseViewModel.h"
#include "tbedit.h"

/////////////////////////////////////////////////////////////////////////////
// CToolbarCombo window

class CToolbarCombo : public CComboBoxEx
{
// Construction
public:
	CToolbarCombo();

// Attributes
private:
	CTbEdit m_edit;
	NotificationManager m_manager;
	CString m_text;

// Operations
public:
	BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);

	NotificationManager* GetManager()
	{
		return &m_manager;
	}

	const CString& GetText()
	{
		return m_text;
	}


	// retrieves text of an item 
	// parameters
	//   pos - item index
	//   buffer - buffer to receive the text
	//   count - count of characters in the buffer
	void GetItemText(int pos, LPTSTR buffer, int count);


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CToolbarCombo)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CToolbarCombo();

	// Generated message map functions
protected:
	void SetText(const CString& text);
	void ResetText();

	//{{AFX_MSG(CToolbarCombo)
	afx_msg void OnSelendok();
	afx_msg void OnSelendcancel();
	//}}AFX_MSG
	afx_msg LRESULT OnContentChange(WPARAM wp, LPARAM lp);
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TOOLBARCOMBO_H__3AE857F3_B4BD_11D4_8200_005004D6EF6C__INCLUDED_)
