You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.4 KiB
86 lines
2.4 KiB
15 years ago
|
/* This file is part of the KDE libraries
|
||
|
Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License version 2 as published by the Free Software Foundation.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
12 years ago
|
#ifndef __tdetexteditor_document_h__
|
||
|
#define __tdetexteditor_document_h__
|
||
15 years ago
|
|
||
|
#include "editor.h"
|
||
|
|
||
|
namespace KTextEditor
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* The main class representing a text document.
|
||
|
* This class provides access to the document's views.
|
||
|
*/
|
||
|
class KTEXTEDITOR_EXPORT Document : public KTextEditor::Editor
|
||
|
{
|
||
|
friend class PrivateDocument;
|
||
|
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
public:
|
||
15 years ago
|
Document ( TQObject *parent = 0, const char *name = 0 );
|
||
15 years ago
|
virtual ~Document ();
|
||
|
|
||
|
/**
|
||
|
* Returns the global number of this document in your app.
|
||
|
*/
|
||
|
unsigned int documentNumber () const;
|
||
|
|
||
|
/**
|
||
|
* Returns this document's DCOP suffix for identifiying its DCOP interface.
|
||
|
*/
|
||
15 years ago
|
TQCString documentDCOPSuffix () const;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Create a view that will display the document data. You can create as many
|
||
|
* views as you like. When the user modifies data in one view then all other
|
||
|
* views will be updated as well.
|
||
|
*/
|
||
15 years ago
|
virtual class View *createView ( TQWidget *parent, const char *name = 0 ) = 0;
|
||
15 years ago
|
|
||
|
/*
|
||
|
* Returns a list of all views of this document.
|
||
|
*/
|
||
15 years ago
|
virtual TQPtrList<class View> views () const = 0;
|
||
15 years ago
|
|
||
13 years ago
|
/**
|
||
|
* Returns the list position of this document in your app, if applicable.
|
||
|
*/
|
||
|
long documentListPosition () const;
|
||
|
|
||
|
/**
|
||
|
* Sets the list position of this document in your app, if applicable.
|
||
|
*/
|
||
|
void setDocumentListPosition (long pos);
|
||
|
|
||
15 years ago
|
private:
|
||
|
class PrivateDocument *d;
|
||
|
static unsigned int globalDocumentNumber;
|
||
|
unsigned int myDocumentNumber;
|
||
13 years ago
|
long myDocumentListPosition;
|
||
15 years ago
|
};
|
||
|
|
||
15 years ago
|
KTEXTEDITOR_EXPORT Document *createDocument ( const char* libname, TQObject *parent = 0, const char *name = 0 );
|
||
15 years ago
|
|
||
|
}
|
||
|
|
||
|
#endif
|