aboutsummaryrefslogtreecommitdiffhomepage
path: root/interface-ncurses.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-16 14:42:47 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-16 14:42:47 +0100
commitf6ff327f0b7b50b74328e448ce862f7212dcae23 (patch)
tree4a773dcb9120d6a7fb96fce92422667e8702dbdf /interface-ncurses.h
parent0a8f940ffe1aaf77ba12ccc02d4e382be2118151 (diff)
downloadsciteco-f6ff327f0b7b50b74328e448ce862f7212dcae23.tar.gz
keep a buffer dirty flag and display infos about the current buffer in the interfaces (including the dirty flag)
* was a bit tricky because the Scintilla SAVEPOINTS cannot be (fully) used * when a file is loaded or saved, a Scintilla SAVEPOINT is set * SAVEPOINTLEFT notifications are used to set a buffer dirty * SAVEPOINTREACHED notifications are useless since Scintilla does not consider the saves themselves to be undoable * GTK interface displays infos in window title bar * NCURSES interface has also been updated and cleaned up a bit. Infos are displayed in a new info line. * NCURSES: fixed popup display after terminal resizing
Diffstat (limited to 'interface-ncurses.h')
-rw-r--r--interface-ncurses.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/interface-ncurses.h b/interface-ncurses.h
index 9469cfc..28f2e72 100644
--- a/interface-ncurses.h
+++ b/interface-ncurses.h
@@ -18,17 +18,25 @@ extern class InterfaceNCurses : public Interface {
Scintilla *sci;
+ WINDOW *info_window;
+ gchar *info_current;
WINDOW *sci_window;
WINDOW *msg_window;
WINDOW *cmdline_window;
gchar *cmdline_current;
- WINDOW *popup_window;
- GSList *popup_list;
- gint popup_list_longest;
- gint popup_list_length;
+ struct Popup {
+ WINDOW *window;
+ GSList *list;
+ gint longest;
+ gint length;
+
+ Popup() : window(NULL), list(NULL), longest(0), length(0) {}
+ ~Popup();
+ } popup;
void resize_all_windows(void);
+ void draw_info(void);
public:
InterfaceNCurses();
@@ -42,6 +50,9 @@ public:
return scintilla_send_message(sci, iMessage, wParam, lParam);
}
+ void info_update(QRegister *reg);
+ void info_update(Buffer *buffer);
+
void cmdline_update(const gchar *cmdline = NULL);
void popup_add_filename(PopupFileType type,