00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef RECORD_H
00023 #define RECORD_H
00024
00025 #include "gui/widgets/window.h"
00026
00027 #include "utils/gettext.h"
00028
00029 #include <guichan/actionlistener.hpp>
00030
00031 #include <fstream>
00032 #include <string>
00033
00034 class ChatWindow;
00035
00036 class Recorder : public Window, public gcn::ActionListener
00037 {
00038 public:
00039 Recorder(ChatWindow *chat, const std::string &title = _("Recording..."),
00040 const std::string &buttonTxt = _("Stop recording"));
00041
00042 virtual ~Recorder();
00043
00049 void record(const std::string &msg);
00050
00056 void setRecordingFile(const std::string &msg);
00057
00061 bool isRecording() { return (bool) mStream.is_open(); }
00062
00068 void action(const gcn::ActionEvent &event);
00069
00070 private:
00071 ChatWindow *mChat;
00072
00073 std::ofstream mStream;
00074 };
00075
00076 #endif