menucmds.cpp File Reference

(r1785/r1739)

#include "camtypes.h"
#include <wx/mediactrl.h>
#include "menucmds.h"
#include "camelot.h"
#include "camframe.h"
#include "camdoc.h"
#include "printing.h"
#include "helpuser.h"
#include "menuops.h"
#include "camview.h"
#include "product.h"
#include "fileutil.h"
#include "sgliboil.h"
#include "rechblnd.h"
#include "filedlgs.h"
#include "tmplmngr.h"

Go to the source code of this file.

Defines

#define THIRTY_TWO   32

Functions

 DECLARE_SOURCE ("$Revision: 1739 $")
void ExitAction ()
 Performs Exit application menu function.
void FileNewAction ()
 Performs New File menu function on the File menu.
void FileNewAnimationAction ()
 Opens the animation template.
void FileNewTemplateAction (INT32 iNumberOfTemplate)
 Opens the specified template.
void FileOpenAction ()
 Performs File Open menu function on the File menu.
void FileCloseAction ()
 Performs File Close menu function on the File menu.
void FileSaveAction ()
 Performs File Save menu function on the File menu.
void FileSaveAsAction ()
 Performs File SaveAs menu function on the File menu.
void FileSaveAllAction ()
 Performs the File Save All Action in a Kernel / oil compliant way.
void PrintSetupAction ()
 Performs Printer Setup menu function on the File menu.
void PrintAction ()
 Stop MFC menu items from doing things that don't work (e.g. Print). For now calls the Print operation (which ENSURE's).
void PrintPreviewAction ()
 Performs File Print Preview menu function on the File menu.
void WindowNewAction ()
 Performs New Window menu function on the Window menu.
void WindowArrangeAction ()
 Performs Window menu function Arrange.
void WindowCascadeAction ()
 Performs Window menu function Cascade.
void WindowTileHorzAction ()
 Performs Window menu function Tile Horizontal.
void WindowTileVertAction ()
 Performs Window menu function Tile Verticle.
void WindowNextDcocument (bool fForward)
 Performs Window menu function switch next document.
OpState WindowCmdState ()
 Updates the state of the window menu options.
void HelpIndexAction ()
 Performs Help Index menu function on the Help menu.
void HelpUsingAction ()
 Performs Help Using menu function on the Help menu.
void HelpToolsAction ()
void HelpGalleriesAction ()
static void StartMovie (const wxString &strFile)
void HelpDemosAction ()
void HelpPlayerAction ()
void HelpTechSupportAction ()
void ViewToolBarAction ()
 Performs View menu function to update ToolBar.
void ViewStatusBarAction ()
 Performs View menu function to update StatusBar.
void ViewRulersAction ()
 Performs View menu function to update Rulers.
OpState ViewToolBarState ()
 Updates the state of the ToolBar menu option.
OpState ViewStatusBarState ()
 Updates the state of the ToolBar menu option.
OpState ViewColourBarState ()
 Updates the state of the ColourBar menu option.
OpState ViewRulersState ()
 Updates the state of the Rulers menu option.
OpState ViewFullScreenState ()
 Updates the state of the FullScreen menu option.
OpState ViewScrollBarsState ()
 Updates the state of the ScrollBars menu option.
void ViewColourBarAction ()
 Performs View menu function to update Colour Bar.
void ViewScrollBarsAction ()
 Performs View menu function to update Scroll Bars.
void ViewFullScreenAction ()
 Performs View menu function to Toggle Full Screen mode. Full Screen Mode is a bit misleading.. this function actually toggles mode by writing/loading either clean.con or normal.con files - all bars except the infobar are destroyed and recreated in there new state after the load.The Infobar is a special case this is just moved after the load.
void HelpXaraForumAction ()
 Provides access from a help menu to XaraX's Forum Page (e.g. Talkgraphics) Errors If the browser could not be opened, an Error message box is diplayed. See Also -.
void HelpWebsterHomePage ()
 Provides access from a help menu to Webster's Home Page. Errors If the browser could not be opened, an Error message box is diplayed. See Also -.
void HelpXaraHomePage ()
 Provides access from a help menu to Xara's HomePage Page. Errors If the browser could not be opened, an Error message box is diplayed. See Also -.
BOOL IsCDROMOn ()
 To discover whether the installed version of Webster is a CD or DownLoad version. Errors - See Also -.
void WebsterDemos ()
 Provides access from a help menu to Webster's Movies Demos Page. Errors If the browser could not be opened, an Error message box is diplayed. See Also -.
void WebsterHelpPages ()
 Provides access from a help menu to Webster's Help Pages Errors If the browser could not be opened, an Error message box is diplayed. See Also -.
void HelpXaraPurchasePage ()
 Provides access from a help menu to Xara's Purchase Page. Errors If the browser could not be opened, an Error message box is diplayed. See Also -.
