update dev300-m58
[ooovba.git] / dbaccess / source / ui / inc / querycontainerwindow.hxx
blob36c5f93ee78a1fa3fe18ca976cb7afa657def8c7
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: querycontainerwindow.hxx,v $
10 * $Revision: 1.10 $
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 DBAUI_QUERYCONTAINERWINDOW_HXX
32 #define DBAUI_QUERYCONTAINERWINDOW_HXX
34 #ifndef _SV_WINDOW_HXX
35 #include <vcl/window.hxx>
36 #endif
37 #ifndef _SV_SPLIT_HXX
38 #include <vcl/split.hxx>
39 #endif
40 #ifndef DBAUI_DATAVIEW_HXX
41 #include "dataview.hxx"
42 #endif
43 #ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
44 #include <com/sun/star/frame/XFrame.hpp>
45 #endif
46 #ifndef DBAUI_QUERYVIEWSWITCH_HXX
47 #include "QueryViewSwitch.hxx"
48 #endif
49 #ifndef _SV_DOCKWIN_HXX
50 #include <vcl/dockwin.hxx>
51 #endif
53 class FixedLine;
54 //.........................................................................
55 namespace dbaui
57 //.........................................................................
59 //=====================================================================
60 //= OBeamer
61 //=====================================================================
62 // tempoaray class until the beamer is implemented
63 class OBeamer : public DockingWindow
65 public:
66 OBeamer(Window* _pParent) : DockingWindow(_pParent,0){}
69 //=====================================================================
70 //= OQueryContainerWindow
71 //=====================================================================
72 class OQueryContainerWindow : public ODataView
74 OQueryViewSwitch* m_pViewSwitch;
75 OBeamer* m_pBeamer;
76 Splitter* m_pSplitter;
77 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xBeamer;
79 DECL_LINK( SplitHdl, void* );
80 public:
81 OQueryContainerWindow(Window* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
82 ~OQueryContainerWindow();
84 virtual void Construct();
86 virtual long PreNotify( NotifyEvent& rNEvt );
88 // show the beamer
89 void showPreview(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame);
90 // called when the beamer has been disposed
91 void disposingPreview();
93 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
94 getPreviewFrame() const { return m_xBeamer; }
96 OQueryDesignView* getDesignView() { return m_pViewSwitch->getDesignView(); }
98 sal_Bool isCutAllowed() { return m_pViewSwitch->isCutAllowed(); }
99 sal_Bool isPasteAllowed() { return m_pViewSwitch->isPasteAllowed(); }
100 sal_Bool isCopyAllowed() { return m_pViewSwitch->isCopyAllowed(); }
101 void copy() { m_pViewSwitch->copy(); }
102 void cut() { m_pViewSwitch->cut(); }
103 void paste() { m_pViewSwitch->paste(); }
105 void clear() { m_pViewSwitch->clear(); }
106 sal_Bool isSlotEnabled( sal_Int32 _nSlotId ) { return m_pViewSwitch->isSlotEnabled( _nSlotId ); }
107 void setSlotEnabled( sal_Int32 _nSlotId, sal_Bool _bEnable ) { m_pViewSwitch->setSlotEnabled( _nSlotId, _bEnable ); }
108 void setNoneVisbleRow(sal_Int32 _nRows) { m_pViewSwitch->setNoneVisbleRow( _nRows); }
110 void setReadOnly( sal_Bool _bReadOnly ) { m_pViewSwitch->setReadOnly( _bReadOnly ); }
112 sal_Bool checkStatement() { return m_pViewSwitch->checkStatement( ); }
113 ::rtl::OUString getStatement() { return m_pViewSwitch->getStatement( ); }
114 void setStatement( const ::rtl::OUString& _rsStatement ) { m_pViewSwitch->setStatement( _rsStatement ); }
116 void initialize() { m_pViewSwitch->initialize(); }
117 void SaveUIConfig() { m_pViewSwitch->SaveUIConfig(); }
118 bool reset( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { return m_pViewSwitch->reset( _pErrorInfo ); }
120 bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo );
122 virtual void GetFocus();
124 protected:
125 // re-arrange the controls belonging to the document itself
126 virtual void resizeAll( const Rectangle& _rPlayground );
128 // arrange dericed classes controls in the rectangle given
129 virtual void resizeDocumentView(Rectangle& _rPlayground);
131 // end of temp classes
133 //.........................................................................
134 } // namespace dbaui
135 //.........................................................................
137 #endif // DBAUI_QUERYCONTAINERWINDOW_HXX