CustomCommand.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //---------------------------------------------------------------------------
  2. #ifndef CustomCommandH
  3. #define CustomCommandH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include "HistoryComboBox.hpp"
  10. //---------------------------------------------------------------------------
  11. class TCustomCommands;
  12. //---------------------------------------------------------------------------
  13. class TCustomCommandDialog : public TForm
  14. {
  15. __published:
  16. TGroupBox *Group;
  17. TButton *OkButton;
  18. TButton *CancelButton;
  19. TLabel *DescriptionLabel;
  20. TEdit *DescriptionEdit;
  21. TLabel *Label1;
  22. THistoryComboBox *CommandEdit;
  23. TCheckBox *ApplyToDirectoriesCheck;
  24. TCheckBox *RecursiveCheck;
  25. TRadioButton *LocalCommandButton;
  26. TRadioButton *RemoteCommandButton;
  27. TCheckBox *ShowResultsCheck;
  28. TButton *HelpButton;
  29. TCheckBox *CopyResultsCheck;
  30. TStaticText *HintText;
  31. TLabel *ShortCutLabel;
  32. TComboBox *ShortCutCombo;
  33. void __fastcall ControlChange(TObject *Sender);
  34. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  35. void __fastcall HelpButtonClick(TObject *Sender);
  36. void __fastcall CommandEditGetData(THistoryComboBox *Sender,
  37. Pointer & Data);
  38. void __fastcall CommandEditSetData(THistoryComboBox *Sender,
  39. Pointer Data);
  40. void __fastcall FormShow(TObject *Sender);
  41. private:
  42. TCustomCommandsMode FMode;
  43. int FParams;
  44. UnicodeString FOrigDescription;
  45. const TCustomCommandList * FCustomCommandList;
  46. TCustomCommandValidate FOnValidate;
  47. void __fastcall SetParams(int value);
  48. int __fastcall GetParams();
  49. void __fastcall GetCommand(TCustomCommandType & Command);
  50. protected:
  51. void __fastcall UpdateControls();
  52. public:
  53. __fastcall TCustomCommandDialog(TComponent* Owner,
  54. const TCustomCommandList * CustomCommandList, TCustomCommandsMode Mode,
  55. int Options, TCustomCommandValidate OnValidate, const TShortCuts * ShortCuts);
  56. bool __fastcall Execute(TCustomCommandType & Command);
  57. };
  58. //---------------------------------------------------------------------------
  59. #endif