BOOL InvokeWeblink (const String_256 &command)
 Allows a command to be sent to Weblink. This enables the default browser to be fired up to display the specified URL or file. If there is a browser open then this will be used instead rather than firing up a new instance. Errors If the command had a problem, an Error message box is diplayed. See Also -.
void SetWebsterReg (BOOL pcData)
 To set the registry flag for Webster. i.e. Is the Help to be obtained from the CD or from the Net. Errors See Also -.


Define Documentation

#define THIRTY_TWO   32
 

Definition at line 142 of file menucmds.cpp.


Function Documentation

DECLARE_SOURCE "$Revision: 1739 $"   ) 
 

menucmds.cpp - This module provides a set of menu command functions which are called from OIL Menu Module when an appropriate menu item is selected.

void ExitAction  ) 
 

Performs Exit application menu function.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

State()

Definition at line 168 of file menucmds.cpp.

00169 {               
00170     AfxGetApp().OnAppExit();
00171 }

void FileCloseAction  ) 
 

Performs File Close menu function on the File menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 339 of file menucmds.cpp.

00340 {               
00341     // CGS:  we need to clear out all intermediate blend steps ....
00342     // NOTE:  this clears out all 'built-up' intermediate data
00343     // it clears out the becomea stuff
00344 
00345     NodeGroup::KillAllBlendBecomeAConsLists ();
00346 
00347     // CGS:  these pointers MUST be reset! ....
00348         
00349     BlendRecordHandler::SetLastInsertedNodeBlender (NULL);
00350     BlendRecordHandler::SetLastInsertedNodeBlend (NULL);
00351     BlendRecordHandler::SetLastInsertedNodeBlendPath (NULL);
00352     
00353     // OnFileClose needs an event, but doesn't use it
00354     wxCommandEvent      event;
00355     AfxGetApp().GetDocumentManager()->OnFileClose( event );
00356 }

void FileNewAction  ) 
 

Performs New File menu function on the File menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 197 of file menucmds.cpp.

00198 {               
00199     //First tell the document system that the next template to use is the
00200     //default animation template
00201     CCamDoc::SetNextTemplateToUse( CTemplateManager::GetDefaultDrawingTemplate() );
00202 
00203     // OnFileOpen needs an event, but doesn't use it
00204     wxCommandEvent event;
00205     AfxGetApp().GetDocumentManager()->OnFileNew( event );
00206 
00207     CCamDoc::EnableRemoveUntouchedDocs();       // Next idle event will try ro get rid of 
00208                                                 // the auto-created startup document
00209 }

void FileNewAnimationAction  ) 
 

Opens the animation template.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/10/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
MenuCmds

Definition at line 226 of file menucmds.cpp.

00227 {               
00228     //First tell the document system that the next template to use is the
00229     //default animation template
00230     CCamDoc::SetNextTemplateToUse( CTemplateManager::GetDefaultAnimationTemplate() );
00231 
00232 PORTNOTETRACE("other", "FileNewAnimationAction does nothing");
00233 #if !defined(EXCLUDE_FROM_XARALX)
00234     AfxGetApp().OnFileNew();
00235 #endif
00236 
00237     CCamDoc::EnableRemoveUntouchedDocs();       // Next idle event will try ro get rid of 
00238                                                 // the auto-created startup document
00239 }

void FileNewTemplateAction INT32  iNumberOfTemplate  ) 
 

Opens the specified template.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/10/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
MenuCmds

Definition at line 256 of file menucmds.cpp.

00257 {               
00258     //First find the default template path
00259     CTemplateManager&   TemplateManager = GetApplication()->GetTemplateManager();
00260     String_256          strPathOfFile;
00261     if( !TemplateManager.GetTemplateFilename( iNumberOfTemplate, &strPathOfFile ) )
00262         return;
00263 
00264     TRACEUSER( "jlh92", _T("Opening %s\n"), PCTSTR(strPathOfFile) );
00265 
00266     CCamDoc::SetNextTemplateToUse( strPathOfFile );
00267 
00268     // OnFileOpen needs an event, but doesn't use it
00269     wxCommandEvent event;
00270     AfxGetApp().GetDocumentManager()->OnFileNew( event );
00271 
00272     CCamDoc::EnableRemoveUntouchedDocs();       // Next idle event will try ro get rid of 
00273                                                 // the auto-created startup document
00274 }

void FileOpenAction  ) 
 

Performs File Open menu function on the File menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 301 of file menucmds.cpp.

00302 {
00303     // OnFileOpen needs an event, but doesn't use it
00304     wxCommandEvent      event;
00305 //  AfxGetApp().GetDocumentManager()->SetLastDirectory(BaseFileDialog::DefaultOpenFilePath);
00306 //  AfxGetApp().GetDocumentManager()->OnFileOpen( event );
00307     AfxGetApp().OnFileOpen();
00308     CCamDoc::EnableRemoveUntouchedDocs();       // Next idle event will try ro get rid of 
00309                                                 // the auto-created startup document
00310 }

