HelpOps Class Reference

This class is used for all the Help Operations found on the help menu. More...

#include <menuops.h>

Inheritance diagram for HelpOps:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 HelpOps ()
 Constructs a new HelpOps object: setting default operation flags, and adding it to the Live list.
void Do (OpDescriptor *WhichOp)
 Actually "DO" a Exit Application operation.

Static Public Member Functions

static BOOL Init ()
 Declares a preference that allows you to clear memory in delete().
static OpState GetState (String_256 *, OpDescriptor *)
 Find the state of the HelpOps operation.
static BOOL GetCDHelpOn ()
static void SetCDHelpOn (BOOL value)

Static Protected Attributes

static BOOL CDHelpOn = FALSE

Detailed Description

This class is used for all the Help Operations found on the help menu.

Author:
Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/8/93
See also:
operation

Definition at line 480 of file menuops.h.


Constructor & Destructor Documentation

HelpOps::HelpOps  ) 
 

Constructs a new HelpOps object: setting default operation flags, and adding it to the Live list.

Author:
Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 1245 of file menuops.cpp.

01245                 : Operation()
01246 {                 
01247 }


Member Function Documentation

void HelpOps::Do OpDescriptor WhichOp  )  [virtual]
 

Actually "DO" a Exit Application operation.

Author:
Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/8/93
Parameters:
An Operation Descriptor [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 1267 of file menuops.cpp.

01268 {
01269     if ((WhichOp->Token) ==  String(OPTOKEN_HELPUSING))
01270         HelpUsingAction(); 
01271     else if ((WhichOp->Token) == String(OPTOKEN_HELPINDEX))
01272         HelpIndexAction();
01273     else if (WhichOp->Token == String(OPTOKEN_HELPTOOLS))
01274         HelpToolsAction();
01275     else if (WhichOp->Token == String(OPTOKEN_HELPGALLERIES))
01276         HelpGalleriesAction();
01277     else if (WhichOp->Token == String(OPTOKEN_HELPDEMOS))
01278     {
01279     #ifndef WEBSTER
01280         HelpDemosAction();
01281     #else   // webster
01282         WebsterDemos();
01283     #endif //webster
01284     }
01285     else if (WhichOp->Token == String(OPTOKEN_HELPPLAYER))
01286     {
01287         HelpPlayerAction();
01288     }
01289     else if (WhichOp->Token == String(OPTOKEN_HELPTECHSUPPORT))
01290         HelpTechSupportAction();
01291 //Webster_Ranbir_12\11\96
01292 #ifdef INC_WEB_MENU_ITEMS
01293     else if (WhichOp->Token == String(OPTOKEN_XARAX_FORUM))
01294         HelpXaraForumAction();
01295     else if (WhichOp->Token == String(OPTOKEN_WEBSTER_HOME_PAGE))
01296         HelpWebsterHomePage();
01297     else if (WhichOp->Token == String(OPTOKEN_XARA_HOME_PAGE))
01298         HelpXaraHomePage();
01299     else if (WhichOp->Token == String(OPTOKEN_HINTS_AND_TIPS_PAGES))
01300         WebsterHelpPages();
01301     else if (WhichOp->Token == String(OPTOKEN_XARA_PURCHASE_PAGE))
01302         HelpXaraPurchasePage();
01303 //Webster_Ranbir_12\11\96
01304 #endif //INC_WEB_MENU_ITEMS
01305 
01306 #ifdef INC_WEB_MENU_ITEMS
01307     else if (WhichOp->Token == String(OPTOKEN_WEBLINK))
01308         if(GetCDHelpOn())
01309             SetWebsterReg(FALSE);
01310         else
01311             SetWebsterReg(TRUE);
01312 #endif  //INC_WEB_MENU_ITEMS    
01313 
01314 #ifdef STANDALONE
01315     else if ((WhichOp->Token) == String(OPTOKEN_HELPSPEC))
01316         HelpSpecAction(); 
01317 #endif
01318     
01319     End();
01320 }                 

static BOOL HelpOps::GetCDHelpOn  )  [inline, static]
 

Definition at line 493 of file menuops.h.

00493 { return CDHelpOn;  }

OpState HelpOps::GetState String_256 UIDescription,
OpDescriptor OpDesc
[static]
 

Find the state of the HelpOps operation.

