LibreOffice Module dbaccess (master) 1
TableDesignView.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <dbaccess/dataview.hxx>
22#include <com/sun/star/lang/Locale.hpp>
24#include <vcl/weld.hxx>
25#include "IClipBoardTest.hxx"
26
27namespace dbaui
28{
29 class OTableController;
30 class OTableDesignView;
31 class OTableFieldDescWin;
32 class OTableEditorCtrl;
33
35 {
36 std::unique_ptr<weld::Paned> m_xHorzSplitter;
37 std::unique_ptr<weld::Container> m_xEditorParent;
38 css::uno::Reference<css::awt::XWindow> m_xEditorParentWin;
40 std::unique_ptr<weld::Container> m_xFieldDescParent;
41 std::unique_ptr<OTableFieldDescWin> m_xFieldDescWin;
42
43 public:
45 virtual ~OTableBorderWindow() override;
46 // Window overrides
47 virtual void dispose() override;
48
49 virtual void GetFocus() override;
50 virtual void Layout() override;
51
52 OTableEditorCtrl* GetEditorCtrl() const { return m_xEditorCtrl.get(); }
54 };
55
57 , public IClipboardTest
58 {
60 {
63 NONE
64 };
65 private:
66 css::lang::Locale m_aLocale;
70
72
73 DECL_LINK( FieldDescFocusIn, weld::Widget&, void );
74 protected:
75
76 // return the Rectangle where I can paint myself
77 virtual void resizeDocumentView(tools::Rectangle& rRect) override;
78
79 public:
81 const css::uno::Reference< css::uno::XComponentContext >&,
82 OTableController& _rController);
83 virtual ~OTableDesignView() override;
84 virtual void dispose() override;
85
86 // Window overrides
87 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
88 virtual void GetFocus() override;
89
90 OTableEditorCtrl* GetEditorCtrl() const { return m_pWin ? m_pWin->GetEditorCtrl() : nullptr; }
91 OTableFieldDescWin* GetDescWin() const { return m_pWin ? m_pWin->GetDescWin() : nullptr; }
93
94 const css::lang::Locale& getLocale() const { return m_aLocale;}
95
96 // IClipboardTest
97 virtual bool isCutAllowed() override;
98 virtual bool isCopyAllowed() override;
99 virtual bool isPasteAllowed() override;
100 virtual void copy() override;
101 virtual void cut() override;
102 virtual void paste() override;
103
104 // set the view readonly or not
105 void setReadOnly(bool _bReadOnly);
106
107 virtual void initialize() override;
108 void reSync(); // resync window data with realdata
109 };
110}
111
112/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OTableFieldDescWin * GetDescWin() const
virtual ~OTableBorderWindow() override
virtual void Layout() override
std::unique_ptr< OTableFieldDescWin > m_xFieldDescWin
OTableBorderWindow(OTableDesignView *pParent)
OTableEditorCtrl * GetEditorCtrl() const
virtual void dispose() override
virtual void GetFocus() override
css::uno::Reference< css::awt::XWindow > m_xEditorParentWin
std::unique_ptr< weld::Container > m_xFieldDescParent
std::unique_ptr< weld::Paned > m_xHorzSplitter
std::unique_ptr< weld::Container > m_xEditorParent
VclPtr< OTableEditorCtrl > m_xEditorCtrl
virtual bool isCutAllowed() override
virtual bool isCopyAllowed() override
const css::lang::Locale & getLocale() const
VclPtr< OTableBorderWindow > m_pWin
virtual void copy() override
OTableController & m_rController
virtual void cut() override
IClipboardTest * getActiveChild() const
css::lang::Locale m_aLocale
OTableDesignView(vcl::Window *pParent, const css::uno::Reference< css::uno::XComponentContext > &, OTableController &_rController)
OTableFieldDescWin * GetDescWin() const
virtual void paste() override
void setReadOnly(bool _bReadOnly)
virtual void initialize() override
DECL_LINK(FieldDescFocusIn, weld::Widget &, void)
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual bool isPasteAllowed() override
ChildFocusState m_eChildFocus
virtual void resizeDocumentView(tools::Rectangle &rRect) override
virtual void GetFocus() override
OTableEditorCtrl * GetEditorCtrl() const
virtual void dispose() override
virtual ~OTableDesignView() override
OTableController & getController() const