aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-07-13 23:35:26 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-07-14 00:18:28 +0200
commitf69d1f04c841521c17542cd00f9851db1ff3e220 (patch)
treeca3f9e85cccac4901cafc67ad2bdc3cd154ea7b4 /src/interface.h
parentbf5745b95ca0a0edfb0b1129835f0e48c20ef6fa (diff)
downloadsciteco-f69d1f04c841521c17542cd00f9851db1ff3e220.tar.gz
programmable terminal color redefinition and theming SciTECO curses UI based on Scintilla styles
* The first 16 colors of the terminal palette can be redefined using the 3EJ property - with all restrictions that ncurses and UNIX terminals impose on us. It is still important to be able to redefine the palette for some color schemes like Solarized since it may be difficult for users to set up the terminal emulator's palette manually. Also when using PDCurses, setting the palette is port-specific or only possible using init_color(). In order to allow color redefinitions across all curses ports it makes sense if SciTECO gives access to the color initialization of curses even if it can guarantee very little about its semantics in general. * 3EJ is completely ignored for GTK+ * use the STYLE_DEFAULT of the current document to style the message line. Fg and bg colors are reversed to guarantee a good contrast to the Scintilla view. Errors are still hardcoded to a red background, warnings to yellow and info messages to green. This allows color-scheming more of SciTECO given that the red, yellow and green terminal colors are not changed fundamentally in the terminal's palette. * info line is now also styled using STYLE_DEFAULT (reverse colors). The Q-Register and buffer names are now written out using format_str() which means that control characters are written out in REVERSE just like in the command line. String::canonicalize_ctl() is still used to canonicalize window titles. * Command line is now modelled as a curses Pad and "blitted" to the command line window. This allowed simplification of the command line drawing code and introduction of format_str(). The command line is now styled according to STYLE_DEFAULT (original fg and bg colors). The rubbed-out part of the command line can now longer be shown in bold black - or even bold light black - since that is not visible in all color themes. Instead it is now only shown in bold. Command line theming problems will be gone once we use a Scintilla view for the command line. * The popup widget is now styled according to STYLE_CALLTIP. * This means that all relevant parts of SciTECO's user interface can now be themed. This allows the creation of themes that redefine the terminal palette radically (e.g. Solarized) and the creation of "bright" themes (e.g. Solarized/bright). * theming of the non-scintilla-view parts of SciTECO is currently unsupported on GTK+. The reason is that both the popup widget and command line widgets have to be rewritten completely in GTK+ and are work in progress, so adapting the current code would be a waste of time. * Added a manual section about the UI and theming.
Diffstat (limited to 'src/interface.h')
-rw-r--r--src/interface.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interface.h b/src/interface.h
index 6c847f4..e93ebe3 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -193,13 +193,15 @@ public:
return NULL;
}
- /* expected to initialize Scintilla */
inline void
main(int &argc, char **&argv)
{
impl().main_impl(argc, argv);
}
+ /* makes sense only on Curses */
+ inline void init_color(guint color, guint32 rgb) {}
+
enum MessageType {
MSG_USER,
MSG_INFO,