aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-02-11updated copyright to 2015Robin Haberkorn1-1/+1
2014-11-24turn off Scintilla undo collection by default and fixed memleakRobin Haberkorn1-0/+6
* in batch mode, Scintilla undo actions are simply leaked memory * Since we have more than one Scintilla view now, we must empty the undo buffer of all scintilla views when a command line is committed ($$)
2014-11-17Make sure QRegister::view is properly initialized and cleaned upRobin Haberkorn1-1/+1
* it must be initialized after the UI (Interface::main), so I added a View::initialize() function * the old initialize() method was renamed to setup() * use a global instance of QRegister::view so it is guaranteed to be destroyed only after any QRegisters that could still need it * Document API adapted to work with ViewCurrent references
2014-11-16rewritten View and Interface base classes using the Curiously Recurring ↵Robin Haberkorn1-5/+22
Template Pattern. * without the one-view-per-buffer designs, many Scintilla send message (SSM) calls could be inlined * with the new design, this was no longer possible using the abstract base classes. the CRT pattern allows inlining again but introduces a strange level of code obscurity. * tests suggest that at high optimization levels, the one-view-per-buffer design and the CRT pattern reduces typical macro runtimes by 30% (e.g. for symbols-extract.tes). * only updated the NCurses UI for the time being
2014-11-16first working version of the one-view-per-buffer designRobin Haberkorn1-0/+114
The user interface provides a Scintilla view abstraction and every buffer is based on a view. All Q-Register strings use a single dedicated view to save memory and initialization time when using many string registers. * this means we can finally implement a working lexer configuration and it only has to be done once when the buffer is first added to the ring. It is unnecessary to magically restore the lexer styles upon rubout of EB (very hard to implement anyway). It is also not necessary to rerun the lexer configuration macro upon rubout which would be hard to reconcile with SciTECO's basic design since every side-effect should be attached to a character. * this means that opening buffers is slightly slower now because of the view initialization * on the other hand, macros with many string q-reg operations are faster now, since the document must no longer be changed on the buffer's view and restored later on. * also now we can make a difference between editing a document in a view and changing the current view, which reduces UI calls * the Document class has been retained as an abstraction about Scintilla documents, used by QRegister Strings. It had to be made virtual, so the view on which the document is created can be specified by a virtual function. There is no additional space overhead for Documents.