1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _EDITSEL_HXX 25 #define _EDITSEL_HXX 26 27 #include <vcl/seleng.hxx> 28 29 class EditView; 30 31 // ---------------------------------------------------------------------- 32 // class EditSelFunctionSet 33 // ---------------------------------------------------------------------- 34 class EditSelFunctionSet: public FunctionSet 35 { 36 private: 37 EditView* pCurView; 38 39 public: 40 EditSelFunctionSet(); 41 42 virtual void BeginDrag(); 43 44 virtual void CreateAnchor(); 45 virtual void DestroyAnchor(); 46 47 virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ); 48 49 virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); 50 virtual void DeselectAtPoint( const Point& rPointPixel ); 51 virtual void DeselectAll(); 52 SetCurView(EditView * pView)53 void SetCurView( EditView* pView ) { pCurView = pView; } GetCurView()54 EditView* GetCurView() { return pCurView; } 55 }; 56 57 // ---------------------------------------------------------------------- 58 // class EditSelectionEngine 59 // ---------------------------------------------------------------------- 60 class EditSelectionEngine : public SelectionEngine 61 { 62 private: 63 64 public: 65 EditSelectionEngine(); 66 67 void SetCurView( EditView* pNewView ); 68 EditView* GetCurView(); 69 }; 70 71 #endif // _EDITSEL_HXX 72