mulwidgets/common/inc/multemplateinterface.h
branchRCL_3
changeset 26 0e9bb658ef58
parent 0 e83bab7cf002
equal deleted inserted replaced
25:4ea6f81c838a 26:0e9bb658ef58
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  xml parser header
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MULTEMPLATEINTERFACE_H
       
    20 #define MULTEMPLATEINTERFACE_H
       
    21 
       
    22 #include <alf/ialfmap.h>
       
    23 #include <osn/ustring.h>
       
    24 #include <alf/alfimagevisual.h>
       
    25 #include <alf/alflayout.h>
       
    26 
       
    27 //#include "mulplaintexteditor.h"
       
    28 
       
    29 namespace duiuimodel
       
    30     {
       
    31     class DuiNode;
       
    32     }
       
    33 using namespace duiuimodel;
       
    34 
       
    35 namespace Alf
       
    36     {
       
    37     
       
    38 //Forward declarations
       
    39 class MulXmlUtility;
       
    40 class IAlfMap;
       
    41  	
       
    42 class MulTemplateInterface
       
    43     {
       
    44         
       
    45 public:
       
    46 
       
    47     /**
       
    48      * Display Area.
       
    49      *
       
    50      * @returns the display are of the control.
       
    51      */
       
    52     virtual TRect Displayarea() = 0;    
       
    53     
       
    54     /**
       
    55      * Data for the item.
       
    56      *
       
    57      * @aItemIndex index of the item.
       
    58      * @returns data map of the item at the index.
       
    59      */
       
    60     virtual IAlfMap* RootData(int aItemIndex) = 0;
       
    61     
       
    62     /**
       
    63      * Get the xml utility.
       
    64      *
       
    65      * @returns MulXmlUtility.
       
    66      */
       
    67     virtual MulXmlUtility& GetMulXmlUtlity() = 0;
       
    68     
       
    69     /**
       
    70      * Get the path where the xmls are stored.
       
    71      *
       
    72      * @returns the path.
       
    73      */
       
    74     virtual UString ResourcePath() = 0;        
       
    75     
       
    76     /**
       
    77     * Gets the template Attribute Name.
       
    78     */
       
    79     virtual UString TemplateAttribute() = 0; 
       
    80     
       
    81     /**
       
    82     * Gets the embedded widget load name.
       
    83     */
       
    84     virtual UString EmbedWidgetName() = 0;
       
    85     
       
    86     /**
       
    87      * Checks if the visual passed as argument belongs to the highlighted item
       
    88      * 
       
    89      * @param aVisual The visual to be checked if it belongs to the highlighted item.
       
    90      * @returns True: If aVisual corresponds to highlight item. otherwise, False.
       
    91      */
       
    92     virtual bool IsHighlightVisual(CAlfVisual& aVisual) = 0;
       
    93     
       
    94     /**
       
    95      * Return image scale mode
       
    96      * 
       
    97      * @return Scale mode
       
    98      */
       
    99     virtual CAlfImageVisual::TScaleMode ScaleMode() = 0;
       
   100     
       
   101     /**
       
   102      * Return images should be scaled or not
       
   103      * 
       
   104      * @return true if scaling should be applied, else false
       
   105      */
       
   106     virtual bool ApplyScaleMode() = 0;
       
   107     
       
   108     /**
       
   109      * Gets the plain text editor control
       
   110      * 
       
   111      * @return MulPlainTextEditor wraped in layout.
       
   112      */
       
   113     //virtual MulPlainTextEditor* PlainTextEditor() = 0;    
       
   114     
       
   115     /**
       
   116      * Gets the root node of the current template.
       
   117      * 
       
   118      * @return DuiNode pointer.
       
   119      */
       
   120     virtual DuiNode* TemplateRootNode() = 0;  
       
   121 
       
   122     virtual bool IsHomogeneous() = 0;
       
   123     
       
   124     
       
   125     /**
       
   126     * To Get the background is transparent or not.
       
   127     */
       
   128     virtual bool BackGroundTransparency() = 0;   
       
   129     
       
   130     
       
   131     }; //class
       
   132             
       
   133     } // namespace 
       
   134 
       
   135 #endif
       
   136