home *** CD-ROM | disk | FTP | other *** search
- /* Ped1ObjectDeity.cc */
-
- #include "Ped1ObjectDeity.hh"
- #include "PedAgent.hh"
- #include "PedWindow.hh"
- #include "PedPaneTE.hh"
-
- Ped1ObjectDeity deity, *gOD = &deity;
-
- PedAgent *
- PedClassAgent::MakeAgent()
- {
- PedAgent *agent = new PedAgent(mPrimaryTask);
- agent->autorelease();
-
- return agent;
- }
-
- void
- Ped1ObjectDeity::RegisterAgentClass(PedClassAgent *inClass)
- {
- if (inClass != NULL) {
- mAgentClass = inClass;
- }
- }
-
- PedAgent *
- Ped1ObjectDeity::CreateWindowAgent()
- {
- if (mAgentClass != NULL) {
- return mAgentClass->MakeAgent();
- }
- PedAgent *agent = new PedAgent(NULL);
- agent->autorelease();
- return agent;
- }
-
-
-
- PedWindow *
- Ped1ObjectDeity::CreateWindow()
- {
- return CreateTEWindow();
-
- PedWindow *wind = new PedWindow();
- wind->autorelease();
- return wind;
- }
-
- PedWindow *
- Ped1ObjectDeity::CreateTEWindow()
- {
- PedAgent *agent = new PedAgent(NULL);
- PedWindow *wind = new PedWindow(agent);
- PedPane *pane = new PedPaneTE(*wind);
- wind->SetPane(pane);
- // Release everything we allocated. Windows must be autoreleased,
- // because they're not retained until they're opened.
- agent->release();
- wind->autorelease();
- pane->release();
- return wind;
- }
-
- /*
- void
- Ped1ObjectDeity::RegisterFabricator(ObjCode inCode, PedFabricator inFab)
- {
- if (inCode == 'Agnt') {
- mFabAgent = inFab;
- }
- }
- */
-