VCF::DocManagerEvent Class Reference
class DocManagerEvent More...
#include <vcf/ApplicationKit/DocumentManager.h>
Inheritance diagram for VCF::DocManagerEvent:

Public Member Functions | |
| DocManagerEvent (Object *source, uint32 type) | |
| bool | allowFileOperation () |
| tells if we want to allow the DocumentManager to perform the standard file operation that he has been requested. | |
| void | setAllowFileOperation (const bool &val) |
| sets this flag as false from the event handler in order in order to make the manager aware that an alternative way, implemented by the handler, is preferred. | |
| bool | getFileOperationStatus () |
| gets the status of a file operation after the event handler has been executed | |
| void | setFileOperationStatus (const bool &val) |
| sets the status of a file operation from the event handler. | |
Protected Attributes | |
| bool | allowFileOp_ |
| bool | fileOperationStatus_ |
Detailed Description
class DocManagerEventwhile a normal event is appropriated to notify the user interface that a file operation has been performed on a document, a user will need this special kind of event if he needs to bypass a standard operation on documents as normally execute by the DocumentManager. Even if the DocumentManager is already very flexible, this let the user to have a comlete control in some case he may need ( very unfrequent though ).
This how this mechanism works: this event class has two member functions that are normally supposed to work togheter. Yet are normally *not* used. Let's take the case of DocumentManager::saveFile() for example, and imagine that the user needs to completely bypass the way saveFile works and adopt his personal implementation. In order to do that he needs to add an handler to the manager, that is performing the operation in hte way he needs. He will also have to setAllowFileOperation( false ) from inside this handler, and setFileOperationStatus( true ) whenever the saving operation has been completed successfuly. The standard implementation of saveFile will then call the handler, collect that fileOperationStatus_ value and return it. See comment for setFileOperationStatus.
- See also:
- saveFile()
Constructor & Destructor Documentation
|
||||||||||||
|
|
Member Function Documentation
|
|
tells if we want to allow the DocumentManager to perform the standard file operation that he has been requested.
|
|
|
gets the status of a file operation after the event handler has been executed
|
|
|
sets this flag as false from the event handler in order in order to make the manager aware that an alternative way, implemented by the handler, is preferred.
|
|
|
sets the status of a file operation from the event handler. The value set with this function will be the value returned by the DocumentManager's member function that was supposed to perform the standard implementation of this file operation. Use setAllowFileOperation( false ) to make this function active.
|
Member Data Documentation
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/DocumentManager.h
