Console emulation using scintilla.
- StyledText is a output text control
- Console includes a prompt
TODO: Hidden time and proccess name margins
Console(*args, **kwargs)¶Bases: adata.gui.text.StyledText
stc.StyledTextCtrl Styled text window with an input prompt.
| Parameters: | args (parameters) – See wx.stc.StyledTextCtrl |
|---|
Enter(cmd)¶Override to send code somewhere
| Parameters: | cmd (string) – A command line. |
|---|
FontBigger(e=None)¶Toggle text wrap mode
| Parameters: | event (wx.Event) – Optional |
|---|---|
| Returns: | zoom level |
| Return type: | int |
FontSmaller(e=None)¶Toggle text wrap mode
| Parameters: | event (wx.Event) – Optional |
|---|---|
| Returns: | zoom level |
| Return type: | int |
GoPreviousMarker(e=None)¶Go to previous marker
| Parameters: | event (wx.Event) – Optional |
|---|---|
| Returns: | zoom level |
| Return type: | int |
GoPrompt(text=None)¶Move cursor to propmt and optionally set the command text
| Parameters: | text (string) – Optional command |
|---|
GoPromptHandler(e)¶Go to prompt *
| Parameters: | event (wx.Event) – Optional |
|---|---|
| Returns: | line |
| Return type: | int |
Mark(line, icon)¶Create a new marker
| Parameters: |
|
|---|---|
| Returns: | Marker ID |
| Return type: | int |
OnKeyDown(event)¶Key pressed event handler
If line is not prompt, does nothing. Else:
- Avoid prompt symbol modification
- Up / Down to navigate history
- Send code on Enter
| Parameters: | event (wx.Event) – Required event information. |
|---|
SearchBox(e=None)¶Find text
| Parameters: | event (wx.Event) – Optional |
|---|
SearchNextHandler(e=None)¶Search next occurence
| Parameters: | event (wx.Event) – Optional |
|---|
SearchPreviousHandler(e=None)¶Search previous occurence
| Parameters: | event (wx.Event) – Optional |
|---|
ToggleWrapMode(event=None)¶Toggle text wrap mode
| Parameters: | event (wx.Event) – Optional |
|---|---|
| Returns: | self.GetWrapMode |
| Return type: | boolean |
StyledText(*args, **kwargs)¶Bases: WX
Basic scintilla text control with styles, write and echo methods
See https://docs.wxpython.org/wx.stc.StyledTextCtrl.html
echo(text=None, style=None, lf=True, marker=None, icon=None)¶The print method
write(text)¶Stardard write method