// __author__ = David Terracino (davet@lycosemail.com)
//              Juan Carlos De Abreu (jcabreur@gmail.com)

/**
 * This class provide a functions set to manipulate the windows clipboard.
 */

#ifndef CLIPBOARD_H__
#define CLIPBOARD_H__

#include "../Base/Singleton.h"
#include "../Includes/Basic.h"
#include "string.h"

BEGIN_TEG_NAMESPACE();

// Macros to use the clipboard.
#define CLIPBOARD_PASTE(text) Clipboard::GetInstance().getText(text)
#define CLIPBOARD_COPY(text) Clipboard::GetInstance().setText(text)

class Clipboard : public Singleton<Clipboard> {
public:
  // Clipboard constructor.
  Clipboard();

  // Clipboard destructor.
  ~Clipboard();

  // Methods.
  BOOL getText(std::tstring& text, HWND hWnd = NULL) const;
  BOOL setText(const std::tstring& text, HWND hWnd = NULL) const;
};

END_TEG_NAMESPACE();

#endif  // CLIPBOARD_H__
