view libgui/src/m-editor/octave-txt-lexer.h @ 19382:c364b9a44580 gui-release

provide an editor lexer for text or unknown files (bug #43572) * default-qt-settings.in: fix color for numbers in bash files, add defaults for the new text lexer * file-editor-tab.cc (update_lexer): only select the bash lexer for .sh-files, select the new text lexer for .m-files or unnamed files if octave and matlab lexer is not available as well as for files with no or unknown extension * octave-txt-lexer.h: new lexer class derived from QsciLexer just providing the default style for text or unknown files * octave-txt-lexer.cc (language, description): implemented functions * module.mk: added new files octave-txt-lexer.cc/.h * settings-dialog.cc (constructor): read the settings for the new text lexer; (write-changed-settings): write settings for the new lexer into the files
author Torsten <ttl@justmail.de>
date Sun, 23 Nov 2014 13:13:35 +0100
parents
children 4197fc428c7d
line wrap: on
line source

/*

Copyright (C) 2013 Torsten

This file is part of Octave.

Octave is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

Octave is distributed in the hope that it will be useful, but WITHOUT
ANY 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 Octave; see the file COPYING.  If not, see
<http://www.gnu.org/licenses/>.

*/

// Author: Torsten <ttl@justmail.de>

#if !defined (octave_txt_lexer_h)
#define octave_txt_lexer_h 1

#include <Qsci/qsciscintilla.h>
#include <Qsci/qscilexer.h>


class octave_txt_lexer : public QsciLexer
{
  Q_OBJECT

public:

  virtual const char *language () const;
  virtual QString description (int style) const;

};

#endif