36 const std::string &title,
37 const std::string &buttonTxt)
42 const int offsetX = 2 * getPadding() + 10;
43 const int offsetY = getTitleBarHeight() + getPadding() + 10;
45 auto *button =
new Button(buttonTxt,
"activate",
this);
70 std::string msgCopy = msg;
104 mStream.open(file.c_str(), std::ios_base::trunc);
static const std::string & getLocalDataDirectory()
void setRowHeight(int n, int h)
This class is an helper for setting the position of widgets.
@ AUTO_SET
Uses the share as the new size.
void setRecordingFile(const std::string &msg)
Sets the file being recorded to.
Recorder(ChatWindow *chat, const std::string &title=_("Recording..."), const std::string &buttonTxt=_("Stop recording"))
void action(const gcn::ActionEvent &event) override
called when the button is pressed
void record(const std::string &msg)
Outputs the message to the recorder file.
virtual void setVisible(bool visible)
Overloads window setVisible by Guichan to allow sticky window handling.
Layout & getLayout()
Gets the layout handler for this window.
void setWindowName(const std::string &name)
Sets the name of the window.
LayoutCell & place(int x, int y, gcn::Widget *, int w=1, int h=1)
Adds a widget to the window and sets it at given cell.
void setDefaultSize()
Set the default win pos and size to the current ones.
void loadWindowState()
Reads the position (and the size for resizable windows) in the configuration based on the given strin...
void serverNotice(const std::string &message)
std::string & trim(std::string &str)
Trims spaces off the end and the beginning of the given string.