1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef DBAUI_QUERYCONTAINERWINDOW_HXX 25 #define DBAUI_QUERYCONTAINERWINDOW_HXX 26 27 #ifndef _SV_WINDOW_HXX 28 #include <vcl/window.hxx> 29 #endif 30 #ifndef _SV_SPLIT_HXX 31 #include <vcl/split.hxx> 32 #endif 33 #ifndef DBAUI_DATAVIEW_HXX 34 #include "dataview.hxx" 35 #endif 36 #ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_ 37 #include <com/sun/star/frame/XFrame.hpp> 38 #endif 39 #ifndef DBAUI_QUERYVIEWSWITCH_HXX 40 #include "QueryViewSwitch.hxx" 41 #endif 42 #ifndef _SV_DOCKWIN_HXX 43 #include <vcl/dockwin.hxx> 44 #endif 45 46 class FixedLine; 47 //......................................................................... 48 namespace dbaui 49 { 50 //......................................................................... 51 52 //===================================================================== 53 //= OBeamer 54 //===================================================================== 55 // tempoaray class until the beamer is implemented 56 class OBeamer : public DockingWindow 57 { 58 public: OBeamer(Window * _pParent)59 OBeamer(Window* _pParent) : DockingWindow(_pParent,0){} 60 }; 61 62 //===================================================================== 63 //= OQueryContainerWindow 64 //===================================================================== 65 class OQueryContainerWindow : public ODataView 66 { 67 OQueryViewSwitch* m_pViewSwitch; 68 OBeamer* m_pBeamer; 69 Splitter* m_pSplitter; 70 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xBeamer; 71 72 DECL_LINK( SplitHdl, void* ); 73 public: 74 OQueryContainerWindow(Window* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); 75 ~OQueryContainerWindow(); 76 77 virtual void Construct(); 78 79 virtual long PreNotify( NotifyEvent& rNEvt ); 80 81 // show the beamer 82 void showPreview(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame); 83 // called when the beamer has been disposed 84 void disposingPreview(); 85 86 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getPreviewFrame() const87 getPreviewFrame() const { return m_xBeamer; } 88 getDesignView()89 OQueryDesignView* getDesignView() { return m_pViewSwitch->getDesignView(); } 90 isCutAllowed()91 sal_Bool isCutAllowed() { return m_pViewSwitch->isCutAllowed(); } isPasteAllowed()92 sal_Bool isPasteAllowed() { return m_pViewSwitch->isPasteAllowed(); } isCopyAllowed()93 sal_Bool isCopyAllowed() { return m_pViewSwitch->isCopyAllowed(); } copy()94 void copy() { m_pViewSwitch->copy(); } cut()95 void cut() { m_pViewSwitch->cut(); } paste()96 void paste() { m_pViewSwitch->paste(); } 97 clear()98 void clear() { m_pViewSwitch->clear(); } isSlotEnabled(sal_Int32 _nSlotId)99 sal_Bool isSlotEnabled( sal_Int32 _nSlotId ) { return m_pViewSwitch->isSlotEnabled( _nSlotId ); } setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable)100 void setSlotEnabled( sal_Int32 _nSlotId, sal_Bool _bEnable ) { m_pViewSwitch->setSlotEnabled( _nSlotId, _bEnable ); } setNoneVisbleRow(sal_Int32 _nRows)101 void setNoneVisbleRow(sal_Int32 _nRows) { m_pViewSwitch->setNoneVisbleRow( _nRows); } 102 setReadOnly(sal_Bool _bReadOnly)103 void setReadOnly( sal_Bool _bReadOnly ) { m_pViewSwitch->setReadOnly( _bReadOnly ); } 104 checkStatement()105 sal_Bool checkStatement() { return m_pViewSwitch->checkStatement( ); } getStatement()106 ::rtl::OUString getStatement() { return m_pViewSwitch->getStatement( ); } setStatement(const::rtl::OUString & _rsStatement)107 void setStatement( const ::rtl::OUString& _rsStatement ) { m_pViewSwitch->setStatement( _rsStatement ); } 108 initialize()109 void initialize() { m_pViewSwitch->initialize(); } SaveUIConfig()110 void SaveUIConfig() { m_pViewSwitch->SaveUIConfig(); } reset(::dbtools::SQLExceptionInfo * _pErrorInfo)111 bool reset( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { return m_pViewSwitch->reset( _pErrorInfo ); } 112 113 bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo ); 114 void forceInitialView(); 115 116 virtual void GetFocus(); 117 118 protected: 119 // re-arrange the controls belonging to the document itself 120 virtual void resizeAll( const Rectangle& _rPlayground ); 121 122 // arrange dericed classes controls in the rectangle given 123 virtual void resizeDocumentView(Rectangle& _rPlayground); 124 }; 125 // end of temp classes 126 127 //......................................................................... 128 } // namespace dbaui 129 //......................................................................... 130 131 #endif // DBAUI_QUERYCONTAINERWINDOW_HXX 132 133