void FileSaveAction  ) 
 

Performs File Save menu function on the File menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 385 of file menucmds.cpp.

00386 {               
00387     wxCommandEvent      event;
00388 //  AfxGetApp().GetDocumentManager()->SetLastDirectory(BaseFileDialog::DefaultSaveFilePath);
00389     AfxGetApp().GetDocumentManager()->OnFileSave( event );
00390 }

void FileSaveAllAction  ) 
 

Performs the File Save All Action in a Kernel / oil compliant way.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/7/95

Definition at line 446 of file menucmds.cpp.

00447 {
00448     // We do not want to call our version of this function as for some reason
00449     // it also shuts down the dialog manager...
00450 PORTNOTETRACE("other", "FileSaveAllAction does nothing");
00451 #if !defined(EXCLUDE_FROM_XARALX)
00452     ((CCamApp*)AfxGetApp())->RealSaveAll();
00453 #endif
00454 }

void FileSaveAsAction  ) 
 

Performs File SaveAs menu function on the File menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 419 of file menucmds.cpp.

00420 {               
00421 //  AfxGetApp().GetDocumentManager()->SetLastDirectory(BaseFileDialog::DefaultSaveFilePath);
00422 
00423     // Don't call wxDocManager::OnFileSaveAs because that calls wxDocument non-virtual functions
00424     // We need to ensure our pointer is cast to a CCamDoc*
00425     // Note also that GetCurrentDocument doesn't mean "Current" in the way that the Kernel defines it!!!
00426     //  (It means "Active"...)
00427 //  wxCommandEvent      event;
00428 //  AfxGetApp().GetDocumentManager()->OnFileSaveAs( event );
00429 
00430     wxDocument* pDoc = AfxGetApp().GetDocumentManager()->GetCurrentDocument();
00431     if (pDoc && pDoc->IsKindOf(CLASSINFO(CCamDoc)))
00432         ((CCamDoc*)pDoc)->SaveAs();
00433 }

void HelpDemosAction  ) 
 

Definition at line 859 of file menucmds.cpp.

00860 {
00861     StartMovie( _T("Part_1_master_inc_audio_smaller_q35_fr15_hi.ogm") );
00862 
00863 //  HelpOnlineDemos();
00864 }

void HelpGalleriesAction  ) 
 

Definition at line 821 of file menucmds.cpp.

00822 {
00823     HelpUsingGalleries();
00824 }

void HelpIndexAction  ) 
 

Performs Help Index menu function on the Help menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 770 of file menucmds.cpp.

00771 {
00772     AfxGetApp().OnHelpIndex();
00773 }

void HelpPlayerAction  ) 
 

Definition at line 866 of file menucmds.cpp.

00867 {
00868     CCamApp::SelectMediaApp();
00869 }

void HelpTechSupportAction  ) 
 

Definition at line 871 of file menucmds.cpp.

00872 {
00873     HelpTechnicalSupport();
00874 }

void HelpToolsAction  ) 
 

Definition at line 814 of file menucmds.cpp.

00815 {               
00816     HelpUsingTools();
00817 }

void HelpUsingAction  ) 
 

Performs Help Using menu function on the Help menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 800 of file menucmds.cpp.

00801 {               
00802 PORTNOTETRACE("other", "HelpUsingAction does nothing");
00803 #if !defined(EXCLUDE_FROM_XARALX)
00804 #if (_MFC_VER >= 0x250)
00805     GetMainFrame()->OnHelpUsing();
00806 #else
00807     ((CCamApp*) AfxGetApp())->OnHelpUsing();
00808 #endif
00809 #endif
00810 }

void HelpWebsterHomePage  ) 
 

Provides access from a help menu to Webster's Home Page. Errors If the browser could not be opened, an Error message box is diplayed. See Also -.

void HelpWebsterHomePage()

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/01/97
Parameters:
- [INPUTS]
- [OUTPUTS] Returns -

Definition at line 1372 of file menucmds.cpp.

01373 {
01374     wxString strURL = CamResource::GetText(_R(IDS_URL_PRODUCT));
01375     CCamApp::LaunchWebBrowser(strURL);
01376 }

void HelpXaraForumAction  ) 
 

Provides access from a help menu to XaraX's Forum Page (e.g. Talkgraphics) Errors If the browser could not be opened, an Error message box is diplayed. See Also -.

void HelpXaraForumAction()

Author:
Alex
Date:
19/02/2004
Parameters:
- [INPUTS]
- [OUTPUTS] Returns -

Definition at line 1351 of file menucmds.cpp.

01352 {
01353     wxString strURL = CamResource::GetText(_R(IDS_URL_FORUM));
01354     CCamApp::LaunchWebBrowser(strURL);
01355 }

void HelpXaraHomePage  ) 
 

