PushModule Class Reference

Inheritance diagram for PushModule:

Module_v1 List of all members.

Public Member Functions

virtual BOOL Init ()
 Called after module's constructor to ask it whether it wants to exist or not. Each module is asked in two passes, so that its existence can depend on another module. If a module does not want to exist, it should return FALSE, whereupon it will be deleted.
virtual UINT32 GetInterfaceVersion ()
virtual UINT32 GetInfoVersion ()
virtual void Describe (void *Info)
 Asks a module for more information. The pointer points to a struct such as ModInfo_v1 which the module should fill in. All fields should be filled (NULL is OK for char* variables). The type of the pointer is not explicitly defined so the structure can evolve while keeping backward compatibility.
virtual void * CreateTool (UINT32 ToolID)
 Provide a clean interface from module to kernel code for the creation of tools.

Detailed Description

Definition at line 151 of file pushbase.cpp.


Member Function Documentation

void * PushModule::CreateTool UINT32  Type  )  [virtual]
 

Provide a clean interface from module to kernel code for the creation of tools.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/6/93
Parameters:
ToolNumber - The number of the tool to create (1 to NumTools) [INPUTS]
- [OUTPUTS]
Returns:
Pointer to the new instantiation of the desired tool.

Errors: -

Reimplemented from Module_v1.

Definition at line 196 of file pushbase.cpp.

00197 {
00198     if (Type==1)
00199         return NULL; //new ZoomTool;
00200 
00201     if (Type==2)
00202         return new PushTool;
00203 
00204     if (Type==3)
00205         return NULL; //new FreeHandTool;
00206 
00207     if (Type==4)
00208         return new PenTool;
00209 
00210     if (Type==5)
00211         return NULL; //new BlendTool;
00212 
00213     if (Type==6)
00214         return new BezierTool;
00215 
00216     if (Type==7)
00217         return new GradFillTool;
00218 
00219     if (Type==8)
00220         return new TranspTool;
00221 
00222     if (Type==9)
00223         return new GridTool;
00224 
00225     if (Type==10)
00226         return new RectangleTool;
00227 
00228     if (Type==11)
00229         return new QuickShapeTool;
00230 
00231     if (Type==12)
00232         return new MouldTool;
00233 
00234     if (Type==13)
00235         return new BlankTool;
00236 
00237     return NULL;
00238 }           

void PushModule::Describe void *  Info  )  [virtual]
 

Asks a module for more information. The pointer points to a struct such as ModInfo_v1 which the module should fill in. All fields should be filled (NULL is OK for char* variables). The type of the pointer is not explicitly defined so the structure can evolve while keeping backward compatibility.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
Pointer to area to recieve info [INPUTS]
Info area is updated [OUTPUTS]
Returns:
None

Errors: None

Reimplemented from Module_v1.

Definition at line 176 of file pushbase.cpp.

00177 {
00178     // Cast the pointer into one we understand...
00179     
00180     ModInfo_v1 *ModInfo = (ModInfo_v1 *) Info;
00181     
00182     // ...and fill in the fields
00183     
00184     ModInfo->InfoVersion = 1;
00185     ModInfo->InterfaceVersion = GetInterfaceVersion();
00186     ModInfo->Version = 1;
00187     ModInfo->ID = MODULEID_PUSH;
00188     ModInfo->NumTools = 13;
00189     ModInfo->Name = Name;
00190     ModInfo->Purpose = Purpose;
00191     ModInfo->Author = Author;
00192 }

virtual UINT32 PushModule::GetInfoVersion  )  [inline, virtual]
 

Definition at line 161 of file pushbase.cpp.

00161 { return 1; };

virtual UINT32 PushModule::GetInterfaceVersion  )  [inline, virtual]
 

Reimplemented from Module_v1.

Definition at line 158 of file pushbase.cpp.

00158 { return 1; } ;

BOOL PushModule::Init void   )  [virtual]
 

Called after module's constructor to ask it whether it wants to exist or not. Each module is asked in two passes, so that its existence can depend on another module. If a module does not want to exist, it should return FALSE, whereupon it will be deleted.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if OK, FALSE if module doesn't want to initialise.

Errors: None

Reimplemented from Module_v1.

Definition at line 171 of file pushbase.cpp.

00172 {
00173     return TRUE;
00174 }


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 04:00:12 2007 for Camelot by  doxygen 1.4.4