Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members

cutescintilla.h

00001 /***************************************************************************
00002                           cutescintilla.h  -  extension on qscintilla
00003                              -------------------
00004     begin                : Sam Jul 19 23:53:49 CEST 2003
00005     copyright            : (C) 2003 by Heiko Köhler
00006     email                : heicom@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef __CUTESCINTILLA_H__
00019 #define __CUTESCINTILLA_H__
00020 
00021 #include <qextscintilla.h>
00022 #include <qmap.h>
00023 #include <qaction.h>
00024 #include <qpopupmenu.h>
00025 
00026 #include "readtags.h"
00027 
00029 class CUTEScintilla : public QextScintilla
00030 {
00031     Q_OBJECT
00032 public:
00033     enum AutoCompletion { Document, TagsFile, None };
00034     CUTEScintilla(QWidget *parent=0, const char *name=0, tagFile *tags=0);
00036     void setActions(QMap<int, QAction*>);
00038     void autoComplete();
00041     void setAutoCompletionThreshold(int);
00042     void setAutoCompletionSource(AutoCompletion ac)
00043         { autoCompletionSource = ac; }
00045     void setTagsFile(tagFile *t)
00046         { tags = t; }
00048     QString line(int);
00049 protected slots:
00050     void slotCharAdded(int);
00051 protected:
00052     void autoCompleteFromDocument();
00053     void autoCompleteFromTagsFile();
00054     bool eventFilter(QObject *obj, QEvent *e);
00055     void contextMenu(QContextMenuEvent *e);
00056     void keyPressEvent( QKeyEvent *e );
00057     void dragEnterEvent( QDragEnterEvent *e ) { qDebug("dragEnterEvent"); }
00058     void dropEvent( QDropEvent *e );
00059 private:
00060     QMap<int, int> keyMap;
00061     QPopupMenu *menu;
00062     int threshold;
00063     static char wordChars[];
00064     AutoCompletion autoCompletionSource;
00065     tagFile *tags;
00066 };
00067 
00068 #endif

Generated on Sun May 2 20:02:57 2004 by doxygen 1.3.2