Provides access from a help menu to Xara's HomePage Page. Errors If the browser could not be opened, an Error message box is diplayed. See Also -.

void HelpXaraHomePage()

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/01/97
Parameters:
- [INPUTS]
- [OUTPUTS] Returns -

Definition at line 1390 of file menucmds.cpp.

01391 {
01392     wxString strURL = CamResource::GetText(_R(IDS_URL_XARASITE));
01393     CCamApp::LaunchWebBrowser(strURL);
01394 }

void HelpXaraPurchasePage  ) 
 

Provides access from a help menu to Xara's Purchase Page. Errors If the browser could not be opened, an Error message box is diplayed. See Also -.

void HelpXaraPurchasePage()

Author:
Priestley (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/09/2000
Parameters:
- [INPUTS]
- [OUTPUTS] Returns -

Definition at line 1498 of file menucmds.cpp.

01499 {
01500     wxString strURL = CamResource::GetText(_R(IDS_URL_PURCHASE));
01501     CCamApp::LaunchWebBrowser(strURL);
01502 }

BOOL InvokeWeblink const String_256 command  ) 
 

Allows a command to be sent to Weblink. This enables the default browser to be fired up to display the specified URL or file. If there is a browser open then this will be used instead rather than firing up a new instance. Errors If the command had a problem, an Error message box is diplayed. See Also -.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com> from Ranbir code
Date:
16/09/97
Parameters:
- [INPUTS] Returns True if worked ok, False otherwise

Definition at line 1521 of file menucmds.cpp.

01522 {
01523     CCamApp::LaunchWebBrowser(command);
01524     return TRUE;
01525 }

BOOL IsCDROMOn  ) 
 

To discover whether the installed version of Webster is a CD or DownLoad version. Errors - See Also -.

BOOL IsCDROMOn()

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/01/97
Parameters:
- [INPUTS]
- [OUTPUTS] Returns True if this is a CD version of Webster, FALSE if it is a download version.

Definition at line 1411 of file menucmds.cpp.

01412 {
01413 PORTNOTETRACE("other","IsCDROMOn - do nothing");
01414 #if !defined(EXCLUDE_FROM_XARALX)
01415     BOOL bSetting;
01416     HKEY arhKeys[3];
01417     DWORD dwBoolSize = sizeof(BOOL);
01418     DWORD dwDisposition;
01419 
01420     BOOL bResult =  ((RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_ALL_ACCESS, &arhKeys[0]) == ERROR_SUCCESS) &&
01421 
01422     (RegCreateKeyEx(arhKeys[0], PRODUCT_MANUFACTURER,  0, NULL, REG_OPTION_NON_VOLATILE,  KEY_ALL_ACCESS, NULL, &arhKeys[1], &dwDisposition) == ERROR_SUCCESS) &&
01423 
01424     (RegCreateKeyEx(arhKeys[1], PRODUCT_WEBLINKNAME,  0, NULL, REG_OPTION_NON_VOLATILE,  KEY_ALL_ACCESS, NULL, &arhKeys[2], &dwDisposition) == ERROR_SUCCESS) &&
01425 
01426     (RegQueryValueEx(arhKeys[2],    "Search CDROM", NULL, NULL,  (LPBYTE) &bSetting,    &dwBoolSize) == ERROR_SUCCESS));
01427 
01428 //  ERROR2IF(!bResult, "Registry read error");
01429 
01430     // If We failed to read from the registry, Untick the Menu item.
01431     if(!bResult)
01432         bSetting = bResult;
01433 
01434     for (INT32 i = 2; i >= 0; i--) 
01435           RegCloseKey(arhKeys[i]);
01436 
01437     return bSetting;
01438 #else
01439     return FALSE;
01440 #endif
01441 }

void PrintAction  ) 
 

Stop MFC menu items from doing things that don't work (e.g. Print). For now calls the Print operation (which ENSURE's).

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/7/93
Parameters:
None [INPUTS]
void for handled or not [OUTPUTS]
Returns:
None

Errors: None

Definition at line 512 of file menucmds.cpp.

00513 {               
00514 #if !defined(STANDALONE)
00515     wxView * pView = AfxGetApp().GetDocumentManager()->GetCurrentView();
00516     if (pView && pView->IsKindOf(CLASSINFO(CCamView)))
00517         ((CCamView*)pView)->OnFilePrint();
00518 
00519 #endif
00520 }

void PrintPreviewAction  ) 
 

Performs File Print Preview menu function on the File menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 549 of file menucmds.cpp.

00550 {               
00551     wxView * pView = AfxGetApp().GetDocumentManager()->GetCurrentView();
00552     if (pView && pView->IsKindOf(CLASSINFO(CCamView)))
00553         ((CCamView*)pView)->OnFilePrintPreview();
00554 }

void PrintSetupAction  ) 
 

Performs Printer Setup menu function on the File menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 481 of file menucmds.cpp.

