1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: brwview.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SBX_BRWVIEW_HXX
32 #define _SBX_BRWVIEW_HXX
34 #ifndef _SV_WINDOW_HXX //autogen
35 #include <vcl/window.hxx>
38 #ifndef _TOOLS_RESID_HXX //autogen wg. ResId
39 #include <tools/resid.hxx>
42 #ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
43 #include <com/sun/star/awt/PosSize.hpp>
45 #ifndef DBAUI_DATAVIEW_HXX
46 #include "dataview.hxx"
48 #ifndef _UNOTOOLS_EVENTLISTENERADAPTER_HXX_
49 #include <unotools/eventlisteneradapter.hxx>
53 namespace com
{ namespace sun
{ namespace star
{ namespace awt
{
55 class XControlContainer
;
59 // =========================================================================
68 class UnoDataBrowserView
: public ODataView
, public ::utl::OEventListenerAdapter
71 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XControl
> m_xGrid
; // our grid's UNO representation
72 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XControlContainer
> m_xMe
; // our own UNO representation
73 DBTreeView
* m_pTreeView
;
74 Splitter
* m_pSplitter
;
75 mutable SbaGridControl
* m_pVclControl
; // our grid's VCL representation
78 DECL_LINK( SplitHdl
, void* );
81 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XControl
> getGridControl() const { return m_xGrid
; }
82 SbaGridControl
* getVclControl() const;
85 UnoDataBrowserView( Window
* pParent
,
86 IController
& _rController
,
87 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& );
88 virtual ~UnoDataBrowserView();
91 virtual void Construct(const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XControlModel
>& xModel
);
93 /** as columns may be hidden there is a difference between a columns model pos and its view pos
94 so we you may use these translation function
96 sal_uInt16
View2ModelPos(sal_uInt16 nPos
) const;
97 /// for the same reason the view column count isn't the same as the model column count
99 void setSplitter(Splitter
* _pSplitter
);
100 void setTreeView(DBTreeView
* _pTreeView
);
102 void showStatus( const String
& _rStatus
);
105 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XControlContainer
> getContainer() { return m_xMe
; }
108 virtual long PreNotify( NotifyEvent
& rNEvt
);
109 virtual void GetFocus();
110 virtual void resizeDocumentView(Rectangle
& rRect
);
111 virtual void _disposing( const ::com::sun::star::lang::EventObject
& _rSource
);
114 using ODataView::Construct
;
117 class BrowserViewStatusDisplay
120 UnoDataBrowserView
* m_pView
;
123 BrowserViewStatusDisplay( UnoDataBrowserView
* _pView
, const String
& _rStatus
);
124 ~BrowserViewStatusDisplay( );
127 #endif // _SBX_BRWVIEW_HXX