21 #include <ubit/udefs.hpp> 22 #include <ubit/ustr.hpp> 23 #include <ubit/uboxes.hpp> 31 typedef std::list<UDocAttachment*> UDocAttachments;
72 virtual void saveErrors(
bool);
100 bool operator()(
const UStr* s1,
const UStr* s2)
const;
102 typedef std::map<const UStr*, UDocCreator*, Comp> Map;
133 virtual bool isEditable()
const;
134 virtual void setEditable(
bool state =
true);
139 virtual void setPath(
const UStr& path);
140 virtual void makePath(
UStr& fullpath,
const UStr& url);
159 virtual void addLinkCallback(
const UChild& cond_slash_callback);
190 virtual const UStr& getUrl()
const = 0;
191 virtual const UStr& getType()
const = 0;
192 virtual bool isLoaded()
const = 0;
200 enum From {PATHNAME, BUFFER, SCRATCH};
231 virtual bool isEditable()
const;
232 virtual void setEditable(
bool state =
true);
virtual bool loadAttachment(UDocAttachment *, bool reload=false)
loads this attachment.
Definition: udoc.hpp:156
virtual UStr * getErrors() const
return last errors messages if saveErrors() was set to true.
Definition: udoc.cpp:387
virtual UDocCreator * getCreator(const UStr &type)
returns the creator for this type (if any, null otherwise).
Definition: udoc.cpp:469
Box container.
Definition: ubox.hpp:64
virtual void setDefaultCreator(UDocCreator &)
changes the creator that is used when the document type is unknown.
Definition: udoc.cpp:465
virtual const UStr & getPath() const
returns the pathname of the document.
Definition: udoc.hpp:136
virtual void addCreator(const UStr &type, UDocCreator &)
adds a document creator.
Definition: udoc.cpp:460
virtual int loadAttachments(bool reload=false)
loads the attachments.
Definition: udoc.hpp:149
virtual UDoc * load(const UStr &name, const UStr &buffer)
loads a document from a buffer in memory.
Definition: udoc.cpp:424
virtual UDoc * read(const UStr &filename)
reads a document from a file.
Definition: udoc.cpp:409
< Base of flat documents that just contains flat text or an image see also: UXmlDocument for XML "hie...
Definition: udoc.hpp:228
virtual const UDocAttachments * getAttachments() const
returns the objects (images, stylesheets, etc) that are attached to this document.
Definition: udoc.hpp:146
virtual int getStatus() const
status of the last (read/load/create) operation.
Definition: udoc.cpp:383
Document source (file, buffer, etc.).
Definition: udoc.hpp:199
static UDocFactory & getDefaultFactory()
returns the default factory for reading/creating documents.
Definition: udoc.cpp:27
Generic Document.
Definition: udoc.hpp:122
Document attachment (image, stylesheet, etc.)
Definition: udoc.hpp:187
Document Factory: use this class to read documents.
Definition: udoc.hpp:37
Definition: uhardfont.hpp:31
Document creator interface (intended to be subclassed).
Definition: udoc.hpp:216
virtual UDocCreator * getDefaultCreator()
returns the default document creator.
Definition: udoc.cpp:478
virtual UDoc * create(const UStr &name)
creates an empty document.
Definition: udoc.cpp:439
Ubit String.
Definition: ustr.hpp:72
< Documents that needs a plugin to be displayed.
Definition: udoc.hpp:240
[impl] Internal implementation of a child node.
Definition: uchild.hpp:23