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: querycontainerwindow.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 DBAUI_QUERYCONTAINERWINDOW_HXX
32 #define DBAUI_QUERYCONTAINERWINDOW_HXX
34 #ifndef _SV_WINDOW_HXX
35 #include <vcl/window.hxx>
38 #include <vcl/split.hxx>
40 #ifndef DBAUI_DATAVIEW_HXX
41 #include "dataview.hxx"
43 #ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
44 #include <com/sun/star/frame/XFrame.hpp>
46 #ifndef DBAUI_QUERYVIEWSWITCH_HXX
47 #include "QueryViewSwitch.hxx"
49 #ifndef _SV_DOCKWIN_HXX
50 #include <vcl/dockwin.hxx>
54 //.........................................................................
57 //.........................................................................
59 //=====================================================================
61 //=====================================================================
62 // tempoaray class until the beamer is implemented
63 class OBeamer
: public DockingWindow
66 OBeamer(Window
* _pParent
) : DockingWindow(_pParent
,0){}
69 //=====================================================================
70 //= OQueryContainerWindow
71 //=====================================================================
72 class OQueryContainerWindow
: public ODataView
74 OQueryViewSwitch
* m_pViewSwitch
;
76 Splitter
* m_pSplitter
;
77 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> m_xBeamer
;
79 DECL_LINK( SplitHdl
, void* );
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
);
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();
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 //.........................................................................
135 //.........................................................................
137 #endif // DBAUI_QUERYCONTAINERWINDOW_HXX