From 6e4ee366a9e19ebc3cfbaa09311f4c2c3ed161c3 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Sat, 6 Sep 2003 20:08:10 +0000 Subject: [PATCH] lyxfunc.h #included frontends/LyXKeySym.h for a typedef only. No more. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7697 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView_pimpl.C | 1 + src/BufferView_pimpl.h | 7 +++++-- src/ChangeLog | 18 ++++++++++++++++++ src/frontends/ChangeLog | 6 ++++++ src/frontends/LyXKeySym.h | 3 --- src/frontends/WorkArea.h | 5 ++++- src/frontends/qt2/ChangeLog | 4 ++++ src/frontends/qt2/QContentPane.C | 2 ++ src/kbmap.C | 8 ++++++-- src/kbmap.h | 6 +++++- src/kbsequence.C | 8 +++++--- src/kbsequence.h | 6 +++++- src/lyxfunc.C | 1 + src/lyxfunc.h | 4 ++++ 14 files changed, 66 insertions(+), 13 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index abcc8144da..94bff2a317 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -48,6 +48,7 @@ #include "frontends/Alert.h" #include "frontends/Dialogs.h" #include "frontends/FileDialog.h" +#include "frontends/LyXKeySym.h" #include "frontends/LyXView.h" #include "frontends/LyXScreenFactory.h" #include "frontends/screen.h" diff --git a/src/BufferView_pimpl.h b/src/BufferView_pimpl.h index 6599d6c6e7..223a3e58b5 100644 --- a/src/BufferView_pimpl.h +++ b/src/BufferView_pimpl.h @@ -18,22 +18,23 @@ #ifndef BUFFERVIEW_PIMPL_H #define BUFFERVIEW_PIMPL_H -#include "errorlist.h" #include "BufferView.h" +#include "errorlist.h" #include "insets/inset.h" #include "frontends/key_state.h" -#include "frontends/LyXKeySym.h" #include "frontends/Timeout.h" #include "support/types.h" #include +#include #include class Change; +class LyXKeySym; class LyXView; class WorkArea; class LyXScreen; @@ -77,6 +78,8 @@ struct BufferView::Pimpl : public boost::signals::trackable { */ void scroll(int lines); /// + typedef boost::shared_ptr LyXKeySymPtr; + /// void workAreaKeyPress(LyXKeySymPtr key, key_modifier::state state); /// void selectionRequested(); diff --git a/src/ChangeLog b/src/ChangeLog index ca6a06b4b3..52df927f65 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2003-09-06 Angus Leeming + + * BufferView_pimpl.h: + * kbmap.h: + * kbsequence.h: + * lyxfunc.h: forward declare LyXKeySym rather than + #include "frontends/LyXKeySym.h". + + * BufferView_pimpl.C: + * kbmap.C: + * kbsequence.C: + * lyxfunc.C: associated changes. + +2003-09-06 Angus Leeming + + * BufferView.[Ch] (ChangeInsets): moved to BufferView_pimpl.[Ch]. + As a result, can remove the #include "insets/inset.h" from BufferView.h + 2003-09-06 Angus Leeming * BufferView.[Ch] (ChangeInsets): moved to BufferView_pimpl.[Ch]. diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index d71ea59e04..5f2e6f3f7a 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,9 @@ +2003-09-06 Angus Leeming + + * LyXKeySym.h: remove LyXKeySymPtr typedef. + * WorkArea.h: forward declare LyXKeySym rather than + #include "frontends/LyXKeySym.h". + 2003-09-05 Martin Vermeer * Alert_pimpl.h: re-add missing system headers, needed for 2.95.2. diff --git a/src/frontends/LyXKeySym.h b/src/frontends/LyXKeySym.h index 5a8b1b867a..4a42e2649c 100644 --- a/src/frontends/LyXKeySym.h +++ b/src/frontends/LyXKeySym.h @@ -13,7 +13,6 @@ #define LYXKEYSYM_H #include "support/std_string.h" -#include /** * This is a base class for representing a keypress. @@ -57,6 +56,4 @@ public: */ bool operator==(LyXKeySym const & k1, LyXKeySym const & k2); -typedef boost::shared_ptr LyXKeySymPtr; - #endif diff --git a/src/frontends/WorkArea.h b/src/frontends/WorkArea.h index bbd2820aa0..6248af5d01 100644 --- a/src/frontends/WorkArea.h +++ b/src/frontends/WorkArea.h @@ -14,17 +14,19 @@ #define WORKAREA_H #include "frontends/key_state.h" -#include "frontends/LyXKeySym.h" +#include #include #include #include #include +#include "support/std_string.h" #include class Painter; class FuncRequest; +class LyXKeySym; /** * The work area class represents the widget that provides the @@ -35,6 +37,7 @@ class FuncRequest; */ class WorkArea { public: + typedef boost::shared_ptr LyXKeySymPtr; WorkArea() {} diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 3d3c35cf93..82a99cf89e 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,7 @@ +2003-09-06 Angus Leeming + + * QContentPane.C: add a typedef for LyXKeySymPtr. + 2003-09-06 Angus Leeming * QCitationDialog.C: diff --git a/src/frontends/qt2/QContentPane.C b/src/frontends/qt2/QContentPane.C index bbcea493fd..03f0b3cda0 100644 --- a/src/frontends/qt2/QContentPane.C +++ b/src/frontends/qt2/QContentPane.C @@ -137,6 +137,8 @@ void QContentPane::wheelEvent(QWheelEvent * e) void QContentPane::keyPressEvent(QKeyEvent * e) { + typedef boost::shared_ptr LyXKeySymPtr; + QLyXKeySym * sym = new QLyXKeySym(); sym->set(e); wa_->workAreaKeyPress(LyXKeySymPtr(sym), q_key_state(e->state())); diff --git a/src/kbmap.C b/src/kbmap.C index c6ef06ed3e..509bf0eb4b 100644 --- a/src/kbmap.C +++ b/src/kbmap.C @@ -14,11 +14,15 @@ #include #include "kbmap.h" + +#include "debug.h" #include "kbsequence.h" #include "LyXAction.h" -#include "support/filetools.h" #include "lyxlex.h" -#include "debug.h" + +#include "frontends/LyXKeySym.h" + +#include "support/filetools.h" using std::endl; using lyx::support::i18nLibFileSearch; diff --git a/src/kbmap.h b/src/kbmap.h index cef9fd59e5..f4a7b06ec8 100644 --- a/src/kbmap.h +++ b/src/kbmap.h @@ -16,11 +16,13 @@ #include "support/std_string.h" #include "frontends/key_state.h" -#include "frontends/LyXKeySym.h" + +#include #include class kb_sequence; +class LyXKeySym; /// Defines key maps and actions for key sequences class kb_keymap { @@ -39,6 +41,8 @@ public: /// print all available keysyms string const print() const; + /// + typedef boost::shared_ptr LyXKeySymPtr; /** * Look up a key press in the keymap. * @param key the keysym diff --git a/src/kbsequence.C b/src/kbsequence.C index 7a3b0b6edc..dc4fc71b9c 100644 --- a/src/kbsequence.C +++ b/src/kbsequence.C @@ -12,13 +12,15 @@ #include -#include "gettext.h" - -#include "frontends/LyXKeySymFactory.h" #include "kbsequence.h" + +#include "gettext.h" #include "kbmap.h" #include "lfuns.h" +#include "frontends/LyXKeySym.h" +#include "frontends/LyXKeySymFactory.h" + using std::make_pair; diff --git a/src/kbsequence.h b/src/kbsequence.h index 9cbf3c2972..8b090cf8ab 100644 --- a/src/kbsequence.h +++ b/src/kbsequence.h @@ -14,15 +14,19 @@ #define KBSEQUENCE_H #include "frontends/key_state.h" -#include "frontends/LyXKeySym.h" + +#include + #include "support/std_string.h" #include class kb_keymap; +class LyXKeySym; /// Holds a key sequence and the current and standard keymaps class kb_sequence { public: + typedef boost::shared_ptr LyXKeySymPtr; typedef std::vector KeySequence; friend class kb_keymap; diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 0866afb3b9..59d0e5e0fd 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -55,6 +55,7 @@ #include "frontends/Dialogs.h" #include "frontends/FileDialog.h" #include "frontends/lyx_gui.h" +#include "frontends/LyXKeySym.h" #include "frontends/LyXView.h" #include "frontends/Menubar.h" #include "frontends/Toolbar.h" diff --git a/src/lyxfunc.h b/src/lyxfunc.h index 788b6f9ddf..f3ce55520f 100644 --- a/src/lyxfunc.h +++ b/src/lyxfunc.h @@ -19,9 +19,11 @@ #include "lfuns.h" #include "support/std_string.h" +#include #include class FuncStatus; +class LyXKeySym; class LyXView; class LyXText; class FuncRequest; @@ -52,6 +54,8 @@ public: /// return the status bar state string string const view_status_message(); + /// + typedef boost::shared_ptr LyXKeySymPtr; /// void processKeySym(LyXKeySymPtr key, key_modifier::state state); -- 2.39.2