// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ieopensavedlg.pas' rev: 30.00 (Windows)

#ifndef IeopensavedlgHPP
#define IeopensavedlgHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.Messages.hpp>
#include <System.SysUtils.hpp>
#include <Winapi.CommDlg.hpp>
#include <System.Classes.hpp>
#include <Vcl.Graphics.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ComCtrls.hpp>
#include <Vcl.Clipbrd.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Buttons.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Dialogs.hpp>
#include <hyieutils.hpp>
#include <hyiedefs.hpp>
#include <imageenio.hpp>
#include <imageenview.hpp>
#include <iemview.hpp>
#include <iemio.hpp>
#include <ievect.hpp>
#include <System.UITypes.hpp>

//-- user supplied -----------------------------------------------------------

namespace Ieopensavedlg
{
//-- forward type declarations -----------------------------------------------
struct TIEOpenFileNameEx;
class DELPHICLASS TIECommonDialog;
class DELPHICLASS TOpenImageEnDialog;
class DELPHICLASS TSaveImageEnDialog;
//-- type declarations -------------------------------------------------------
struct DECLSPEC_DRECORD TIEOpenFileNameEx
{
public:
	unsigned lStructSize;
	HWND hWndOwner;
	NativeUInt hInstance;
	void *lpstrFilter;
	void *lpstrCustomFilter;
	unsigned nMaxCustFilter;
	unsigned nFilterIndex;
	void *lpstrFile;
	unsigned nMaxFile;
	void *lpstrFileTitle;
	unsigned nMaxFileTitle;
	void *lpstrInitialDir;
	void *lpstrTitle;
	unsigned Flags;
	System::Word nFileOffset;
	System::Word nFileExtension;
	void *lpstrDefExt;
	NativeInt lCustData;
	unsigned __stdcall (*lpfnHook)(HWND Wnd, unsigned Msg, NativeUInt wParam, NativeInt lParam);
	void *lpTemplateName;
	void *pvReserved;
	unsigned dwReserved;
	unsigned FlagsEx;
};


typedef TIEOpenFileNameEx *PIEOpenFileNameEx;

typedef void __fastcall (__closure *TIEFileDlgPreviewEvent)(System::TObject* Sender, System::TObject* Viewer, System::UnicodeString FileName, bool ParamsOnly);

enum DECLSPEC_DENUM TIEDBorderStyle : unsigned char { iepsDefault, iepsCropped, iepsCropShadow, iepsSoftShadow };

enum DECLSPEC_DENUM TIECommonDialogView : unsigned char { iedvDefault, iedvSmallIcons, iedvMediumIcons, iedvLargeIcons, iedvExtraLargeIcons, iedvTiles, iedvList, iedvDetails };

enum DECLSPEC_DENUM TIEPreviewSize : unsigned char { iespDefault, iespTall, iespLarge };

enum DECLSPEC_DENUM TIEShowFormats : unsigned char { iesfImagesAndVideos, iesfImagesOnly, iesfVideosOnly, iesfAllOnly };

class PASCALIMPLEMENTATION TIECommonDialog : public System::Classes::TComponent
{
	typedef System::Classes::TComponent inherited;
	
private:
	bool FCtl3D;
	void *FDefWndProc;
	System::Classes::THelpContext FHelpContext;
	HWND FHandle;
	void *FObjectInstance;
	System::WideChar *FTemplate;
	System::Classes::TNotifyEvent FOnClose;
	System::Classes::TNotifyEvent FOnShow;
	bool fShowPlacesBar;
	TIECommonDialogView FFileView;
	Vcl::Extctrls::TTimer* fWatchTimer;
	MESSAGE void __fastcall WMDestroy(Winapi::Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMInitDialog(Winapi::Messages::TWMInitDialog &Message);
	MESSAGE void __fastcall WMNCDestroy(Winapi::Messages::TWMNoParams &Message);
	void __fastcall MainWndProc(Winapi::Messages::TMessage &Message);
	
protected:
	bool fExtendedDialog;
	DYNAMIC void __fastcall DoClose(void);
	DYNAMIC void __fastcall DoShow(void);
	virtual void __fastcall WndProc(Winapi::Messages::TMessage &Message);
	virtual bool __fastcall MessageHook(Winapi::Messages::TMessage &Msg);
	virtual System::LongBool __fastcall TaskModalDialog(void * DialogFunc, void *DialogData);
	virtual bool __fastcall Execute(void) = 0 ;
	__property System::WideChar * Template = {read=FTemplate, write=FTemplate};
	System::WideString __fastcall ExtractFilter(void * ss, int idx);
	
public:
	__fastcall virtual TIECommonDialog(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TIECommonDialog(void);
	virtual void __fastcall DefaultHandler(void *Message);
	__property HWND Handle = {read=FHandle, nodefault};
	
__published:
	__property bool Ctl3D = {read=FCtl3D, write=FCtl3D, default=1};
	__property System::Classes::THelpContext HelpContext = {read=FHelpContext, write=FHelpContext, default=0};
	__property System::Classes::TNotifyEvent OnClose = {read=FOnClose, write=FOnClose};
	__property System::Classes::TNotifyEvent OnShow = {read=FOnShow, write=FOnShow};
	__property bool ShowPlacesBar = {read=fShowPlacesBar, write=fShowPlacesBar, default=1};
	__property TIECommonDialogView FileView = {read=FFileView, write=FFileView, default=0};
	__property bool ExtendedDialog = {read=fExtendedDialog, write=fExtendedDialog, default=1};
};


class PASCALIMPLEMENTATION TOpenImageEnDialog : public TIECommonDialog
{
	typedef TIECommonDialog inherited;
	
private:
	bool m_blnInSelectionChange;
	Ievect::TImageEnVect* FImageEnView;
	Iemview::TImageEnMView* fImageEnMView;
	Vcl::Extctrls::TPanel* FPicturePanel;
	Vcl::Stdctrls::TLabel* fPicLabel1;
	Vcl::Stdctrls::TLabel* fPicLabel2;
	Vcl::Stdctrls::TLabel* fPicLabel3;
	Vcl::Extctrls::TPanel* fInfoPanel;
	Vcl::Stdctrls::TLabel* fInfoLabel1;
	Vcl::Stdctrls::TLabel* fInfoLabel2;
	Vcl::Buttons::TSpeedButton* FPreviewButton;
	Vcl::Stdctrls::TComboBox* FZoomComboBox;
	Vcl::Comctrls::TProgressBar* fProgressBar;
	Vcl::Buttons::TSpeedButton* fPlayButton;
	Vcl::Stdctrls::TButton* fAdvancedButton;
	Vcl::Stdctrls::TCheckBox* fPreviewCheck;
	int fFileSize;
	int fFrames;
	System::WideString fSelType;
	bool fAutoSetFilter;
	int fAutoSetFilterFileType;
	bool fAlwaysAnimate;
	bool fAutoAdjustDPI;
	bool fFilteredAdjustDPI;
	bool fGetExifThumbnail;
	System::Classes::TStrings* FHistoryList;
	System::Uitypes::TOpenOptions FOptions;
	System::UnicodeString FFilter;
	int FFilterIndex;
	int FFilterDefault;
	int FCurrentFilterIndex;
	System::UnicodeString FInitialDir;
	System::UnicodeString FTitle;
	System::UnicodeString FDefaultExt;
	System::WideString FFileNameW;
	System::Classes::TStrings* FFiles;
	Hyieutils::TIEWideStrings* FFilesW;
	Vcl::Dialogs::TFileEditStyle FFileEditStyle;
	System::Classes::TNotifyEvent FOnSelectionChange;
	System::Classes::TNotifyEvent FOnFolderChange;
	System::Classes::TNotifyEvent FOnTypeChange;
	Vcl::Forms::TCloseQueryEvent FOnCanClose;
	TIEDBorderStyle fPreviewBorderStyle;
	TIEShowFormats fShowFormats;
	System::UnicodeString fExtendedFilters;
	bool fShowAllFrames;
	int fSelectedFrame;
	void *OpenFileNameExShadow;
	System::Classes::TNotifyEvent fOnCreateCustomControls;
	System::Classes::TNotifyEvent fOnDestroyCustomControls;
	TIEFileDlgPreviewEvent fOnPreviewFile;
	bool FPreviewIsFullSize;
	TIEPreviewSize FPreviewSize;
	System::Sysutils::TFileName __fastcall GetFileName(void);
	System::WideString __fastcall GetFileNameW(void);
	System::WideString __fastcall GetLongFileName(void);
	System::WideString __fastcall GetFileName2(void);
	int __fastcall GetFilterIndex(void);
	void __fastcall ReadFileEditStyle(System::Classes::TReader* Reader);
	void __fastcall SetHistoryList(System::Classes::TStrings* Value);
	void __fastcall SetInitialDir(const System::UnicodeString Value);
	void __fastcall PreviewClick(System::TObject* Sender);
	void __fastcall PreviewKeyPress(System::TObject* Sender, System::WideChar &Key);
	void __fastcall ZoomComboChange(System::TObject* Sender);
	void __fastcall ImageEnIOProgress(System::TObject* Sender, int per);
	void __fastcall ShowIOParams(Imageenio::TIOParamsVals* params);
	void __fastcall DoCheckPreview(System::TObject* Sender);
	void __fastcall SetPreviewBorderStyle(TIEDBorderStyle v);
	void __fastcall SetZoomFilter(Hyiedefs::TResampleFilter v);
	Hyiedefs::TResampleFilter __fastcall GetZoomFilter(void);
	int __fastcall FileExtToFilterIndex(System::UnicodeString e, bool bExcludeCommon = false);
	int __fastcall FileTypeToFilterIndex(int FileType);
	void __fastcall SetAlwaysAnimate(bool value);
	void __fastcall SetFileName(System::Sysutils::TFileName value);
	void __fastcall SetPreviewSize(const TIEPreviewSize v);
	
protected:
	bool fShowPreview;
	void __fastcall PlayClick(System::TObject* Sender);
	bool __fastcall CanClose(TIEOpenFileNameEx &OpenFileName);
	DYNAMIC bool __fastcall DoCanClose(void);
	System::LongBool __fastcall DoExecute(void * Func);
	DYNAMIC void __fastcall DoSelectionChange(void);
	DYNAMIC void __fastcall DoFolderChange(void);
	DYNAMIC void __fastcall DoTypeChange(void);
	virtual void __fastcall DefineProperties(System::Classes::TFiler* Filer);
	void __fastcall GetFileNames(TIEOpenFileNameEx &OpenFileName);
	virtual System::Types::TRect __fastcall GetStaticRect(void);
	virtual void __fastcall WndProc(Winapi::Messages::TMessage &Message);
	virtual void __fastcall SetZoom(void);
	DYNAMIC void __fastcall DoClose(void);
	DYNAMIC void __fastcall DoShow(void);
	void __fastcall SetLang(void);
	void __fastcall OnMViewSelect(System::TObject* Sender, int idx);
	void __fastcall DoAllDisplayed(System::TObject* Sender);
	bool __fastcall LoadPreview(bool bFullSize);
	bool __fastcall NeedLoadPreviewFullSize(void);
	int __fastcall SelectedZoom(void);
	
public:
	__fastcall virtual TOpenImageEnDialog(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TOpenImageEnDialog(void);
	System::UnicodeString __fastcall BuildStrFilter(int LimitToType = 0xffffffff);
	virtual bool __fastcall Execute(void);
	__property Vcl::Dialogs::TFileEditStyle FileEditStyle = {read=FFileEditStyle, write=FFileEditStyle, nodefault};
	__property System::Classes::TStrings* Files = {read=FFiles};
	__property Hyieutils::TIEWideStrings* FilesW = {read=FFilesW};
	__property System::Classes::TStrings* HistoryList = {read=FHistoryList, write=SetHistoryList};
	__property Vcl::Extctrls::TPanel* PicturePanel = {read=FPicturePanel};
	__property Vcl::Extctrls::TPanel* InfoPanel = {read=fInfoPanel};
	__property Vcl::Stdctrls::TCheckBox* PreviewCheckBox = {read=fPreviewCheck};
	__property System::UnicodeString ExtendedFilters = {read=fExtendedFilters, write=fExtendedFilters};
	__property int SelectedFrame = {read=fSelectedFrame, write=fSelectedFrame, nodefault};
	__property System::WideString FileNameW = {read=GetFileNameW, write=FFileNameW};
	
__published:
	__property System::UnicodeString DefaultExt = {read=FDefaultExt, write=FDefaultExt};
	__property System::Sysutils::TFileName FileName = {read=GetFileName, write=SetFileName};
	__property System::UnicodeString Filter = {read=FFilter, write=FFilter};
	__property int FilterIndex = {read=GetFilterIndex, write=FFilterIndex, default=1};
	__property int FilterDefault = {read=FFilterDefault, write=FFilterDefault, default=-1};
	__property System::UnicodeString InitialDir = {read=FInitialDir, write=SetInitialDir};
	__property System::Uitypes::TOpenOptions Options = {read=FOptions, write=FOptions, default=4};
	__property System::UnicodeString Title = {read=FTitle, write=FTitle};
	__property Vcl::Forms::TCloseQueryEvent OnCanClose = {read=FOnCanClose, write=FOnCanClose};
	__property System::Classes::TNotifyEvent OnFolderChange = {read=FOnFolderChange, write=FOnFolderChange};
	__property System::Classes::TNotifyEvent OnSelectionChange = {read=FOnSelectionChange, write=FOnSelectionChange};
	__property System::Classes::TNotifyEvent OnTypeChange = {read=FOnTypeChange, write=FOnTypeChange};
	__property bool AutoSetFilter = {read=fAutoSetFilter, write=fAutoSetFilter, default=1};
	__property int AutoSetFilterFileType = {read=fAutoSetFilterFileType, write=fAutoSetFilterFileType, default=-1};
	__property bool AlwaysAnimate = {read=fAlwaysAnimate, write=SetAlwaysAnimate, default=0};
	__property TIEDBorderStyle PreviewBorderStyle = {read=fPreviewBorderStyle, write=SetPreviewBorderStyle, default=0};
	__property bool AutoAdjustDPI = {read=fAutoAdjustDPI, write=fAutoAdjustDPI, default=0};
	__property bool GetExifThumbnail = {read=fGetExifThumbnail, write=fGetExifThumbnail, default=0};
	__property bool FilteredAdjustDPI = {read=fFilteredAdjustDPI, write=fFilteredAdjustDPI, default=0};
	__property Hyiedefs::TResampleFilter ZoomFilter = {read=GetZoomFilter, write=SetZoomFilter, default=9};
	__property bool ShowAllFrames = {read=fShowAllFrames, write=fShowAllFrames, default=1};
	__property TIEShowFormats ShowFormats = {read=fShowFormats, write=fShowFormats, default=0};
	__property TIEPreviewSize PreviewSize = {read=FPreviewSize, write=SetPreviewSize, default=0};
	__property System::Classes::TNotifyEvent OnCreateCustomControls = {read=fOnCreateCustomControls, write=fOnCreateCustomControls};
	__property System::Classes::TNotifyEvent OnDestroyCustomControls = {read=fOnDestroyCustomControls, write=fOnDestroyCustomControls};
	__property TIEFileDlgPreviewEvent OnPreviewFile = {read=fOnPreviewFile, write=fOnPreviewFile};
};


enum DECLSPEC_DENUM Ieopensavedlg__3 : unsigned char { sdShowPreview, sdShowAdvanced };

typedef System::Set<Ieopensavedlg__3, Ieopensavedlg__3::sdShowPreview, Ieopensavedlg__3::sdShowAdvanced> TIESaveDlgOpt;

class PASCALIMPLEMENTATION TSaveImageEnDialog : public TOpenImageEnDialog
{
	typedef TOpenImageEnDialog inherited;
	
private:
	TIESaveDlgOpt fExOptions;
	System::Classes::TComponent* fAttachedImageEnIO;
	void __fastcall OnWatchTimer(System::TObject* Sender);
	void __fastcall DoAdvanced(System::TObject* Sender);
	void __fastcall SetAttachedImageEnIO(System::Classes::TComponent* v);
	
protected:
	DYNAMIC void __fastcall DoTypeChange(void);
	virtual void __fastcall SetFileNameExt(void);
	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
	void __fastcall GetAdvancedType(Imageenio::TPreviewParams &pp, int &ft);
	void __fastcall EnableDisableAdvanced(void);
	
public:
	__fastcall virtual TSaveImageEnDialog(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TSaveImageEnDialog(void);
	virtual bool __fastcall Execute(void);
	
__published:
	__property TIESaveDlgOpt ExOptions = {read=fExOptions, write=fExOptions, nodefault};
	__property System::Classes::TComponent* AttachedImageEnIO = {read=fAttachedImageEnIO, write=SetAttachedImageEnIO};
};


//-- var, const, procedure ---------------------------------------------------
}	/* namespace Ieopensavedlg */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_IEOPENSAVEDLG)
using namespace Ieopensavedlg;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// IeopensavedlgHPP
