Subversion Repositories svn.mios32

Rev

Rev 1726 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1726 Rev 1734
Line 1... Line 1...
1
/* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
1
/* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
2
// $Id: MiosTerminal.cpp 1726 2013-03-28 21:20:34Z tk $
2
// $Id: MiosTerminal.cpp 1734 2013-04-05 21:19:53Z tk $
3
/*
3
/*
4
 * MIOS Terminal Component
4
 * MIOS Terminal Component
5
 *
5
 *
6
 * ==========================================================================
6
 * ==========================================================================
7
 *
7
 *
Line 22... Line 22...
22
    , gotFirstMessage(0)
22
    , gotFirstMessage(0)
23
{
23
{
24
    addAndMakeVisible(terminalLogBox = new LogBox(T("MIOS Terminal")));
24
    addAndMakeVisible(terminalLogBox = new LogBox(T("MIOS Terminal")));
25
    terminalLogBox->addEntry(Colours::grey, T("MIOS Terminal ready."));
25
    terminalLogBox->addEntry(Colours::grey, T("MIOS Terminal ready."));
26
26
27
    addAndMakeVisible(inputLine = new TextEditor(String::empty));
27
    addAndMakeVisible(inputLine = new CommandLineEditor());
28
    inputLine->setMultiLine(false);
-
 
29
    inputLine->setReturnKeyStartsNewLine(false);
-
 
30
    inputLine->setReadOnly(false);
-
 
31
    inputLine->setScrollbarsShown(false);
-
 
32
    inputLine->setCaretVisible(true);
-
 
33
    inputLine->setPopupMenuEnabled(true);
-
 
34
    inputLine->setTextToShowWhenEmpty(T("(send a command to MIOS32 application)"), Colours::grey);
28
    inputLine->setTextToShowWhenEmpty(T("(send a command to MIOS32 application)"), Colours::grey);
35
    inputLine->addListener(this);
29
    inputLine->addListener(this);
36
30
37
    setSize(400, 200);
31
    setSize(400, 200);
38
}
32
}
Line 90... Line 84...
90
    }
84
    }
91
}
85
}
92
86
93
void MiosTerminal::textEditorEscapeKeyPressed(TextEditor &editor)
87
void MiosTerminal::textEditorEscapeKeyPressed(TextEditor &editor)
94
{
88
{
95
    if( &editor == inputLine ) {
-
 
96
        inputLine->setText(String::empty);
89
    editor.setText(String::empty);
97
    }
-
 
98
}
90
}
99
91
100
void MiosTerminal::textEditorFocusLost(TextEditor &editor)
92
void MiosTerminal::textEditorFocusLost(TextEditor &editor)
101
{
93
{
102
}
94
}