aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-ncurses.cpp
AgeCommit message (Collapse)AuthorFilesLines
2014-11-17renamed the "NCurses" UI to "Curses" internallyRobin Haberkorn1-525/+0
* does not change ./configure parameters You still have to specifiy --with-interface=ncurses for the Curses interface with default settings * the "NCurses" UI was used for many different Curses variants, so plain "Curses" is a better name.
2014-11-17Make sure QRegister::view is properly initialized and cleaned upRobin Haberkorn1-8/+3
* 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-13/+12
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-16/+51
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.
2014-11-11added all of SciTECO's declarations to the "SciTECO" namespaceRobin Haberkorn1-0/+4
normally, since SciTECO is not a library, this is not strictly necessary since every library should use proper name prefixes or namespaces for all global declarations to avoid name clashes. However * you cannot always rely on that * Scintilla does violate the practice of using prefixes or namespaces. The public APIs are OK, but it does define global functions/methods, e.g. for "Document" that clashed with SciTECO's "TECODocument" class at link-time. Scintilla can put its definitions in a namespace, but this feature cannot be easily enabled without patching Scintilla. * a "SciTECO" namespace will be necessary if "SciTECO" is ever to be turned into a library. Even if this library will have only a C-linkage API, it must ensure it doesn't clutter the global namespace. So the old "TECODocument" class was renamed back to "Document" (SciTECO::Document).
2014-04-25avoid narrowing-conversion warning in C++11Robin Haberkorn1-1/+1
* as of gcc 4.7.2, -Wnarrowing is in -Wall
2014-02-18use new EMCurses keyboard handler callbackRobin Haberkorn1-1/+1
* should improve performance on EMCurses/Emscripten, since no polling for key events is necessary anymore
2014-02-16ncurses: fixed info bar at startupRobin Haberkorn1-0/+1
2014-02-15updated Copyright to year 2014Robin Haberkorn1-1/+1
2014-02-15added EMCurses/Emscripten supportRobin Haberkorn1-62/+89
by building with Emscripten support, SciTECO may be embedded into web pages. * sciteco.html is not a piece of documentation but a sample SciTECO embedding
2013-03-18remove all unused-attributes for parametersRobin Haberkorn1-3/+2
* compiler does not warn by default: this actually makes sense * so we don't need any unused-attributes * less GCC-extension based * on older GCCs I think -Wunused-parameters was enabled by -Wall we should add -Wno-unused-parameters if that's the case
2013-03-18declare all global inter-dependant objects in main.cpp and get rid of ↵Robin Haberkorn1-2/+0
init_priority attribute * we cannot use weak symbols in MinGW, so we avoid init_priority for symbol initialization by compiling the empty definitions into sciteco-minimal but the real ones into sciteco (had to add new file symbols-minimal.cpp) * this fixes compilation/linking on LLVM Clang AND Dragonegg since their init_priority attribute is broken! this will likely be fixed in the near future but broken versions will be around for some time
2013-03-18make sure a (void*)0 is used as sentinelsRobin Haberkorn1-1/+1
since including glib.h on LLVM-Clang (32-bit) results in NULL being redefined to 0 and compiler warnings being emitted when NULL is used as sentinels
2013-02-22resolved enter-key handling by introducing get_eol()Robin Haberkorn1-11/+2
2013-02-22function key macro support for GTK+ interfaceRobin Haberkorn1-9/+9
* also revised the way in which unhandled keys are interpreted (use gdk_keyval_to_unicode() instead of deprecated GdkEventKey::string) * keep in sync with Curses key handling
2013-02-22fixed global object initialization order issueRobin Haberkorn1-6/+13
* Scintilla is now initialized from main() using Interface::main() * Scintilla initialization depends on initialization of objects in the global namespace (otherwise the Lexer catalogue may not be filled properly and lexing may not work). Lexer modules were initialized after SciTECO interface initialization * merged Scintilla initialization (Interface::main()) with interface option parsing
2013-02-16function key support (keys without printable representation) using keyboard ↵Robin Haberkorn1-7/+32
macros * if enabled, when a function key is pressed it is looked up in Q-Registers ^F... e.g. HOME key corresponds to register ^FHOME * the string if available is inserted as if it was entered by key-presses (later it may be entered as a single input token which may be removed in a single rubout) * only NCurses currently, key names directly correspond to Curses key names * on Curses if function keys are enabled ESCAPE will be inserted after a delay (because function keys are transmitted via escape sequences). A function key macro may be used to define an alternative escape character
2013-02-01fixed buffer Ring initializationRobin Haberkorn1-1/+1
* there was a dependency on interface initialization. it did not cause issues because destruction order was by chance. * introduced INIT_PRIO and PRIO_* macros to easy initialization order declaration (using a PRIO_* formula makes code self-documenting) * also used this to clean up QRegisterTable initialization (we do not need the explicit initialize() method) * also used to clean up symbols initialization
2013-01-23implemented special save last commandline command ("*" at beginning of ↵Robin Haberkorn1-0/+1
commandline macro) * only works as part of commandline macro, * at the beginning of other macros, it is treated like an arithmetic asterisk * variables defined in cmdline.cpp are now declared by new cmdline.h
2013-01-19support only Scinterm >= v1.1 (contains SCI_COLOR_PAIR macro and indirectly ↵Robin Haberkorn1-6/+0
fixes PDCurses support)
2013-01-19updated copyright (2012-2013)Robin Haberkorn1-1/+1
2013-01-19allow <CTRL/C> to be typed; aborts last typed charRobin Haberkorn1-2/+8
* CTRL/C will be a command so it is important to be able to type it directly * aborting character processing is important because it allows aborting infinite loops * since the loop interruption currently relies on SIGINT handling, there is only limited support for XCurses and GTK - CTRL/C has to be typed in the terminal window. later support for input queue polling might be added
2012-12-04added copyright notice to every source fileRobin Haberkorn1-0/+17
2012-12-04first working version of autotools based build-systemRobin Haberkorn1-4/+4
2012-12-04autoconf preparation: move everything into src/ subdirRobin Haberkorn1-0/+426