MyGUI
3.2.1
|
00001 /* 00002 * This source file is part of MyGUI. For the latest info, see http://mygui.info/ 00003 * Distributed under the MIT License 00004 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) 00005 */ 00006 00007 #ifndef __MYGUI_CLIPBOARD_MANAGER_H__ 00008 #define __MYGUI_CLIPBOARD_MANAGER_H__ 00009 00010 #include "MyGUI_Prerequest.h" 00011 #include "MyGUI_Singleton.h" 00012 #include "MyGUI_Types.h" 00013 #include "MyGUI_UString.h" 00014 00015 namespace MyGUI 00016 { 00017 00018 class WindowsClipboardHandler; 00019 00020 class MYGUI_EXPORT ClipboardManager : 00021 public Singleton<ClipboardManager> 00022 { 00023 public: 00024 ClipboardManager(); 00025 00026 void initialise(); 00027 void shutdown(); 00028 00033 void setClipboardData(const std::string& _type, const std::string& _data); 00034 00038 void clearClipboardData(const std::string& _type); 00039 00043 std::string getClipboardData(const std::string& _type); 00044 00045 /*events:*/ 00051 delegates::CMultiDelegate2<const std::string&, const std::string&> eventClipboardChanged; 00052 00059 delegates::CMultiDelegate2<const std::string&, std::string&> eventClipboardRequested; 00060 00061 private: 00062 MapString mClipboardData; 00063 00064 #if MYGUI_PLATFORM == MYGUI_PLATFORM_WIN32 00065 WindowsClipboardHandler* mWindowsClipboardHandler; 00066 #endif 00067 00068 bool mIsInitialise; 00069 }; 00070 00071 } // namespace MyGUI 00072 00073 #endif // __MYGUI_CLIPBOARD_MANAGER_H__