diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-17 03:11:59 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-17 03:56:38 +0100 |
commit | e762a43754ba375789fa749ca2e00a3548500d6a (patch) | |
tree | be3e0996f4bee068f58564fe38fac6fee51466a2 /src/interface-ncurses.h | |
parent | 2ee2ddd07e41488b782056e911bcbe2fa51f7e22 (diff) | |
download | sciteco-e762a43754ba375789fa749ca2e00a3548500d6a.tar.gz |
simplified (User) Interface API
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
Diffstat (limited to 'src/interface-ncurses.h')
-rw-r--r-- | src/interface-ncurses.h | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/interface-ncurses.h b/src/interface-ncurses.h index 0d13615..d245e86 100644 --- a/src/interface-ncurses.h +++ b/src/interface-ncurses.h @@ -68,8 +68,6 @@ typedef class InterfaceNCurses : public Interface<InterfaceNCurses, ViewNCurses> WINDOW *cmdline_window; gchar *cmdline_current; - ViewNCurses *current_view; - struct Popup { WINDOW *window; GSList *list; @@ -81,14 +79,14 @@ typedef class InterfaceNCurses : public Interface<InterfaceNCurses, ViewNCurses> } popup; public: - InterfaceNCurses() : screen(NULL), + InterfaceNCurses() : Interface(), + screen(NULL), screen_tty(NULL), info_window(NULL), info_current(NULL), msg_window(NULL), cmdline_window(NULL), - cmdline_current(NULL), - current_view(NULL) {} + cmdline_current(NULL) {} ~InterfaceNCurses(); /* implementation of Interface::main() */ @@ -101,26 +99,6 @@ public: /* implementation of Interface::show_view() */ void show_view_impl(ViewNCurses *view); - /* implementation of Interface::get_current_view() */ - inline ViewNCurses * - get_current_view_impl(void) - { - return current_view; - } - - /* implementation of Interface::ssm() */ - inline sptr_t - ssm_impl(unsigned int iMessage, uptr_t wParam = 0, sptr_t lParam = 0) - { - return current_view->ssm(iMessage, wParam, lParam); - } - /* implementation of Interface::undo_ssm() */ - inline void - undo_ssm_impl(unsigned int iMessage, - uptr_t wParam = 0, sptr_t lParam = 0) - { - current_view->undo_ssm(iMessage, wParam, lParam); - } /* implementation of Interface::info_update() */ void info_update_impl(QRegister *reg); |