sources/interface.cpp

changeset 92
39947c46ed17
parent 91
ac02cf1c3576
child 95
e7439fa13093
equal deleted inserted replaced
91:ac02cf1c3576 92:39947c46ed17
141 } 141 }
142 142
143 // ------------------------------------------------------------------------------------------------- 143 // -------------------------------------------------------------------------------------------------
144 // 144 //
145 Interface::Interface() : 145 Interface::Interface() :
146 Session (this),
147 InputCursor (0), 146 InputCursor (0),
148 CursorPosition (0), 147 CursorPosition (0),
149 InputPanning (0), 148 InputPanning (0),
150 NeedRefresh (false), 149 NeedRefresh (false),
151 NeedStatusBarRender (false), 150 NeedStatusBarRender (false),
154 NeedNicklistRender (false), 153 NeedNicklistRender (false),
155 OutputScroll (0), 154 OutputScroll (0),
156 CurrentInputState (INPUTSTATE_NORMAL), 155 CurrentInputState (INPUTSTATE_NORMAL),
157 DisconnectConfirmFunction (NULL) 156 DisconnectConfirmFunction (NULL)
158 { 157 {
159 #ifdef XCURSES 158 ::initscr();
160 ::Xinitscr(argc, argv);
161 #else
162 ::initscr();
163 #endif
164
165 ::raw(); 159 ::raw();
166 ::keypad (stdscr, true); 160 ::keypad (stdscr, true);
167 ::noecho(); 161 ::noecho();
168 ::refresh(); 162 ::refresh();
169 ::timeout (0); 163 ::timeout (0);
170 InputHistory.clear(); 164 InputHistory.clear();
171 InputHistory << ""; 165 InputHistory << "";
172 OutputLines.clear(); 166 OutputLines.clear();
173 OutputLines << ColoredLine(); 167 OutputLines << ColoredLine();
168 Session.set_interface (this);
174 Title.sprintf (APPNAME " %s (%d)", full_version_string(), changeset_date_string()); 169 Title.sprintf (APPNAME " %s (%d)", full_version_string(), changeset_date_string());
175 170
176 if (::has_colors()) 171 if (::has_colors())
177 { 172 {
178 ::start_color(); 173 ::start_color();

mercurial