00482 {               
00483     AfxGetApp().OnFilePrintSetup();
00484 }

void SetWebsterReg BOOL  pcData  ) 
 

To set the registry flag for Webster. i.e. Is the Help to be obtained from the CD or from the Net. Errors See Also -.

void SetWebsterReg(BOOL pcData)

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/01/97
Parameters:
pcdata - To set the state of the Flag [INPUTS]
- [OUTPUTS] Returns -

Definition at line 1543 of file menucmds.cpp.

01544 {
01545 PORTNOTETRACE("other","SetWebsterReg - do nothing");
01546 #ifndef EXCLUDE_FROM_XARALX
01547     HKEY arhKeys[3];
01548     DWORD dwBoolSize = sizeof(BOOL);
01549     DWORD dwDisposition;
01550 
01551         BOOL bResult = ((RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_ALL_ACCESS, &arhKeys[0]) == ERROR_SUCCESS) &&
01552 
01553         (RegCreateKeyEx(arhKeys[0], PRODUCT_MANUFACTURER,  0, NULL, REG_OPTION_NON_VOLATILE,  KEY_ALL_ACCESS, NULL, &arhKeys[1], &dwDisposition) == ERROR_SUCCESS) &&
01554 
01555         (RegCreateKeyEx(arhKeys[1], PRODUCT_WEBLINKNAME,  0, NULL, REG_OPTION_NON_VOLATILE,  KEY_ALL_ACCESS, NULL, &arhKeys[2], &dwDisposition) == ERROR_SUCCESS) &&
01556 
01557         (RegSetValueEx (arhKeys[2], "Search CDROM", NULL, REG_DWORD,  (LPBYTE) &pcData, dwBoolSize) == ERROR_SUCCESS));
01558 
01559     for (INT32 i = 2; i >= 0; i--) 
01560           RegCloseKey(arhKeys[i]);
01561 #endif
01562 }

static void StartMovie const wxString &  strFile  )  [static]
 

Definition at line 826 of file menucmds.cpp.

00827 {
00828     wxString            strDataPath( (wxChar*)CCamApp::GetResourceDirectory() );
00829     if( !wxDir::Exists( strDataPath ) )
00830     {
00831 #if defined(_DEBUG)
00832         // We'll try default location under debug to make life easier
00833         strDataPath = _T("/usr/share");
00834 #endif
00835     }
00836 
00837     wxString            strVideoPath( strDataPath );
00838     strVideoPath += _("/video");
00839 
00840     wxString            strCommand; // ( _T("mplayer -slave \"") );
00841     strCommand += strVideoPath + _T("/") + strFile + _T("\"");  
00842 
00843 #if true
00844     CCamApp::LaunchMediaApp( strCommand );
00845 #else
00846     long /*TYPENOTE: CORRECT*/ lResult = wxExecute( strCommand, wxEXEC_SYNC, NULL );
00847     if( 255 == lResult )
00848     {
00849         strCommand = strDataPath + _T("/xaralx/bin/mplayer -slave \"");
00850         strCommand += strVideoPath + _T("/") + strFile + _T("\"");
00851 
00852         lResult = wxExecute( strCommand, wxEXEC_SYNC, NULL );
00853         if( 255 == lResult )
00854             InformWarning( _R(IDS_MPLAYER_MISSING), _R(IDS_OK) );
00855     }
00856 #endif
00857 }

void ViewColourBarAction  ) 
 

Performs View menu function to update Colour Bar.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 1192 of file menucmds.cpp.

01193 {
01194 PORTNOTETRACE("other", "ViewColourBarAction does nothing");
01195 #if !defined(EXCLUDE_FROM_XARALX)
01196     GetMainFrame()->ShowColourBar(!GetMainFrame()->IsColourBarVisible());
01197 #endif  
01198 }

OpState ViewColourBarState  ) 
 

Updates the state of the ColourBar menu option.

Author:
Chris_Parks (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/10/94
Parameters:
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 1067 of file menucmds.cpp.

01068 {
01069 PORTNOTETRACE("other", "ViewColourBarState does nothing");
01070 #if !defined(EXCLUDE_FROM_XARALX)
01071     if(GetMainFrame()->IsColourBarVisible())
01072 #endif
01073         return OpState( TRUE, FALSE );              // not ticked, not greyed
01074 #if !defined(EXCLUDE_FROM_XARALX)
01075     else
01076         return OpState( FALSE, FALSE );                 // ticked, not greyed
01077 #endif  
01078 }

void ViewFullScreenAction  ) 
 

Performs View menu function to Toggle Full Screen mode. Full Screen Mode is a bit misleading.. this function actually toggles mode by writing/loading either clean.con or normal.con files - all bars except the infobar are destroyed and recreated in there new state after the load.The Infobar is a special case this is just moved after the load.

