xref: /trunk/main/basctl/source/basicide/iderdll2.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _IDERDLL2_HXX
29 #define _IDERDLL2_HXX
30 
31 class StarBASIC;
32 class SvxSearchItem;
33 class Accelerator;
34 
35 #include <tools/string.hxx>
36 #include <tools/gen.hxx>
37 #include <tools/link.hxx>
38 
39 #include <bastypes.hxx>
40 #include <bastype2.hxx>
41 
42 #define INVPOSITION 0x7fff
43 
44 class BasicIDEData
45 {
46 private:
47     Accelerator*    pAccelerator;
48     SvxSearchItem*  pSearchItem;
49 
50     LibInfos        aLibInfos;
51 
52     BasicEntryDescriptor    m_aLastEntryDesc;
53 
54     Point           aObjCatPos;
55     Size            aObjCatSize;
56 
57     String          aAddLibPath;
58     String          aAddLibFilter;
59 
60     sal_uInt16          nBasicDialogCount;
61 
62     sal_Bool            OLD_bRelMacroRecording;
63     sal_Bool            bChoosingMacro;
64     sal_Bool            bShellInCriticalSection;
65 
66 protected:
67     DECL_LINK( GlobalBasicBreakHdl, StarBASIC * );
68 
69 public:
70                             BasicIDEData();
71                             ~BasicIDEData();
72 
73     LibInfos&               GetLibInfos() { return aLibInfos; }
74 
75     BasicEntryDescriptor&   GetLastEntryDescriptor()    { return m_aLastEntryDesc; }
76     void                    SetLastEntryDescriptor( BasicEntryDescriptor& rDesc ) { m_aLastEntryDesc = rDesc; }
77 
78     sal_Bool&                   ChoosingMacro()             { return bChoosingMacro; }
79     sal_Bool&                   ShellInCriticalSection()    { return bShellInCriticalSection; }
80 
81     sal_uInt16                  GetBasicDialogCount() const { return nBasicDialogCount; }
82     void                    IncBasicDialogCount()       { nBasicDialogCount++; }
83     void                    DecBasicDialogCount()       { nBasicDialogCount--; }
84 
85     SvxSearchItem&          GetSearchItem() const;
86     void                    SetSearchItem( const SvxSearchItem& rItem );
87 
88     void                    SetObjectCatalogPos( const Point& rPnt )
89                                 { aObjCatPos = rPnt; }
90     const Point&            GetObjectCatalogPos() const
91                                 { return aObjCatPos; }
92 
93     void                    SetObjectCatalogSize( const Size& rSize )
94                                 { aObjCatSize = rSize; }
95     const Size&             GetObjectCatalogSize() const
96                                 { return aObjCatSize; }
97 
98     const String&           GetAddLibPath() const   { return aAddLibPath; }
99     void                    SetAddLibPath( const String& rPath ) { aAddLibPath = rPath; }
100 
101     const String&           GetAddLibFilter() const { return aAddLibFilter; }
102     void                    SetAddLibFilter( const String& rFilter )  { aAddLibFilter = rFilter; }
103 };
104 
105 
106 #endif //_IDERDLL2_HXX
107