TCUtils.h

From TotalcmdWiki
Jump to navigation Jump to search
#ifndef TCUtilsH
#define TCUtilsH

#include <windows.h>

class TCUtils
{
public:
       /*
       Sends a user command to Total Commander.
       Parameters:
	userCommand - Name of user command to send.
	sourceWindow - Name of the window from which the command is send (optional).
	*/
	static void sendUserCommand (const char* userCommand, HWND sourceWindow = NULL);

	/* 
	Change one or both directories in Total Commander.
	Parameters:
	firstPath - Name of the first directory to change. Meaning depends on the flags parameter. Can be NULL.
	secondPath - Name of the second directory to change. Meaning depends on the flags parameter.  Can be NULL.
	flags - Can be "S", "T", "ST" or NULL. 
	S makes firstPath the source panel and secondPath the target panel otherwise firstPath is the left panel and   secondPath is the left panel.
	T opens the directory in a new tab. Otherwise the direcory is changed in the current tab.
	sourceWindow - Name of the window from which the command is send (optional).
	*/
       static void sendChangeDirectory (const char* firstPath, const char* secondPath, const char* flags = NULL, HWND   sourceWindow = NULL);
};

#endif