19 #include "kateappIface.h"
22 #include "katesession.h"
23 #include "katedocmanager.h"
24 #include "katemainwindow.h"
26 KateAppDCOPIface::KateAppDCOPIface (
KateApp *app) : DCOPObject (
"KateApplication")
31 DCOPRef KateAppDCOPIface::documentManager ()
33 return DCOPRef (m_app->documentManager()->dcopObject ());
36 DCOPRef KateAppDCOPIface::activeMainWindow ()
38 KateMainWindow *win = m_app->activeMainWindow();
41 return DCOPRef (win->dcopObject ());
46 uint KateAppDCOPIface::activeMainWindowNumber ()
48 KateMainWindow *win = m_app->activeMainWindow();
51 return win->mainWindowNumber ();
57 uint KateAppDCOPIface::mainWindows ()
59 return m_app->mainWindows ();
62 DCOPRef KateAppDCOPIface::mainWindow (uint n)
64 KateMainWindow *win = m_app->mainWindow(n);
67 return DCOPRef (win->dcopObject ());
72 bool KateAppDCOPIface::openURL (KURL url, TQString encoding)
74 return m_app->openURL (url, encoding,
false);
77 bool KateAppDCOPIface::openURL (KURL url, TQString encoding,
bool isTempFile)
79 return m_app->openURL (url, encoding, isTempFile);
82 bool KateAppDCOPIface::setCursor (
int line,
int column)
84 return m_app->setCursor (line, column);
87 bool KateAppDCOPIface::openInput (TQString text)
89 return m_app->openInput (text);
92 bool KateAppDCOPIface::activateSession (TQString session)
94 m_app->sessionManager()->activateSession (m_app->sessionManager()->giveSession (session));
99 const TQString & KateAppDCOPIface::session()
const
101 return m_app->sessionManager()->activeSession()->sessionName();