xref: /trunk/main/basctl/source/basicide/bastype4.hxx (revision 96821c26)
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 #ifndef _BASTYPE4_HXX
24 #define _BASTYPE4_HXX
25 
26 
27 #include <svtools/tabbar.hxx>
28 
29 class EditEngine;
30 class EditView;
31 
32 class ExtendedTabBar : public TabBar
33 {
34 	EditEngine*     pEditEngine;
35 	EditView*       pEditView;
36 	sal_Bool            bIsInKeyInput;
37 #if _SOLAR__PRIVATE
38 	void            ImpCheckEditEngine( sal_Bool bKeepNewText );
39 #endif
40 protected:
41 	virtual void    MouseButtonDown( const MouseEvent& rMEvt );
42 	virtual void    MouseButtonUp( const MouseEvent& rMEvt );
43 	virtual void    MouseMove( const MouseEvent& rMEvt );
44 	virtual void    LoseFocus();
45 	virtual void    KeyInput( const KeyEvent& rKEvent );
46 	virtual void    Paint( const Rectangle& );
47 
48 	virtual sal_Bool    StartRenamingTab( sal_uInt16 nCurId );
49 	virtual sal_Bool    AllowRenamingTab( sal_uInt16 nCurId, const String& rNewName );
50 	virtual void    TabRenamed( sal_uInt16 nCurId, const String& rNewName );
51 
52 public:
53 					ExtendedTabBar( Window* pParent, WinBits nStyle );
54 					~ExtendedTabBar();
55 
56 	void            RenameSelectedTab();
IsInEditMode() const57 	sal_Bool            IsInEditMode() const { return pEditEngine ? sal_True : sal_False; }
58 	void            StopEditMode( sal_Bool bKeepCurText = sal_False );
59 };
60 
61 #endif  //_BASTYPE4_HXX
62 
63 
64