photosgallery/viewframework/plugins/fullscreenviewplugin/src/glxmainfullscreenviewplugin.cpp
changeset 0 4e91876724a2
child 30 a60acebbbd9d
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Implementation 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 
       
    23 #include "glxmainfullscreenviewplugin.h"
       
    24 #include "glxfullscreenviewplugin.hrh"
       
    25 
       
    26 #include <data_caging_path_literals.hrh>
       
    27 
       
    28 #include <glxfullscreenviewdata.rsg>
       
    29 #include <glxresourceutilities.h>                // for CGlxResourceUtilities
       
    30 
       
    31 #include <glxcommandhandlerhelp.h>
       
    32 
       
    33 #include <AknUtils.h>
       
    34 #include <avkon.hrh>
       
    35 #include <bautils.h>
       
    36 
       
    37 #include <glxfullscreenview.h>
       
    38 #include <glxlog.h>
       
    39 #include <glxtracer.h>
       
    40 
       
    41 
       
    42 _LIT(KGlxFullScreenResource,"glxfullscreenviewdata.rsc");
       
    43 
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // C++ default constructor can NOT contain any code, that
       
    47 // might leave.
       
    48 // ---------------------------------------------------------------------------
       
    49 //
       
    50 CGlxMainFullScreenViewPlugin::CGlxMainFullScreenViewPlugin()
       
    51 
       
    52     {
       
    53     TRACER("CGlxMainFullScreenViewPlugin::CGlxMainFullScreenViewPlugin()");
       
    54     iResourceIds.iMenuId = R_GLX_FULLSCREEN_MENU;
       
    55     iResourceIds.iViewId = R_GLX_FULLSCREEN_VIEW;
       
    56     iResourceIds.iCbaId = R_GLX_FULLSCREEN_SOFTKEYS;
       
    57     iViewUID = KGlxMainFullScreenViewImplementationId;
       
    58     
       
    59     }
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // Symbian 2nd phase constructor can leave.
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65 void CGlxMainFullScreenViewPlugin::ConstructL()
       
    66     {
       
    67     TRACER("CGlxMainFullScreenViewPlugin::ConstructL()");
       
    68     // Do nothing
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // Two-phased constructor.
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 CGlxMainFullScreenViewPlugin* CGlxMainFullScreenViewPlugin::NewL()
       
    76     {
       
    77     TRACER("CGlxMainFullScreenViewPlugin::NewL()");
       
    78     CGlxMainFullScreenViewPlugin* self = 
       
    79         new ( ELeave ) CGlxMainFullScreenViewPlugin();
       
    80     CleanupStack::PushL( self );
       
    81     self->ConstructL();
       
    82     CleanupStack::Pop( self );
       
    83     return self;
       
    84     }
       
    85 
       
    86 // ---------------------------------------------------------------------------
       
    87 // Destructor
       
    88 // ---------------------------------------------------------------------------
       
    89 //
       
    90 CGlxMainFullScreenViewPlugin::~CGlxMainFullScreenViewPlugin()
       
    91     {
       
    92     TRACER("CGlxMainFullScreenViewPlugin::~CGlxMainFullScreenViewPlugin()");
       
    93     // Do nothing
       
    94     }
       
    95 
       
    96 // ---------------------------------------------------------------------------
       
    97 // AddCommandHandlersL
       
    98 // ---------------------------------------------------------------------------
       
    99 //
       
   100 void CGlxMainFullScreenViewPlugin::AddCommandHandlersL()
       
   101     {
       
   102     CGlxFullScreenViewPluginBase::AddCommandHandlersL();
       
   103 
       
   104     TGlxHelpContext helpInfo;
       
   105     helpInfo.iBrowseContext = LGAL_HLP_ALL_FULLSCREEN;
       
   106     
       
   107     iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo));
       
   108     }
       
   109 
       
   110 // ---------------------------------------------------------------------------
       
   111 // GetResourceFilenameL
       
   112 // ---------------------------------------------------------------------------
       
   113 //
       
   114 void CGlxMainFullScreenViewPlugin::GetResourceFilenameL(TFileName& aResFile)
       
   115     {
       
   116     TRACER("CGlxMainFullScreenViewPlugin::GetResourceFilenameL()");
       
   117     TParse parse;
       
   118     parse.Set(KGlxFullScreenResource, &KDC_APP_RESOURCE_DIR, NULL);
       
   119     aResFile.Append(parse.FullName()); 
       
   120     CGlxResourceUtilities::GetResourceFilenameL(aResFile);  
       
   121     }
       
   122 
       
   123 //  End of File