aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-gtk.h
AgeCommit message (Collapse)AuthorFilesLines
2015-03-10avoid frequent info line redraws in Curses and GTK+ UIsRobin Haberkorn1-2/+10
* it is now redrawn once after each key press, even if the info line has not changed. * This is because Interface::update_info() is called very often in interactive mode, so it makes more sense to redraw it after user interaction (where even unnecessary delays are not noticed so easily), than thousands of times in a macro. * This is especially important since InterfaceCurses::update_info() now also sets the Window title on PDCurses - this is a very costly operation. * The same optimization was applied to InterfaceGtk where it is probably greatly responsible for the sluggishness of the UI. The GTK+ changes are currently UNTESTED.
2015-03-01keep rubbed out command line for later re-insertion and massive Cmdline ↵Robin Haberkorn1-3/+5
cleanup/refactoring * characters rubbed out are not totally removed from the command line, but only from the *effective* command line. * The rubbed out command line is displayed after the command line cursor. On Curses it is grey and underlined. * When characters are inserted that are on the rubbed out part of the command line, the cursor simply moves forward. NOTE: There's currently no immediate editing command for reinserting the next character/word from the rubbed out command line. * Characters resulting in errors are no longer simply discarded but rubbed out, so they will stay in the rubbed out part of the command line, reminding you which character caused the error. * Improved Cmdline formatting on Curses UI: * Asterisk is printed bold * Control characters are printed in REVERSE style, similar to what Scinterm does. The controll character formatting has thus been moved from macro_echo() in cmdline.cpp to the UI implementations. * Updated the GTK+ UI (UNTESTED): I did only, the most important API adaptions. The command line still does not use any colors. * Refactored entire command line handling: * The command line is now a class (Cmdline), and most functions in cmdline.cpp have been converted to methods. * Esp. process_edit_cmd() (now Cmdline::process_edit_cmd()) has been simplified. There is no longer the possibility of a buffer overflow because of static insertion buffer sizes * Cleaned up usage of the cmdline_pos variable (now Cmdline::pc) which is really a program counter that used a different origin as macro_pc which was really confusing. * The new Cmdline class is theoretically 8-bit clean. However all of this will change again when we introduce Scintilla views for the command line. * Added 8-bit clean (null-byte aware) versions of QRegisterData::set_string() and QRegisterData::append_string()
2015-02-11updated copyright to 2015Robin Haberkorn1-1/+1
2014-12-09Curses: support cycling through long lists of possible auto-completions and ↵Robin Haberkorn1-0/+7
optimized screen refreshing/redrawing * pressing e.g. TAB when the popup is showing a list of auto-completions will show the next page, eventually beginning at the first one again. * do not redraw curses windows in the UI methods directly. this resulted in flickering during command-line editing macros and ordinary macro calls because the physical screen was updated immediately. Instead, window refreshing and updated is done centrally in event_loop_iter() only after a key has been processed. Also we use wnoutrefresh() and doupdate() to send as little to the terminal (emulator) as possible.
2014-11-17Make sure QRegister::view is properly initialized and cleaned upRobin Haberkorn1-2/+15
* 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-17simplified (User) Interface APIRobin Haberkorn1-23/+2
Both UIs have a current_view, so this field, the ssm(), undo_ssm() and get_current_view() methods can be refactored into the Interface base class
2014-11-17updated GTK user interface to API changesRobin Haberkorn1-18/+70
it now works as good (or bad) as it did before. * fixed entering of the Escape character
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-02-15updated Copyright to year 2014Robin Haberkorn1-1/+1
2014-02-15all interface classes define the same type InterfaceCurrent, simplifying the ↵Robin Haberkorn1-3/+2
interface object definition * they still define their own classes (e.g. InterfaceNCurses), InterfaceCurrent is a typedef
2013-03-18declare all global inter-dependant objects in main.cpp and get rid of ↵Robin Haberkorn1-0/+1
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-02-22fixed global object initialization order issueRobin Haberkorn1-6/+6
* 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-01-19updated copyright (2012-2013)Robin Haberkorn1-1/+1
2012-12-04added copyright notice to every source fileRobin Haberkorn1-0/+17
2012-12-04autoconf preparation: move everything into src/ subdirRobin Haberkorn1-0/+73