duncan
Mom and Dad were wrong!
/home/malcolm/tmp/duncan/prototype/0/client/inputline.h
00001 #ifndef CLIENT_INPUTLINE_H_
00002 #define CLIENT_INPUTLINE_H_
00003 
00004 #include <string>
00005 #include "input.h"
00006 
00007 namespace client {
00008 
00017 class InputLine {
00018         private:
00019                 size_t maxlen_, cursorpos_, boxstart_, boxwidth_;
00020                 std::string input_,print_;
00021 
00022                 void insert_char(unsigned int);
00023                 void remove_char();
00024         public:
00025                 InputLine(size_t mlen=16, size_t bwidth=16);
00026                 
00027                 bool new_char(unsigned int);
00028                 void reset(size_t mlen=0, size_t bwidth=0);
00029                 void set_input(const std::string&);
00030                 size_t cursorpos();
00031                 std::string& input();
00032                 std::string& print();
00033 };
00034 
00035 }
00036 
00037 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations