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