mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
(including mechanism to inject a different control implementation + as I needed to add an header include to most form header files, I reordered include sections along a bit) Source commit: aa2a1b6f5daf70865c0c87c0733aad1be4825b83
60 lines
2.0 KiB
C++
60 lines
2.0 KiB
C++
//---------------------------------------------------------------------------
|
|
#ifndef SelectMaskH
|
|
#define SelectMaskH
|
|
//---------------------------------------------------------------------------
|
|
#include <Classes.hpp>
|
|
#include <Controls.hpp>
|
|
#include <StdCtrls.hpp>
|
|
#include <Forms.hpp>
|
|
#include <HistoryComboBox.hpp>
|
|
#include <CustomDirView.hpp>
|
|
#include <Buttons.hpp>
|
|
//---------------------------------------------------------------------------
|
|
#include <WinInterface.h>
|
|
#include <GUITools.h>
|
|
//---------------------------------------------------------------------------
|
|
class TSelectMaskDialog : public TForm
|
|
{
|
|
__published:
|
|
TButton * OKBtn;
|
|
TButton * CancelBtn;
|
|
TGroupBox * MaskGroup;
|
|
TLabel * Label3;
|
|
THistoryComboBox * MaskEdit;
|
|
TCheckBox * ApplyToDirectoriesCheck;
|
|
TButton * HelpButton;
|
|
TStaticText * HintText;
|
|
TButton * ClearButton;
|
|
TButton * MaskButton;
|
|
TButton *ColorButton;
|
|
TLabel *ColorFileNamesLabel;
|
|
TLabel *ColorSizesLabel;
|
|
TLabel *ColorPaddingLabel;
|
|
void __fastcall FormCloseQuery(TObject * Sender, bool & CanClose);
|
|
void __fastcall MaskEditExit(TObject * Sender);
|
|
void __fastcall HelpButtonClick(TObject * Sender);
|
|
void __fastcall ClearButtonClick(TObject * Sender);
|
|
void __fastcall FormShow(TObject * Sender);
|
|
void __fastcall MaskButtonClick(TObject * Sender);
|
|
void __fastcall ColorButtonClick(TObject *Sender);
|
|
void __fastcall MaskEditChange(TObject *Sender);
|
|
private:
|
|
TControl * FParent;
|
|
std::unique_ptr<TPopupMenu> FColorPopupMenu;
|
|
TColor FColor;
|
|
|
|
void __fastcall ColorChange(TColor Color);
|
|
void __fastcall UpdateControls();
|
|
|
|
INTERFACE_HOOK;
|
|
|
|
public:
|
|
enum TMode { smSelect, smDeselect, smFilter, smFileColor };
|
|
__fastcall TSelectMaskDialog(TComponent* Owner);
|
|
void __fastcall Init(TMode Mode, TControl * Parent);
|
|
bool __fastcall Execute(TFileFilter & FileFilter, TColor & Color);
|
|
bool __fastcall Execute(UnicodeString & Mask, TColor & Color);
|
|
};
|
|
//---------------------------------------------------------------------------
|
|
#endif
|