SystemBarOp Class Reference

#include <bars.h>

Inheritance diagram for SystemBarOp:

DialogBarOp DialogOp Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 SystemBarOp ()
 Dummy constructor for DYNCREATE.
 SystemBarOp (UINT32 BarNameID, SystemBarType GrpBarID, DockBarType DockType=DOCKBAR_BOTTOM, UINT32 Slot=0, INT32 Offset=-1)
 Constructor.
virtual MsgResult Message (Msg *Msg)
 The default SystemBarOp Message handler.
BOOL Read (CCLexFile &file)
 Trap call to read bars in the system bar class.
BOOL Write (CCLexFile &file)
 Trap calls to write out system bars.
virtual BOOL Read (LoadRegistryEntries &Loader)
 Trap call to read bars in the system bar class.
virtual BOOL Write (SaveRegistryEntries &Saver)
 Trap calls to write out system bars.

Static Public Member Functions

static SystemBarOp * FindType (SystemBarType)
 To find one of the permanently created system bars which are used to group OpDescriptors so that they can be presented to the user in a sensible way. This routine searches the list of DialogBarOps created by the message manager to distribute messages to DialgBarOps.
static BOOL Connect (SystemBarType, OpDescriptor *pHorzOpDesc, OpDescriptor *pVertOpDesc=NULL)
 To connect an OpDescriptor to the specified system bar.
static BOOL Connect (SystemBarOp *, OpDescriptor *pHorzOpDesc, OpDescriptor *pVertOpDesc=NULL)
 To connect an OpDescriptor to the specified system bar.
static BOOL Separate (SystemBarType)
 To connect a separator to the specified system bar.
static BOOL Separate (SystemBarOp *)
 To connect a separator to the specified system bar.
static BOOL Init ()
 Registers SystemBarOp OpDescriptor.

Public Attributes

SystemBarType GroupBarID

Detailed Description

Definition at line 802 of file bars.h.


Constructor & Destructor Documentation

SystemBarOp::SystemBarOp (   ) 
 

Dummy constructor for DYNCREATE.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 5767 of file bars.cpp.

05768 {
05769 
05770 }

SystemBarOp::SystemBarOp (  UINT32  BarNameID,
SystemBarType  GrpBarID,
DockBarType  DockType = DOCKBAR_BOTTOM,
UINT32  Slot = 0,
INT32  Offset = -1
) 
 

Constructor.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/4/94
Parameters:
BarNameID = ID of string used as the name of the bar (appears in [INPUTS] toolbars dialogue) GrpBarID = The group which this system belongs (e.g. File, Edit, etc)
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 5789 of file bars.cpp.

05793                                           : 
05794                             DialogBarOp(BarNameID, CC_RUNTIME_CLASS(DialogBarOp) )
05795 {
05796     GroupBarID = GrpBarID;
05797 
05798     SetDockBarType(DockType);
05799     SetSlot(Slot);
05800     SetOffset(Offset);
05801 }


Member Function Documentation

BOOL SystemBarOp::Connect (  SystemBarOp *  pSystemBar,
OpDescriptor *  pHorzOpDesc,
OpDescriptor *  pVertOpDesc = NULL
)  [static]
 

To connect an OpDescriptor to the specified system bar.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com> (& MarkN)
Date:
17/4/94
Parameters:
Pointer to system bar to connect OpDescriptor to. [INPUTS] Pointer to the Horz OpDescriptor to connect to a bar Pointer to the Vert OpDescriptor to connect to a bar (should be NULL if Vert is same as Horz op desc)
- [OUTPUTS]
Returns:
TRUE if connection succeeded. FALSE otherwise.

Errors: -

See also:
-

Definition at line 5986 of file bars.cpp.

05987 {
05988     BOOL ConnectedOK = FALSE;                           // Setup return value
05989 
05990     if (pSystemBar)
05991     {
05992         BarControl* pBarCtrl = new BarControl();
05993         if (pBarCtrl)
05994         {
05995             // Set horz op desc
05996             pBarCtrl->SetHorzOpDesc(pHorzOpDesc);
05997 
05998             // Set vert op desc depending on pVertOpDesc
05999             if (pVertOpDesc != NULL)
06000                 pBarCtrl->SetVertOpDesc(pVertOpDesc);
06001             else
06002                 pBarCtrl->SetVertOpDesc(pHorzOpDesc);
06003 
06004             // Add the BarControl to to the system bar 
06005             pSystemBar->AddBarItem(pBarCtrl);
06006 
06007             ConnectedOK = TRUE;
06008         }
06009     }
06010 
06011     return (ConnectedOK);                               // If no match was found
06012 }