Author:
Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/8/93
Parameters:
String - representing the operation description which may be updated [INPUTS] OpDescriptor - To help update the state
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 1339 of file menuops.cpp.

01340 {
01341     //Webster_Ranbir_12\11\96
01342 #ifdef INC_WEB_MENU_ITEMS
01343     if (OpDesc->Token == String(OPTOKEN_WEBLINK))       
01344     {
01345         OpState Opst;
01346         BOOL RegistryFlag = IsCDROMOn();
01347         if(RegistryFlag)
01348         {
01349             Opst.Ticked = TRUE;
01350             SetCDHelpOn(TRUE);
01351         }
01352         else
01353         {
01354             Opst.Ticked = FALSE;
01355             SetCDHelpOn(FALSE);
01356         }
01357         return Opst;
01358     }
01359     else
01360 #endif //INC_WEB_MENU_ITEMS
01361         return OpState(FALSE, FALSE);
01362 }                                    

BOOL HelpOps::Init void   )  [static]
 

Declares a preference that allows you to clear memory in delete().

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/4/94
Returns:
TRUE if it worked OK, FALSE if not

Reimplemented from SimpleCCObject.

Definition at line 1386 of file menuops.cpp.

01387 {
01388     REGOP(HELP,USING,HelpOps)
01389     /* OpDescriptor* UsingOp = new OpDescriptor(
01390                                             0, 
01391                                             _R(IDS_HELP_USING),
01392                                             CC_RUNTIME_CLASS(HelpOps), 
01393                                             OPTOKEN_HELPUSING,
01394                                             HelpOps::GetState,
01395                                             HID_HELP_USING,
01396                                             _R(IDBBL_HELPUSINGOP),
01397                                             0 );
01398 
01399     ERRORIF(!UsingOp, _R(IDE_NOMORE_MEMORY), FALSE);*/
01400 
01401     // REGOP(HELP, INDEX, HelpOps)
01402     OpDescriptor* IndexOp = new OpDescriptor(
01403                                                 0, 
01404                                                 _R(IDS_HELP_TOPICS),
01405                                                 CC_RUNTIME_CLASS(HelpOps), 
01406                                                 OPTOKEN_HELPINDEX,
01407                                                 HelpOps::GetState,
01408                                                 HID_HELP_INDEX,
01409                                                 _R(IDBBL_HELPINDEXOP),
01410                                                 0 );
01411 
01412     ERRORIF(!IndexOp, _R(IDE_NOMORE_MEMORY), FALSE);
01413 
01414     // REGOP(HELP, DEMOS, HelpOps);
01415     OpDescriptor* DemosOp = new OpDescriptor(
01416                                                 0, 
01417                                                 _R(IDS_HELP_MOVIES),
01418                                                 CC_RUNTIME_CLASS(HelpOps), 
01419                                                 OPTOKEN_HELPDEMOS,
01420                                                 HelpOps::GetState,
01421                                                 HID_HELP_DEMOS,
01422                                                 _R(IDBBL_HELPDEMOSOP),
01423                                                 0 );
01424 
01425     ERRORIF(!DemosOp, _R(IDE_NOMORE_MEMORY), FALSE);
01426     
01427     // REGOP(HELP, PLAYER, HelpPlayer);
01428     OpDescriptor* PlayerOp = new OpDescriptor(
01429                                                 0, 
01430                                                 _R(IDS_HELP_PLAYER),
01431                                                 CC_RUNTIME_CLASS(HelpOps), 
01432                                                 OPTOKEN_HELPPLAYER,
01433                                                 HelpOps::GetState,
01434                                                 HID_HELP_PLAYER,
01435                                                 _R(IDBBL_HELPPLAYEROP),
01436                                                 0 );
01437 
01438     ERRORIF(!PlayerOp, _R(IDE_NOMORE_MEMORY), FALSE);
01439 
01440     //Webster_Ranbir_12\11\96
01441 #ifdef INC_WEB_MENU_ITEMS
01442 
01443     OpDescriptor* WebsOp = new OpDescriptor(
01444                                                 0, 
01445                                                 _R(IDS_XARA_WEB),               
01446                                                 CC_RUNTIME_CLASS(HelpOps), 
01447                                                 OPTOKEN_XARA_WEB_MENU,      
01448                                                 HelpOps::GetState,
01449                                                 0,
01450                                                 0,
01451                                                 0 );
01452 
01453     ERRORIF(!WebsOp, _R(IDE_NOMORE_MEMORY), FALSE);
01454 
01455 
01456     OpDescriptor* ForumOp = new OpDescriptor(
01457                                                 0,
01458                                                 _R(IDS_XARAX_FORUM),
01459                                                 CC_RUNTIME_CLASS(HelpOps),
01460                                                 OPTOKEN_XARAX_FORUM,
01461                                                 HelpOps::GetState,
01462                                                 0,
01463                                                 0,
01464                                                 0 );
01465 
01466     ERRORIF(!ForumOp, _R(IDE_NOMORE_MEMORY), FALSE);
01467 
01468 
01469     OpDescriptor* WebsHomePageOp = new OpDescriptor(
01470                                                 0, 
01471                                                 _R(IDS_WEBSTER_HOME_PAGE),                  
01472                                                 CC_RUNTIME_CLASS(HelpOps), 
01473                                                 OPTOKEN_WEBSTER_HOME_PAGE,
01474                                                 HelpOps::GetState,
01475                                                 0,
01476                                                 0,
01477                                                 0 );
01478 
01479     ERRORIF(!WebsHomePageOp, _R(IDE_NOMORE_MEMORY), FALSE);
01480 
01481 
01482     OpDescriptor* XaraHomePageOp = new OpDescriptor(
01483                                                 0, 
01484                                                 _R(IDS_XARA_HOME_PAGE),                 
01485                                                 CC_RUNTIME_CLASS(HelpOps), 
01486                                                 OPTOKEN_XARA_HOME_PAGE,
01487                                                 HelpOps::GetState,
01488                                                 0,
01489                                                 0,
01490                                                 0 );
01491 
01492     ERRORIF(!XaraHomePageOp, _R(IDE_NOMORE_MEMORY), FALSE);
01493 
01494 
01495     OpDescriptor* XaraPurchasePageOp = new OpDescriptor(
01496                                                 0, 
01497                                                 _R(IDS_XARA_PURCHASE_PAGE),                 
01498                                                 CC_RUNTIME_CLASS(HelpOps), 
01499                                                 OPTOKEN_XARA_PURCHASE_PAGE,
01500                                                 HelpOps::GetState,
01501                                                 0,
01502                                                 0,
01503                                                 0 );
01504 
01505     ERRORIF(!XaraPurchasePageOp, _R(IDE_NOMORE_MEMORY), FALSE);
01506 
01507     OpDescriptor* HintsAndTipsPagesOp = new OpDescriptor(
01508                                                 0, 
01509                                                 _R(IDS_HINTS_AND_TIPS_PAGES),                   
01510                                                 CC_RUNTIME_CLASS(HelpOps), 
01511                                                 OPTOKEN_HINTS_AND_TIPS_PAGES,
01512                                                 HelpOps::GetState,
01513                                                 0,
01514                                                 0,
01515                                                 0 );
01516 
01517     ERRORIF(!HintsAndTipsPagesOp, _R(IDE_NOMORE_MEMORY), FALSE);
01518 
01519 
01520 
01521     OpDescriptor* WebLink = new OpDescriptor(
01522                                                 0, 
01523                                                 _R(IDS_WEBLINK),                
01524                                                 CC_RUNTIME_CLASS(HelpOps), 
01525                                                 OPTOKEN_WEBLINK,
01526                                                 HelpOps::GetState,
01527                                                 0,
01528                                                 0,
01529                                                 0 );
01530 
01531     ERRORIF(!WebLink, _R(IDE_NOMORE_MEMORY), FALSE);
01532 
01533 #endif // INC_WEB_MENU_ITEMS
01534 
01535     REGOP(HELP, TOOLS, HelpOps);
01536     REGOP(HELP, GALLERIES, HelpOps);
01537 
01538     REGOP(HELP, TECHSUPPORT, HelpOps);
01539 
01540 #ifdef STANDALONE
01541     REGOP(HELP,SPEC,HelpOps)
01542 #endif
01543 
01544     return TRUE;
01545 }

static void HelpOps::SetCDHelpOn BOOL  value  )  [inline, static]
 

Definition at line 494 of file menuops.h.

00494 { CDHelpOn = value; }


Member Data Documentation

BOOL HelpOps::CDHelpOn = FALSE [static, protected]
 

Definition at line 497 of file menuops.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:07 2007 for Camelot by  doxygen 1.4.4