• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

  • kate
  • part
katedocument.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2001-2004 Christoph Cullmann <cullmann@kde.org>
3 Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
4 Copyright (C) 1999 Jochen Wilhelmy <digisnap@cs.tu-berlin.de>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef _KATE_DOCUMENT_H_
22#define _KATE_DOCUMENT_H_
23
24#include "katesupercursor.h"
25#include "katetextline.h"
26#include "kateundo.h"
27#include "katebuffer.h"
28#include "katecodefoldinghelpers.h"
29
30#include "../interfaces/document.h"
31
32#include <tdetexteditor/configinterfaceextension.h>
33#include <tdetexteditor/encodinginterface.h>
34#include <tdetexteditor/sessionconfiginterface.h>
35#include <tdetexteditor/editinterfaceext.h>
36#include <tdetexteditor/templateinterface.h>
37
38#include <dcopobject.h>
39
40#include <kmimetype.h>
41#include <tdelocale.h>
42
43#include <tqintdict.h>
44#include <tqmap.h>
45#include <tqdatetime.h>
46
47namespace KTextEditor { class Plugin; }
48
49namespace TDEIO { class TransferJob; }
50
51class KateUndoGroup;
52class KateCmd;
53class KateAttribute;
54class KateAutoIndent;
55class KateCodeFoldingTree;
56class KateBuffer;
57class KateView;
58class KateViewInternal;
59class KateArbitraryHighlight;
60class KateSuperRange;
61class KateLineInfo;
62class KateBrowserExtension;
63class KateDocumentConfig;
64class KateHighlighting;
65class KatePartPluginItem;
66class KatePartPluginInfo;
67
68class KTempFile;
69
70class TQTimer;
71
72class KateKeyInterceptorFunctor;
73
74//
75// Kate KTextEditor::Document class (and even KTextEditor::Editor ;)
76//
77class KateDocument : public Kate::Document,
78 public Kate::DocumentExt,
79 public KTextEditor::ConfigInterfaceExtension,
80 public KTextEditor::EncodingInterface,
81 public KTextEditor::SessionConfigInterface,
82 public KTextEditor::EditInterfaceExt,
83 public KTextEditor::TemplateInterface,
84 public DCOPObject
85{
86 K_DCOP
87 TQ_OBJECT
88
89 friend class KateViewInternal;
90 friend class KateRenderer;
91
92 public:
93 KateDocument (bool bSingleViewMode=false, bool bBrowserView=false, bool bReadOnly=false,
94 TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject * = 0, const char * = 0);
95 ~KateDocument ();
96
97 bool closeURL();
98
99 //
100 // Plugins section
101 //
102 public:
103 void unloadAllPlugins ();
104
105 void enableAllPluginsGUI (KateView *view);
106 void disableAllPluginsGUI (KateView *view);
107
108 void loadPlugin (uint pluginIndex);
109 void unloadPlugin (uint pluginIndex);
110
111 void enablePluginGUI (KTextEditor::Plugin *plugin, KateView *view);
112 void enablePluginGUI (KTextEditor::Plugin *plugin);
113
114 void disablePluginGUI (KTextEditor::Plugin *plugin, KateView *view);
115 void disablePluginGUI (KTextEditor::Plugin *plugin);
116
117 private:
118 TQMemArray<KTextEditor::Plugin *> m_plugins;
119
120 public:
121 bool readOnly () const { return m_bReadOnly; }
122 bool browserView () const { return m_bBrowserView; }
123 bool singleViewMode () const { return m_bSingleViewMode; }
124 KateBrowserExtension *browserExtension () { return m_extension; }
125
126 private:
127 // only to make part work, don't change it !
128 bool m_bSingleViewMode;
129 bool m_bBrowserView;
130 bool m_bReadOnly;
131 KateBrowserExtension *m_extension;
132
133 //
134 // KTextEditor::Document stuff
135 //
136 public:
137 KTextEditor::View *createView( TQWidget *parent, const char *name );
138 TQPtrList<KTextEditor::View> views () const;
139
140 inline KateView *activeView () const { return m_activeView; }
141
142 private:
143 TQPtrList<KateView> m_views;
144 TQPtrList<KTextEditor::View> m_textEditViews;
145 KateView *m_activeView;
146
156 void setActiveView( KateView *view );
157
158 //
159 // KTextEditor::ConfigInterfaceExtension stuff
160 //
161 public slots:
162 uint configPages () const;
163 KTextEditor::ConfigPage *configPage (uint number = 0, TQWidget *parent = 0, const char *name=0 );
164 TQString configPageName (uint number = 0) const;
165 TQString configPageFullName (uint number = 0) const;
166 TQPixmap configPagePixmap (uint number = 0, int size = TDEIcon::SizeSmall) const;
167
168 //
169 // KTextEditor::EditInterface stuff
170 //
171 public slots:
172 TQString text() const;
173
174 TQString text ( uint startLine, uint startCol, uint endLine, uint endCol ) const;
175 TQString text ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise ) const;
176
177 TQString textLine ( uint line ) const;
178
179 bool setText(const TQString &);
180 bool clear ();
181
182 bool insertText ( uint line, uint col, const TQString &s );
183 bool insertText ( uint line, uint col, const TQString &s, bool blockwise );
184
185 bool removeText ( uint startLine, uint startCol, uint endLine, uint endCol );
186 bool removeText ( uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise );
187
188 bool insertLine ( uint line, const TQString &s );
189 bool removeLine ( uint line );
190
191 uint numLines() const;
192 uint numVisLines() const;
193 uint length () const;
194 int lineLength ( uint line ) const;
195
196 signals:
197 void textChanged ();
198 void charactersInteractivelyInserted(int ,int ,const TQString&);
199 void charactersSemiInteractivelyInserted(int ,int ,const TQString&);
200 void backspacePressed();
201
202 public:
203//BEGIN editStart/editEnd (start, end, undo, cursor update, view update)
209 void editStart (bool withUndo = true);
211 void editBegin () { editStart(); }
216 void editEnd ();
217 private:
218 bool m_isInUndo;
219
220//END editStart/editEnd
221
222//BEGIN LINE BASED INSERT/REMOVE STUFF (editStart() and editEnd() included)
223 public:
231 bool editInsertText ( uint line, uint col, const TQString &s );
239 bool editRemoveText ( uint line, uint col, uint len );
240
249 bool editMarkLineAutoWrapped ( uint line, bool autowrapped );
250
261 bool editWrapLine ( uint line, uint col, bool newLine = true, bool *newLineAdded = 0 );
270 bool editUnWrapLine ( uint line, bool removeLine = true, uint length = 0 );
271
278 bool editInsertLine ( uint line, const TQString &s );
284 bool editRemoveLine ( uint line );
285
292 bool wrapText (uint startLine, uint endLine);
293//END LINE BASED INSERT/REMOVE STUFF
294
295 signals:
300 void editTextInserted ( uint line, uint col, uint len);
301
305 void editTextRemoved ( uint line, uint col, uint len);
306
310 void editLineWrapped ( uint line, uint col, uint len );
311
315 void editLineUnWrapped ( uint line, uint col );
316
320 void editLineInserted ( uint line );
321
325 void editLineRemoved ( uint line );
326
327 private:
328 void undoStart();
329 void undoEnd();
330 void undoSafePoint();
331
332 private slots:
333 void undoCancel();
334
335 private:
336 void editAddUndo (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text);
337
338 uint editSessionNumber;
339 bool editIsRunning;
340 bool editWithUndo;
341 bool m_undoComplexMerge;
342 KateUndoGroup* m_editCurrentUndo;
343
344 //
345 // KTextEditor::UndoInterface stuff
346 //
347 public slots:
348 void undo ();
349 void redo ();
350 void clearUndo ();
351 void clearRedo ();
352
353 uint undoCount () const;
354 uint redoCount () const;
355
356 uint undoSteps () const;
357 void setUndoSteps ( uint steps );
358
359 private:
360 friend class KateTemplateHandler;
361
362 private:
363 TQPtrList<KateSuperCursor> m_superCursors;
364
365 //
366 // some internals for undo/redo
367 //
368 TQPtrList<KateUndoGroup> undoItems;
369 TQPtrList<KateUndoGroup> redoItems;
370 bool m_undoDontMerge; //create a setter later on and remove the friend declaration
371 bool m_undoIgnoreCancel;
372 TQTimer* m_undoMergeTimer;
373 // these two variables are for resetting the document to
374 // non-modified if all changes have been undone...
375 KateUndoGroup* lastUndoGroupWhenSaved;
376 KateUndoGroup* lastRedoGroupWhenSaved;
377 bool docWasSavedWhenUndoWasEmpty;
378 bool docWasSavedWhenRedoWasEmpty;
379
380 // this sets
381 void updateModified();
382
383 signals:
384 void undoChanged ();
385 void textInserted(int line,int column);
386
387 //
388 // KTextEditor::CursorInterface stuff
389 //
390 public slots:
391 KTextEditor::Cursor *createCursor ();
392 TQPtrList<KTextEditor::Cursor> cursors () const;
393
394 private:
395 TQPtrList<KTextEditor::Cursor> myCursors;
396
397 //
398 // KTextEditor::SearchInterface stuff
399 //
400 public slots:
401 bool searchText (unsigned int startLine, unsigned int startCol,
402 const TQString &text, unsigned int *foundAtLine, unsigned int *foundAtCol,
403 unsigned int *matchLen, bool casesensitive = true, bool backwards = false);
404 bool searchText (unsigned int startLine, unsigned int startCol,
405 const TQRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol,
406 unsigned int *matchLen, bool backwards = false);
407
408 //
409 // KTextEditor::HighlightingInterface stuff
410 //
411 public slots:
412 uint hlMode ();
413 bool setHlMode (uint mode);
414 uint hlModeCount ();
415 TQString hlModeName (uint mode);
416 TQString hlModeSectionName (uint mode);
417
418 public:
419 void bufferHlChanged ();
420
421 private:
422 void setDontChangeHlOnSave();
423
424 signals:
425 void hlChanged ();
426
427 //
428 // Kate::ArbitraryHighlightingInterface stuff
429 //
430 public:
431 KateArbitraryHighlight* arbitraryHL() const { return m_arbitraryHL; };
432
433 private slots:
434 void tagArbitraryLines(KateView* view, KateSuperRange* range);
435
436 //
437 // KTextEditor::ConfigInterface stuff
438 //
439 public slots:
440 void readConfig ();
441 void writeConfig ();
442 void readConfig (TDEConfig *);
443 void writeConfig (TDEConfig *);
444 void readSessionConfig (TDEConfig *);
445 void writeSessionConfig (TDEConfig *);
446 void configDialog ();
447
448 //
449 // KTextEditor::MarkInterface and MarkInterfaceExtension
450 //
451 public slots:
452 uint mark( uint line );
453
454 void setMark( uint line, uint markType );
455 void clearMark( uint line );
456
457 void addMark( uint line, uint markType );
458 void removeMark( uint line, uint markType );
459
460 TQPtrList<KTextEditor::Mark> marks();
461 void clearMarks();
462
463 void setPixmap( MarkInterface::MarkTypes, const TQPixmap& );
464 void setDescription( MarkInterface::MarkTypes, const TQString& );
465 TQString markDescription( MarkInterface::MarkTypes );
466 TQPixmap *markPixmap( MarkInterface::MarkTypes );
467 TQColor markColor( MarkInterface::MarkTypes );
468
469 void setMarksUserChangable( uint markMask );
470 uint editableMarks();
471
472 signals:
473 void marksChanged();
474 void markChanged( KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction );
475
476 private:
477 TQIntDict<KTextEditor::Mark> m_marks;
478 TQIntDict<TQPixmap> m_markPixmaps;
479 TQIntDict<TQString> m_markDescriptions;
480 uint m_editableMarks;
481
482 //
483 // KTextEditor::PrintInterface
484 //
485 public slots:
486 bool printDialog ();
487 bool print ();
488
489 //
490 // KTextEditor::DocumentInfoInterface ( ### unfinished )
491 //
492 public:
502 TQString mimeType();
503
511 long fileSize();
512
520 TQString niceFileSize();
521
530 KMimeType::Ptr mimeTypeForContent();
531
532 //
533 // KTextEditor::VariableInterface
534 //
535 public:
536 TQString variable( const TQString &name ) const;
537
538 signals:
539 void variableChanged( const TQString &, const TQString & );
540
541 private:
542 TQMap<TQString, TQString> m_storedVariables;
543
544 //
545 // KParts::ReadWrite stuff
546 //
547 public:
548 bool openURL( const KURL &url );
549
550 /* Anders:
551 I reimplemented this, since i need to check if backup succeeded
552 if requested */
553 bool save();
554
555 /* Anders: Reimplemented to do kate specific stuff */
556 bool saveAs( const KURL &url );
557
558 bool openFile (TDEIO::Job * job);
559 bool openFile ();
560
561 bool saveFile ();
562
563 void setReadWrite ( bool readwrite = true );
564
565 void setModified( bool m );
566
567 private slots:
568 void slotDataKate ( TDEIO::Job* tdeio_job, const TQByteArray &data );
569 void slotFinishedKate ( TDEIO::Job * job );
570
571 private:
572 void abortLoadKate();
573
574 void activateDirWatch ();
575 void deactivateDirWatch ();
576
577 TQString m_dirWatchFile;
578
579 //
580 // Kate::Document stuff, this is all deprecated!!!!!!!!!!
581 //
582 public:
583 Kate::ConfigPage *colorConfigPage (TQWidget *) { return 0; }
584 Kate::ConfigPage *fontConfigPage (TQWidget *) { return 0; }
585 Kate::ConfigPage *indentConfigPage (TQWidget *) { return 0; }
586 Kate::ConfigPage *selectConfigPage (TQWidget *) { return 0; }
587 Kate::ConfigPage *editConfigPage (TQWidget *) { return 0; }
588 Kate::ConfigPage *keysConfigPage (TQWidget *) { return 0; }
589 Kate::ConfigPage *hlConfigPage (TQWidget *) { return 0; }
590 Kate::ConfigPage *viewDefaultsConfigPage (TQWidget *) { return 0; }
591 Kate::ConfigPage *saveConfigPage( TQWidget * ) { return 0; }
592
593 Kate::ActionMenu *hlActionMenu (const TQString& /* text */, TQObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
594 Kate::ActionMenu *exportActionMenu (const TQString& /* text */, TQObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
595
596 public:
600 bool typeChars ( KateView *type, const TQString &chars );
601
605 inline uint lastLine() const { return numLines()-1; }
606
607 uint configFlags ();
608 void setConfigFlags (uint flags);
609
610 // Repaint all of all of the views
611 void repaintViews(bool paintOnlyDirty = true);
612
613 inline KateHighlighting *highlight () { return m_buffer->highlight(); }
614
615 inline KateHighlighting *highlight () const { return m_buffer->highlight(); }
616
617 public slots: //please keep prototypes and implementations in same order
618 void tagLines(int start, int end);
619 void tagLines(KateTextCursor start, KateTextCursor end);
620
621 //export feature, obsolute
622 public slots:
623 void exportAs(const TQString&) { };
624
625 signals:
626 void modifiedChanged ();
627 void preHighlightChanged(uint);
628
629 private slots:
630 void internalHlChanged();
631
632 public:
633 void addView(KTextEditor::View *);
634 void removeView(KTextEditor::View *);
635
636 void addSuperCursor(class KateSuperCursor *, bool privateC);
637 void removeSuperCursor(class KateSuperCursor *, bool privateC);
638
639 bool ownedView(KateView *);
640 bool isLastView(int numViews);
641
642 uint currentColumn( const KateTextCursor& );
643 void newLine( KateTextCursor&, KateViewInternal * ); // Changes input
644 void backspace( KateView *view, const KateTextCursor& );
645 void del( KateView *view, const KateTextCursor& );
646 void transpose( const KateTextCursor& );
647
648 void paste ( KateView* view );
649
650 public:
651 void insertIndentChars ( KateView *view );
652
653 void indent ( KateView *view, uint line, int change );
654 void comment ( KateView *view, uint line, uint column, int change );
655 void align ( KateView *view, uint line );
656
657 enum TextTransform { Uppercase, Lowercase, Capitalize };
658
666 void transform ( KateView *view, const KateTextCursor &, TextTransform );
670 void joinLines( uint first, uint last );
671
672 private:
673 void optimizeLeadingSpace( uint line, int flags, int change );
674 void replaceWithOptimizedSpace( uint line, uint upto_column, uint space, int flags );
675
676 bool removeStringFromBegining(int line, TQString &str);
677 bool removeStringFromEnd(int line, TQString &str);
678
688 bool nextNonSpaceCharPos(int &line, int &col);
689
697 bool previousNonSpaceCharPos(int &line, int &col);
698
703 void addStartLineCommentToSingleLine(int line, int attrib=0);
708 bool removeStartLineCommentFromSingleLine(int line, int attrib=0);
709
713 void addStartStopCommentToSingleLine(int line, int attrib=0);
717 bool removeStartStopCommentFromSingleLine(int line, int attrib=0);
721 bool removeStartStopCommentFromRegion(const KateTextCursor &start, const KateTextCursor &end, int attrib=0);
722
727 void addStartStopCommentToSelection( KateView *view, int attrib=0 );
731 void addStartLineCommentToSelection( KateView *view, int attrib=0 );
732
739 bool removeStartStopCommentFromSelection( KateView *view, int attrib=0 );
743 bool removeStartLineCommentFromSelection( KateView *view, int attrib=0 );
744
745 public:
746 TQString getWord( const KateTextCursor& cursor );
747
748 public:
749 void tagAll();
750
751 void newBracketMark( const KateTextCursor& start, KateBracketRange& bm, int maxLines = -1 );
752 bool findMatchingBracket( KateTextCursor& start, KateTextCursor& end, int maxLines = -1 );
753
754 private:
755 void guiActivateEvent( KParts::GUIActivateEvent *ev );
756
757 public:
758
759 TQString docName () {return m_docName;};
760
761 void setDocName (TQString docName);
762
763 void lineInfo (KateLineInfo *info, unsigned int line);
764
765 KateCodeFoldingTree *foldingTree ();
766
767 public:
773 bool isModifiedOnDisc() { return m_modOnHd; };
774
776 void isModOnHD( bool =false ) {};
777
778 void setModifiedOnDisk( int reason );
779
780 public slots:
787 void slotModifiedOnDisk( Kate::View *v=0 );
788
792 void reloadFile();
793
794 private:
795 int m_isasking; // don't reenter slotModifiedOnDisk when this is true
796 // -1: ignore once, 0: false, 1: true
797
798 public slots:
799 void setEncoding (const TQString &e);
800 TQString encoding() const;
801
802 public slots:
803 void setWordWrap (bool on);
804 bool wordWrap ();
805
806 void setWordWrapAt (uint col);
807 uint wordWrapAt ();
808
809 public slots:
810 void setPageUpDownMovesCursor(bool on);
811 bool pageUpDownMovesCursor();
812
813 signals:
814 void modStateChanged (Kate::Document *doc);
815 void nameChanged (Kate::Document *doc);
816
817 public slots:
818 // clear buffer/filename - update the views
819 void flush ();
820
821 signals:
826 void fileNameChanged ();
827
828 public slots:
829 void applyWordWrap ();
830
831 // code folding
832 public:
833 inline uint getRealLine(unsigned int virtualLine)
834 {
835 return m_buffer->lineNumber (virtualLine);
836 }
837
838 inline uint getVirtualLine(unsigned int realLine)
839 {
840 return m_buffer->lineVisibleNumber (realLine);
841 }
842
843 inline uint visibleLines ()
844 {
845 return m_buffer->countVisible ();
846 }
847
848 inline KateTextLine::Ptr kateTextLine(uint i)
849 {
850 return m_buffer->line (i);
851 }
852
853 inline KateTextLine::Ptr plainKateTextLine(uint i)
854 {
855 return m_buffer->plainLine (i);
856 }
857
858 signals:
859 void codeFoldingUpdated();
860 void aboutToRemoveText(const KateTextRange&);
861 void textRemoved();
862
863 private slots:
864 void slotModOnHdDirty (const TQString &path);
865 void slotModOnHdCreated (const TQString &path);
866 void slotModOnHdDeleted (const TQString &path);
867
868 private:
878 bool createDigest ( TQCString &result );
879
885 TQString reasonedMOHString() const;
886
895 void removeTrailingSpace( uint line );
896
897 public:
898 void updateFileType (int newType, bool user = false);
899
900 int fileType () const { return m_fileType; };
901
902 //
903 // REALLY internal data ;)
904 //
905 private:
906 // text buffer
907 KateBuffer *m_buffer;
908
909 KateArbitraryHighlight* m_arbitraryHL;
910
911 KateAutoIndent *m_indenter;
912
913 bool hlSetByUser;
914
915 bool m_modOnHd;
916 unsigned char m_modOnHdReason;
917 TQCString m_digest; // MD5 digest, updated on load/save
918
919 TQString m_docName;
920 int m_docNameNumber;
921
922 // file type !!!
923 int m_fileType;
924 bool m_fileTypeSetByUser;
925
929 bool m_reloading;
930 bool m_loading;
931 bool m_encodingSticky;
932
933 public slots:
934 void slotQueryClose_save(bool *handled, bool* abortClosing);
935
936 public:
937 void makeAttribs (bool needInvalidate = true);
938
939 static bool checkOverwrite( KURL u );
940
941 static void setDefaultEncoding (const TQString &encoding);
942
943 void setEncodingSticky( bool e ) { m_encodingSticky = e; }
944
948 public:
949 inline KateDocumentConfig *config () { return m_config; };
950
951 void updateConfig ();
952
953 private:
954 KateDocumentConfig *m_config;
955
960 private:
964 void readDirConfig ();
965
970 void readVariables(bool onlyViewAndRenderer = false);
971
976 void readVariableLine( TQString t, bool onlyViewAndRenderer = false );
980 void setViewVariable( TQString var, TQString val );
986 static bool checkBoolValue( TQString value, bool *result );
992 static bool checkIntValue( TQString value, int *result );
997 static bool checkColorValue( TQString value, TQColor &col );
998
1002 static TQRegExp kvLine;
1003 static TQRegExp kvLineWildcard;
1004 static TQRegExp kvLineMime;
1005 static TQRegExp kvVar;
1006
1007 TDEIO::TransferJob *m_job;
1008 KTempFile *m_tempFile;
1009
1010 // TemplateInterface
1011 public:
1012 bool setTabInterceptor(KateKeyInterceptorFunctor *interceptor); /* perhaps make it moregeneral like an eventfilter*/
1013 bool removeTabInterceptor(KateKeyInterceptorFunctor *interceptor);
1014 bool invokeTabInterceptor(KKey);
1015
1016 protected:
1017 virtual bool insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=0 );
1018 KateKeyInterceptorFunctor *m_tabInterceptor;
1019
1020 protected slots:
1021 void testTemplateCode();
1022 void dumpRegionTree();
1023
1024 //BEGIN DEPRECATED
1025 //
1026 // KTextEditor::SelectionInterface stuff
1027 // DEPRECATED, this will be removed for KDE 4.x !!!!!!!!!!!!!!!!!!!!
1028 //
1029 public slots:
1030 bool setSelection ( uint startLine, uint startCol, uint endLine, uint endCol );
1031 bool clearSelection ();
1032 bool hasSelection () const;
1033 TQString selection () const;
1034 bool removeSelectedText ();
1035 bool selectAll();
1036
1037 //
1038 // KTextEditor::SelectionInterfaceExt
1039 //
1040 int selStartLine();
1041 int selStartCol();
1042 int selEndLine();
1043 int selEndCol();
1044
1045
1046 // hack, only there to still support the deprecated stuff, will be removed for KDE 4.x
1047 #undef signals
1048 #define signals public
1049 signals:
1050 #undef signals
1051 #define signals protected
1052 void selectionChanged ();
1053
1054 //
1055 // KTextEditor::BlockSelectionInterface stuff
1056 // DEPRECATED, this will be removed for KDE 4.x !!!!!!!!!!!!!!!!!!!!
1057 //
1058 public slots:
1059 bool blockSelectionMode ();
1060 bool setBlockSelectionMode (bool on);
1061 bool toggleBlockSelectionMode ();
1062
1063 private:
1064//END DEPRECATED
1065
1066 k_dcop:
1067 uint documentNumber () const;
1068 long documentListPosition () const;
1069 void setDocumentListPosition (long pos);
1070};
1071
1072#endif
DCOPObject
KKey
KParts::GUIActivateEvent
KTempFile
KURL
KateArbitraryHighlight
An arbitrary highlighting interface for Kate.
Definition: katearbitraryhighlight.h:61
KateAttribute
The Attribute class incorporates all text decorations supported by Kate.
Definition: kateattribute.h:33
KateAutoIndent
Provides Auto-Indent functionality for katepart.
Definition: kateautoindent.h:71
KateBrowserExtension
Interface for embedding KateDocument into a browser.
Definition: katedocumenthelpers.h:37
KateBuffer
The KateBuffer class maintains a collections of lines.
Definition: katebuffer.h:342
KateRenderer
Handles all of the work of rendering the text (used for the views and printing)
Definition: katerenderer.h:43
KateSuperCursor
Possible additional features:
Definition: katesupercursor.h:46
KateSuperRange
Represents a range of text, from the start() to the end().
Definition: katesupercursor.h:169
KateTextCursor
Simple cursor class with no document pointer.
Definition: katecursor.h:34
KateUndoGroup
Class to manage a group of undo items.
Definition: kateundo.h:34
KateUndoGroup::UndoType
UndoType
Types for undo items.
Definition: kateundo.h:63
Kate::DocumentExt
Extensions to the Document Interface.
Definition: document.h:350
Kate::DocumentExt::setModifiedOnDisk
virtual void setModifiedOnDisk(int reason)=0
For client apps that want to deal with files modified on disk, it is nessecary to reset this property...
Kate::DocumentExt::slotModifiedOnDisk
virtual void slotModifiedOnDisk(View *v=0)=0
These stuff is implemented as slots in the real document.
Kate::Document
This interface provides access to the Kate Document class.
Definition: document.h:190
Kate::Document::docName
virtual TQString docName()
Returns the document name.
Definition: document.h:217
Kate::Document::isModOnHD
virtual void isModOnHD(bool=false)
deprecated for KDE 4.0, just does reloadFile, which will ask the normal "do you want it really" quest...
Definition: document.h:212
Kate::Document::indentConfigPage
virtual ConfigPage * indentConfigPage(TQWidget *)=0
Kate::Document::fontConfigPage
virtual ConfigPage * fontConfigPage(TQWidget *)=0
Kate::Document::setDocName
virtual void setDocName(TQString)
Sets the document name.
Definition: document.h:225
Kate::Document::keysConfigPage
virtual ConfigPage * keysConfigPage(TQWidget *)=0
Kate::Document::editConfigPage
virtual ConfigPage * editConfigPage(TQWidget *)=0
Kate::Document::reloadFile
virtual void reloadFile()=0
Reloads the current document from disk if possible.
Kate::Document::selectConfigPage
virtual ConfigPage * selectConfigPage(TQWidget *)=0
Kate::Document::colorConfigPage
virtual ConfigPage * colorConfigPage(TQWidget *)=0
Kate::Document::hlConfigPage
virtual ConfigPage * hlConfigPage(TQWidget *)=0
Kate::View
The Kate::View text editor interface.
Definition: view.h:45
TDEConfig
TDEIcon::SizeSmall
SizeSmall
TDESharedPtr
flush
kndbgstream & flush(kndbgstream &s)
KStdAction::clear
TDEAction * clear(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
KStdAction::saveAs
TDEAction * saveAs(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
TDEStdAccel::paste
const TDEShortcut & paste()
TDEStdAccel::redo
const TDEShortcut & redo()
TDEStdAccel::save
const TDEShortcut & save()
TDEStdAccel::undo
const TDEShortcut & undo()
TDEStdAccel::print
const TDEShortcut & print()
TDEStdAccel::selectAll
const TDEShortcut & selectAll()
tdelocale.h

kate

Skip menu "kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kate

Skip menu "kate"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kate by doxygen 1.9.4
This website is maintained by Timothy Pearson.