BOOL SystemBarOp::Connect (  SystemBarType  SystemBarID,
OpDescriptor *  pHorzOpDesc,
OpDescriptor *  pVertOpDesc = NULL
)  [static]
 

To connect an OpDescriptor to the specified system bar.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com> (& MarkN)
Date:
17/4/94
Parameters:
Type of system bar to find and connect OpDescriptor to. [INPUTS] Pointer to the Horz OpDescriptor to connect to a bar Pointer to the Vert OpDescriptor to connect to a bar (should be NULL if Vert is same as Horz op desc)
- [OUTPUTS]
Returns:
TRUE if connection succeeded. FALSE otherwise.

Errors: -

See also:
-

Definition at line 5952 of file bars.cpp.

05953 {
05954     BOOL ConnectedOK = FALSE;                           // Setup return value
05955 
05956     SystemBarOp* pSystemBar = SystemBarOp::FindType(SystemBarID);   // Find the bar specified by the ID
05957     if (pSystemBar)
05958         ConnectedOK = SystemBarOp::Connect(pSystemBar,pHorzOpDesc,pVertOpDesc);
05959 
05960     return (ConnectedOK);                               // If no match was found
05961 }

SystemBarOp * SystemBarOp::FindType (  SystemBarType  SystemBarID  )  [static]
 

To find one of the permanently created system bars which are used to group OpDescriptors so that they can be presented to the user in a sensible way. This routine searches the list of DialogBarOps created by the message manager to distribute messages to DialgBarOps.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/4/94
Parameters:
Type of system bar to find [INPUTS]
- [OUTPUTS]
Returns:
Pointer to the system bar of the specified type. NULL is returned if system bar is not found.

Errors: -

See also:
-

Definition at line 5906 of file bars.cpp.

05907 {
05908     // Search the list of DialogBarOps for the specified system bar...
05909     List* pBarList = MessageHandler::GetClassList(CC_RUNTIME_CLASS(DialogBarOp));
05910     ENSURE(pBarList,"Can't find list of DialogBarOps in SystemBarOp::FindType");
05911 
05912     DialogBarOp* pBar = (DialogBarOp*)pBarList->GetHead();      // Get ptr to head of list
05913     while (pBar)                                                // While there are BarOps
05914     {
05915         if (pBar->IsKindOf(CC_RUNTIME_CLASS(SystemBarOp)))      // test class
05916         {
05917             if (((SystemBarOp*)pBar)->GroupBarID == SystemBarID)// test type
05918             {
05919                 return ( (SystemBarOp*)pBar );                  // If they match then return
05920             }                                                   // a ptr to this BarOp
05921         }
05922         pBar = (DialogBarOp*)pBarList->GetNext(pBar);           // else skip to next bar
05923     }                                                           // and continue...
05924 
05925     return (NULL);                                              // If no match was found
05926 }

BOOL SystemBarOp::Init (  void   )  [static]
 

Registers SystemBarOp OpDescriptor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from DialogBarOp.

Definition at line 6094 of file bars.cpp.

06095 {
06096     
06097     BOOL ok;
06098     ok =    (RegisterOpDescriptor(
06099                                 0, 
06100                                 _R(IDS_MARKN_EMPTY),
06101                                 CC_RUNTIME_CLASS(SystemBarOp), 
06102                                 OPTOKEN_DLGBAROP,
06103                                 NULL // No GetState
06104     
06105                                 )
06106     /*
06107             &&
06108             new SystemBarOp( _R(IDS_FILE_BAR), SYSTEMBAR_FILE )
06109             &&
06110             new SystemBarOp( _R(IDS_EDIT_BAR), SYSTEMBAR_EDIT )
06111             &&
06112             new SystemBarOp( _R(IDS_ATTRIBUTE_BAR), SYSTEMBAR_ATTRIBUTE )
06113             &&
06114             new SystemBarOp( _R(IDS_ARRANGE_BAR), SYSTEMBAR_ARRANGE )
06115             &&
06116             new SystemBarOp( _R(IDS_UTILS_BAR), SYSTEMBAR_UTILITIES )
06117             &&
06118             new SystemBarOp( _R(IDS_WINDOW_BAR), SYSTEMBAR_WINDOW )
06119             &&
06120             new SystemBarOp( _R(IDS_HELP_BAR), SYSTEMBAR_HELP )
06121     */
06122             ); 
06123 
06124     return ok; 
06125 }