Author:
Chris_Parks (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/10/94
Parameters:
None [INPUTS]
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

Definition at line 1255 of file menucmds.cpp.

01256 {
01257 PORTNOTETRACE("other", "ViewFullScreenAction does nothing");
01258 #if !defined(EXCLUDE_FROM_XARALX)
01259     BOOL NoError = TRUE;
01260     // lock the window to avoid untidy layout recalcs
01261     ::LockWindowUpdate(GetMainFrame()->GetSafeHwnd());
01262     
01263     // tell the mainframe we are changing modes - this prevents
01264     // some unnecessary work
01265     GetMainFrame()->SetChangingMode(TRUE);
01266 
01267     // save current bars setup in clean/normal ini file
01268     if(GetMainFrame()->IsFullScreenMode())
01269         NoError = DialogBarOp::WriteNamedBars("clean");
01270     else
01271         NoError = DialogBarOp::WriteNamedBars("normal");
01272 
01273     if(!NoError)
01274         InformError();
01275     // kill all bars ( except infobar at the mo..)
01276     BROADCAST_TO_CLASS(DialogMsg(NULL, DIM_BAR_DEATH, NULL ),DialogBarOp);
01277     
01278     // hide the info bar
01279     InformationBarOp::SetVisibility(FALSE,TRUE);
01280     
01281     // load clean/normal bars ini file
01282     if(GetMainFrame()->IsFullScreenMode())
01283         DialogBarOp::LoadNamedBars("normal");
01284     else
01285         DialogBarOp::LoadNamedBars("clean");
01286     
01287     // force the info bar to the correct visible state
01288     InformationBarOp::SetVisibility(InformationBarOp::IsVisible(),TRUE);
01289     
01290     // All clear to Mainframe
01291     GetMainFrame()->SetChangingMode(FALSE);
01292     
01293     // Make sure everything is positioned correctly
01294     GetMainFrame()->RecalcLayout();
01295     GetMainFrame()->RelocateToolbar ();
01296     
01297     // and unlock and show the window
01298     ::LockWindowUpdate(NULL);
01299 
01300     // Update all button controls that invoke this Op
01301     OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_VIEWFULLSCREEN);
01302     if (pOpDesc!=NULL)
01303     {
01304         // Found the opdescriptor. Now find all the gadgets associated with it
01305         List Gadgets;
01306         if (pOpDesc->BuildGadgetList(&Gadgets))
01307         {
01308             // Found some. Set the controls accordingly
01309             GadgetListItem* pGadgetItem = (GadgetListItem*) Gadgets.GetHead();
01310 
01311             while (pGadgetItem != NULL)
01312             {
01313                 // Set the gadget
01314                 pGadgetItem->pDialogBarOp->SetBoolGadgetSelected(pGadgetItem->gidGadgetID,
01315                                                                     GetMainFrame()->IsFullScreenMode());
01316                 // Find the next gadget
01317                 pGadgetItem = (GadgetListItem*) Gadgets.GetNext(pGadgetItem);
01318             }
01319     
01320             // Clean out the list
01321             Gadgets.DeleteAll();
01322         }
01323     }
01324 #endif
01325 }

OpState ViewFullScreenState  ) 
 

Updates the state of the FullScreen menu option.

Author:
Chris_Parks (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/10/94
Parameters:
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 1126 of file menucmds.cpp.

01127 {           
01128 PORTNOTETRACE("other", "ViewFullScreenState does nothing");
01129 #if !defined(EXCLUDE_FROM_XARALX)
01130     if(GetMainFrame()->IsFullScreenMode())
01131 #endif
01132         return OpState( TRUE, FALSE );              // not ticked, not greyed
01133 #if !defined(EXCLUDE_FROM_XARALX)
01134     else
01135         return OpState( FALSE, FALSE );                 // ticked, not greyed
01136 #endif  
01137 }

void ViewRulersAction  ) 
 

Performs View menu function to update Rulers.

Author:
Chris_Parks (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/7/93
Parameters:
None [INPUTS]
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 978 of file menucmds.cpp.

00979 {
00980     // Get the currently selected view pointer. (can be NULL if no documents!)
00981     DocView *pView = DocView::GetSelected();
00982     
00983     if (pView)
00984     {
00985         BOOL NewState = ! pView->AreRulersVisible();
00986         pView->ShowViewRulers(NewState);
00987         CCamView::SetDefaultRulersState(NewState);
00988     }
00989 }

OpState ViewRulersState  ) 
 

Updates the state of the Rulers menu option.

Author:
Chris_Parks (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/10/94
Parameters:
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 1096 of file menucmds.cpp.

01097 {
01098     // Get the currently selected view pointer. (can be NULL if no documents!)
01099     DocView *pView = DocView::GetSelected();
01100     if (pView == NULL)
01101         return OpState( FALSE, TRUE );              // not ticked, greyed;
01102 
01103     if(pView->AreRulersVisible())
01104          return OpState( TRUE, FALSE );             // ticked, not greyed
01105     else
01106         return OpState( FALSE, FALSE );             // not ticked, not greyed
01107     
01108 }

void ViewScrollBarsAction  ) 
 

