LibreOffice Module dbaccess (master) 1
sqledit.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 <sal/config.h>
22
24#include <rtl/ref.hxx>
25#include <svtools/colorcfg.hxx>
26#include <svx/weldeditview.hxx>
27#include <vcl/timer.hxx>
28#include <mutex>
29
30namespace com::sun::star::beans { class XMultiPropertySet; }
31
32namespace dbaui
33{
35 {
36 private:
37 class ChangesListener;
38 friend class ChangesListener;
39
40 std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
47
49 std::mutex m_mutex;
50 css::uno::Reference<css::beans::XMultiPropertySet> m_notifier;
51
54
55 DECL_LINK(ModifyHdl, LinkParamNone*, void);
56 DECL_LINK(ImplUpdateDataHdl, Timer*, void);
57 DECL_LINK(ScrollHdl, weld::ScrolledWindow&, void);
58 DECL_LINK(EditStatusHdl, EditStatus&, void);
59
61
62 void ImplSetFont();
63
64 void DoBracketHilight(sal_uInt16 nKey);
65
66 static void SetItemPoolFont(SfxItemPool* pItemPool);
67
68 void UpdateData();
69
70 void SetScrollBarRange();
71 void DoScroll();
72
73 virtual void EditViewScrollStateChange() override;
74
75 public:
76 SQLEditView(std::unique_ptr<weld::ScrolledWindow> xScrolledWindow);
77 virtual void makeEditEngine() override;
78 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
79 virtual ~SQLEditView() override;
80
81 virtual bool KeyInput(const KeyEvent& rKEvt) override;
82 virtual bool Command(const CommandEvent& rCEvt) override;
83
84 void SetTextAndUpdate(const OUString& rNewText);
85
87 {
88 m_aModifyLink = rLink;
89 }
90
92
93 static Color GetSyntaxHighlightColor(const svtools::ColorConfig& rColorConfig, HighlighterLanguage eLanguage, TokenType aToken);
94
96 };
97}
98
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const svtools::ColorConfig m_aColorConfig
Definition: sqledit.hxx:42
virtual void ConfigurationChanged(utl::ConfigurationBroadcaster *, ConfigurationHints) override
Definition: sqledit.cxx:499
rtl::Reference< ChangesListener > m_listener
Definition: sqledit.hxx:48
DECL_LINK(ImplUpdateDataHdl, Timer *, void)
void SetModifyHdl(const Link< LinkParamNone *, void > &rLink)
Definition: sqledit.hxx:86
DECL_LINK(ModifyHdl, LinkParamNone *, void)
void DoBracketHilight(sal_uInt16 nKey)
Definition: sqledit.cxx:234
void DisableInternalUndo()
Definition: sqledit.cxx:81
void SetScrollBarRange()
Definition: sqledit.cxx:445
bool m_bDisableInternalUndo
Definition: sqledit.hxx:53
virtual ~SQLEditView() override
Definition: sqledit.cxx:156
static void SetItemPoolFont(SfxItemPool *pItemPool)
Definition: sqledit.cxx:87
virtual void EditViewScrollStateChange() override
Definition: sqledit.cxx:439
SQLEditView(std::unique_ptr< weld::ScrolledWindow > xScrolledWindow)
Definition: sqledit.cxx:71
virtual bool KeyInput(const KeyEvent &rKEvt) override
Definition: sqledit.cxx:352
static Color GetSyntaxHighlightColor(const svtools::ColorConfig &rColorConfig, HighlighterLanguage eLanguage, TokenType aToken)
Definition: sqledit.cxx:311
Link< LinkParamNone *, void > m_aModifyLink
Definition: sqledit.hxx:41
DECL_LINK(ScrollHdl, weld::ScrolledWindow &, void)
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: sqledit.cxx:125
std::unique_ptr< weld::ScrolledWindow > m_xScrolledWindow
Definition: sqledit.hxx:40
virtual bool Command(const CommandEvent &rCEvt) override
Definition: sqledit.cxx:366
svtools::ColorConfig m_ColorConfig
Definition: sqledit.hxx:45
const SyntaxHighlighter m_aHighlighter
Definition: sqledit.hxx:44
void SetTextAndUpdate(const OUString &rNewText)
Definition: sqledit.cxx:169
rtl::Reference< SfxItemPool > m_pItemPool
Definition: sqledit.hxx:46
DECL_LINK(EditStatusHdl, EditStatus &, void)
css::uno::Reference< css::beans::XMultiPropertySet > m_notifier
Definition: sqledit.hxx:50
virtual void makeEditEngine() override
Definition: sqledit.cxx:117
Color GetColorValue(TokenType aToken)
Definition: sqledit.cxx:187
Timer m_aUpdateDataTimer
Definition: sqledit.hxx:43
std::mutex m_mutex
Definition: sqledit.hxx:49
ConfigurationHints
HighlighterLanguage
TokenType