xref: /AOO41X/main/dbaccess/source/ui/app/AppDetailView.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef DBAUI_APPDETAILVIEW_HXX
28*cdf0e10cSrcweir #define DBAUI_APPDETAILVIEW_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
31*cdf0e10cSrcweir #include <com/sun/star/frame/XController.hpp>
32*cdf0e10cSrcweir #endif
33*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
34*cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp>
35*cdf0e10cSrcweir #endif
36*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
37*cdf0e10cSrcweir #include <com/sun/star/sdbc/XConnection.hpp>
38*cdf0e10cSrcweir #endif
39*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
40*cdf0e10cSrcweir #include <com/sun/star/ucb/XContent.hpp>
41*cdf0e10cSrcweir #endif
42*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDB_APPLICATION_NAMEDDATABASEOBJECT_HPP_
43*cdf0e10cSrcweir #include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
44*cdf0e10cSrcweir #endif
45*cdf0e10cSrcweir #ifndef _SV_SPLIT_HXX
46*cdf0e10cSrcweir #include <vcl/split.hxx>
47*cdf0e10cSrcweir #endif
48*cdf0e10cSrcweir #ifndef _SV_FIXED_HXX
49*cdf0e10cSrcweir #include <vcl/fixed.hxx>
50*cdf0e10cSrcweir #endif
51*cdf0e10cSrcweir #ifndef _SV_MNEMONIC_HXX
52*cdf0e10cSrcweir #include <vcl/mnemonic.hxx>
53*cdf0e10cSrcweir #endif
54*cdf0e10cSrcweir #ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
55*cdf0e10cSrcweir #include "IClipBoardTest.hxx"
56*cdf0e10cSrcweir #endif
57*cdf0e10cSrcweir #ifndef DBAUI_TITLE_WINDOW_HXX
58*cdf0e10cSrcweir #include "AppTitleWindow.hxx"
59*cdf0e10cSrcweir #endif
60*cdf0e10cSrcweir #ifndef DBAUI_APPELEMENTTYPE_HXX
61*cdf0e10cSrcweir #include "AppElementType.hxx"
62*cdf0e10cSrcweir #endif
63*cdf0e10cSrcweir #ifndef _SVTREEBOX_HXX
64*cdf0e10cSrcweir #include <svtools/svtreebx.hxx>
65*cdf0e10cSrcweir #endif
66*cdf0e10cSrcweir #ifndef DBAUI_VERTSPLITVIEW_HXX
67*cdf0e10cSrcweir #include "VertSplitView.hxx"
68*cdf0e10cSrcweir #endif
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir #include <vector>
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir class SvLBoxEntry;
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir namespace dbaui
75*cdf0e10cSrcweir {
76*cdf0e10cSrcweir 	class OAppBorderWindow;
77*cdf0e10cSrcweir 	class OApplicationDetailView;
78*cdf0e10cSrcweir 	class OAppDetailPageHelper;
79*cdf0e10cSrcweir 	class OTasksWindow;
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir 	class OCreationList : public SvTreeListBox
82*cdf0e10cSrcweir 	{
83*cdf0e10cSrcweir 		OTasksWindow&   m_rTaskWindow;
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir         // members related to drawing the currently hovered/selected entry
86*cdf0e10cSrcweir         SvLBoxEntry*        m_pMouseDownEntry;
87*cdf0e10cSrcweir         SvLBoxEntry*        m_pLastActiveEntry;
88*cdf0e10cSrcweir         Color               m_aOriginalBackgroundColor;
89*cdf0e10cSrcweir         Font                m_aOriginalFont;
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir 	public:
92*cdf0e10cSrcweir 		OCreationList( OTasksWindow& _rParent );
93*cdf0e10cSrcweir 		// window overloads
94*cdf0e10cSrcweir 		virtual void MouseMove( const MouseEvent& rMEvt );
95*cdf0e10cSrcweir 		virtual void MouseButtonDown( const MouseEvent& rMEvt );
96*cdf0e10cSrcweir 		virtual void MouseButtonUp( const MouseEvent& rMEvt );
97*cdf0e10cSrcweir 		virtual void KeyInput( const KeyEvent& rKEvt );
98*cdf0e10cSrcweir         virtual void Paint( const Rectangle& rRect );
99*cdf0e10cSrcweir 	    virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel );
100*cdf0e10cSrcweir         virtual void GetFocus();
101*cdf0e10cSrcweir         virtual void LoseFocus();
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir         inline void resetLastActive() { m_pLastActiveEntry = NULL;}
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir         void    updateHelpText();
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir     protected:
108*cdf0e10cSrcweir 	    virtual void	    PreparePaint( SvLBoxEntry* _pEntry );
109*cdf0e10cSrcweir 	    virtual Rectangle   GetFocusRect( SvLBoxEntry* _pEntry, long _nLine );
110*cdf0e10cSrcweir         virtual void        ModelHasCleared();
111*cdf0e10cSrcweir 
112*cdf0e10cSrcweir         // IMnemonicEntryList
113*cdf0e10cSrcweir         virtual void        SelectSearchEntry( const void* _pEntry );
114*cdf0e10cSrcweir         virtual void        ExecuteSearchEntry( const void* _pEntry ) const;
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir     private:
117*cdf0e10cSrcweir         void    onSelected( SvLBoxEntry* _pEntry ) const;
118*cdf0e10cSrcweir         /** sets a new current entry, and invalidates the old and the new one, if necessary
119*cdf0e10cSrcweir             @return <TRUE/> if and only if the "current entry" changed
120*cdf0e10cSrcweir         */
121*cdf0e10cSrcweir         bool    setCurrentEntryInvalidate( SvLBoxEntry* _pEntry );
122*cdf0e10cSrcweir 	};
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir     struct TaskEntry
125*cdf0e10cSrcweir     {
126*cdf0e10cSrcweir         ::rtl::OUString sUNOCommand;
127*cdf0e10cSrcweir         sal_uInt16          nHelpID;
128*cdf0e10cSrcweir         String          sTitle;
129*cdf0e10cSrcweir         bool            bHideWhenDisabled;
130*cdf0e10cSrcweir             // TODO: we should be consistent in the task pane and the menus/toolbars:
131*cdf0e10cSrcweir             // If an entry is disabled in the latter, it should also be disabled in the former.
132*cdf0e10cSrcweir             // If an entry is *hidden* in the former, it should also be hidden in the latter.
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir         TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sal_uInt16 _nTitleResourceID, bool _bHideWhenDisabled = false );
135*cdf0e10cSrcweir     };
136*cdf0e10cSrcweir 	typedef ::std::vector< TaskEntry >	TaskEntryList;
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir     struct TaskPaneData
139*cdf0e10cSrcweir     {
140*cdf0e10cSrcweir         /// the tasks available in the pane
141*cdf0e10cSrcweir         TaskEntryList   aTasks;
142*cdf0e10cSrcweir         /// the resource ID for the title of the pane
143*cdf0e10cSrcweir         sal_uInt16          nTitleId;
144*cdf0e10cSrcweir     };
145*cdf0e10cSrcweir 
146*cdf0e10cSrcweir 	class OTasksWindow : public Window
147*cdf0e10cSrcweir 	{
148*cdf0e10cSrcweir 		OCreationList						m_aCreation;
149*cdf0e10cSrcweir 		FixedText							m_aDescription;
150*cdf0e10cSrcweir 		FixedText							m_aHelpText;
151*cdf0e10cSrcweir 		FixedLine							m_aFL;
152*cdf0e10cSrcweir 		OApplicationDetailView*				m_pDetailView;
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir 		DECL_LINK( OnEntrySelectHdl,		SvTreeListBox* );
155*cdf0e10cSrcweir 		void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
156*cdf0e10cSrcweir 	protected:
157*cdf0e10cSrcweir 		virtual void DataChanged(const DataChangedEvent& rDCEvt);
158*cdf0e10cSrcweir 	public:
159*cdf0e10cSrcweir 		OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView);
160*cdf0e10cSrcweir 		virtual ~OTasksWindow();
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir 		// window overloads
163*cdf0e10cSrcweir 		virtual void Resize();
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir 		OApplicationDetailView*	getDetailView() const { return m_pDetailView; }
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir 		/// fills the Creation listbox with the necessary strings and images
168*cdf0e10cSrcweir 		void fillTaskEntryList( const TaskEntryList& _rList );
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir 	    inline bool HandleKeyInput( const KeyEvent& _rKEvt )
171*cdf0e10cSrcweir         {
172*cdf0e10cSrcweir             return m_aCreation.HandleKeyInput( _rKEvt );
173*cdf0e10cSrcweir         }
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir         void Clear();
176*cdf0e10cSrcweir 		void setHelpText(sal_uInt16 _nId);
177*cdf0e10cSrcweir 	};
178*cdf0e10cSrcweir 	//==================================================================
179*cdf0e10cSrcweir 	class OApplicationDetailView : public OSplitterView
180*cdf0e10cSrcweir 								 , public IClipboardTest
181*cdf0e10cSrcweir 	{
182*cdf0e10cSrcweir 		Splitter							m_aHorzSplitter;
183*cdf0e10cSrcweir 		OTitleWindow						m_aTasks;
184*cdf0e10cSrcweir 		OTitleWindow						m_aContainer;
185*cdf0e10cSrcweir 		OAppBorderWindow&					m_rBorderWin;		// my parent
186*cdf0e10cSrcweir 		OAppDetailPageHelper*				m_pControlHelper;
187*cdf0e10cSrcweir         ::std::vector< TaskPaneData >       m_aTaskPaneData;
188*cdf0e10cSrcweir         MnemonicGenerator                   m_aExternalMnemonics;
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir 		void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir     protected:
193*cdf0e10cSrcweir 		virtual void DataChanged(const DataChangedEvent& rDCEvt);
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir     public:
196*cdf0e10cSrcweir 		OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode _ePreviewMode);
197*cdf0e10cSrcweir 		virtual ~OApplicationDetailView();
198*cdf0e10cSrcweir 		// window overloads
199*cdf0e10cSrcweir 		//	virtual void Resize();
200*cdf0e10cSrcweir 		virtual void GetFocus();
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 		/** creates the tables page
203*cdf0e10cSrcweir 			@param	_xConnection
204*cdf0e10cSrcweir 				The connection to get the table names
205*cdf0e10cSrcweir 		*/
206*cdf0e10cSrcweir 		void createTablesPage(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection);
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir 		/** creates the page for the specific type.
209*cdf0e10cSrcweir 			@param	_eType
210*cdf0e10cSrcweir 				The type which should be created. E_TABLE isn't allowed.
211*cdf0e10cSrcweir 			@param	_xContainer
212*cdf0e10cSrcweir 				The container of the elements to be inserted.
213*cdf0e10cSrcweir 		*/
214*cdf0e10cSrcweir 		void createPage(ElementType _eType,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xContainer);
215*cdf0e10cSrcweir 
216*cdf0e10cSrcweir         void setTaskExternalMnemonics( MnemonicGenerator& _rMnemonics );
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir         /** called to give the window the chance to intercept key events, while it has not
219*cdf0e10cSrcweir             the focus
220*cdf0e10cSrcweir 
221*cdf0e10cSrcweir             @return <TRUE/> if and only if the event has been handled, and should not
222*cdf0e10cSrcweir                 not be further processed
223*cdf0e10cSrcweir         */
224*cdf0e10cSrcweir         bool    interceptKeyInput( const KeyEvent& _rEvent );
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir         inline OAppBorderWindow& getBorderWin() const { return m_rBorderWin; }
227*cdf0e10cSrcweir         inline OTasksWindow& getTasksWindow() const { return *static_cast< OTasksWindow* >( m_aTasks.getChildWindow() ); }
228*cdf0e10cSrcweir 
229*cdf0e10cSrcweir 		sal_Bool isCutAllowed()	;
230*cdf0e10cSrcweir 		sal_Bool isCopyAllowed()	;
231*cdf0e10cSrcweir 		sal_Bool isPasteAllowed();
232*cdf0e10cSrcweir 		virtual sal_Bool hasChildPathFocus() { return HasChildPathFocus(); }
233*cdf0e10cSrcweir 		void copy();
234*cdf0e10cSrcweir 		void cut();
235*cdf0e10cSrcweir 		void paste();
236*cdf0e10cSrcweir 
237*cdf0e10cSrcweir 		/** return the qualified name.
238*cdf0e10cSrcweir 			@param	_pEntry
239*cdf0e10cSrcweir 				The entry of a table, or query, form, report to get the qualified name.
240*cdf0e10cSrcweir 				If the entry is <NULL/>, the first selected is chosen.
241*cdf0e10cSrcweir 			@return
242*cdf0e10cSrcweir 				the qualified name
243*cdf0e10cSrcweir 		*/
244*cdf0e10cSrcweir 		::rtl::OUString getQualifiedName( SvLBoxEntry* _pEntry ) const;
245*cdf0e10cSrcweir 
246*cdf0e10cSrcweir 		/** returns if an entry is a leaf
247*cdf0e10cSrcweir 			@param _pEntry
248*cdf0e10cSrcweir 				The entry to check
249*cdf0e10cSrcweir 			@return
250*cdf0e10cSrcweir 				<TRUE/> if the entry is a leaf, otherwise <FALSE/>
251*cdf0e10cSrcweir 		*/
252*cdf0e10cSrcweir 		sal_Bool isLeaf(SvLBoxEntry* _pEntry) const;
253*cdf0e10cSrcweir 
254*cdf0e10cSrcweir 		/** returns if one of the selected entries is a leaf
255*cdf0e10cSrcweir 			@return
256*cdf0e10cSrcweir 				<TRUE/> if the entry is a leaf, otherwise <FALSE/>
257*cdf0e10cSrcweir 		*/
258*cdf0e10cSrcweir 		sal_Bool isALeafSelected() const;
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir 		/** select all entries in the detail page
261*cdf0e10cSrcweir 		*/
262*cdf0e10cSrcweir 		void selectAll();
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir 		/// returns <TRUE/> if it sorts ascending
265*cdf0e10cSrcweir 		sal_Bool isSortUp() const;
266*cdf0e10cSrcweir 
267*cdf0e10cSrcweir 		/// sort the entries in the detail page down
268*cdf0e10cSrcweir 		void sortDown();
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir 		/// sort the entries in the detail page up
271*cdf0e10cSrcweir 		void sortUp();
272*cdf0e10cSrcweir 
273*cdf0e10cSrcweir 		/// returns <TRUE/> when a detail page was filled
274*cdf0e10cSrcweir 		sal_Bool isFilled() const;
275*cdf0e10cSrcweir 
276*cdf0e10cSrcweir 		/// return the element of currently select entry
277*cdf0e10cSrcweir 		ElementType getElementType() const;
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir 		/** clears the detail pages.
280*cdf0e10cSrcweir 			@param	_bTaskAlso
281*cdf0e10cSrcweir 				If <TRUE/> the task window will also be cleared.
282*cdf0e10cSrcweir 		*/
283*cdf0e10cSrcweir 		void clearPages(sal_Bool _bTaskAlso = sal_True);
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir 		/// returns the count of entries
286*cdf0e10cSrcweir 		sal_Int32 getElementCount();
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir 		/// returns the count of selected entries
289*cdf0e10cSrcweir 		sal_Int32 getSelectionCount();
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir 		/** returns the element names which are selected
292*cdf0e10cSrcweir 			@param	_rNames
293*cdf0e10cSrcweir 				The list will be filled.
294*cdf0e10cSrcweir 		*/
295*cdf0e10cSrcweir 		void getSelectionElementNames(::std::vector< ::rtl::OUString>& _rNames ) const;
296*cdf0e10cSrcweir 
297*cdf0e10cSrcweir         /** describes the current selection for the given control
298*cdf0e10cSrcweir         */
299*cdf0e10cSrcweir         void    describeCurrentSelectionForControl(
300*cdf0e10cSrcweir                     const Control& _rControl,
301*cdf0e10cSrcweir                     ::com::sun::star::uno::Sequence< ::com::sun::star::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects
302*cdf0e10cSrcweir                 );
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir         /** describes the current selection for the given ElementType
305*cdf0e10cSrcweir         */
306*cdf0e10cSrcweir         void    describeCurrentSelectionForType(
307*cdf0e10cSrcweir                     const ElementType _eType,
308*cdf0e10cSrcweir                     ::com::sun::star::uno::Sequence< ::com::sun::star::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects
309*cdf0e10cSrcweir                 );
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir         /** select all names on the currently selected container. Non existence names where ignored.
312*cdf0e10cSrcweir         *
313*cdf0e10cSrcweir         * \param _aNames the element names
314*cdf0e10cSrcweir         */
315*cdf0e10cSrcweir         void selectElements(const ::com::sun::star::uno::Sequence< ::rtl::OUString>& _aNames);
316*cdf0e10cSrcweir 
317*cdf0e10cSrcweir 		/** adds a new object to the detail page.
318*cdf0e10cSrcweir 			@param	_eType
319*cdf0e10cSrcweir 				The type where the entry shold be appended.
320*cdf0e10cSrcweir 			@param	_rName
321*cdf0e10cSrcweir 				The name of the object to be inserted
322*cdf0e10cSrcweir 			@param	_rObject
323*cdf0e10cSrcweir 				The object to add.
324*cdf0e10cSrcweir 			@param	_rxConn
325*cdf0e10cSrcweir 				If we insert a table, the connection must be set.
326*cdf0e10cSrcweir 		*/
327*cdf0e10cSrcweir 		SvLBoxEntry* elementAdded(ElementType eType
328*cdf0e10cSrcweir 						,const ::rtl::OUString& _rName
329*cdf0e10cSrcweir 						,const ::com::sun::star::uno::Any& _rObject );
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir 		/** replaces a objects name with a new one
332*cdf0e10cSrcweir 			@param	_eType
333*cdf0e10cSrcweir 				The type where the entry shold be appended.
334*cdf0e10cSrcweir 			@param	_rOldName
335*cdf0e10cSrcweir 				The old name of the object to be replaced
336*cdf0e10cSrcweir 			@param	_rNewName
337*cdf0e10cSrcweir 				The new name of the object to be replaced
338*cdf0e10cSrcweir 			@param	_rxConn
339*cdf0e10cSrcweir 				If we insert a table, the connection must be set.
340*cdf0e10cSrcweir             @param  _xObject
341*cdf0e10cSrcweir                 The object which was replaced
342*cdf0e10cSrcweir 		*/
343*cdf0e10cSrcweir 		void elementReplaced(ElementType eType
344*cdf0e10cSrcweir 						,const ::rtl::OUString& _rOldName
345*cdf0e10cSrcweir 						,const ::rtl::OUString& _rNewName );
346*cdf0e10cSrcweir 
347*cdf0e10cSrcweir 		/** removes an element from the detail page.
348*cdf0e10cSrcweir 			@param	_eType
349*cdf0e10cSrcweir 				The type where the entry shold be appended.
350*cdf0e10cSrcweir 			@param	_rName
351*cdf0e10cSrcweir 				The name of the element to be removed.
352*cdf0e10cSrcweir 			@param	_rxConn
353*cdf0e10cSrcweir 				If we remove a table, the connection must be set.
354*cdf0e10cSrcweir 		*/
355*cdf0e10cSrcweir 		void elementRemoved(ElementType _eType
356*cdf0e10cSrcweir 							,const ::rtl::OUString& _rName );
357*cdf0e10cSrcweir 
358*cdf0e10cSrcweir 		/// returns the preview mode
359*cdf0e10cSrcweir 		PreviewMode getPreviewMode();
360*cdf0e10cSrcweir 
361*cdf0e10cSrcweir 		/// <TRUE/> if the preview is enabled
362*cdf0e10cSrcweir 		sal_Bool isPreviewEnabled();
363*cdf0e10cSrcweir 
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir 		/** switches to the given preview mode
366*cdf0e10cSrcweir 			@param	_eMode
367*cdf0e10cSrcweir 				the mode to set for the preview
368*cdf0e10cSrcweir 		*/
369*cdf0e10cSrcweir 		void switchPreview(PreviewMode _eMode);
370*cdf0e10cSrcweir 
371*cdf0e10cSrcweir 		/** shows the Preview of the content when it is enabled.
372*cdf0e10cSrcweir 			@param	_xContent
373*cdf0e10cSrcweir 				The content which must support the "preview" command.
374*cdf0e10cSrcweir 		*/
375*cdf0e10cSrcweir 		void showPreview(const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent >& _xContent);
376*cdf0e10cSrcweir 
377*cdf0e10cSrcweir 		/** shows the Preview of a table or query
378*cdf0e10cSrcweir 			@param	_sDataSourceName
379*cdf0e10cSrcweir 				the name of the data source
380*cdf0e10cSrcweir 			@param	_sName
381*cdf0e10cSrcweir 				the name of table or query
382*cdf0e10cSrcweir 			@param	_bTable
383*cdf0e10cSrcweir 				<TRUE/> if it is a table, otherwise <FALSE/>
384*cdf0e10cSrcweir 			@return	void
385*cdf0e10cSrcweir 		*/
386*cdf0e10cSrcweir 		void showPreview(	const ::rtl::OUString& _sDataSourceName,
387*cdf0e10cSrcweir 							const ::rtl::OUString& _sName,
388*cdf0e10cSrcweir 							sal_Bool _bTable);
389*cdf0e10cSrcweir 
390*cdf0e10cSrcweir 		SvLBoxEntry* getEntry( const Point& _aPoint ) const;
391*cdf0e10cSrcweir 
392*cdf0e10cSrcweir 		Window* getTreeWindow() const;
393*cdf0e10cSrcweir     private:
394*cdf0e10cSrcweir         void                impl_createPage(
395*cdf0e10cSrcweir                                 ElementType _eType,
396*cdf0e10cSrcweir                                 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
397*cdf0e10cSrcweir                                 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxNonTableElements
398*cdf0e10cSrcweir                             );
399*cdf0e10cSrcweir 
400*cdf0e10cSrcweir         const TaskPaneData& impl_getTaskPaneData( ElementType _eType );
401*cdf0e10cSrcweir         void                impl_fillTaskPaneData( ElementType _eType, TaskPaneData& _rData ) const;
402*cdf0e10cSrcweir 	};
403*cdf0e10cSrcweir }
404*cdf0e10cSrcweir #endif // DBAUI_APPDETAILVIEW_HXX
405*cdf0e10cSrcweir 
406