ViewOps Class Reference

This class is used for all the View operations found on the View Menu. More...

#include <menuops.h>

Inheritance diagram for ViewOps:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ViewOps ()
 Constructs a new ViewOps object: setting default operation flags, and adding it to the Live list.
virtual BOOL OnIdleEvent (void)
 Delays going into full screen mode until we are out of the broadcast loop makes BarOp deletion safe.
void Do (OpDescriptor *WhichOp)
 Actually "DO" a Exit Application operation.

Static Public Member Functions

static BOOL Init ()
 Create OpDescriptors for the each file operation.
static OpState GetState (String_256 *, OpDescriptor *)
 Find the state of the ViewOps operation.
static BOOL IsFullScreenPending ()

Static Public Attributes

static BOOL DoFullScreen = FALSE

Detailed Description

This class is used for all the View operations found on the View Menu.

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

Definition at line 538 of file menuops.h.


Constructor & Destructor Documentation

ViewOps::ViewOps  ) 
 

Constructs a new ViewOps 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 1760 of file menuops.cpp.

01760                 : Operation()
01761 {                 
01762 }


Member Function Documentation

void ViewOps::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 1829 of file menuops.cpp.

01830 {
01831     DoFullScreen = FALSE;
01832     if ((WhichOp->Token) == String(OPTOKEN_VIEWFULLSCREEN))
01833     {
01834         // make sure there isn't a processor registered
01835         GetApplication()->RemoveIdleProcessor(IDLEPRIORITY_HIGH, this);
01836         // register the idle handler
01837         GetApplication()->RegisterIdleProcessor(IDLEPRIORITY_HIGH, this);
01838         DoFullScreen = TRUE;
01839         // if we End() now the idle loop will fall over.
01840         return;                                        // DONT END() !!!! 
01841     }
01842 
01843     if ((WhichOp->Token) ==  String(OPTOKEN_VIEWTOOLBAR))
01844         ViewToolBarAction(); 
01845     else if ((WhichOp->Token) == String(OPTOKEN_VIEWSTATUSBAR))
01846         ViewStatusBarAction(); 
01847     else if ((WhichOp->Token) == String(OPTOKEN_VIEWCOLOURBAR))
01848         ViewColourBarAction();
01849     else if ((WhichOp->Token) == String(OPTOKEN_VIEWSCROLLBARS))
01850         ViewScrollBarsAction();
01851     else if ((WhichOp->Token) == String(OPTOKEN_VIEWRULERS))
01852         ViewRulersAction();
01853 
01854     End();
01855 }                 

OpState ViewOps::GetState String_256 UIDescription,
OpDescriptor WhichOp
[static]
 

Find the state of the ViewOps 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 1874 of file menuops.cpp.

01875 {
01876     if ((WhichOp->Token) ==  String(OPTOKEN_VIEWTOOLBAR))
01877         return ViewToolBarState();
01878     else if ((WhichOp->Token) == String(OPTOKEN_VIEWSTATUSBAR))
01879         return ViewStatusBarState();
01880     else if ((WhichOp->Token) == String(OPTOKEN_VIEWCOLOURBAR))
01881         return ViewColourBarState();
01882     else if ((WhichOp->Token) == String(OPTOKEN_VIEWFULLSCREEN))
01883         return ViewFullScreenState();
01884     else if ((WhichOp->Token) == String(OPTOKEN_VIEWSCROLLBARS))
01885         return ViewScrollBarsState();
01886     else if ((WhichOp->Token) == String(OPTOKEN_VIEWRULERS))
01887         return ViewRulersState();
01888 
01889     return OpState(FALSE, FALSE);
01890 }                                    

BOOL ViewOps::Init void   )  [static]
 

Create OpDescriptors for the each file operation.

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

Errors: -

See also:
-

Reimplemented from SimpleCCObject.

Definition at line 1908 of file menuops.cpp.

