OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Loading...
Searching...
No Matches
ocdoc.h
Go to the documentation of this file.
1
//----------------------------------------------------------------------------
2
// ObjectComponents
3
// Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
4
/// \file
5
/// Definition of TOcDocument Class
6
//----------------------------------------------------------------------------
7
8
#if !defined(OCF_OCDOC_H)
9
#define OCF_OCDOC_H
10
11
#include <
owl/private/defs.h
>
12
#if defined(BI_HAS_PRAGMA_ONCE)
13
# pragma once
14
#endif
15
16
#include <
ocf/oclink.h
>
17
18
#include <
ocf/ocpart.h
>
19
20
21
22
//
23
// Interfaces & Classes referenced
24
//
25
interface
_ICLASS
IStorage
;
26
27
namespace
ocf
{
28
29
//
30
// Interfaces & Classes referenced
31
//
32
class
_ICLASS
TOcStorage
;
33
class
_ICLASS
TOcApp
;
34
class
_ICLASS
TOcControl
;
35
class
_ICLASS
TOcView
;
36
class
_ICLASS
TOcRemVie
;
37
38
//
39
/// \class TOcDocument
40
// ~~~~~ ~~~~~~~~~~~
41
/// OC Document class, holds parts & is a owner of views
42
//
43
class
_ICLASS
TOcDocument
{
44
public
:
45
TOcDocument
(
TOcApp
& app, LPCTSTR fileName = 0);
46
TOcDocument
(
TOcApp
& app, LPCTSTR fileName,
IStorage
* storageI);
47
~TOcDocument
();
48
49
/// \name Collection management
50
/// @{
51
TOcPartCollection
&
GetParts
() {
return
PartCollection;}
52
TOcLinkCollection
&
GetLinks
() {
return
LinkCollection;}
53
TOcLinkCollection
&
GetViews
() {
return
LinkCollection;}
// Compatibility
54
/// @}
55
56
/// \name Storage & streaming related
57
/// @{
58
TOcStorage
*
GetStorage
() {
return
Storage;}
59
void
SetStorage(
IStorage
* storage,
bool
remember =
true
);
60
void
SetStorage(LPCTSTR path);
61
bool
SaveToFile(LPCTSTR newName);
62
bool
RestoreStorage();
63
/// @}
64
65
/// \name Load/Save part information
66
/// @{
67
bool
LoadParts();
68
bool
SaveParts(
IStorage
* storage = 0,
bool
sameAsLoaded =
true
,
69
bool
remember =
true
);
70
void
RenameParts(
IBRootLinkable
* bLDocumentI);
71
void
Close();
72
/// @}
73
74
/// \name Get/Set active view
75
/// @{
76
TOcView
*
GetActiveView
() {
return
ActiveView;}
77
void
SetActiveView(
TOcView
* view);
78
/// @}
79
80
/// \name Get/Set document name
81
/// @{
82
owl::tstring
GetName
()
const
{
return
Name;}
83
void
SetName(
const
owl::tstring
& newName);
84
/// @}
85
86
int
AllocPartID
() {
return
++PartID;}
87
TOcApp
&
GetOcApp
() {
return
OcApp;}
88
89
private
:
90
TOcView
* ActiveView;
///< Active TOcView object
91
TOcApp
& OcApp;
///< Our OC application object
92
TOcStorage
* Storage;
///< root storage for embedded objects
93
TOcStorage
* OrgStorage;
///< original root storage for embedded objects
94
95
int
PartID;
96
owl::tstring
Name
;
97
TOcPartCollection
PartCollection;
98
TOcLinkCollection
LinkCollection;
99
100
//friend class TOcPartCollectionIter; // To allow iterator access to collection
101
//friend class TOcLinkCollectionIter; // To allow iterator access to collection
102
friend
class
_ICLASS
TOcControl
;
103
friend
class
_ICLASS
TOcView
;
104
friend
class
_ICLASS
TOcRemVie
;
105
};
106
107
}
// OCF namespace
108
109
#endif
// OCF_OCDOC_H
110
ocf::IBRootLinkable
Definition
ocbocole.h:338
ocf::TOcApp
OCF Application class.
Definition
ocapp.h:144
ocf::TOcControl
Class representing an embedded control within a document.
Definition
occtrl.h:78
ocf::TOcDocument::GetViews
TOcLinkCollection & GetViews()
Definition
ocdoc.h:53
ocf::TOcDocument::GetOcApp
TOcApp & GetOcApp()
Definition
ocdoc.h:87
ocf::TOcDocument::GetLinks
TOcLinkCollection & GetLinks()
Definition
ocdoc.h:52
ocf::TOcDocument::TOcView
friend class _ICLASS TOcView
Definition
ocdoc.h:103
ocf::TOcDocument::TOcDocument
TOcDocument(TOcApp &app, LPCTSTR fileName=0)
Definition
ocdoc.cpp:36
ocf::TOcDocument::AllocPartID
int AllocPartID()
Definition
ocdoc.h:86
ocf::TOcDocument::GetStorage
TOcStorage * GetStorage()
Definition
ocdoc.h:58
ocf::TOcDocument::TOcControl
friend class _ICLASS TOcControl
Definition
ocdoc.h:102
ocf::TOcDocument::TOcRemVie
friend class _ICLASS TOcRemVie
Definition
ocdoc.h:104
ocf::TOcDocument::GetName
owl::tstring GetName() const
Definition
ocdoc.h:82
ocf::TOcDocument::GetParts
TOcPartCollection & GetParts()
Definition
ocdoc.h:51
ocf::TOcDocument::GetActiveView
TOcView * GetActiveView()
Definition
ocdoc.h:76
ocf::TOcLinkCollection
Container of link views with iterator.
Definition
oclink.h:123
ocf::TOcPartCollection
Container of parts with iterator.
Definition
ocpart.h:172
ocf::TOcStorage
Definition
ocstorag.h:73
ocf::TOcView
The TOcView partner is a container (viewer) of a given (server/client) document.
Definition
ocview.h:136
ocf
Object Component Framework (COM encapsulation).
Definition
appdesc.h:22
ocf::TOcRemVie
class _ICLASS TOcRemVie
Definition
ocdoc.h:36
ocf::Name
Name
Definition
occtrl.cpp:156
owl::tstring
std::string tstring
Definition
defs.h:79
IStorage
interface _ICLASS IStorage
Definition
ocdoc.h:25
oclink.h
Definition of TOcLinkView Class.
ocpart.h
Definition of TOcPart class.
_ICLASS
#define _ICLASS
Definition
oleutil.h:25
defs.h
include
ocf
ocdoc.h
Generated by
1.18.0