mulwidgets/alfviewwidget/inc/alfviewcontrol.h
branchRCL_3
changeset 19 4ea6f81c838a
parent 17 514d98f21c43
child 20 0e9bb658ef58
equal deleted inserted replaced
17:514d98f21c43 19:4ea6f81c838a
     1 /*
       
     2 * Copyright (c) 2007 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:   View Widget control Class Header.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef ALFVIEWCONTROL_H_
       
    20 #define ALFVIEWCONTROL_H_
       
    21 
       
    22 #include <alf/alfwidgetcontrol.h>
       
    23 
       
    24 namespace Alf
       
    25     {
       
    26 class AlfViewWidget;
       
    27     
       
    28 /**
       
    29  * Control class of the view widget.
       
    30  *
       
    31  * This class implements logic of the view widget.
       
    32  *
       
    33  * View widget automatically creates an CAlfViewControl object
       
    34  * for it's control.
       
    35  */
       
    36 class CAlfViewControl : public CAlfWidgetControl
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Default constructor
       
    42      *
       
    43      * @param aEnv UI Accelerator Toolkit environment where this view widget
       
    44      *       is created.
       
    45      * @param aViewWidget The view widget with which this control is associated with.
       
    46      */
       
    47     CAlfViewControl(CAlfEnv& aEnv, AlfViewWidget& aViewWidget);
       
    48 
       
    49     /**
       
    50      * Default destructor
       
    51      */
       
    52     virtual ~CAlfViewControl();
       
    53     
       
    54  // From base class CAlfWidgetControl
       
    55 
       
    56     /**
       
    57      * Handles events sent to widget control.
       
    58      *
       
    59      * @since S60 ?S60_version
       
    60      * @param aEvent The event to be handled.
       
    61      * @return see AlfEventStatus.
       
    62      */
       
    63    	virtual AlfEventStatus handleEvent(const TAlfEvent& aEvent);
       
    64    	
       
    65 // New methods   	
       
    66    	
       
    67    	/**
       
    68    	 * Returns the view widget associated with this control.
       
    69    	 * The widget() method returns the AlfWidget implementation class
       
    70    	 * object that is used as an adapter in the AlfViewWidget object.
       
    71    	 */
       
    72    	AlfViewWidget& viewWidget();
       
    73    	   	   	
       
    74 private:
       
    75 
       
    76 	/** View widget in which this control is used */
       
    77 	AlfViewWidget& mViewWidget;
       
    78    	
       
    79     };
       
    80 
       
    81     }
       
    82 
       
    83 #endif /*ALFVIEWCONTROL_H_*/