javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttablecolumnar.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*******************************************************************************
       
     2  * Copyright (c) 2007, 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved. This program and the accompanying materials
       
     4  * are made available under the terms of the Eclipse Public License v1.0
       
     5  * which accompanies this distribution, and is available at
       
     6  * http://www.eclipse.org/legal/epl-v10.html
       
     7  *
       
     8  * Contributors:
       
     9  *     Nokia Corporation - S60 implementation
       
    10  *******************************************************************************/
       
    11 
       
    12 #ifndef SWTTABLECOLUMNAR_H
       
    13 #define SWTTABLECOLUMNAR_H
       
    14 
       
    15 
       
    16 #include "eswt.h"
       
    17 
       
    18 
       
    19 /**
       
    20  *  This interface collects the functions that are common to all the columnar
       
    21  *  drawable items in a Table. I.e. the header and the items.
       
    22  *  @lib eswt.dll
       
    23  */
       
    24 class MSwtTableColumnar
       
    25 {
       
    26     /**
       
    27      * Returns the preferred size of the whole item.
       
    28      * @return The preferred size
       
    29      */
       
    30     virtual TSize GetPreferredSize() const = 0;
       
    31 
       
    32     /**
       
    33      * Computes the preferred size of the cell specified by its column index.
       
    34      * @param aColumnIndex The column index to calculate for.
       
    35      * @return The preferred size
       
    36      */
       
    37     TSize GetPreferredSize(const TInt& aColumnIndex) const;
       
    38 
       
    39     /**
       
    40      * Insert a new column at the specified index.
       
    41      * The new column will use the default colors, fonts, etc.
       
    42      * @param aIndex The column index to insert at.
       
    43      */
       
    44     virtual void InsertNewColumnL(const TInt& aIndex) = 0;
       
    45 
       
    46     /**
       
    47      * Removes data (image, text, colors, ...) contained in the specified column
       
    48      * @param aIndex The column index to remove.
       
    49      */
       
    50     virtual void RemoveColumn(const TInt& aIndex) = 0;
       
    51 
       
    52     /**
       
    53      * Sets the text of the cell at the specified index.
       
    54      * @param aColumnIndex The column index to set.
       
    55      * @param aText        The text to set.
       
    56      */
       
    57     virtual void SetTextL(const TInt& aColumnIndex, const TDesC& aText) = 0;
       
    58 
       
    59     /**
       
    60      * Returns the text at the specified column index
       
    61      * @param aColumnIndex The column index to get.
       
    62      * @return             The text in the column.
       
    63      */
       
    64     virtual const TDesC& GetText(const TInt& aColumnIndex) const = 0;
       
    65 
       
    66     /**
       
    67      * Checks if there is at least one image in the specified column.
       
    68      * @param aColumnIndex The column index to get.
       
    69      * @return             True if there is one or more images in the column.
       
    70      */
       
    71     virtual TBool IsImageSet(const TInt& aColumnIndex) const = 0;
       
    72 
       
    73     /**
       
    74      * Sets the image of the cell at the specified index.
       
    75      * @param aColumnIndex  The column index to set.
       
    76      * @param aImage        The image to set.
       
    77      */
       
    78     virtual void SetImageByIndex(const TInt& aColumnIndex, const MSwtImage* aImage) = 0;
       
    79 };
       
    80 
       
    81 
       
    82 #endif // SWTTABLECOLUMNAR_H