1 /*************************************************************************
2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3  *
4  * Copyright 2000, 2010 Oracle and/or its affiliates.
5  *
6  * OpenOffice.org - a multi-platform office productivity suite
7  *
8  * This file is part of OpenOffice.org.
9  *
10  * OpenOffice.org is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License version 3
12  * only, as published by the Free Software Foundation.
13  *
14  * OpenOffice.org is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU Lesser General Public License version 3 for more details
18  * (a copy is included in the LICENSE file that accompanied this code).
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with OpenOffice.org.  If not, see
22  * <http://www.openoffice.org/license.html>
23  * for a copy of the LGPLv3 License.
24  *
25 ************************************************************************/
26 
27 #ifndef DBA30D_IAPPLICATIONCONTROLLER_HXX
28 #define DBA30D_IAPPLICATIONCONTROLLER_HXX
29 
30 #include "IController.hxx"
31 #include "AppElementType.hxx"
32 #include "callbacks.hxx"
33 
34 /** === begin UNO includes === **/
35 /** === end UNO includes === **/
36 
37 class SvTreeListBox;
38 class SvLBoxEntry;
39 
40 //........................................................................
41 namespace dbaui
42 {
43 //........................................................................
44 
45     class SAL_NO_VTABLE IApplicationController  :public IController
46 			                                    ,public IControlActionListener
47                                                 ,public IContextMenuProvider
48     {
49     public:
50 		/** called when an entry in a tree list box has been double-clicked
51 			@param	_rTree
52 				The tree list box.
53             @return
54                 <TRUE/> if the double click event has been handled by the called, and should not
55                 be processed further.
56 		*/
57 		virtual bool onEntryDoubleClick( SvTreeListBox& _rTree ) = 0;
58 
59         /** called when a container (category) in the application view has been selected
60 			@param	_pTree
61 				The tree list box.
62 			@return
63 				<TRUE/> if the cotainer could be changed otherwise <FALSE/>
64 		*/
65 		virtual sal_Bool onContainerSelect(ElementType _eType) = 0;
66 
67         /** called when an entry in a tree view has been selected
68 			@param	_pEntry
69 				the selected entry
70 		*/
71 		virtual void onSelectionChanged() = 0;
72 
73         /** called when a "Cut" command is executed in a tree view
74 		*/
75 		virtual void onCutEntry() = 0;
76 
77         /** called when a "Copy" command is executed in a tree view
78 		*/
79 		virtual void onCopyEntry() = 0;
80 
81         /** called when a "Paste" command is executed in a tree view
82 		*/
83 		virtual void onPasteEntry() = 0;
84 
85         /** called when a "Delete" command is executed in a tree view
86 		*/
87 		virtual void onDeleteEntry() = 0;
88 
89         /// called when the preview mode was changed
90 		virtual void previewChanged( sal_Int32 _nMode ) = 0;
91 
92         /// called when an object container of any kind was found during enumerating tree view elements
93 		virtual void containerFound( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer >& _xContainer) = 0;
94     };
95 
96 //........................................................................
97 } // namespace dbaui
98 //........................................................................
99 
100 #endif // DBA30D_IAPPLICATIONCONTROLLER_HXX
101