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