Led 3.0 Class Library Documentation

Module FlavorPackage


Classes and Global Functions Index

Module Description:

This module defines the packaged up contents of serialized data. This data is usually used to exchange in drag and drop, and clipboard operations. But its sometimes used/saved for other purposes, like UNDO and hidable text.


Class: FlavorPackageExternalizer [public]

Base Classes: virtual MarkerOwner
Description:

Helper class for implementing externalizing. Can be subclassed to add new formats. Call it with a WriterFlavorPackage, and a range to copy from, and the externalizing will be done.

See also FlavorPackageInternalizer.

Member Details

FlavorPackageExternalizer::ExternalizeBestFlavor [public]

void FlavorPackageExternalizer::ExternalizeBestFlavor (WriterFlavorPackage& flavorPackage, size_t from, size_t to)

Externalize to the given FlavorPackageExternalizer::WriterFlavorPackage the text in the given range. This can be for a Drag&Drop package, a ClipBoard package, or whatever (see FlavorPackageExternalizer::ExternalizeFlavors).

FlavorPackageExternalizer::ExternalizeFlavor_TEXT [public]

void FlavorPackageExternalizer::ExternalizeFlavor_TEXT (WriterFlavorPackage& flavorPackage, size_t from, size_t to)

Externalize to the given FlavorPackageExternalizer::WriterFlavorPackage the text in the given range. This can be for a Drag&Drop package, a ClipBoard package, or whatever (see FlavorPackageExternalizer::ExternalizeFlavors and FlavorPackageExternalizer::ExternalizeBestFlavor).

This method externalizes in the native OS text format (with any embedded NUL-characters in the text eliminated).

FlavorPackageExternalizer::ExternalizeFlavors [public]

void FlavorPackageExternalizer::ExternalizeFlavors (WriterFlavorPackage& flavorPackage, size_t from, size_t to)

Externalize to the given FlavorPackageExternalizer::WriterFlavorPackage the text in the given range. This can be for a Drag&Drop package, a ClipBoard package, or whatever (see FlavorPackageExternalizer::ExternalizeBestFlavor).


Class: FlavorPackageInternalizer [public]

Base Classes: virtual MarkerOwner
Description:

Helper class for implementing internalizing. Can be subclassed to add new formats. Call it with a ReaderFlavorPackage, and a range to insert it into, and the internalizing will be done.

See also FlavorPackageExternalizer.


Class: ReadWriteMemBufferPackage [public]

Base Classes: ReaderFlavorPackage, WriterFlavorPackage
Description:

Dual purpose, store-and-reuse package. Useful for undo.


Class: ReaderClipboardFlavorPackage [public]

Base Classes: ReaderFlavorPackage
Description:

NB: On windows - it is REQUIRED the ClipboardFlavorPackage objects only be created in the context of Open/Close clipboard operations (for example done in OnPasteCommand_Before/OnPasteCommand_After - so typically no problem).

NB: For X-Windows, the clip data is just stored in the global variable ReaderClipboardFlavorPackage::sPrivateClipData.


Class: ReaderFlavorPackage [public]

Description:

Abstraction wrapping both Drag&Drop packages, and clipboard access. Used by FlavorPackageInternalizer.

Member Details

ReaderFlavorPackage::GetFlavorSize [public]

virtual size_t GetFlavorSize (Led_ClipFormat clipFormat) const = 0;

Return an upper bound on the size of the given flavor element. Try to get the right size, but the OS frequently makes this impossible. Just garuantee that when you do a ReaderFlavorPackage::ReadFlavorData you get the right size, and that is smaller or equal to what this returns.

ReaderFlavorPackage::ReadFlavorData [public]

virtual size_t ReadFlavorData (Led_ClipFormat clipFormat, size_t bufSize, void* buf) const = 0;

Return the data of a given clip format, copied into the passed in buffer. The caller must allocate/free the buffer. An upper bound on the size needed for the buffer can be retrieved with ReaderFlavorPackage::GetFlavorSize.


Class: WriterClipboardFlavorPackage [public]

Base Classes: WriterFlavorPackage
Description:

NB: On windows - it is REQUIRED the ClipboardFlavorPackage objects only be created in the context of Open/Close clipboard operations (for example done in OnCopyCommand_Before/OnCopyCommand_After - so typically no problem).

See also ReaderClipboardFlavorPackage.


Class: WriterFlavorPackage [public]

Description:

Abstraction wrapping both Drag&Drop packages, and clipboard access. Used by FlavorPackageExternalizer.


Return to Led Page Return to Led ClassLib Documentation Index Return to Led Reference Manual Index
Last Updated 2001-10-20