mmuifw_plat/alf_widgetmodel_api/inc/alf/ialfwidgetcontroldescriptor.h
branchRCL_3
changeset 20 0e9bb658ef58
parent 0 e83bab7cf002
equal deleted inserted replaced
19:4ea6f81c838a 20:0e9bb658ef58
       
     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:  An interface used by design tools to get a description of the control.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef I_ALFWIDGETCONTROLDESCRIPTOR_H
       
    20 #define I_ALFWIDGETCONTROLDESCRIPTOR_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include <alf/ialfinterfacebase.h>
       
    25 
       
    26 namespace Alf
       
    27     {
       
    28 
       
    29 /**
       
    30  *  An interface used by design tools to get a description of the control.
       
    31  *  The description may include a generic description of the control, and
       
    32  *  descriptions of the event handlers and elements used by the control.
       
    33  *
       
    34  *  @lib alfwidgetmodel.lib
       
    35  *  @since S60 ?S60_version
       
    36  *  @status Draft
       
    37  */
       
    38 class IAlfWidgetControlDescription : public IAlfInterfaceBase
       
    39     {
       
    40 public:
       
    41     /**
       
    42      * Get the description of the control.
       
    43      *
       
    44      * @since S60 ?S60_version
       
    45      * @return The description of the control.
       
    46      */
       
    47     virtual const TDesC8& controlDescription() const = 0;
       
    48 
       
    49     /**
       
    50      * Get the number of required elements in the control.
       
    51      *
       
    52      * @since S60 ?S60_version
       
    53      * @return The number of required elements.
       
    54      */
       
    55     virtual int numRequiredElements() const = 0;
       
    56 
       
    57     /**
       
    58      * Get the name of a required element by index.
       
    59      *
       
    60      * @since S60 ?S60_version
       
    61      * @param aIndex The index of the element.
       
    62      * @return The name of the element at the given index.
       
    63      */
       
    64     virtual const TDesC8& elementName(int aIndex) const = 0;
       
    65 
       
    66     /**
       
    67      * Get the description of a required element by index.
       
    68      *
       
    69      * @since S60 ?S60_version
       
    70      * @param aIndex The index of the element.
       
    71      * @return The description of the element at the given index.
       
    72      */
       
    73     virtual const TDesC8& elementDescription(int aIndex) const = 0;
       
    74 
       
    75     /**
       
    76      * Get the number of required event handlers in the control.
       
    77      *
       
    78      * @since S60 ?S60_version
       
    79      * @return The number of required event handlers.
       
    80      */
       
    81     virtual int numRequiredEventHandlers() const = 0;
       
    82 
       
    83     /**
       
    84      * Get the event id of a required event handler by index.
       
    85      * The event id may be a custaom event id or a key event id.
       
    86      *
       
    87      * @since S60 ?S60_version
       
    88      * @param aIndex The index of the event handler.
       
    89      * @return The name of the event handler at the given index.
       
    90      */
       
    91     virtual uint eventHandlerId(int aIndex) const = 0;
       
    92 
       
    93     /**
       
    94      * Determine the type of a required event handler by index.
       
    95      * The event type may be a custom event or a key event.
       
    96      *
       
    97      * @note Pointer event handlers cannot be identified without
       
    98      * an associated custom event id. Therefore, pointer event handlers
       
    99      * are visible as custom event handlers.
       
   100      *
       
   101      * @since S60 ?S60_version
       
   102      * @param aIndex The index of the event handler.
       
   103      * @return <code>ETrue</code> if the event handler is a key event handler.
       
   104      *         <code>EFalse</code> if the event handler is a custom event handler.
       
   105      */
       
   106     virtual bool keyEventHandler(int aIndex) const = 0;
       
   107 
       
   108     /**
       
   109      * Get the name of a required event handler by index.
       
   110      *
       
   111      * @since S60 ?S60_version
       
   112      * @param aIndex The index of the event handler.
       
   113      * @return The name of the event handler at the given index.
       
   114      */
       
   115     virtual const TDesC8& eventHandlerName(int aIndex) const = 0;
       
   116 
       
   117     /**
       
   118      * Get the description of a required event handler by index.
       
   119      *
       
   120      * @since S60 ?S60_version
       
   121      * @param aIndex The index of the event handler.
       
   122      * @return The description of the event handler at the given index.
       
   123      */
       
   124     virtual const TDesC8& eventHandlerDescription(int aIndex) const = 0;
       
   125 
       
   126     };
       
   127 
       
   128     } // namespace Alf
       
   129 
       
   130 #endif // I_ALFWIDGETCONTROLDESCRIPTOR_H
       
   131 
       
   132 // End of File