diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-29 14:38:59 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-29 14:38:59 +0000 |
commit | b4ddbd772ae2039ec9e23ce85f16f07f3533edd4 (patch) | |
tree | d7c8834da3aa1b09a76769421483b1fbebfe6882 /src/gui/chat.h | |
parent | 120e0cb592d289132f504778f471195c12a196d5 (diff) | |
download | mana-b4ddbd772ae2039ec9e23ce85f16f07f3533edd4.tar.gz mana-b4ddbd772ae2039ec9e23ce85f16f07f3533edd4.tar.bz2 mana-b4ddbd772ae2039ec9e23ce85f16f07f3533edd4.tar.xz mana-b4ddbd772ae2039ec9e23ce85f16f07f3533edd4.zip |
*** empty log message ***
Diffstat (limited to 'src/gui/chat.h')
-rw-r--r-- | src/gui/chat.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/gui/chat.h b/src/gui/chat.h index 574accab..b078e952 100644 --- a/src/gui/chat.h +++ b/src/gui/chat.h @@ -88,7 +88,8 @@ /** should always be zero if failed */ #define SKILL_FAILED 0x00 -struct CHATSKILL { +struct CHATSKILL +{ short skill; short bskill; short unused; @@ -99,7 +100,9 @@ struct CHATSKILL { /** * Simple chatlog object. */ -class ChatWindow : public Window, public gcn::ActionListener { +class ChatWindow : public Window, public gcn::ActionListener, + public gcn::KeyListener +{ public: /** * Constructor. @@ -170,14 +173,14 @@ class ChatWindow : public Window, public gcn::ActionListener { */ char *chat_send(std::string nick, std::string msg); - /** History */ - void update_history(const char *ptr); - void arrow_up(void); - void arrow_down(void); + /** History */ + void updateHistory(const char *ptr); + void arrowUp(void); + void arrowDown(void); + + /** Called when key is pressed */ + void keyPress(const gcn::Key& key); - /** Called when key is pressed */ - void keyPress(const gcn::Key& key); - private : std::ofstream chatlog_file; @@ -197,20 +200,19 @@ class ChatWindow : public Window, public gcn::ActionListener { std::string const_msg(CHATSKILL); /** - * Cuts a string into two on a per word basis - * @param value The string to be cut, it may be modified - * in the function. + * Cuts a string into two on a per word basis. + * + * @param value The string to be cut, it may be modified + * in the function. * @param maximumLength The length after which the string - * should be cut. + * should be cut. * @return The cut off section of the string */ - std::string cut_string(std::string& value, unsigned int maximumLength); - - /** Input box for chat messages */ - gcn::TextField *chatInput; - gcn::TextBox *textOutput; - ScrollArea *scrollArea; + std::string cutString(std::string& value, unsigned int maximumLength); + gcn::TextField *chatInput; /**< Input box for typing chat messages */ + gcn::TextBox *textOutput; /**< Text box for displaying chat history */ + ScrollArea *scrollArea; /**< Scroll area around text output */ }; #endif |