sources/interface.h

branch
protocol5
changeset 131
4996c8684b93
parent 106
7b156b764d11
parent 127
6610b8b29848
child 133
4d8fa5394d67
--- a/sources/interface.h	Mon Jan 25 04:15:31 2016 +0200
+++ b/sources/interface.h	Wed Jul 20 12:55:39 2016 +0300
@@ -1,5 +1,5 @@
 /*
-	Copyright 2014, 2015 Teemu Piippo
+	Copyright 2014 - 2016 Teemu Piippo
 	All rights reserved.
 
 	Redistribution and use in source and binary forms, with or without
@@ -58,39 +58,40 @@
 	void set_player_names (const StringList& names);
 	void need_refresh();
 	void tab_complete (const String& part, String complete);
-	RCONSession* get_session() { return &Session; }
+	RCONSession* get_session() { return &m_session; }
+	void handle_command(const String& input);
 	void disconnected();
-	void handle_command(const String& input);
-
+	
 	void vprint (const char* fmtstr, va_list args);
 	void __cdecl print (const char* fmtstr, ...);
 	void __cdecl print_warning (const char* fmtstr, ...);
 	void __cdecl print_error (const char* fmtstr, ...);
+	void __cdecl print_text (const char* fmtstr, ...);
 
 private:
-	StringList InputHistory;
-	int InputCursor;
-	int CursorPosition;
-	int InputPanning;
-	bool NeedRefresh;
-	bool NeedStatusBarRender;
-	bool NeedInputRender;
-	bool NeedOutputRender;
-	bool NeedNicklistRender;
-	struct { char ch; int x; } CursorCharacter;
-	Vector<ColoredLine> OutputLines;
-	int OutputScroll;
-	String Title;
-	InputState CurrentInputState;
-	std::function<void (void)> DisconnectConfirmFunction;
-	IPAddress CurrentAddress;
-	String StatusBarText;
-	StringList PlayerNames;
-	String PasteBuffer;
-	RCONSession Session;
+	StringList m_inputHistory;
+	int m_inputCursor;
+	int m_cursorPosition;
+	int m_inputPanning;
+	bool m_needRefresh;
+	bool m_needStatusBarRender;
+	bool m_needInputRender;
+	bool m_needOutputRender;
+	bool m_needNicklistRender;
+	struct { char ch; int x; } m_cursorCharacter;
+	Vector<ColoredLine> m_outputLines;
+	int m_outputScroll;
+	String m_title;
+	InputState m_inputState;
+	std::function<void(bool)> m_disconnectCallback;
+	IPAddress m_remoteAddress;
+	String m_statusBarText;
+	StringList m_playerNames;
+	String m_pasteBuffer;
+	RCONSession m_session;
 
 	void render_titlebar();
-	void safe_disconnect (std::function<void()> afterwards);
+	void safe_disconnect (std::function<void(bool)> afterwards);
 	int render_colorline (int y, int x0, int width, const ColoredLine& line, bool allowWrap);
 	int nicklist_width();
 	void render_output();
@@ -109,6 +110,8 @@
 	void yank (int a, int b);
 	int find_previous_word();
 	int find_next_word();
+	void reset_title();
+	void flush_input();
 };
 
-END_ZFC_NAMESPACE
+END_ZFC_NAMESPACE
\ No newline at end of file

mercurial