/Users/ericb/Desktop/SRC680_m247/starmath/inc/edit.hxx

Go to the documentation of this file.
00001 /*************************************************************************
00002  *
00003  *  OpenOffice.org - a multi-platform office productivity suite
00004  *
00005  *  $RCSfile: edit.hxx,v $
00006  *
00007  *  $Revision: 1.14 $
00008  *
00009  *  last change: $Author: vg $ $Date: 2007/05/25 12:09:11 $
00010  *
00011  *  The Contents of this file are made available subject to
00012  *  the terms of GNU Lesser General Public License Version 2.1.
00013  *
00014  *
00015  *    GNU Lesser General Public License Version 2.1
00016  *    =============================================
00017  *    Copyright 2005 by Sun Microsystems, Inc.
00018  *    901 San Antonio Road, Palo Alto, CA 94303, USA
00019  *
00020  *    This library is free software; you can redistribute it and/or
00021  *    modify it under the terms of the GNU Lesser General Public
00022  *    License version 2.1, as published by the Free Software Foundation.
00023  *
00024  *    This library is distributed in the hope that it will be useful,
00025  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00026  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00027  *    Lesser General Public License for more details.
00028  *
00029  *    You should have received a copy of the GNU Lesser General Public
00030  *    License along with this library; if not, write to the Free Software
00031  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00032  *    MA  02111-1307  USA
00033  *
00034  ************************************************************************/
00035 #ifndef EDIT_HXX
00036 #define EDIT_HXX
00037 
00038 #ifndef _SV_WINDOW_HXX //autogen
00039 #include <vcl/window.hxx>
00040 #endif
00041 #ifndef _SV_TIMER_HXX //autogen
00042 #include <vcl/timer.hxx>
00043 #endif
00044 #ifndef _TRANSFER_HXX
00045 #include <svtools/transfer.hxx>
00046 #endif
00047 #ifndef _MyEDITDATA_HXX //autogen
00048 #include <svx/editdata.hxx>
00049 #endif
00050 #ifndef INCLUDED_SVTOOLS_COLORCFG_HXX
00051 #include <svtools/colorcfg.hxx>
00052 #endif
00053 
00054 //#ifndef _ACCESSIBILITY_HXX_
00055 //#include "accessibility.hxx"
00056 //#endif
00057 
00058 class SmDocShell;
00059 class SmViewShell;
00060 class EditView;
00061 class EditEngine;
00062 class EditStatus;
00063 class ScrollBar;
00064 class ScrollBarBox;
00065 class DataChangedEvent;
00066 class Menu;
00067 class SmCmdBoxWindow;
00068 class SmEditAccessible;
00069 class CommandEvent;
00070 
00071 /**************************************************************************/
00072 
00073         void SmGetLeftSelectionPart(const ESelection aSelection,
00074                                                                 USHORT &nPara, USHORT &nPos);
00075 
00076 /**************************************************************************/
00077 
00078 class SmEditWindow : public Window, public DropTargetHelper
00079 {
00080     ::com::sun::star::uno::Reference<
00081         ::com::sun::star::accessibility::XAccessible >  xAccessible;
00082     SmEditAccessible *                                          pAccessible;
00083 
00084     SmCmdBoxWindow &rCmdBox;
00085         EditView           *pEditView;
00086         ScrollBar          *pHScrollBar,
00087                                    *pVScrollBar;
00088         ScrollBarBox   *pScrollBox;
00089         Timer                   aModifyTimer,
00090                                         aCursorMoveTimer;
00091         ESelection              aOldSelection;
00092 
00093         virtual void KeyInput(const KeyEvent& rKEvt);
00094         virtual void Command(const CommandEvent& rCEvt);
00095         DECL_LINK(MenuSelectHdl, Menu *);
00096         DECL_LINK(ModifyTimerHdl, Timer *);
00097         DECL_LINK(CursorMoveTimerHdl, Timer *);
00098 
00099         virtual void DataChanged( const DataChangedEvent& );
00100         virtual void Resize();
00101         virtual void MouseMove(const MouseEvent &rEvt);
00102         virtual void MouseButtonUp(const MouseEvent &rEvt);
00103         virtual void MouseButtonDown(const MouseEvent &rEvt);
00104 
00105     virtual sal_Int8    AcceptDrop( const AcceptDropEvent& rEvt );
00106     virtual sal_Int8    ExecuteDrop( const ExecuteDropEvent& rEvt );
00107         virtual void Paint(const Rectangle& rRect);
00108 
00109         DECL_LINK(EditStatusHdl ,EditStatus *);
00110         DECL_LINK(ScrollHdl, ScrollBar *);
00111 
00112         void            CreateEditView();
00113 
00114         Rectangle       AdjustScrollBars();
00115         void            SetScrollBarRanges();
00116         void            InitScrollBars();
00117 
00118 public:
00119     SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin );
00120         ~SmEditWindow();
00121 
00122     SmDocShell *    GetDoc();
00123     SmViewShell *   GetView();
00124     EditView *      GetEditView()   { return pEditView; }
00125     EditEngine *    GetEditEngine();
00126     SfxItemPool *   GetEditEngineItemPool();
00127 
00128         // Window
00129         virtual void            SetText(const XubString &rText);
00130     virtual String      GetText() const;
00131         virtual void            GetFocus();
00132         virtual void            LoseFocus();
00133 
00134         ESelection                      GetSelection() const;
00135         void                            SetSelection(const ESelection &rSel);
00136 
00137         BOOL                            IsEmpty() const;
00138         BOOL                            IsSelected() const;
00139         BOOL                            IsAllSelected() const;
00140         void                            Cut();
00141         void                            Copy();
00142         void                            Paste();
00143         void                            Delete();
00144         void                            SelectAll();
00145         void                            InsertText(const String &rText);
00146         void                            InsertCommand(USHORT nCommand);
00147         void                            MarkError(const Point &rPos);
00148         void                            SelNextMark();
00149         void                            SelPrevMark();
00150         BOOL                            HasMark(const String &rText) const;
00151 
00152         void                            Flush();
00153     void                DeleteEditView( SmViewShell &rView );
00154 
00155     void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg );
00156 
00157     BOOL                HandleWheelCommands( const CommandEvent &rCEvt );
00158 
00159     // for Accessibility
00160     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
00161 
00162     using Window::GetAccessible;
00163     SmEditAccessible *   GetAccessible()  { return pAccessible; }
00164 };
00165 
00166 
00167 #endif
00168 

Generated on Wed Feb 20 17:21:56 2008 for maths by  doxygen 1.5.1