xref: /AOO41X/main/dbaccess/source/ui/browser/dbtreeview.hxx (revision 2e2212a7c22e96cf6f6fab0dd042c34a45a64bd6)
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 DBACCESS_UI_DBTREEVIEW_HXX
25 #define DBACCESS_UI_DBTREEVIEW_HXX
26 
27 #ifndef _SV_WINDOW_HXX //autogen
28 #include <vcl/window.hxx>
29 #endif
30 
31 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
32 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
33 #endif
34 
35 class SvTreeListBox;
36 class SvLBoxTreeList;
37 namespace dbaui
38 {
39     class DBTreeListBox;
40     // ------------------
41     // - DBTreeView -
42     // ------------------
43 
44     class DBTreeView : public Window
45     {
46     private:
47         DBTreeListBox*  m_pTreeListBox;
48     protected:
49         // window overridables
50         virtual void Resize();
51     public:
52 
53         DBTreeView( Window* pParent,
54                 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
55                 WinBits nBits );
56         ~DBTreeView();
57 
58         /** sets a handler which is called when an list box entry is to be expanded.
59             <p>When calling the link, the parameter is an SvLBoxEntry marking the entry to be expanded.
60             </p>
61         */
62         void    SetPreExpandHandler(const Link& _rHdl);
63         /// gets the currently set NodeExpansionHandler
64 
65         void    setCopyHandler(const Link& _rHdl);
66 
67 
68         void                setModel(SvLBoxTreeList* _pTreeModel);
69         void                setSelChangeHdl(const Link& _rHdl);
70 
getListBox() const71         DBTreeListBox&      getListBox() const { return *m_pTreeListBox; }
72 
73         virtual void GetFocus();
74     };
75 }
76 
77 #endif // DBACCESS_UI_DBTREEVIEW_HXX
78 
79