mulwidgets/alfscrollbarwidget/inc/ialfscrollbarbaseelementinternal.h
changeset 17 3eca7e70b1b8
parent 3 4526337fb576
equal deleted inserted replaced
3:4526337fb576 17:3eca7e70b1b8
     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:  interface for the scrollbar base element internal functions.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef I_ALFSCROLLBARBASEELEMENTINTERNAL_H
       
    19 #define I_ALFSCROLLBARBASEELEMENTINTERNAL_H
       
    20 
       
    21 //Widget Model include
       
    22 #include <alf/ialfinterfacebase.h>
       
    23 
       
    24 //Toolkit include
       
    25 #include <alf/alfevent.h>
       
    26 
       
    27 namespace Alf
       
    28     {
       
    29  
       
    30 /**
       
    31  * @namespace alfscrollbarbaseelementinternal
       
    32  *
       
    33  * ident specifies the unique identifier for the scrollbar base-element 
       
    34  * internal interface.
       
    35  */
       
    36 namespace alfscrollbarbaseelementinternal
       
    37     {
       
    38     static const IfId ident =
       
    39         {
       
    40         0,"scrollbarbaseelementinternal" 
       
    41         };
       
    42     }
       
    43 
       
    44 /**
       
    45  * An internal interface to be used by custom scrollbar base element writer.
       
    46  *
       
    47  * An interface which should be implemented by all the base elements of 
       
    48  * scrollbar (e.g. AlfScrollBarDefaltBaseElement, AlfScrollBarArrowBAseElement,
       
    49  * AlfScrollBarDefaltLctBaseElement). The interface is exported for the 
       
    50  * developers who wants to create their custom scrollbar base element.
       
    51  * The functions of this interface are not supposed to be called by scrollbar
       
    52  * widget users directly. These functions are called by different part of 
       
    53  * scrollbar widget (e.g. scrollbar control, long tap pointer event timer).
       
    54  * 
       
    55  */
       
    56 class IAlfScrollBarBaseElementInternal : public IAlfInterfaceBase 
       
    57     {
       
    58 
       
    59 public:
       
    60 
       
    61     /**
       
    62      * Getter for the type identifier of this interface.
       
    63      * Usage:
       
    64      * @code
       
    65      * IAlfElement* element;
       
    66      * IAlfScrollBarBaseElementInternal* elementInternal = 
       
    67      * static_cast<IAlfScrollBarBaseElementInternal*> ( 
       
    68      * element->makeInterface (IAlfScrollBarBaseElementInternal::type() ) );
       
    69      * @endcode
       
    70      * @see \link IAlfInterfaceBase \endlink for
       
    71      * \link IAlfInterfaceBase::makeInterface \endlink
       
    72      * The above code provides all the interfaces of ScrollBar base element.
       
    73      * @since S60 ?S60_version
       
    74      * @return Identifier of this interface.
       
    75      */
       
    76     static inline const IfId& type()
       
    77         {
       
    78         return alfscrollbarbaseelementinternal :: ident;
       
    79         }
       
    80 
       
    81     /** 
       
    82      * baseLayoutSizeChanged. 
       
    83      * This function is called by scrollbar control to notify scrollbar base
       
    84      * element the base layout size has been changed ( and so the base element
       
    85      * should relayout its internal visualization).
       
    86      * 
       
    87      * @since S60 ?S60_version
       
    88      */
       
    89     virtual void baseLayoutSizeChanged()=0;
       
    90     
       
    91     /**
       
    92      * Send the corresponding Custom events to the scrollbar eventhandlers 
       
    93      * according to the visual clicked.
       
    94      * 
       
    95      */
       
    96     virtual bool processPointerEvent(TAlfEvent * aPntrEvent)=0;
       
    97     
       
    98     /**
       
    99      * creates the visualization  
       
   100      * 
       
   101      */
       
   102     virtual void createVisualization() = 0;
       
   103     
       
   104     /**
       
   105      * Destroys the visualization 
       
   106      * 
       
   107      */
       
   108     virtual void updateVisualization() = 0;
       
   109     
       
   110     /**
       
   111      * updates the visualization 
       
   112      * 
       
   113      */
       
   114     virtual void destroyVisualization() = 0;
       
   115     
       
   116     /**
       
   117      * Returns pointer to AlfScrollBarModel
       
   118      */
       
   119     virtual void initializeScrollModel() = 0;
       
   120     
       
   121     /**
       
   122      *  Handles Longtap event
       
   123      */
       
   124     virtual AlfEventStatus handleLongTapEvent() = 0;
       
   125     
       
   126     /** 
       
   127      *virtual Destructor.
       
   128      *
       
   129      */
       
   130     virtual ~IAlfScrollBarBaseElementInternal() {}
       
   131 
       
   132     }; // end of class IAlfScrollBarBaseElementInternal
       
   133   
       
   134     } // end of namespace Alf
       
   135 
       
   136 #endif // I_ALFSCROLLBARBASEELEMENTINTERNAL_H
       
   137 //End Of File