Performs View menu function to update Scroll Bars.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 1217 of file menucmds.cpp.

01218 {
01219 PORTNOTETRACE("other", "ViewScrollBarsAction does nothing");
01220 #if !defined(EXCLUDE_FROM_XARALX)
01221     // Get the currently selected view pointer. (can be NULL if no documents!)
01222     DocView *pView = DocView::GetSelected();
01223     if (pView)
01224     {
01225         BOOL NewState = ! pView->AreScrollersVisible();
01226         pView->ShowViewScrollers(NewState);
01227         ScreenCamView::SetDefaultScrollersState(NewState);
01228     }
01229 
01230     // OLD Global version           
01231     //  GetMainFrame()->ShowScrollBars(!GetMainFrame()->AreScrollBarsVisible());
01232 #endif
01233 }

OpState ViewScrollBarsState  ) 
 

Updates the state of the ScrollBars menu option.

Author:
Chris_Parks (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/10/94
Parameters:
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 1155 of file menucmds.cpp.

01156 {           
01157     // Get the currently selected view pointer. (can be NULL if no documents!)
01158     DocView *pView = DocView::GetSelected();
01159     if (pView == NULL)
01160         return OpState( FALSE, TRUE );              // not ticked, greyed;
01161 
01162     if(pView->AreScrollersVisible())
01163          return OpState( TRUE, FALSE );             // ticked, not greyed
01164     else
01165         return OpState( FALSE, FALSE );             // not ticked, not greyed
01166     
01167     /* OLD Global version
01168     if(GetMainFrame()->AreScrollBarsVisible())
01169          return OpState( TRUE, FALSE );             // not ticked, not greyed
01170     else  
01171         return OpState( FALSE, FALSE );                 // ticked, not greyed
01172     */
01173 }

void ViewStatusBarAction  ) 
 

Performs View menu function to update StatusBar.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 953 of file menucmds.cpp.

00954 {
00955 PORTNOTETRACE("other", "ViewStatusBarAction does nothing");
00956 #if !defined(EXCLUDE_FROM_XARALX)
00957     GetMainFrame()->ShowStatusBar(!GetMainFrame()->IsStatusBarVisible());
00958 #endif
00959 }

OpState ViewStatusBarState  ) 
 

Updates the state of the ToolBar menu option.

Author:
Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/7/93
Parameters:
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 1038 of file menucmds.cpp.

01039 {
01040 PORTNOTETRACE("other", "ViewStatusBarState does nothing");
01041 #if !defined(EXCLUDE_FROM_XARALX)
01042     if(GetMainFrame()->IsStatusBarVisible())
01043 #endif
01044         return OpState( TRUE, FALSE );              // not ticked, not greyed
01045 #if !defined(EXCLUDE_FROM_XARALX)
01046     else  
01047         return OpState( FALSE, FALSE );                 // ticked, not greyed
01048 #endif
01049 }

void ViewToolBarAction  ) 
 

Performs View menu function to update ToolBar.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 921 of file menucmds.cpp.

00922 {
00923 PORTNOTETRACE("other", "ViewToolBarAction does nothing");
00924 #if !defined(EXCLUDE_FROM_XARALX)
00925     ((CMainFrame*)((AfxGetApp())->m_pMainWnd))->OnBarCheck(_R(ID_VIEW_TOOLBAR));
00926 #endif
00927 }

OpState ViewToolBarState  ) 
 

Updates the state of the ToolBar menu option.

Author:
Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/7/93
Parameters:
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 1006 of file menucmds.cpp.

01007 {
01008 PORTNOTETRACE("other", "ViewToolBarState does nothing");
01009 #if !defined(EXCLUDE_FROM_XARALX)
01010     CWnd* pBar = ((CMainFrame*)((AfxGetApp())->m_pMainWnd)
01011                                     )->GetDescendantWindow(_R(AFX_IDW_TOOLBAR));
01012     
01013     if ((pBar != NULL) && ((pBar->GetStyle() & WS_VISIBLE) != 0))
01014 #endif
01015          return OpState( TRUE, FALSE );                 // not ticked, not greyed
01016 #if !defined(EXCLUDE_FROM_XARALX)
01017     else
01018         return OpState( FALSE, FALSE );                 // ticked, not greyed
01019 #endif
01020 } 

void WebsterDemos  ) 
 

Provides access from a help menu to Webster's Movies Demos Page. Errors If the browser could not be opened, an Error message box is diplayed. See Also -.

void WebsterDemos()

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/01/97
Parameters:
- [INPUTS]
- [OUTPUTS] Returns -

Definition at line 1456 of file menucmds.cpp.

