fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / ui / inc / TableDesignControl.hxx
blob97acc014cf04acecc702658c114240d716aa8d95
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_TABLEDESIGNCONTROL_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_TABLEDESIGNCONTROL_HXX
22 #include <svtools/tabbar.hxx>
23 #include <svtools/editbrowsebox.hxx>
25 #include "IClipBoardTest.hxx"
26 #include "TypeInfo.hxx"
28 namespace dbaui
30 class OTableDesignView;
32 class OTableRowView : public ::svt::EditBrowseBox, public IClipboardTest
34 friend class OTableDesignUndoAct;
36 protected:
37 long m_nDataPos; ///< currently needed row
38 long m_nCurrentPos; ///< current position of selected column
40 private:
41 sal_uInt16 m_nCurUndoActId;
43 protected:
44 bool m_bCurrentModified;
45 bool m_bUpdatable;
46 bool m_bClipboardFilled;
48 public:
49 OTableRowView(vcl::Window* pParent);
51 virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
52 virtual void SetCellData( long nRow, sal_uInt16 nColId, const ::com::sun::star::uno::Any& _rNewData ) = 0;
53 virtual ::com::sun::star::uno::Any GetCellData( long nRow, sal_uInt16 nColId ) = 0;
54 virtual void SetControlText( long nRow, sal_uInt16 nColId, const OUString& rText ) = 0;
55 virtual OUString GetControlText( long nRow, sal_uInt16 nColId ) = 0;
57 virtual OTableDesignView* GetView() const = 0;
59 sal_uInt16 GetCurUndoActId(){ return m_nCurUndoActId; }
61 // IClipboardTest
62 virtual void cut() SAL_OVERRIDE;
63 virtual void copy() SAL_OVERRIDE;
64 virtual void paste() SAL_OVERRIDE;
66 protected:
67 void Paste( long nRow );
69 virtual void CopyRows() = 0;
70 virtual void DeleteRows() = 0;
71 virtual void InsertRows( long nRow ) = 0;
72 virtual void InsertNewRows( long nRow ) = 0;
74 virtual bool IsPrimaryKeyAllowed( long nRow ) = 0;
75 virtual bool IsInsertNewAllowed( long nRow ) = 0;
76 virtual bool IsDeleteAllowed( long nRow ) = 0;
78 bool IsUpdatable() const {return m_bUpdatable;}
79 void SetUpdatable( bool bUpdate=true );
81 virtual RowStatus GetRowStatus(long nRow) const SAL_OVERRIDE;
82 virtual void KeyInput(const KeyEvent& rEvt) SAL_OVERRIDE;
83 virtual void Command( const CommandEvent& rEvt ) SAL_OVERRIDE;
85 virtual void Init() SAL_OVERRIDE;
88 #endif
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */