interfaces
markinterface.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __ktexteditor_markinterface_h__
00021 #define __ktexteditor_markinterface_h__
00022
00023 #include <qptrlist.h>
00024
00025 #include <kdelibs_export.h>
00026
00027 class QCString;
00028
00029 namespace KTextEditor
00030 {
00031
00032 class Mark
00033 {
00034 public:
00035 uint line;
00036 uint type;
00037 };
00038
00042 class KTEXTEDITOR_EXPORT MarkInterface
00043 {
00044 friend class PrivateMarkInterface;
00045
00046 public:
00047 MarkInterface ();
00048 virtual ~MarkInterface ();
00049
00050 unsigned int markInterfaceNumber () const;
00051
00052 protected:
00053 void setMarkInterfaceDCOPSuffix (const QCString &suffix);
00054
00055
00056
00057
00058 public:
00062 virtual uint mark (uint line) = 0;
00063
00068 virtual void setMark (uint line, uint markType) = 0;
00072 virtual void clearMark (uint line) = 0;
00073
00074 virtual void addMark (uint line, uint markType) = 0;
00078 virtual void removeMark (uint line, uint markType) = 0;
00079
00083 virtual QPtrList<KTextEditor::Mark> marks () = 0;
00087 virtual void clearMarks () = 0;
00088
00095 static int reservedMarkersCount();
00096
00103 enum MarkTypes
00104 {
00106 markType01= 0x1,
00108 markType02= 0x2,
00110 markType03= 0x4,
00112 markType04= 0x8,
00114 markType05= 0x10,
00116 markType06= 0x20,
00118 markType07= 0x40,
00119
00120 markType08= 0x80,
00121 markType09= 0x100,
00122 markType10= 0x200,
00123 markType11= 0x400,
00124 markType12= 0x800,
00125 markType13= 0x1000,
00126 markType14= 0x2000,
00127 markType15= 0x4000,
00128 markType16= 0x8000,
00129 markType17= 0x10000,
00130 markType18= 0x20000,
00131 markType19= 0x40000,
00132 markType20= 0x80000,
00133 markType21= 0x100000,
00134 markType22= 0x200000,
00135 markType23= 0x400000,
00136 markType24= 0x800000,
00137 markType25= 0x1000000,
00138 markType26= 0x2000000,
00139 markType27= 0x4000000,
00140 markType28= 0x8000000,
00141 markType29= 0x10000000,
00142 markType30= 0x20000000,
00143 markType31= 0x40000000,
00144 markType32= 0x80000000,
00145
00146 Bookmark = markType01,
00147 BreakpointActive = markType02,
00148 BreakpointReached = markType03,
00149 BreakpointDisabled = markType04,
00150 Execution = markType05,
00151 Warning = markType06,
00152 Error = markType07
00153 };
00154
00155
00156
00157
00158 public:
00159 virtual void marksChanged () = 0;
00160
00161 private:
00162 class PrivateMarkInterface *d;
00163 static unsigned int globalMarkInterfaceNumber;
00164 unsigned int myMarkInterfaceNumber;
00165 };
00166
00167 KTEXTEDITOR_EXPORT MarkInterface *markInterface (class Document *doc);
00168
00169 }
00170
00171 #endif