SelectMask.h 2.0 KB

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