MsgResult SystemBarOp::Message (  Msg *  Msg  )  [virtual]
 

The default SystemBarOp Message handler.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/5/94
Parameters:
Msg,: The message to handle [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from DialogBarOp.

Definition at line 6142 of file bars.cpp.

06143 {
06144     // We must destroy the dialog if the application is dying
06145 //  if (MESSAGE_IS_A(Msg,DeathMsg))
06146 //      End();                          // Camelot is ending, so end the Op
06147 
06148 //      return OK;
06149     return (DialogBarOp::Message(Msg));
06150 }

BOOL SystemBarOp::Read (  LoadRegistryEntries &  Loader  )  [virtual]
 

Trap call to read bars in the system bar class.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/2/97
Parameters:
Loader = the class to use to load in the registry data. [INPUTS]
- [OUTPUTS]
Returns:
FALSE always because this routine should never be called!

Errors: -

See also:
-

Reimplemented from DialogBarOp.

Definition at line 5880 of file bars.cpp.

05881 {
05882     return (FALSE);
05883 }

BOOL SystemBarOp::Read (  CCLexFile &  file  ) 
 

Trap call to read bars in the system bar class.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94
Parameters:
file = a file to read the dialog bar from. [INPUTS]
- [OUTPUTS]
Returns:
FALSE always because this routine should never be called!

Errors: -

See also:
-

Reimplemented from DialogBarOp.

Definition at line 5839 of file bars.cpp.

05840 {
05841     return (FALSE);
05842 }

BOOL SystemBarOp::Separate (  SystemBarOp *  pSystemBar  )  [static]
 

To connect a separator to the specified system bar.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/4/94
Parameters:
Pointer to system bar to connect OpDescriptor to. [INPUTS]
- [OUTPUTS]
Returns:
TRUE if connection succeeded. FALSE otherwise.

Errors: -

See also:
-

Definition at line 6060 of file bars.cpp.

06061 {
06062     BOOL ConnectedOK = FALSE;                           // Setup return value
06063 
06064     if (pSystemBar)
06065     {
06066         BarSeparator* pBarSep = new BarSeparator();
06067         if (pBarSep)
06068         {
06069             // Add the BarControl to to the system bar 
06070             pSystemBar->AddBarItem(pBarSep);
06071 
06072             ConnectedOK = TRUE;
06073         }
06074     }
06075 
06076     return (ConnectedOK);                               // If no match was found
06077 }

BOOL SystemBarOp::Separate (  SystemBarType  SystemBarID  )  [static]
 

To connect a separator to the specified system bar.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/4/94
Parameters:
Type of system bar to find and connect OpDescriptor to. [INPUTS]
- [OUTPUTS]
Returns:
TRUE if connection succeeded. FALSE otherwise.

Errors: -

See also:
-

Definition at line 6030 of file bars.cpp.

06031 {
06032     BOOL ConnectedOK = FALSE;                           // Setup return value
06033 
06034     SystemBarOp* pSystemBar = SystemBarOp::FindType(SystemBarID);   // Find the bar specified by the ID
06035     if (pSystemBar)
06036         ConnectedOK = SystemBarOp::Separate(pSystemBar);
06037 
06038     return (ConnectedOK);                               // If no match was found
06039 }

BOOL SystemBarOp::Write (  SaveRegistryEntries &  Saver  )  [virtual]
 

Trap calls to write out system bars.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/2/97
Parameters:
Saver = the class to use to write out the registry data. [INPUTS]
- [OUTPUTS]
Returns:
FALSE always because system bars can't be serialised

Errors: -

See also:
-

Reimplemented from DialogBarOp.

Definition at line 5859 of file bars.cpp.

05860 {
05861     return (FALSE);
05862 }

BOOL SystemBarOp::Write (  CCLexFile &  file  )  [virtual]
 

Trap calls to write out system bars.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94
Parameters:
file = a file to Write the dialog bar to. [INPUTS]
- [OUTPUTS]
Returns:
FALSE always because system bars can't be serialised

Errors: -

See also:
-

Reimplemented from DialogBarOp.

Definition at line 5818 of file bars.cpp.

05819 {
05820     return (FALSE);
05821 }


Member Data Documentation

SystemBarType SystemBarOp::GroupBarID
 

Definition at line 836 of file bars.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:01:39 2007 for Camelot by  doxygen 1.4.4