CustomCommand.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. TCheckBox *RemoteFilesCheck;
  34. void __fastcall ControlChange(TObject *Sender);
  35. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  36. void __fastcall HelpButtonClick(TObject *Sender);
  37. void __fastcall CommandEditGetData(THistoryComboBox *Sender,
  38. Pointer & Data);
  39. void __fastcall CommandEditSetData(THistoryComboBox *Sender,
  40. Pointer Data);
  41. void __fastcall FormShow(TObject *Sender);
  42. private:
  43. TCustomCommandsMode FMode;
  44. int FParams;
  45. UnicodeString FOrigDescription;
  46. const TCustomCommandList * FCustomCommandList;
  47. TCustomCommandValidate FOnValidate;
  48. int FOptions;
  49. void __fastcall SetParams(int value);
  50. int __fastcall GetParams();
  51. void __fastcall GetCommand(TCustomCommandType & Command);
  52. protected:
  53. void __fastcall UpdateControls();
  54. INTERFACE_HOOK;
  55. public:
  56. __fastcall TCustomCommandDialog(TComponent* Owner,
  57. const TCustomCommandList * CustomCommandList, TCustomCommandsMode Mode,
  58. int Options, TCustomCommandValidate OnValidate, const TShortCuts * ShortCuts);
  59. bool __fastcall Execute(TCustomCommandType & Command);
  60. };
  61. //---------------------------------------------------------------------------
  62. #endif