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 #ifndef DBAUI_QUERYVIEW_TEXT_HXX
24 #define DBAUI_QUERYVIEW_TEXT_HXX
25 
26 #ifndef DBAUI_QUERYVIEW_HXX
27 #include "queryview.hxx"
28 #endif
29 #ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
30 #include "querycontainerwindow.hxx"
31 #endif
32 
33 class Splitter;
34 namespace dbaui
35 {
36 	class OSqlEdit;
37 	class OQueryTextView : public Window
38 	{
39 		friend class OQueryViewSwitch;
40 		OSqlEdit*	m_pEdit;
41 	public:
42 		OQueryTextView( OQueryContainerWindow* pParent );
43 		virtual ~OQueryTextView();
44 
45 		virtual void GetFocus();
46 
47 		virtual sal_Bool isCutAllowed();
48 		virtual sal_Bool isPasteAllowed();
49 		virtual sal_Bool isCopyAllowed();
50 		virtual void copy();
51 		virtual void cut();
52 		virtual void paste();
53 		// clears the whole query
54 		virtual void clear();
55 		// set the view readonly or not
56 		virtual void setReadOnly(sal_Bool _bReadOnly);
57 		// check if the statement is correct when not returning false
58 		virtual sal_Bool checkStatement();
59 		// set the statement for representation
60 		virtual void setStatement(const ::rtl::OUString& _rsStatement);
61 		virtual ::rtl::OUString getStatement();
62 		// allow access to our edit
getSqlEdit() const63 		OSqlEdit* getSqlEdit() const { return m_pEdit; }
64 
getContainerWindow()65 		OQueryContainerWindow*	getContainerWindow() { return static_cast< OQueryContainerWindow* >( GetParent() ); }
66 	protected:
67 		virtual void Resize();
68 	};
69 }
70 #endif // DBAUI_QUERYVIEW_TEXT_HXX
71 
72 
73