diff options
author | Thomas Lange <tl@openoffice.org> | 2001-03-08 08:25:55 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2001-03-08 08:25:55 +0000 |
commit | 9bf928a7a57d2c35e412707df8b041032830b10e (patch) | |
tree | b7dded287f554fb0ea84661bbc0793689bb09eb6 /starmath/inc/edit.hxx | |
parent | e0ba748a21962545f8bb1e74d2483eaca29ba163 (diff) |
#82063# use EditEngine and EditEngineItemPool obtained from SmDocShell now; Get/LoseFocus added to restore/save current Selection and status handler when switching views
Diffstat (limited to 'starmath/inc/edit.hxx')
-rw-r--r-- | starmath/inc/edit.hxx | 84 |
1 files changed, 45 insertions, 39 deletions
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 7fee113a88df..91a40d69c16d 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -2,9 +2,9 @@ * * $RCSfile: edit.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $ + * last change: $Author: tl $ $Date: 2001-03-08 09:22:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,17 +90,17 @@ class Menu; class SmEditWindow: public Window { - EditView *pEditView; -#if SUPD >= 602 - SfxItemPool *pEditEngineItemPool; -#endif - EditEngine *pEditEngine; - ScrollBar *pHScrollBar, - *pVScrollBar; - ScrollBarBox *pScrollBox; - Timer aModifyTimer, - aCursorMoveTimer; - ESelection aOldSelection; + EditEngine *pEditEngine; + SfxItemPool *pEditEngineItemPool; + EditView *pEditView; + ScrollBar *pHScrollBar, + *pVScrollBar; + ScrollBarBox *pScrollBox; + Timer aModifyTimer, + aCursorMoveTimer; + ESelection aOldSelection; + ESelection aActiveSelection; // to be restored/saved on + // activation/deactivation of the window virtual void KeyInput(const KeyEvent& rKEvt); virtual void Command(const CommandEvent& rCEvt); @@ -121,40 +121,46 @@ class SmEditWindow: public Window DECL_LINK(EditStatusHdl ,EditStatus *); DECL_LINK(ScrollHdl, ScrollBar *); - void CreateEditEngine(); + void CreateEditView(); + + Rectangle AdjustScrollBars(); + void SetScrollBarRanges(); + void InitScrollBars(); + void ImplSetFont(); - Rectangle AdjustScrollBars(); - void SetScrollBarRanges(); - void InitScrollBars(); - void ImplSetFont(); + void SetEditEngine( EditEngine *pEng, SfxItemPool *pPool ); public: - SmEditWindow(Window *pParent); + SmEditWindow( Window *pParent ); ~SmEditWindow(); + // Window virtual void SetText(const XubString &rText); virtual XubString GetText(); - - ESelection GetSelection() const; - void SetSelection(const ESelection &rSel); - - BOOL IsEmpty() const; - BOOL IsSelected() const; - BOOL IsAllSelected() const; - void Cut(); - void Copy(); - void Paste(); - void Delete(); - void SelectAll(); - void InsertText(const String &rText); - void InsertCommand(USHORT nCommand); - void MarkError(const Point &rPos); - void SelNextMark(); - void SelPrevMark(); - BOOL HasMark(const String &rText) const; - - void Flush(); + virtual void GetFocus(); + virtual void LoseFocus(); + + ESelection GetSelection() const; + void SetSelection(const ESelection &rSel); + + BOOL IsEmpty() const; + BOOL IsSelected() const; + BOOL IsAllSelected() const; + void Cut(); + void Copy(); + void Paste(); + void Delete(); + void SelectAll(); + void InsertText(const String &rText); + void InsertCommand(USHORT nCommand); + void MarkError(const Point &rPos); + void SelNextMark(); + void SelPrevMark(); + BOOL HasMark(const String &rText) const; + + void Flush(); }; + #endif |