29 #include "../../idlib/precompiled.h"
43 currentHistoryPosition = -1;
45 saveCurrentCommand =
true;
54 CDialog::DoDataExchange(pDX);
67 int len = work2.GetLength();
69 work2 = work2.Right(
editConsole.GetLimitText() * 0.75 );
70 len = work2.GetLength();
89 CDialog::OnSize(nType, cx, cy);
91 if (editInput.GetSafeHwnd() ==
NULL) {
97 editInput.GetWindowRect(crect);
99 editInput.SetWindowPos(
NULL, 4, rect.Height() - 4 - crect.Height(), rect.Width() - 8, crect.Height(), SWP_SHOWWINDOW);
100 editConsole.SetWindowPos(
NULL, 4, 4, rect.Width() - 8, rect.Height() - crect.Height() - 8, SWP_SHOWWINDOW);
106 if (pMsg->hwnd ==
editInput.GetSafeHwnd()) {
107 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_ESCAPE ) {
113 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN ) {
118 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_ESCAPE ) {
119 if (pMsg->wParam == VK_ESCAPE) {
127 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_UP ) {
140 editInput.SetSel ( selLocation , selLocation + 1);
150 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_DOWN ) {
164 editInput.SetSel ( selLocation , selLocation + 1);
168 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_TAB ) {
169 common->
Printf (
"Command History\n----------------\n" );
176 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_NEXT) {
180 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_PRIOR ) {
184 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_HOME ) {
188 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_END ) {
193 return CDialog::PreTranslateMessage(pMsg);
197 CDialog::OnSetFocus(pOldWnd);
235 bool propogateCommand =
true;
238 if ( str.CompareNoCase (
"clear" ) == 0) {
242 else if ( str.CompareNoCase (
"edit" ) == 0) {
243 propogateCommand =
false;
245 if ( propogateCommand ) {
255 CDialog::OnActivate(nState, pWndOther, bMinimized);
257 if ( nState == WA_ACTIVE || nState == WA_CLICKACTIVE )
CMainFrame * g_pParentWnd
void WINAPI Sys_UpdateWindows(int nBits)
virtual void DoDataExchange(CDataExchange *pDX)
static const char * TranslateString(const char *p)
CONST PIXELFORMATDESCRIPTOR UINT
virtual void BufferCommandText(cmdExecution_t exec, const char *text)=0
afx_msg void OnSetFocus(CWnd *pOldWnd)
void ExecuteCommand(const idStr &cmd="")
idStr & RemoveColors(void)
virtual void Printf(const char *fmt,...) id_attribute((format(printf
int Append(const type &obj)
IMPLEMENT_DYNCREATE(CCamWnd, CWnd)
bool RemoveIndex(int index)
int currentHistoryPosition
const char * c_str(void) const
afx_msg void OnActivate(UINT nState, CWnd *pWndOther, BOOL bMinimized)
virtual BOOL PreTranslateMessage(MSG *pMsg)
void SetConsoleText(const idStr &text)
void AddText(const char *msg)