interfaces Library API Documentation

markinterface.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Christoph Cullmann (cullmann@kde.org)
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
00018 */
00019 
00020 #ifndef __ktexteditor_markinterface_h__
00021 #define __ktexteditor_markinterface_h__
00022 
00023 #include <qptrlist.h>
00024 
00025 class QCString;
00026 
00027 namespace KTextEditor
00028 {
00029 
00030 class Mark
00031 {
00032   public:
00033     uint line;
00034     uint type;
00035 };
00036 
00040 class MarkInterface
00041 {
00042   friend class PrivateMarkInterface;
00043   
00044   public:
00045     MarkInterface ();
00046     virtual ~MarkInterface ();
00047 
00048     unsigned int markInterfaceNumber () const;
00049     
00050   protected:  
00051     void setMarkInterfaceDCOPSuffix (const QCString &suffix);  
00052 
00053   //
00054   // slots !!!
00055   //
00056   public:
00060     virtual uint mark (uint line) = 0;
00061     
00066     virtual void setMark (uint line, uint markType) = 0;
00070     virtual void clearMark (uint line) = 0;
00071 
00072     virtual void addMark (uint line, uint markType) = 0;
00076     virtual void removeMark (uint line, uint markType) = 0;
00077 
00081     virtual QPtrList<KTextEditor::Mark> marks () = 0;
00085     virtual void clearMarks () = 0;
00086 
00093     static int reservedMarkersCount();
00094 
00101     enum MarkTypes
00102     {
00104       markType01= 0x1,
00106       markType02= 0x2,
00108       markType03= 0x4,
00110       markType04= 0x8,
00112       markType05= 0x10,
00114       markType06= 0x20,
00116       markType07= 0x40,
00117 
00118       markType08= 0x80,
00119       markType09= 0x100,
00120       markType10= 0x200,
00121       markType11= 0x400,
00122       markType12= 0x800,
00123       markType13= 0x1000,
00124       markType14= 0x2000,
00125       markType15= 0x4000,
00126       markType16= 0x8000,
00127       markType17= 0x10000,
00128       markType18= 0x20000,
00129       markType19= 0x40000,
00130       markType20= 0x80000,
00131       markType21= 0x100000,
00132       markType22= 0x200000,
00133       markType23= 0x400000,
00134       markType24= 0x800000,
00135       markType25= 0x1000000,
00136       markType26= 0x2000000,
00137       markType27= 0x4000000,
00138       markType28= 0x8000000,
00139       markType29= 0x10000000,
00140       markType30= 0x20000000,
00141       markType31= 0x40000000,
00142       markType32= 0x80000000,
00143       /* reserved marks */
00144       Bookmark = markType01,
00145       BreakpointActive = markType02,
00146       BreakpointReached = markType03,
00147       BreakpointDisabled = markType04,
00148       Execution = markType05,
00149       Warning = markType06,
00150       Error = markType07
00151     };
00152 
00153   //
00154   // signals !!!
00155   //
00156   public:
00157     virtual void marksChanged () = 0;
00158   
00159   private:
00160     class PrivateMarkInterface *d;
00161     static unsigned int globalMarkInterfaceNumber;
00162     unsigned int myMarkInterfaceNumber;
00163 };
00164 
00165 MarkInterface *markInterface (class Document *doc);
00166 
00167 }
00168 
00169 #endif
KDE Logo
This file is part of the documentation for interfaces Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Jul 22 10:17:55 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003