01457 {
01458 PORTNOTETRACE("other","Movies index - do nothing");
01459 #ifndef EXCLUDE_FROM_XARALX
01460     // Opens the default Browser on Xara's Home Page
01461     const String_256 cmd = TEXT(PRODUCT_WEBLINKEXENAME) TEXT(" movies/index.htm");
01462     InvokeWeblink(cmd);
01463 #endif
01464 }

void WebsterHelpPages  ) 
 

Provides access from a help menu to Webster's Help Pages Errors If the browser could not be opened, an Error message box is diplayed. See Also -.

void WebsterHelpPages()

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/02/97
Parameters:
- [INPUTS]
- [OUTPUTS] Returns -

Definition at line 1479 of file menucmds.cpp.

01480 {
01481     wxString strURL = CamResource::GetText(_R(IDS_URL_TUTORIALS));
01482     CCamApp::LaunchWebBrowser(strURL);
01483 }

void WindowArrangeAction  ) 
 

Performs Window menu function Arrange.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 605 of file menucmds.cpp.

00606 {               
00607 PORTNOTETRACE("other", "WindowArrangeAction does nothing");
00608 #if !defined(EXCLUDE_FROM_XARALX)
00609     ((CMainFrame*)((AfxGetApp())->m_pMainWnd))->OnMDIWindowCmd(_R(ID_WINDOW_ARRANGE));
00610 #endif
00611 }

void WindowCascadeAction  ) 
 

Performs Window menu function Cascade.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 630 of file menucmds.cpp.

00631 {               
00632 PORTNOTETRACE("other", "WindowCascadeAction does nothing");
00633 #if !defined(EXCLUDE_FROM_XARALX)
00634     ((CMainFrame*)((AfxGetApp())->m_pMainWnd))->OnMDIWindowCmd(_R(ID_WINDOW_CASCADE));
00635 #endif
00636 }

OpState WindowCmdState  ) 
 

Updates the state of the window menu options.

Author:
Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/7/93
Parameters:
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 733 of file menucmds.cpp.

00734 {
00735 PORTNOTETRACE("other", "WindowCmdState does nothing");
00736 #if !defined(EXCLUDE_FROM_XARALX)
00737     // Get Active Child Window                                                 
00738     if (((CMDIFrameWnd *) (AfxGetApp())->m_pMainWnd)->MDIGetActive() != NULL)                                               
00739 #endif
00740         return OpState( FALSE, FALSE );                 // not ticked, not greyed
00741 #if !defined(EXCLUDE_FROM_XARALX)
00742     else
00743         return OpState( FALSE, TRUE );                  // not ticked, greyed
00744 #endif
00745 } 

void WindowNewAction  ) 
 

Performs New Window menu function on the Window menu.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 580 of file menucmds.cpp.

00581 {               
00582 PORTNOTETRACE("other", "WindowNewAction does nothing");
00583 #if !defined(EXCLUDE_FROM_XARALX)
00584     ((CMainFrame*)((AfxGetApp())->m_pMainWnd))->OnWindowNew();
00585 #endif
00586 }

void WindowNextDcocument bool  fForward  ) 
 

Performs Window menu function switch next document.

Author:
Luke_Hart (Xara Group Ltd) <lukehcamelotdev@xara.com>
Date:
01/08/06
Parameters:
None [INPUTS]
None [OUTPUTS]
Returns:
None

Errors: None

See also:
MenuCmds

Definition at line 704 of file menucmds.cpp.

00705 {
00706 // This is only needed for Linux (and maybe Mac, we'll see)
00707 #if defined(__WXGTK__)
00708     CCamFrame*          pFrame = (CCamFrame*)AfxGetApp().GetTopWindow();
00709     if( fForward )
00710         pFrame->ActivateNext();
00711     else
00712         pFrame->ActivatePrevious();
00713 #endif
00714 }

void WindowTileHorzAction  ) 
 

Performs Window menu function Tile Horizontal.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 655 of file menucmds.cpp.

00656 {               
00657 PORTNOTETRACE("other", "WindowTileHorzAction does nothing");
00658 #if !defined(EXCLUDE_FROM_XARALX)
00659     ((CMainFrame*)((AfxGetApp())->m_pMainWnd))->OnMDIWindowCmd(_R(ID_WINDOW_TILE_HORZ));
00660 #endif
00661 }

void WindowTileVertAction  ) 
 

Performs Window menu function Tile Verticle.

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

Errors: None

See also:
MenuCmds

SetupDefaultMenu()

SetupSharedMenu()

Definition at line 680 of file menucmds.cpp.

00681 {               
00682 PORTNOTETRACE("other", "WindowTileVertAction does nothing");
00683 #if !defined(EXCLUDE_FROM_XARALX)
00684     ((CMainFrame*)((AfxGetApp())->m_pMainWnd))->OnMDIWindowCmd(_R(ID_WINDOW_TILE_VERT));
00685 #endif
00686 }


Generated on Sat Nov 10 03:49:33 2007 for Camelot by  doxygen 1.4.4