21 #ifndef __KWRITE_MAIN_H__
22 #define __KWRITE_MAIN_H__
24 #include <tdetexteditor/view.h>
25 #include <tdetexteditor/document.h>
27 #include <tdeparts/mainwindow.h>
29 #include <kdialogbase.h>
31 namespace KTextEditor {
class EditorChooser; }
34 class TDEToggleAction;
35 class TDESelectAction;
36 class TDERecentFilesAction;
38 class KWrite :
public KParts::MainWindow
44 KWrite(KTextEditor::Document * = 0L);
47 void loadURL(
const KURL &url);
49 KTextEditor::View *view()
const {
return m_view; }
51 static bool noWindows () {
return winList.isEmpty(); }
55 void setupStatusBar();
59 void dragEnterEvent( TQDragEnterEvent * );
60 void dropEvent( TQDropEvent * );
66 void slotOpen(
const KURL& url);
68 void toggleStatusBar();
74 void slotNewToolbarConfig();
80 void newStatus(
const TQString &msg);
83 void slotDropEvent(TQDropEvent *);
85 void slotEnableActions(
bool enable );
90 void slotFileNameChanged();
94 void readConfig (TDEConfig *);
95 void writeConfig (TDEConfig *);
102 void restore(TDEConfig *,
int);
103 static void restore();
106 void readProperties(TDEConfig *);
107 void saveProperties(TDEConfig *);
108 void saveGlobalProperties(TDEConfig *);
111 KTextEditor::View * m_view;
113 TDERecentFilesAction * m_recentFiles;
114 TDEToggleAction * m_paShowPath;
115 TDEToggleAction * m_paShowStatusBar;
119 static TQPtrList<KTextEditor::Document> docList;
120 static TQPtrList<KWrite> winList;
123 class KWriteEditorChooser:
public KDialogBase
129 KWriteEditorChooser(TQWidget *parent);
130 virtual ~KWriteEditorChooser();
133 KTextEditor::EditorChooser *m_chooser;