www.pudn.com > uoth_src.zip > PrintDlg.h


#ifndef DSSI_PRINTDLG_H 
#define DSSI_PRINTDLG_H 
 
//----------------------------------------------------------------------------- 
//  
// @doc 
// 
// @module	PrintDlg.h - Print selection dialog | 
// 
// This module contains the definition of the print selection dialog. 
// 
// Copyright (c) 2002 - Descartes Systems Sciences, Inc. 
// 
// All rights reserved. 
// 
// Redistribution and use in source and binary forms, with or without  
// modification, are permitted provided that the following conditions are  
// met: 
//  
// 1. Redistributions of source code must retain the above copyright notice,  
//    this list of conditions and the following disclaimer.  
// 2. Neither the name of Descartes Systems Sciences, Inc nor the names of  
//    its contributors may be used to endorse or promote products derived  
//    from this software without specific prior written permission. 
// 
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT  
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED  
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR  
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING  
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS  
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
// 
// @end 
// 
// $History: PrintDlg.h $ 
//       
//----------------------------------------------------------------------------- 
 
//----------------------------------------------------------------------------- 
// 
// Required include files 
// 
//----------------------------------------------------------------------------- 
 
#include "resource.h" 
#include "FilterDlg.h" 
 
//----------------------------------------------------------------------------- 
// 
// Forward definitions 
// 
//----------------------------------------------------------------------------- 
 
class CFilter; 
 
//----------------------------------------------------------------------------- 
// 
// Class definition 
// 
//----------------------------------------------------------------------------- 
 
class CPrintDlg : 
	public CDialogImpl  
{ 
	 
// @access Public types 
public: 
	enum { IDD = IDD_PRINT }; 
 
	enum _Content 
	{ 
		Treasures		= 0, 
		Regions			= 1, 
	}; 
 
	enum _MapImage 
	{ 
		NoImage			= 0, 
		BW_Small		= 1, 
		BW_Large		= 2, 
		Color_Small		= 3, 
		Color_Large		= 4, 
	}; 
 
// @access Constructors and destructors 
public: 
 
	// @cmember General constructor 
 
	CPrintDlg (CFilter *pFilter); 
 
	// @cmember General destructor 
 
	~CPrintDlg (); 
 
// @access Public methods 
public: 
 
	// @cmember Display the dialog 
	 
	int DoModal (HWND hWndParent) 
	{ 
		m_nContent = Treasures; 
		m_nMapImage = BW_Small; 
		m_fTerse = true; 
		return CDialogImpl ::DoModal (hWndParent); 
	} 
 
// @access ATL dialog support 
public: 
	BEGIN_MSG_MAP (CPrintDlg) 
	    MESSAGE_HANDLER (WM_INITDIALOG, OnInitDialog) 
 
		COMMAND_ID_HANDLER (ID_FILE_PAGE_SETUP, OnFilePageSetup) 
 
	    COMMAND_ID_HANDLER (IDOK, OnOk) 
	    COMMAND_ID_HANDLER (IDCANCEL, OnCancel) 
	END_MSG_MAP () 
 
// @access Message handlers 
protected: 
 
	// @cmember Initialize the dialog 
	 
	LRESULT OnInitDialog (UINT uMsg,  
		WPARAM wParam, LPARAM lParam, BOOL &bHandled); 
 
	// @cmember Handle the OK button 
 
	LRESULT OnOk (WORD wNotifyCode,  
		WORD wID, HWND hWndCtl, BOOL &bHandled); 
 
	// @cmember Handle the Cancel button 
 
	LRESULT OnCancel (WORD wNotifyCode,  
		WORD wID, HWND hWndCtl, BOOL &bHandled); 
 
	// @cmember Handle file page setup 
 
	LRESULT OnFilePageSetup (WORD wNotifyCode,  
		WORD wID, HWND hWndCtl, BOOL& bHandled); 
		 
// @access Public member variables 
public: 
 
	// @cmember Type of content to display 
 
	_Content			m_nContent; 
 
	// @cmember Map image mode 
 
	_MapImage			m_nMapImage; 
 
	// @cmember If true, terse information 
 
	bool				m_fTerse; 
 
// @access Protected member variables 
protected: 
 
	// @cmember Context combobox 
 
	CComboBox			m_cbContent; 
 
	// @cmember Map image combobox 
 
	CComboBox			m_cbMapImage; 
 
	// @cmember Terse button 
 
	CButton				m_btnTerse; 
 
	// @cmember Filter dialog 
 
	CFilterDlg			m_dlgFilter; 
}; 
 
#endif // DSSI_PRINTDLG_H