01909 {
01910     /*OpDescriptor* ToolOp = new OpDescriptor(
01911                                             0, 
01912                                             _R(IDS_VIEW_TOOLBAR),
01913                                             CC_RUNTIME_CLASS(ViewOps), 
01914                                             OPTOKEN_VIEWTOOLBAR,
01915                                             ViewOps::GetState,
01916                                             HID_VIEW_TOOLBAR,
01917                                             _R(IDBBL_VIEWTOOLBAROP),
01918                                             0 );
01919 
01920     ERRORIF(!ToolOp, _R(IDE_NOMORE_MEMORY), FALSE);*/
01921 
01922     REGOP(VIEW,STATUSBAR,ViewOps)
01923     OpDescriptor* ColourOp = new OpDescriptor(
01924                                                 0, 
01925                                                 _R(IDS_VIEW_COLOURBAR),
01926                                                 CC_RUNTIME_CLASS(ViewOps), 
01927                                                 OPTOKEN_VIEWCOLOURBAR,
01928                                                 ViewOps::GetState,
01929                                                 0,
01930                                                 0,
01931                                                 0,
01932                                                 0,
01933                                                 TRUE,
01934                                                 FALSE,              // Smart
01935                                                 TRUE,               // Clean
01936                                                 0,                  // OneOpenInstID
01937                                                 0,                  // AutoStateFlags
01938                                                 TRUE                // fCheckable
01939                                                 );
01940 
01941     ERRORIF(!ColourOp, _R(IDE_NOMORE_MEMORY), FALSE);
01942 
01943 /*
01944     OpDescriptor* FullScreenOp = new OpDescriptor(
01945                                                 0, 
01946                                                 _R(IDS_VIEW_FULLSCREEN),
01947                                                 CC_RUNTIME_CLASS(ViewOps), 
01948                                                 OPTOKEN_VIEWFULLSCREEN,
01949                                                 ViewOps::GetState,
01950                                                 0,
01951                                                 0,
01952                                                 0,0,TRUE  );
01953 */
01954 PORTNOTETRACE("other","ViewOps::Init - do nothing");
01955 #ifndef EXCLUDE_FROM_XARALX
01956     BOOL FullScreenOp = RegisterOpDescriptor(
01957                                                 0,
01958                                                 _R(IDS_VIEW_FULLSCREEN),
01959                                                 CC_RUNTIME_CLASS(ViewOps),
01960                                                 OPTOKEN_VIEWFULLSCREEN,
01961                                                 ViewOps::GetState,
01962                                                 HID_VIEW_FULLSCREEN,
01963                                                 _R(IDBBL_VIEWFULLSCREENOP),
01964                                                 _R(IDD_BARCONTROLSTORE),
01965                                                 _R(IDC_BTN_VIEWFULLSCREEN),
01966                                                 SYSTEMBAR_VIEW,
01967                                                 TRUE
01968                                               );
01969 
01970 //      REGOP(VIEW,FULLSCREEN,ViewOps)
01971     ERRORIF(!FullScreenOp, _R(IDE_NOMORE_MEMORY), FALSE);
01972 #endif
01973 
01974     OpDescriptor* ScrollBarsOp = new OpDescriptor(
01975                                                 0, 
01976                                                 _R(IDS_VIEW_SCROLLBARS),
01977                                                 CC_RUNTIME_CLASS(ViewOps), 
01978                                                 OPTOKEN_VIEWSCROLLBARS,
01979                                                 ViewOps::GetState,
01980                                                 0,
01981                                                 0,
01982                                                 0,
01983                                                 0,
01984                                                 TRUE,
01985                                                 FALSE,              // Smart
01986                                                 TRUE,               // Clean
01987                                                 0,                  // OneOpenInstID
01988                                                 0,                  // AutoStateFlags
01989                                                 TRUE                // fCheckable
01990                                                 );
01991 
01992     ERRORIF(!ScrollBarsOp, _R(IDE_NOMORE_MEMORY), FALSE);
01993 
01994     
01995     OpDescriptor* RulerOp = new OpDescriptor(
01996                                                 0, 
01997                                                 _R(IDS_VIEW_RULERS),
01998                                                 CC_RUNTIME_CLASS(ViewOps), 
01999                                                 OPTOKEN_VIEWRULERS,
02000                                                 ViewOps::GetState,
02001                                                 0,
02002                                                 _R(IDBBL_PAGERULERS),
02003                                                 _R(IDD_BARCONTROLSTORE),
02004                                                 _R(IDC_PAGERULERS),
02005                                                 TRUE,               // ReceiveMessages
02006                                                 FALSE,              // Smart
02007                                                 TRUE,               // Clean
02008                                                 0,                  // OneOpenInstID
02009                                                 0,                  // AutoStateFlags
02010                                                 TRUE                // fCheckable
02011                                                 );
02012 
02013     ERRORIF(!RulerOp, _R(IDE_NOMORE_MEMORY), FALSE);
02014     //REGOP(VIEW,COLOURBAR,ViewOps)
02015     return TRUE;
02016 }

static BOOL ViewOps::IsFullScreenPending  )  [inline, static]
 

Definition at line 552 of file menuops.h.

00552 {return DoFullScreen;};

BOOL ViewOps::OnIdleEvent void   )  [virtual]
 

Delays going into full screen mode until we are out of the broadcast loop makes BarOp deletion safe.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/6/95
Parameters:
- [INPUTS]
Returns:
FALSE if it's OK to call low-priority idles (i.e. if I'm not busy this turn)

Reimplemented from Operation.

Definition at line 1778 of file menuops.cpp.

01779 {
01780     if(DoFullScreen)
01781     {
01782         Progress::Start(FALSE);         // Start an hourglass with no delay
01783 
01784 PORTNOTE("other","Removed ViewFullScreenAction usage")
01785 #ifndef EXCLUDE_FROM_XARALX
01786         ViewFullScreenAction(); 
01787 #endif
01788             // Deregister for idles, because we should not be getting them now
01789         GetApplication()->RemoveIdleProcessor(IDLEPRIORITY_HIGH, this);
01790 
01791         End();
01792         DoFullScreen = FALSE;
01793         
01794 #ifndef STANDALONE
01795 PORTNOTE("other","Removed ToolbarDlg usage")
01796 #ifndef EXCLUDE_FROM_XARALX
01797         // no ToolbarDlg on standalone versions
01798         ToolbarDlg * pToolbarDlg = ToolbarDlg::GetToolbarDlg();
01799         if(pToolbarDlg)
01800             pToolbarDlg->ShowToolbarList();
01801 #endif
01802 #endif          
01803         Progress::Stop();                       // Stop the hourglass again
01804     }
01805     return(FALSE);          // And let the low-priority idle handlers do their stuff
01806 }


Member Data Documentation

BOOL ViewOps::DoFullScreen = FALSE [static]
 

Definition at line 551 of file menuops.h.


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