/* Machine-made version of this file copyright (c) 2005 Somusar */ /* Derived from samples that are Copyright (c) 2004, Nokia. All rights reserved */ // INCLUDE FILES #include #include #include #include #include #include #include #include "AknExForm.hrh" #include "AknExFormAppView.h" #include "AknExFormContainer.h" // ================= MEMBER FUNCTIONS ========================================= // ---------------------------------------------------------------------------- // CAknExFormView::CAknExFormView() // Default constructor. // ---------------------------------------------------------------------------- // CAknExFormView::CAknExFormView() : iContainer( NULL ), iCurrentOutline( EAknExFormCmdEmptyOutline ) { } // ---------------------------------------------------------------------------- // void CAknExFormView::ConstructL() // Symbian constructor. // ---------------------------------------------------------------------------- // void CAknExFormView::ConstructL() { BaseConstructL( R_AKNEXFORM_VIEW ); } // ---------------------------------------------------------------------------- // CAknExFormView::~CAknExFormView() // Destructor. // ---------------------------------------------------------------------------- // CAknExFormView::~CAknExFormView() { // Deletes the container class object. if ( iContainer ) { // Removes container from view control stack. AppUi()->RemoveFromStack( iContainer ); } delete iContainer; } // ---------------------------------------------------------------------------- // void CAknExFormView::DisplayNextOutlineL() // // ---------------------------------------------------------------------------- // void CAknExFormView::DisplayNextOutlineL() { switch ( iCurrentOutline ) { default: HandleCommandL( EAknExFormCmdEmptyOutline ); break; } } // ---------------------------------------------------------------------------- // CAknExFormView::Id() // Returns ID of view. // ---------------------------------------------------------------------------- // TUid CAknExFormView::Id() const { return KViewId; } // ---------------------------------------------------------------------------- // CAknExFormView::HandleCommandL() // Handles the commands. // ---------------------------------------------------------------------------- // void CAknExFormView::HandleCommandL( TInt aCommand ) { switch ( aCommand ) { /* case EAknSoftkeyBack and EAknCmdExit are handled by the AppUi class.*/ case EAknExFormCmdAllEditorsCommand: iCurrentOutline = aCommand; IndicateTitlePaneTextL( aCommand ); iContainer->SetTextToLabelL( R_AKNEXFORM_ALL_EDITORS_OPERATION ); iContainer->DisplayFormL( R_AKNEXFORM_ALL_EDITORS_DIALOG ); break; default: break; } } // ---------------------------------------------------------------------------- // CAknExFormView::IndicateTitlePaneTextL() // Set title text to status-pane // ---------------------------------------------------------------------------- // void CAknExFormView::IndicateTitlePaneTextL( TInt aCommand ) { TBool useDefaultText( EFalse ); TInt resourceId( KAknExFormResourceIdInitialize ); switch ( aCommand ) { case EAknExFormCmdEmptyOutline: useDefaultText = ETrue; break; case EAknExFormCmdAllEditorsCommand: resourceId = R_AKNEXFORM_TEXT_STATUS_PANE_TITLE_ALL_EDITORS; break; default: useDefaultText = ETrue; break; } CAknTitlePane* titlePane = static_cast ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); if ( useDefaultText ) { titlePane->SetTextToDefaultL(); } else { TBuf titleText( NULL ); iEikonEnv->ReadResource( titleText, resourceId ); titlePane->SetTextL( titleText ); } } // ---------------------------------------------------------------------------- // CAknExFormView::DoActivateL() // Creates container class object. // ---------------------------------------------------------------------------- // void CAknExFormView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/ ) { // Creates container object. if ( !iContainer ) { iContainer = new( ELeave ) CAknExFormContainer( this ); iContainer->SetMopParent( this ); iContainer->ConstructL( ClientRect()); // Adds container to view control stack. AppUi()->AddToStackL( *this, iContainer ); } } // ---------------------------------------------------------------------------- // void CAknExFormView::DoDeactivate() // Deletes container class object. // ---------------------------------------------------------------------------- // void CAknExFormView::DoDeactivate() { // Deletes the container class object. if ( iContainer ) { // Removes container from view control stack. AppUi()->RemoveFromStack( iContainer ); delete iContainer; iContainer = NULL; } } // ---------------------------------------------------------------------------- // CAknExFormAdd::CAknExFormAdd() // C++ default constructor can NOT contain any code, that // might leave. // ---------------------------------------------------------------------------- // CAknExFormAdd::CAknExFormAdd() { } // ---------------------------------------------------------------------------- // CAknExFormAdd::~CAknExFormAdd() // Destructor // ---------------------------------------------------------------------------- // CAknExFormAdd::~CAknExFormAdd() { } // ---------------------------------------------------------------------------- // void CAknExFormAdd::AddItemL() // Add item for testing uses customised dialog. // ---------------------------------------------------------------------------- // void CAknExFormAdd::AddItemL() { } // End of File