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

// (DO NOT EDIT: machine generated header) 'Anydialogs.pas' rev: 21.00

#ifndef AnydialogsHPP
#define AnydialogsHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Anycommdlg.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Types.hpp>	// Pascal unit

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

namespace Anydialogs
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TCustomDialog;
class PASCALIMPLEMENTATION TCustomDialog : public Classes::TComponent
{
	typedef Classes::TComponent inherited;
	
private:
	bool FCtl3D;
	void *FDefWndProc;
	Classes::THelpContext FHelpContext;
	HWND FHandle;
	void *FObjectInstance;
	char *FTemplate;
	Classes::TNotifyEvent FOnClose;
	Classes::TNotifyEvent FOnShow;
	MESSAGE void __fastcall WMDestroy(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMInitDialog(Messages::TWMInitDialog &Message);
	MESSAGE void __fastcall WMNCDestroy(Messages::TWMNoParams &Message);
	void __fastcall MainWndProc(Messages::TMessage &Message);
	
protected:
	DYNAMIC void __fastcall DoClose(void);
	DYNAMIC void __fastcall DoShow(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	virtual bool __fastcall MessageHook(Messages::TMessage &Msg);
	virtual BOOL __fastcall TaskModalDialog(void * DialogFunc, void *DialogData);
	virtual bool __fastcall Execute(void) = 0 ;
	__property char * Template = {read=FTemplate, write=FTemplate};
	
public:
	__fastcall virtual TCustomDialog(Classes::TComponent* AOwner);
	__fastcall virtual ~TCustomDialog(void);
	virtual void __fastcall DefaultHandler(void *Message);
	__property HWND Handle = {read=FHandle, nodefault};
	
__published:
	__property bool Ctl3D = {read=FCtl3D, write=FCtl3D, default=1};
	__property Classes::THelpContext HelpContext = {read=FHelpContext, write=FHelpContext, default=0};
	__property Classes::TNotifyEvent OnClose = {read=FOnClose, write=FOnClose};
	__property Classes::TNotifyEvent OnShow = {read=FOnShow, write=FOnShow};
};


#pragma option push -b-
enum TOpenOption { ofReadOnly, ofOverwritePrompt, ofHideReadOnly, ofNoChangeDir, ofShowHelp, ofNoValidate, ofAllowMultiSelect, ofExtensionDifferent, ofPathMustExist, ofFileMustExist, ofCreatePrompt, ofShareAware, ofNoReadOnlyReturn, ofNoTestFileCreate, ofNoNetworkButton, ofNoLongNames, ofOldStyleDialog, ofNoDereferenceLinks, ofEnableIncludeNotify, ofEnableSizing, ofDontAddToRecent, ofForceShowHidden };
#pragma option pop

typedef Set<TOpenOption, ofReadOnly, ofForceShowHidden>  TOpenOptions;

#pragma option push -b-
enum TOpenOptionEx { ofExNoPlacesBar };
#pragma option pop

typedef Set<TOpenOptionEx, ofExNoPlacesBar, ofExNoPlacesBar>  TOpenOptionsEx;

#pragma option push -b-
enum TFileEditStyle { fsEdit, fsComboBox };
#pragma option pop

class DELPHICLASS TAnyOpenDialog;
class PASCALIMPLEMENTATION TAnyOpenDialog : public TCustomDialog
{
	typedef TCustomDialog inherited;
	
private:
	Classes::TStrings* FHistoryList;
	TOpenOptions FOptions;
	System::AnsiString FFilter;
	int FFilterIndex;
	int FCurrentFilterIndex;
	System::AnsiString FInitialDir;
	System::AnsiString FTitle;
	System::AnsiString FDefaultExt;
	System::AnsiString FFileName;
	Classes::TStrings* FFiles;
	TOpenOptionsEx FOptionsEx;
	TFileEditStyle FFileEditStyle;
	Classes::TNotifyEvent FOnSelectionChange;
	Classes::TNotifyEvent FOnFolderChange;
	Classes::TNotifyEvent FOnTypeChange;
	Forms::TCloseQueryEvent FOnCanClose;
	System::AnsiString __fastcall GetFileName(void);
	int __fastcall GetFilterIndex(void);
	void __fastcall ReadFileEditStyle(Classes::TReader* Reader);
	void __fastcall SetHistoryList(Classes::TStrings* Value);
	void __fastcall SetInitialDir(const System::AnsiString Value);
	
protected:
	bool __fastcall CanClose(tagOFNA &OpenFileName);
	DYNAMIC bool __fastcall DoCanClose(void);
	BOOL __fastcall DoExecute(void * Func);
	DYNAMIC void __fastcall DoSelectionChange(void);
	DYNAMIC void __fastcall DoFolderChange(void);
	DYNAMIC void __fastcall DoTypeChange(void);
	virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
	void __fastcall GetFileNames(tagOFNA &OpenFileName);
	virtual Types::TRect __fastcall GetStaticRect(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	
public:
	__fastcall virtual TAnyOpenDialog(Classes::TComponent* AOwner);
	__fastcall virtual ~TAnyOpenDialog(void);
	virtual bool __fastcall Execute(void);
	__property TFileEditStyle FileEditStyle = {read=FFileEditStyle, write=FFileEditStyle, nodefault};
	__property Classes::TStrings* Files = {read=FFiles};
	__property Classes::TStrings* HistoryList = {read=FHistoryList, write=SetHistoryList};
	
__published:
	__property System::AnsiString DefaultExt = {read=FDefaultExt, write=FDefaultExt};
	__property System::AnsiString FileName = {read=GetFileName, write=FFileName};
	__property System::AnsiString Filter = {read=FFilter, write=FFilter};
	__property int FilterIndex = {read=GetFilterIndex, write=FFilterIndex, default=1};
	__property System::AnsiString InitialDir = {read=FInitialDir, write=SetInitialDir};
	__property TOpenOptions Options = {read=FOptions, write=FOptions, default=524292};
	__property System::AnsiString Title = {read=FTitle, write=FTitle};
	__property TOpenOptionsEx OptionsEx = {read=FOptionsEx, write=FOptionsEx, default=0};
	__property Forms::TCloseQueryEvent OnCanClose = {read=FOnCanClose, write=FOnCanClose};
	__property Classes::TNotifyEvent OnFolderChange = {read=FOnFolderChange, write=FOnFolderChange};
	__property Classes::TNotifyEvent OnSelectionChange = {read=FOnSelectionChange, write=FOnSelectionChange};
	__property Classes::TNotifyEvent OnTypeChange = {read=FOnTypeChange, write=FOnTypeChange};
};


class DELPHICLASS TAnySaveDialog;
class PASCALIMPLEMENTATION TAnySaveDialog : public TAnyOpenDialog
{
	typedef TAnyOpenDialog inherited;
	
__published:
	virtual bool __fastcall Execute(void);
public:
	/* TAnyOpenDialog.Create */ inline __fastcall virtual TAnySaveDialog(Classes::TComponent* AOwner) : TAnyOpenDialog(AOwner) { }
	/* TAnyOpenDialog.Destroy */ inline __fastcall virtual ~TAnySaveDialog(void) { }
	
};


#pragma option push -b-
enum TAnyColorDialogOption { cdFullOpen, cdPreventFullOpen, cdShowHelp, cdSolidColor, cdAnyColor };
#pragma option pop

typedef Set<TAnyColorDialogOption, cdFullOpen, cdAnyColor>  TAnyColorDialogOptions;

typedef StaticArray<int, 16> TCustomColors;

class DELPHICLASS TAnyColorDialog;
class PASCALIMPLEMENTATION TAnyColorDialog : public TCustomDialog
{
	typedef TCustomDialog inherited;
	
private:
	Graphics::TColor FColor;
	TAnyColorDialogOptions FOptions;
	Classes::TStrings* FCustomColors;
	void __fastcall SetCustomColors(Classes::TStrings* Value);
	
public:
	__fastcall virtual TAnyColorDialog(Classes::TComponent* AOwner);
	__fastcall virtual ~TAnyColorDialog(void);
	virtual bool __fastcall Execute(void);
	
__published:
	__property Graphics::TColor Color = {read=FColor, write=FColor, default=0};
	__property Ctl3D = {default=0};
	__property Classes::TStrings* CustomColors = {read=FCustomColors, write=SetCustomColors};
	__property TAnyColorDialogOptions Options = {read=FOptions, write=FOptions, default=0};
};


#pragma option push -b-
enum TAnyFontDialogOption { fdAnsiOnly, fdTrueTypeOnly, fdEffects, fdFixedPitchOnly, fdForceFontExist, fdNoFaceSel, fdNoOEMFonts, fdNoSimulations, fdNoSizeSel, fdNoStyleSel, fdNoVectorFonts, fdShowHelp, fdWysiwyg, fdLimitSize, fdScalableOnly, fdApplyButton };
#pragma option pop

typedef Set<TAnyFontDialogOption, fdAnsiOnly, fdApplyButton>  TAnyFontDialogOptions;

#pragma option push -b-
enum TAnyFontDialogDevice { fdScreen, fdPrinter, fdBoth };
#pragma option pop

typedef void __fastcall (__closure *TFDApplyEvent)(System::TObject* Sender, HWND Wnd);

class DELPHICLASS TAnyFontDialog;
class PASCALIMPLEMENTATION TAnyFontDialog : public TCustomDialog
{
	typedef TCustomDialog inherited;
	
private:
	Graphics::TFont* FFont;
	TAnyFontDialogDevice FDevice;
	TAnyFontDialogOptions FOptions;
	TFDApplyEvent FOnApply;
	int FMinFontSize;
	int FMaxFontSize;
	bool FFontCharsetModified;
	bool FFontColorModified;
	void __fastcall DoApply(HWND Wnd);
	void __fastcall SetFont(Graphics::TFont* Value);
	void __fastcall UpdateFromLogFont(const tagLOGFONTW &LogFont);
	
protected:
	DYNAMIC void __fastcall Apply(HWND Wnd);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	
public:
	__fastcall virtual TAnyFontDialog(Classes::TComponent* AOwner);
	__fastcall virtual ~TAnyFontDialog(void);
	virtual bool __fastcall Execute(void);
	
__published:
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property TAnyFontDialogDevice Device = {read=FDevice, write=FDevice, default=0};
	__property int MinFontSize = {read=FMinFontSize, write=FMinFontSize, nodefault};
	__property int MaxFontSize = {read=FMaxFontSize, write=FMaxFontSize, nodefault};
	__property TAnyFontDialogOptions Options = {read=FOptions, write=FOptions, default=4};
	__property TFDApplyEvent OnApply = {read=FOnApply, write=FOnApply};
};


#pragma option push -b-
enum TFindOption { frDown, frFindNext, frHideMatchCase, frHideWholeWord, frHideUpDown, frMatchCase, frDisableMatchCase, frDisableUpDown, frDisableWholeWord, frReplace, frReplaceAll, frWholeWord, frShowHelp };
#pragma option pop

typedef Set<TFindOption, frDown, frShowHelp>  TFindOptions;

typedef HWND __stdcall (*TFindReplaceFunc)(tagFINDREPLACEA &FindReplace);

class DELPHICLASS TAnyFindDialog;
class PASCALIMPLEMENTATION TAnyFindDialog : public TCustomDialog
{
	typedef TCustomDialog inherited;
	
private:
	TFindOptions FOptions;
	Types::TPoint FPosition;
	TFindReplaceFunc FFindReplaceFunc;
	Controls::TWinControl* FRedirector;
	Classes::TNotifyEvent FOnFind;
	Classes::TNotifyEvent FOnReplace;
	HWND FFindHandle;
	#pragma pack(push,1)
	tagFINDREPLACEA FFindReplace;
	#pragma pack(pop)
	StaticArray<char, 256> FFindText;
	StaticArray<char, 256> FReplaceText;
	System::AnsiString __fastcall GetFindText(void);
	int __fastcall GetLeft(void);
	Types::TPoint __fastcall GetPosition(void);
	System::AnsiString __fastcall GetReplaceText(void);
	int __fastcall GetTop(void);
	void __fastcall SetFindText(const System::AnsiString Value);
	void __fastcall SetLeft(int Value);
	void __fastcall SetPosition(const Types::TPoint &Value);
	void __fastcall SetReplaceText(const System::AnsiString Value);
	void __fastcall SetTop(int Value);
	
protected:
	__property System::AnsiString ReplaceText = {read=GetReplaceText, write=SetReplaceText};
	__property Classes::TNotifyEvent OnReplace = {read=FOnReplace, write=FOnReplace};
	virtual bool __fastcall MessageHook(Messages::TMessage &Msg);
	DYNAMIC void __fastcall Find(void);
	DYNAMIC void __fastcall Replace(void);
	
public:
	__fastcall virtual TAnyFindDialog(Classes::TComponent* AOwner);
	__fastcall virtual ~TAnyFindDialog(void);
	void __fastcall CloseDialog(void);
	virtual bool __fastcall Execute(void);
	__property int Left = {read=GetLeft, write=SetLeft, nodefault};
	__property Types::TPoint Position = {read=GetPosition, write=SetPosition};
	__property int Top = {read=GetTop, write=SetTop, nodefault};
	
__published:
	__property System::AnsiString FindText = {read=GetFindText, write=SetFindText};
	__property TFindOptions Options = {read=FOptions, write=FOptions, default=1};
	__property Classes::TNotifyEvent OnFind = {read=FOnFind, write=FOnFind};
};


//-- var, const, procedure ---------------------------------------------------
static const ShortInt MaxCustomColors = 0x10;
extern PACKAGE bool ForceCurrentDirectory;
extern "C" HWND __stdcall AnyFindText(tagFINDREPLACEA &FindReplace);

}	/* namespace Anydialogs */
using namespace Anydialogs;
#pragma pack(pop)
#pragma option pop

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