MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / saveViewState

Method saveViewState

src/editor.cpp:686–695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684}
685
686ViewState RcxEditor::saveViewState() const {
687 ViewState vs;
688 vs.scrollLine = (int)m_sci->SendScintilla(QsciScintillaBase::SCI_GETFIRSTVISIBLELINE);
689 int line, col;
690 m_sci->getCursorPosition(&line, &col);
691 vs.cursorLine = line;
692 vs.cursorCol = col;
693 vs.xOffset = (int)m_sci->SendScintilla(QsciScintillaBase::SCI_GETXOFFSET);
694 return vs;
695}
696
697void RcxEditor::restoreViewState(const ViewState& vs) {
698 int maxLine = std::max(0, m_sci->lines() - 1);

Callers 1

refreshMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected