PDocument Class Reference

PDocument is the heart of the Programm it contains all Nodes, Connections and necessary obtions to manage these stuff. More...

Inheritance diagram for PDocument:

Inheritance graph
[legend]
Collaboration diagram for PDocument:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PDocument (PDocumentManager *initManager)
 PDocument (PDocumentManager *initManager, entry_ref *openEntry)
 PDocument (BMessage *archive)
 ~PDocument ()
virtual status_t Archive (BMessage *archive, bool deep=true) const
virtual void MessageReceived (BMessage *message)
const char * Title (void)
 returns the title of the Document.
BRect Bounds (void)
 Bounds returns the Bounds of the Document wicht enclose everey Node in the Document.
void Resize (float toX, float toY)
 Resizes the Document (mostly called from Commands).
bool IsDirty (void)
 Returns if the Document is dirty .
bool IsModified (void)
 IsModified returns if there was any change in the document.
void SetModified (void)
 SetModified set the Document to a modified state.
void ResetModified (void)
 ResetModified set the Document to a unmodified state.
BList * GetChangedNodes (void)
BList * GetSelected (void)
BList * GetAllNodes (void)
BList * GetAllConnections (void)
BMessage * DocumentSettings (void)
void SetDocumentSettings (BMessage *message)
void ShowSettings (void)
BMessage * PrintSettings (void)
void SetPrintSettings (BMessage *settings)
 Set the PrintSettings.
void Print (void)
 Print´s the lastly activated Editor.
void SetEntry (entry_ref *saveEntry, const char *name)
 Set the save and load entry.
void SetEntry (entry_ref *newEntry)
 Set the save and load entry.
entry_ref * Entry (void)
 return the save and load entry
void Save (void)
 save the file to the entry
void Load (void)
 save the file from the entry
void SavePanel ()
 shows a savePanel.
bool QuitRequested (void)
PWindowGetWindow (void)
PCommandManagerGetCommandManager (void)
PEditorManagerGetEditorManager (void)
PDocumentManagerBelongTo (void)
BMenu * GetMenu (const char *signatur)
BMenuItem * GetMenuItem (const char *signatur)
ToolBarGetToolBar (const char *signatur)
ToolMenuGetToolMenu (const char *toolbarSignature, const char *signature)
ToolItemGetToolItem (const char *toolbarSignature, const char *signature)
status_t AddMenu (BMenu *menu, int32 index=-1)
status_t AddMenuItem (const char *menuSignatur, BMenuItem *menuItem, int32 index=-1)
status_t AddToolBar (ToolBar *toolbar)
status_t AddToolMenu (const char *toolbarSignatur, ToolMenu *toolMenu)
status_t AddToolItem (const char *toolbarSignatur, const char *toolmenuSignatur, ToolItem *toolItem, int32 index=-1)
status_t RemoveMenu (const char *menuSignature)
status_t RemoveMenuItem (const char *menuItemSignature)
status_t RemoveToolBar (const char *signature)
status_t RemoveToolMenu (const char *toolbarSignature, const char *toolmenuSignature)
status_t RemoveToolItem (const char *toolbarSignature, const char *toolitemSignature)
BRect * GetPrintRect (void)
BMessage * FindObject (BPoint *where)

Static Public Member Functions

static BArchivable * Instantiate (BMessage *from)

Protected Member Functions

void Init (void)
void Init (BMessage *archive)
void AutoSave (void)
 save the file temporary for restoring
void PushToStream (BPositionIO *pushTo)

Protected Attributes

PDocumentManagerdocumentManager
BList * allNodes
BList * allConnections
BList * selected
BList * valueChanged
BRect bounds
BRect * paperRect
BRect * printableRect
BMessage * printerSetting
BMessage * documentSetting
PCSavePanelsavePanel
float width
float height
bool dirty
entry_ref * entryRef
BEntry * autoSaveRef
bool modified
PEditorManagereditorManager
PCommandManagercommandManager
PWindowwindow
BMessage * testMacro
HelpManagerhelpManager
BMessageRunner * autoSaver
bigtime_t autoSaveIntervall

Friends

class PCommand


Detailed Description

PDocument is the heart of the Programm it contains all Nodes, Connections and necessary obtions to manage these stuff.

Author:
Matthias Lindner
Version:
0.01
Date:
2005/10/04 : two4god@web.de
Author:
Paradoxon powered by Jesus Christ
Version:
0.01
Date:
2005/10/04
Todo:
Helpmanager complete impelementation and integration in PDocument, ToolBar, ToolItem, ToolMenu PWindow and PEditor

Implement Init(BMessage *archive)

See also:
BMessage

Constructor & Destructor Documentation

PDocument::PDocument ( PDocumentManager initManager  ) 

PDocument::PDocument ( PDocumentManager initManager,
entry_ref *  openEntry 
)

PDocument::PDocument ( BMessage *  archive  ) 

PDocument::~PDocument (  ) 


Member Function Documentation

status_t PDocument::AddMenu ( BMenu *  menu,
int32  index = -1 
) [virtual]

Implements PMenuAccess.

status_t PDocument::AddMenuItem ( const char *  menuSignatur,
BMenuItem *  menuItem,
int32  index = -1 
) [virtual]

Implements PMenuAccess.

status_t PDocument::AddToolBar ( ToolBar toolbar  )  [virtual]

Implements PMenuAccess.

status_t PDocument::AddToolItem ( const char *  toolbarSignatur,
const char *  toolmenuSignatur,
ToolItem toolItem,
int32  index = -1 
) [virtual]

Implements PMenuAccess.

status_t PDocument::AddToolMenu ( const char *  toolbarSignatur,
ToolMenu toolMenu 
) [virtual]

Implements PMenuAccess.

status_t PDocument::Archive ( BMessage *  archive,
bool  deep = true 
) const [virtual]

void PDocument::AutoSave ( void   )  [protected]

save the file temporary for restoring

PDocumentManager* PDocument::BelongTo ( void   )  [inline]

BRect PDocument::Bounds ( void   )  [inline]

Bounds returns the Bounds of the Document wicht enclose everey Node in the Document.

BMessage* PDocument::DocumentSettings ( void   )  [inline]

entry_ref* PDocument::Entry ( void   )  [inline]

return the save and load entry

BMessage * PDocument::FindObject ( BPoint *  where  ) 

BList* PDocument::GetAllConnections ( void   )  [inline]

BList* PDocument::GetAllNodes ( void   )  [inline]

BList* PDocument::GetChangedNodes ( void   )  [inline]

PCommandManager* PDocument::GetCommandManager ( void   )  [inline]

PEditorManager* PDocument::GetEditorManager ( void   )  [inline]

BMenu * PDocument::GetMenu ( const char *  signatur  )  [virtual]

Implements PMenuAccess.

BMenuItem * PDocument::GetMenuItem ( const char *  signatur  )  [virtual]

Implements PMenuAccess.

BRect* PDocument::GetPrintRect ( void   )  [inline]

BList* PDocument::GetSelected ( void   )  [inline]

ToolBar * PDocument::GetToolBar ( const char *  signatur  )  [virtual]

Implements PMenuAccess.

ToolItem * PDocument::GetToolItem ( const char *  toolbarSignature,
const char *  signature 
) [virtual]

Implements PMenuAccess.

ToolMenu * PDocument::GetToolMenu ( const char *  toolbarSignature,
const char *  signature 
) [virtual]

Implements PMenuAccess.

PWindow* PDocument::GetWindow ( void   )  [inline]

void PDocument::Init ( BMessage *  archive  )  [protected]

void PDocument::Init ( void   )  [protected]

BArchivable * PDocument::Instantiate ( BMessage *  from  )  [static]

bool PDocument::IsDirty ( void   )  [inline]

Returns if the Document is dirty .

. not implemented at the moment

bool PDocument::IsModified ( void   )  [inline]

IsModified returns if there was any change in the document.

void PDocument::Load ( void   ) 

save the file from the entry

Todo:
mime check
See also:
SetEntry

void PDocument::MessageReceived ( BMessage *  message  )  [virtual]

void PDocument::Print ( void   ) 

Print´s the lastly activated Editor.

Todo:
some error handling and printerSettings.. autocall

BMessage * PDocument::PrintSettings ( void   ) 

void PDocument::PushToStream ( BPositionIO *  pushTo  )  [protected]

bool PDocument::QuitRequested ( void   ) 

status_t PDocument::RemoveMenu ( const char *  menuSignature  )  [virtual]

Implements PMenuAccess.

status_t PDocument::RemoveMenuItem ( const char *  menuItemSignature  )  [virtual]

Implements PMenuAccess.

status_t PDocument::RemoveToolBar ( const char *  signature  )  [virtual]

Implements PMenuAccess.

status_t PDocument::RemoveToolItem ( const char *  toolbarSignature,
const char *  toolitemSignature 
) [virtual]

Implements PMenuAccess.

status_t PDocument::RemoveToolMenu ( const char *  toolbarSignature,
const char *  toolmenuSignature 
) [virtual]

Implements PMenuAccess.

void PDocument::ResetModified ( void   ) 

ResetModified set the Document to a unmodified state.

void PDocument::Resize ( float  toX,
float  toY 
)

Resizes the Document (mostly called from Commands).

void PDocument::Save ( void   ) 

save the file to the entry

See also:
SetEntry

void PDocument::SavePanel (  ) 

shows a savePanel.

. wich pass back an entry and autmatically call SetEntry

See also:
SetEntry

void PDocument::SetDocumentSettings ( BMessage *  message  ) 

void PDocument::SetEntry ( entry_ref *  newEntry  )  [inline]

Set the save and load entry.

void PDocument::SetEntry ( entry_ref *  saveEntry,
const char *  name 
)

Set the save and load entry.

void PDocument::SetModified ( void   ) 

SetModified set the Document to a modified state.

if the user now try to quit he is asked

void PDocument::SetPrintSettings ( BMessage *  settings  ) 

Set the PrintSettings.

Warning:
There is no check if the printersettings are valid!!!!!

void PDocument::ShowSettings ( void   ) 

const char * PDocument::Title ( void   ) 

returns the title of the Document.

. this is generated from the FileName


Friends And Related Function Documentation

friend class PCommand [friend]


Member Data Documentation

BList* PDocument::allConnections [protected]

BList* PDocument::allNodes [protected]

bigtime_t PDocument::autoSaveIntervall [protected]

BMessageRunner* PDocument::autoSaver [protected]

BEntry* PDocument::autoSaveRef [protected]

BRect PDocument::bounds [protected]

bool PDocument::dirty [protected]

BMessage* PDocument::documentSetting [protected]

entry_ref* PDocument::entryRef [protected]

float PDocument::height [protected]

bool PDocument::modified [protected]

BRect* PDocument::paperRect [protected]

BRect* PDocument::printableRect [protected]

BMessage* PDocument::printerSetting [protected]

BList* PDocument::selected [protected]

BMessage* PDocument::testMacro [protected]

BList* PDocument::valueChanged [protected]

float PDocument::width [protected]

PWindow* PDocument::window [protected]


The documentation for this class was generated from the following files:

Generated on Sun Jun 21 01:09:35 2009 for ProjektConceptor by  doxygen 1.5.9