home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / edtrcdll / src / imgcnvdl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.3 KB  |  94 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. /*imgcnvdl.h*/
  20. /*new dialog box for image conversion using Troy Chevalier's dialog box class*/
  21. #include "edtiface.h"
  22.  
  23. class CImageConversionDialog : public CDialog ,public IImageConversionDialog
  24. {
  25. public:
  26.     virtual int LOADDS DoModal();
  27.     CImageConversionDialog(HWND pParent = NULL);   // standard constructor
  28. private:
  29.     IWFEInterface *m_wfeiface;
  30.     HWND m_parent;
  31. // Dialog Data
  32.     enum { IDD = IDD_FECONVERTIMAGE };
  33.     CString    m_outfilevalue;
  34.     int m_listboxindex;
  35. /* necessary overrides */
  36.     virtual BOOL    DoTransfer(BOOL bSaveAndValidate);
  37.     virtual BOOL    OnCommand(int id, HWND hwndCtl, UINT notifyCode);
  38. /*elected overrides*/
  39.     virtual BOOL InitDialog();
  40.  
  41. /*called by OnCommand*/
  42.     void OnOK();
  43.     void OnCancel();
  44. private://methods
  45.     void setListBoxChange(int p_index);//update the text and the .ext on the filename
  46.     BOOL checkLock(){return m_filenamelock;}
  47.     void attachExtention(CString &p_string,const CString &p_ext);
  48. private://members set internally only
  49.     BOOL m_filenamelock;
  50.     CString m_oldstring; //used for comparison to see if variable changed
  51. private://members set from the outside
  52.     CString m_Doutfilename1;
  53.     CString m_Dinputimagetype;
  54.     DWORD m_Dinputimagesize;
  55.  
  56.     CONVERTOPTION *m_Doptionarray;
  57.     DWORD m_Doptionarraycount;
  58.     DWORD m_Doutputimagetype;//index into the above array
  59. public:
  60.     void LOADDS setConvertOptions(CONVERTOPTION *p_array,DWORD p_count){m_Doptionarray=p_array;m_Doptionarraycount=p_count;}
  61.     void LOADDS setOutputFileName1(const char *p_string);
  62.  
  63.     void LOADDS setOutputImageType1(DWORD p_dword){m_Doutputimagetype=p_dword;}
  64.     const char * LOADDS getOutputFileName1(){return m_Doutfilename1;}
  65.     DWORD LOADDS getOutputImageType1(){return m_Doutputimagetype;}
  66.  
  67.     void LOADDS setWFEInterface(IWFEInterface *iface){m_wfeiface=iface;}
  68. };
  69.  
  70.  
  71. class CJpegOptionsDialog : public CDialog ,public IJPEGOptionsDlg
  72. {
  73. public:
  74.     virtual int LOADDS DoModal();
  75.     CJpegOptionsDialog(HWND pParent = NULL);   // standard constructor
  76. private:
  77.     HWND m_parent;
  78. // Dialog Data
  79.     enum { IDD = IDD_FECONVERTIMAGE };
  80.     int m_outputquality;
  81. /* necessary overrides */
  82.     virtual BOOL    DoTransfer(BOOL bSaveAndValidate);
  83.     virtual BOOL    OnCommand(int id, HWND hwndCtl, UINT notifyCode);
  84. /*elected overrides*/
  85.     virtual BOOL InitDialog();
  86.     virtual void OnOK();
  87.     virtual void OnCancel();
  88. private:
  89.     int m_Doutputquality;
  90. public:
  91.     void LOADDS setOutputImageQuality(DWORD p_short){m_Doutputquality=p_short;}
  92.     DWORD LOADDS getOutputImageQuality(){return m_Doutputquality;}
  93. };
  94.