00001 00002 00003 00004 #ifndef GOSU_TEXTINPUT_HPP 00005 #define GOSU_TEXTINPUT_HPP 00006 00007 #include <Gosu/Fwd.hpp> 00008 #include <Gosu/Platform.hpp> 00009 #include <boost/scoped_ptr.hpp> 00010 #include <string> 00011 00012 namespace Gosu 00013 { 00023 class TextInput 00024 { 00025 struct Impl; 00026 boost::scoped_ptr<Impl> pimpl; 00027 00028 public: 00029 TextInput(); 00030 ~TextInput(); 00031 00032 std::wstring text() const; 00033 00036 void setText(const std::wstring& text); 00037 00039 unsigned caretPos() const; 00040 00044 unsigned selectionStart() const; 00045 00046 // Platform-specific communication with Gosu::Input. 00047 #if defined(GOSU_IS_MAC) 00048 bool feedNSEvent(void* event); 00049 #elif defined(GOSU_IS_WIN) 00050 bool feedMessage(unsigned long message, unsigned long wparam, unsigned long lparam); 00051 #elif defined(GOSU_IS_X) 00052 bool feedXEvent(void* display, void* event); 00053 #endif 00054 }; 00055 } 00056 00057 #endif
Documentation not clear enough? Please go to one of the places listed on http://www.libgosu.org/ and leave feedback. Thanks!