2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2010-11-26 10:59:33 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-11-26 10:59:33 +01:00
|
|
|
|
|
|
|
|
#include <texteditor/autocompleter.h>
|
|
|
|
|
|
2014-08-21 20:11:15 +02:00
|
|
|
namespace GlslEditor {
|
2010-11-26 10:59:33 +01:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2014-08-21 08:29:55 +02:00
|
|
|
class GlslCompleter : public TextEditor::AutoCompleter
|
2010-11-26 10:59:33 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2016-04-14 09:00:05 +02:00
|
|
|
bool contextAllowsAutoBrackets(const QTextCursor &cursor,
|
|
|
|
|
const QString &textToInsert = QString()) const override;
|
|
|
|
|
bool contextAllowsAutoQuotes(const QTextCursor &cursor,
|
|
|
|
|
const QString &textToInsert = QString()) const override;
|
|
|
|
|
bool contextAllowsElectricCharacters(const QTextCursor &cursor) const override;
|
|
|
|
|
bool isInComment(const QTextCursor &cursor) const override;
|
|
|
|
|
QString insertMatchingBrace(const QTextCursor &cursor, const QString &text,
|
2016-06-10 15:13:38 +02:00
|
|
|
QChar lookAhead, bool skipChars, int *skippedChars) const override;
|
2016-04-14 09:00:05 +02:00
|
|
|
QString insertMatchingQuote(const QTextCursor &cursor, const QString &text,
|
2016-06-10 15:13:38 +02:00
|
|
|
QChar lookAhead, bool skipChars, int *skippedChars) const override;
|
2016-04-14 09:00:05 +02:00
|
|
|
QString insertParagraphSeparator(const QTextCursor &cursor) const override;
|
2010-11-26 10:59:33 +01:00
|
|
|
};
|
|
|
|
|
|
2014-08-21 08:29:55 +02:00
|
|
|
} // namespace Internal
|
2014-08-21 20:11:15 +02:00
|
|
|
} // namespace GlslEditor
|