update dev300-m58
[ooovba.git] / dbaccess / source / ui / inc / brwview.hxx
blobb83e219a7cd536c2ab3ca7adb3e5331639b51bee
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: brwview.hxx,v $
10 * $Revision: 1.15 $
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>
36 #endif
38 #ifndef _TOOLS_RESID_HXX //autogen wg. ResId
39 #include <tools/resid.hxx>
40 #endif
42 #ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
43 #include <com/sun/star/awt/PosSize.hpp>
44 #endif
45 #ifndef DBAUI_DATAVIEW_HXX
46 #include "dataview.hxx"
47 #endif
48 #ifndef _UNOTOOLS_EVENTLISTENERADAPTER_HXX_
49 #include <unotools/eventlisteneradapter.hxx>
50 #endif
53 namespace com { namespace sun { namespace star { namespace awt {
54 class XControl;
55 class XControlContainer;
56 class XControlModel;
57 }}}}
59 // =========================================================================
60 class ResMgr;
61 class Splitter;
63 namespace dbaui
65 class DBTreeView;
66 class SbaGridControl;
68 class UnoDataBrowserView : public ODataView, public ::utl::OEventListenerAdapter
70 protected:
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
76 Window* m_pStatus;
78 DECL_LINK( SplitHdl, void* );
79 // attribute access
80 public:
81 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > getGridControl() const { return m_xGrid; }
82 SbaGridControl* getVclControl() const;
84 public:
85 UnoDataBrowserView( Window* pParent,
86 IController& _rController,
87 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
88 virtual ~UnoDataBrowserView();
90 /// late construction
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 );
103 void hideStatus();
105 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > getContainer() { return m_xMe; }
107 protected:
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 );
113 private:
114 using ODataView::Construct;
117 class BrowserViewStatusDisplay
119 protected:
120 UnoDataBrowserView* m_pView;
122 public:
123 BrowserViewStatusDisplay( UnoDataBrowserView* _pView, const String& _rStatus );
124 ~BrowserViewStatusDisplay( );
127 #endif // _SBX_BRWVIEW_HXX