bool Terminal::on_my_drag_failed(const Glib::RefPtr<Gdk::DragContext>& context, Gtk::DragResult result) { Frame *old_frame = static_cast<Frame *>(dock_from->get_parent()); if (result == Gtk::DRAG_RESULT_NO_TARGET) { TerminalWindow *window = new TerminalWindow; window->show(); window->tabcontrol.add_tab(manage(new TabFrame(dock_from))); window->show_all(); old_frame->destroy(); } }
void Prepare(ContainerWindow &parent, const PixelRect &rc) override { WindowStyle style; style.Hide(); terminal.Create(parent, rc, style); SetWindow(&terminal); device.SetMonitor(&bridge); }
void Create(PixelSize size) { SingleWindow::Create(_T("RunTerminal"), size); PixelRect rc = GetClientRect(); terminal.Create(*this, rc); }
void set(PixelRect _rc) { SingleWindow::set(_T("RunTerminal"), _T("RunTerminal"), _rc); PixelRect rc = GetClientRect(); terminal.set(*this, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); }
virtual bool OnTimer(WindowTimer &_timer) { if (_timer == timer) { unsigned r = rand(); char ch; if ((r % 16) == 0) ch = '\n'; else ch = 0x20 + ((r / 16) % 0x60); terminal.Write(&ch, 1); return true; } else return SingleWindow::OnTimer(_timer); }
void Clear() { terminal.Clear(); }
void CreateTerminal(ContainerWindow &parent, const PixelRect &rc) { terminal.Create(parent, rc); device.SetMonitor(&bridge); }