You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
3.3 KiB
121 lines
3.3 KiB
3 years ago
|
// This defines the interface to the TQextScintillaLexerBatch class.
|
||
13 years ago
|
//
|
||
|
// Copyright (c) 2006
|
||
|
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
||
|
//
|
||
13 years ago
|
// This file is part of TQScintilla.
|
||
13 years ago
|
//
|
||
13 years ago
|
// This copy of TQScintilla is free software; you can redistribute it and/or
|
||
13 years ago
|
// modify it under the terms of the GNU General Public License as published by
|
||
|
// the Free Software Foundation; either version 2, or (at your option) any
|
||
|
// later version.
|
||
|
//
|
||
13 years ago
|
// TQScintilla is supplied in the hope that it will be useful, but WITHOUT ANY
|
||
13 years ago
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||
|
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||
|
// details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public License along with
|
||
13 years ago
|
// TQScintilla; see the file LICENSE. If not, write to the Free Software
|
||
13 years ago
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||
|
|
||
|
|
||
13 years ago
|
#ifndef TQEXTSCINTILLALEXERBATCH_H
|
||
|
#define TQEXTSCINTILLALEXERBATCH_H
|
||
13 years ago
|
|
||
|
|
||
13 years ago
|
#include <tqobject.h>
|
||
13 years ago
|
|
||
3 years ago
|
#include <tqextscintillaglobal.h>
|
||
|
#include <tqextscintillalexer.h>
|
||
13 years ago
|
|
||
|
|
||
3 years ago
|
//! \brief The TQextScintillaLexerBatch class encapsulates the Scintilla batch
|
||
13 years ago
|
//! file lexer.
|
||
3 years ago
|
class TQEXTSCINTILLA_EXPORT TQextScintillaLexerBatch : public TQextScintillaLexer
|
||
13 years ago
|
{
|
||
13 years ago
|
TQ_OBJECT
|
||
13 years ago
|
|
||
13 years ago
|
|
||
|
public:
|
||
|
//! This enum defines the meanings of the different styles used by the
|
||
|
//! batch file lexer.
|
||
|
enum {
|
||
|
//! The default.
|
||
|
Default = 0,
|
||
|
|
||
|
//! A comment.
|
||
|
Comment = 1,
|
||
|
|
||
|
//! A keyword.
|
||
|
Keyword = 2,
|
||
|
|
||
|
//! A label.
|
||
|
Label = 3,
|
||
|
|
||
|
//! An hide command character.
|
||
|
HideCommandChar = 4,
|
||
|
|
||
|
//! An external command .
|
||
|
ExternalCommand = 5,
|
||
|
|
||
|
//! A variable.
|
||
|
Variable = 6,
|
||
|
|
||
|
//! An operator
|
||
|
Operator = 7
|
||
|
};
|
||
|
|
||
3 years ago
|
//! Construct a TQextScintillaLexerBatch with parent \a parent and name
|
||
|
//! \a name. \a parent is typically the TQextScintilla instance.
|
||
|
TQextScintillaLexerBatch(TQObject *parent = 0,const char *name = 0);
|
||
13 years ago
|
|
||
3 years ago
|
//! Destroys the TQextScintillaLexerBatch instance.
|
||
|
virtual ~TQextScintillaLexerBatch();
|
||
13 years ago
|
|
||
|
//! Returns the name of the language.
|
||
|
const char *language() const;
|
||
|
|
||
|
//! Returns the name of the lexer. Some lexers support a number of
|
||
|
//! languages.
|
||
|
const char *lexer() const;
|
||
|
|
||
|
//! \internal Returns the string of characters that comprise a word.
|
||
|
const char *wordCharacters() const;
|
||
|
|
||
|
//! Returns the foreground colour of the text for style number
|
||
|
//! \a style.
|
||
|
//!
|
||
|
//! \sa paper()
|
||
13 years ago
|
TQColor color(int style) const;
|
||
13 years ago
|
|
||
|
//! Returns the end-of-line fill for style number \a style.
|
||
|
bool eolFill(int style) const;
|
||
|
|
||
|
//! Returns the font for style number \a style.
|
||
13 years ago
|
TQFont font(int style) const;
|
||
13 years ago
|
|
||
|
//! Returns the set of keywords for the keyword set \a set recognised
|
||
|
//! by the lexer as a space separated string.
|
||
|
const char *keywords(int set) const;
|
||
|
|
||
|
//! Returns the descriptive name for style number \a style. If the
|
||
13 years ago
|
//! style is invalid for this language then TQString() is returned.
|
||
13 years ago
|
//! This is intended to be used in user preference dialogs.
|
||
13 years ago
|
TQString description(int style) const;
|
||
13 years ago
|
|
||
|
//! Returns the background colour of the text for style number
|
||
|
//! \a style.
|
||
|
//!
|
||
|
//! \sa color()
|
||
13 years ago
|
TQColor paper(int style) const;
|
||
13 years ago
|
|
||
|
private:
|
||
13 years ago
|
#if defined(TQ_DISABLE_COPY)
|
||
3 years ago
|
TQextScintillaLexerBatch(const TQextScintillaLexerBatch &);
|
||
|
TQextScintillaLexerBatch &operator=(const TQextScintillaLexerBatch &);
|
||
13 years ago
|
#endif
|
||
|
};
|
||
|
|
||
|
#endif
|