47 INPUTSTATE_PASSWORD, |
47 INPUTSTATE_PASSWORD, |
48 INPUTSTATE_CONFIRM_DISCONNECTION, |
48 INPUTSTATE_CONFIRM_DISCONNECTION, |
49 }; |
49 }; |
50 |
50 |
51 Interface(); |
51 Interface(); |
52 void handle_input(); |
52 void connect(String address, String password); |
|
53 void disconnected(); |
|
54 RCONSession* getSession() { return &m_session; } |
|
55 void handleCommand(const String& input); |
|
56 void handleInput(); |
|
57 void needRefresh(); |
|
58 void __cdecl print(const char* fmtstr, ...); |
|
59 void __cdecl printWarning(const char* fmtstr, ...); |
|
60 void __cdecl printError(const char* fmtstr, ...); |
|
61 void __cdecl printText(const char* fmtstr, ...); |
53 void render(); |
62 void render(); |
54 void render_full(); |
63 void renderFull(); |
55 void set_title (const String& message); |
64 void setPlayerNames(const StringList& names); |
56 void update_statusbar(); |
65 void setTitle(const String& message); |
57 void connect (String address, String password); |
66 void tabComplete(const String& part, String complete); |
58 void set_player_names (const StringList& names); |
67 void updateStatusBar(); |
59 void need_refresh(); |
68 void vprint(const char* fmtstr, va_list args); |
60 void tab_complete (const String& part, String complete); |
|
61 RCONSession* get_session() { return &m_session; } |
|
62 void handle_command(const String& input); |
|
63 void disconnected(); |
|
64 |
|
65 void vprint (const char* fmtstr, va_list args); |
|
66 void __cdecl print (const char* fmtstr, ...); |
|
67 void __cdecl print_warning (const char* fmtstr, ...); |
|
68 void __cdecl print_error (const char* fmtstr, ...); |
|
69 void __cdecl print_text (const char* fmtstr, ...); |
|
70 |
69 |
71 private: |
70 private: |
72 StringList m_inputHistory; |
71 StringList m_inputHistory; |
73 int m_inputCursor; |
72 int m_inputCursor; |
74 int m_cursorPosition; |
73 int m_cursorPosition; |
88 String m_statusBarText; |
87 String m_statusBarText; |
89 List<ColoredLine> m_playerNames; |
88 List<ColoredLine> m_playerNames; |
90 String m_pasteBuffer; |
89 String m_pasteBuffer; |
91 RCONSession m_session; |
90 RCONSession m_session; |
92 |
91 |
93 void render_titlebar(); |
92 void detachInput(); |
94 void safe_disconnect (std::function<void(bool)> afterwards); |
93 int findNextWord(); |
95 int render_colorline (int y, int x0, int width, const ColoredLine& line, bool allowWrap); |
94 int findPreviousWord(); |
96 int nicklist_width(); |
95 void flushInput(); |
97 void render_output(); |
96 chtype getColorPair(Color fg, Color bg); |
98 void render_nicklist(); |
97 const String& getCurrentInput(); |
99 void render_input(); |
98 String& getEditableInput(); |
100 void render_statusbar(); |
99 String getPromptString(); |
101 void position_cursor(); |
100 void moveInputCursor(int delta); |
102 chtype color_pair (Color fg, Color bg); |
101 int nicklistWidth(); |
103 const String& current_input(); |
102 void positionCursor(); |
104 void detach_input(); |
103 void printToConsole(String message); |
105 String& mutable_current_input(); |
104 int renderColorline(int y, int x0, int width, const ColoredLine& line, bool allowWrap); |
106 void move_input_cursor (int delta); |
105 void renderInput(); |
107 String prompt_string(); |
106 void renderNicklist(); |
108 void set_input_state (InputState newstate); |
107 void renderOutput(); |
109 void print_to_console (String message); |
108 void renderStatusBar(); |
110 void yank (int a, int b); |
109 void renderTitlebar(); |
111 int find_previous_word(); |
110 void resetTitle(); |
112 int find_next_word(); |
111 void safeDisconnect(std::function<void(bool)> afterwards); |
113 void reset_title(); |
112 void setInputState(InputState newstate); |
114 void flush_input(); |
113 void yank(int a, int b); |
115 }; |
114 }; |
116 |
115 |
117 END_ZFC_NAMESPACE |
116 END_ZFC_NAMESPACE |