SelectMask.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //---------------------------------------------------------------------------
  2. #ifndef SelectMaskH
  3. #define SelectMaskH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <HistoryComboBox.hpp>
  10. #include <CustomDirView.hpp>
  11. #include <WinInterface.h>
  12. #include <Buttons.hpp>
  13. //---------------------------------------------------------------------------
  14. class TSelectMaskDialog : public TForm
  15. {
  16. __published:
  17. TButton * OKBtn;
  18. TButton * CancelBtn;
  19. TGroupBox * MaskGroup;
  20. TLabel * Label3;
  21. THistoryComboBox * MaskEdit;
  22. TCheckBox * ApplyToDirectoriesCheck;
  23. TButton * HelpButton;
  24. TStaticText * HintText;
  25. TButton * ClearButton;
  26. TButton * MaskButton;
  27. TButton *ColorButton;
  28. TLabel *ColorFileNamesLabel;
  29. TLabel *ColorSizesLabel;
  30. TLabel *ColorPaddingLabel;
  31. void __fastcall FormCloseQuery(TObject * Sender, bool & CanClose);
  32. void __fastcall MaskEditExit(TObject * Sender);
  33. void __fastcall HelpButtonClick(TObject * Sender);
  34. void __fastcall ClearButtonClick(TObject * Sender);
  35. void __fastcall FormShow(TObject * Sender);
  36. void __fastcall MaskButtonClick(TObject * Sender);
  37. void __fastcall ColorButtonClick(TObject *Sender);
  38. void __fastcall MaskEditChange(TObject *Sender);
  39. private:
  40. TControl * FParent;
  41. std::unique_ptr<TPopupMenu> FColorPopupMenu;
  42. TColor FColor;
  43. void __fastcall ColorChange(TColor Color);
  44. void __fastcall UpdateControls();
  45. public:
  46. enum TMode { smSelect, smDeselect, smFilter, smFileColor };
  47. __fastcall TSelectMaskDialog(TComponent* Owner);
  48. void __fastcall Init(TMode Mode, TControl * Parent);
  49. bool __fastcall Execute(TFileFilter & FileFilter, TColor & Color);
  50. bool __fastcall Execute(UnicodeString & Mask, TColor & Color);
  51. };
  52. //---------------------------------------------------------------------------
  53. #endif