13#pragma implementation "wxTermContainer.cpp"
25#include "wx/scrolbar.h"
29#include "../terminal/terminal.hpp"
74 Create(parent,
id, pos, size, style);
92 wxPanel::Create( parent,
id, pos, size, style );
110 wxBoxSizer* item2 =
new wxBoxSizer(wxHORIZONTAL);
112 item1->SetSizer(item2);
113 item1->SetAutoLayout(
TRUE);
123 wxScrollBar* item4 =
new wxScrollBar( item1,
ID_SCROLLBAR, wxPoint(this->GetSize().GetX() - 18, 0), wxSize(18, -1), wxSB_VERTICAL );
125 item4->SetScrollbar(90, 10, 300, 10);
126 item2->Add(item4, 0, wxGROW, 5);
257 int newThumbPosition =
event.GetPosition();
302 m_scrollbar->SetScrollbar(100 - termHeight, termHeight, 100, termHeight);
334 if (scrollHeight <= thumbSize)
351 if (thumbPosition < 0)
355 m_scrollbar->SetScrollbar(thumbPosition, thumbSize, scrollHeight, thumbSize);
void SetTerminalHistory(int size)
Set the terminal buffer size (not the length of the input history). The length of the history (i....
int GetScrollPosition()
Returns the current scroll position.
The terminal class for the GUI. It's a specialisation of the GenericTerminal.
void ScrollTerminal(int numLines, bool scrollUp=true)
void SetCursorBlinkRate(int rate)
wxTermContainer()
Constructors.
wxScrollBar * m_scrollbar
void OnScrollbarScrollLineDown(wxScrollEvent &event)
wxEVT_SCROLL_LINEDOWN event handler for ID_SCROLLBAR
void OnWheelScroll(wxMouseEvent &event)
wxEVT_MOUSEWHEEL event handler
void OnScrollbarScrollPageUp(wxScrollEvent &event)
wxEVT_SCROLL_PAGEUP event handler for ID_SCROLLBAR
void OnScrollbarScrollLineUp(wxScrollEvent &event)
wxEVT_SCROLL_LINEUP event handler for ID_SCROLLBAR
NumeReTerminal * m_terminal
bool Create(wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxBORDER_STATIC)
Creation.
static bool ShowToolTips()
Should we show tooltips?
void SetTerminal(NumeReTerminal *terminal)
void updateThumbPosition()
Updates the thumb position after every scroll operation except of the click-drag scrolling.
void CreateControls()
Creates the controls and sizers.
void OnScrollbarScrollPageDown(wxScrollEvent &event)
wxEVT_SCROLL_PAGEDOWN event handler for ID_SCROLLBAR
void SetTerminalHistory(int newSize)
Changes the size of the terminal history buffer.
void SetCaretBlinkTime(int newTime)
Changes the blinking duration of the terminal caret.
void OnScrollbarScrollThumbtrack(wxScrollEvent &event)
wxEVT_SCROLL_THUMBTRACK event handler for ID_SCROLLBAR
void OnSize(wxSizeEvent &event)
Empty OnSize event handler.
void OnUpdateUI(wxUpdateUIEvent &event)