mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
- Started with delphi2cpp.exe http://ivan.vecerina.com/code/delphi2cpp/ - string needs to be replaced with UnicodeString - __fastcall needs to be added to virtual methods, constructors of components, and accessors of published properties - Replaced void with TObject in OnGetData/OnSetData events as for some reasons the void causes linked problems, unless the class has PASCALIMPLEMENTATION attribute Source commit: 6e3b0f977ecbcf9d3dc0706c129a911c0393569e
69 lines
2.2 KiB
C++
69 lines
2.2 KiB
C++
//---------------------------------------------------------------------------
|
|
#ifndef CustomCommandH
|
|
#define CustomCommandH
|
|
//---------------------------------------------------------------------------
|
|
#include <Classes.hpp>
|
|
#include <Controls.hpp>
|
|
#include <StdCtrls.hpp>
|
|
#include <Forms.hpp>
|
|
#include "HistoryComboBox.h"
|
|
//---------------------------------------------------------------------------
|
|
class TCustomCommands;
|
|
//---------------------------------------------------------------------------
|
|
class TCustomCommandDialog : public TForm
|
|
{
|
|
__published:
|
|
TGroupBox *Group;
|
|
TButton *OkButton;
|
|
TButton *CancelButton;
|
|
TLabel *DescriptionLabel;
|
|
TEdit *DescriptionEdit;
|
|
TLabel *Label1;
|
|
THistoryComboBox *CommandEdit;
|
|
TCheckBox *ApplyToDirectoriesCheck;
|
|
TCheckBox *RecursiveCheck;
|
|
TRadioButton *LocalCommandButton;
|
|
TRadioButton *RemoteCommandButton;
|
|
TCheckBox *ShowResultsCheck;
|
|
TButton *HelpButton;
|
|
TCheckBox *CopyResultsCheck;
|
|
TStaticText *HintText;
|
|
TLabel *ShortCutLabel;
|
|
TComboBox *ShortCutCombo;
|
|
TCheckBox *RemoteFilesCheck;
|
|
void __fastcall ControlChange(TObject *Sender);
|
|
void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
|
|
void __fastcall HelpButtonClick(TObject *Sender);
|
|
void __fastcall CommandEditGetData(THistoryComboBox *Sender,
|
|
TObject *& Data);
|
|
void __fastcall CommandEditSetData(THistoryComboBox *Sender,
|
|
TObject * Data);
|
|
void __fastcall FormShow(TObject *Sender);
|
|
|
|
private:
|
|
TCustomCommandsMode FMode;
|
|
int FParams;
|
|
UnicodeString FOrigDescription;
|
|
const TCustomCommandList * FCustomCommandList;
|
|
TCustomCommandValidate FOnValidate;
|
|
int FOptions;
|
|
|
|
void __fastcall SetParams(int value);
|
|
int __fastcall GetParams();
|
|
void __fastcall GetCommand(TCustomCommandType & Command);
|
|
|
|
protected:
|
|
void __fastcall UpdateControls();
|
|
|
|
INTERFACE_HOOK
|
|
|
|
public:
|
|
__fastcall TCustomCommandDialog(TComponent* Owner,
|
|
const TCustomCommandList * CustomCommandList, TCustomCommandsMode Mode,
|
|
int Options, TCustomCommandValidate OnValidate, const TShortCuts * ShortCuts);
|
|
|
|
bool __fastcall Execute(TCustomCommandType & Command);
|
|
};
|
|
//---------------------------------------------------------------------------
|
|
#endif
|