LibreOffice Module dbaccess (master) 1
TableFieldDescWin.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 <IClipBoardTest.hxx>
22#include <ChildWindow.hxx>
23#include "TableFieldControl.hxx"
25
26namespace dbaui
27{
28 class OTableDesignView;
29 class OFieldDescription;
30
31 class OTableFieldDescWin final : public OChildWindow
32 , public IClipboardTest
33 {
35 {
38 NONE
39 };
40 private:
42 std::unique_ptr<weld::Container> m_xBox;
43 std::unique_ptr<OTableFieldControl> m_xFieldControl;
44 std::unique_ptr<weld::Label> m_xHeader;
46
48
50
51 DECL_LINK(HelpFocusIn, weld::Widget&, void);
52 DECL_LINK(FieldFocusIn, weld::Widget&, void);
53
54 public:
55 explicit OTableFieldDescWin(weld::Container* pParent, OTableDesignView* pView);
56 virtual ~OTableFieldDescWin() override;
57
58 void Init();
59
60 void DisplayData( OFieldDescription* pFieldDescr );
61 void SaveData( OFieldDescription* pFieldDescr );
62 void SetReadOnly( bool bReadOnly );
63
64 void SetControlText( sal_uInt16 nControlId, const OUString& rText )
65 { m_xFieldControl->SetControlText(nControlId,rText); }
66
67 OUString BoolStringPersistent(std::u16string_view rUIString) const { return m_xFieldControl->BoolStringPersistent(rUIString); }
68 OUString BoolStringUI(const OUString& rPersistentString) const { return m_xFieldControl->BoolStringUI(rPersistentString); }
69
70 virtual bool HasChildPathFocus() const override;
71 virtual void GrabFocus() override;
72
73 // IClipboardTest
74 virtual bool isCutAllowed() override;
75 virtual bool isCopyAllowed() override;
76 virtual bool isPasteAllowed() override;
77
78 virtual void copy() override;
79 virtual void cut() override;
80 virtual void paste() override;
81
83 {
84 m_aFocusInHdl = rLink;
85 }
86
88 };
89}
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int16 nControlId
DECL_LINK(FieldFocusIn, weld::Widget &, void)
OUString BoolStringUI(const OUString &rPersistentString) const
OTableFieldDescWin(weld::Container *pParent, OTableDesignView *pView)
virtual ~OTableFieldDescWin() override
std::unique_ptr< weld::Container > m_xBox
void SaveData(OFieldDescription *pFieldDescr)
OUString BoolStringPersistent(std::u16string_view rUIString) const
virtual void cut() override
std::unique_ptr< weld::Label > m_xHeader
virtual bool isCutAllowed() override
IClipboardTest * getActiveChild() const
Link< weld::Widget &, void > m_aFocusInHdl
virtual bool HasChildPathFocus() const override
virtual void copy() override
std::unique_ptr< OTableFieldControl > m_xFieldControl
void SetControlText(sal_uInt16 nControlId, const OUString &rText)
OTableFieldControl * getGenPage() const
virtual void GrabFocus() override
void DisplayData(OFieldDescription *pFieldDescr)
OTableDesignHelpBar m_aHelpBar
virtual bool isCopyAllowed() override
void connect_focus_in(const Link< weld::Widget &, void > &rLink)
virtual bool isPasteAllowed() override
virtual void paste() override
void SetReadOnly(bool bReadOnly)
DECL_LINK(HelpFocusIn, weld::Widget &, void)