javauis/lcdui_akn/javalcdui/inc/MMIDCustomComponentContainer.h
branchRCL_3
changeset 19 04becd199f91
child 46 4376525cdefb
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2009 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 * Defines an interface for an LCDUI custom component container.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMIDCUSTOMCOMPONENTCONTAINER_H
       
    20 #define MMIDCUSTOMCOMPONENTCONTAINER_H
       
    21 
       
    22 // EXTERNAL INCLUDES
       
    23 #include    <e32std.h>
       
    24 #include    <w32std.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MMIDCustomComponent;
       
    28 class CCoeControl;
       
    29 
       
    30 
       
    31 /**
       
    32  * Interface for LCDUI custom component container.
       
    33  *
       
    34  * This interface can be used to provide services for storing and handling
       
    35  * LCDUI custom UI components.
       
    36  *
       
    37  * @lib lcdui
       
    38  * @since S60 5.0
       
    39  */
       
    40 class MMIDCustomComponentContainer
       
    41 {
       
    42 public: // New methods
       
    43 
       
    44     /**
       
    45      * Registers a new custom component to this container.
       
    46      *
       
    47      * The ownership of the component is NOT transfferred. Nothing happens
       
    48      * if the component has already been registered. The component is
       
    49      * added on top of the stack in this container. Index can be changed
       
    50      * later.
       
    51      *
       
    52      * @param aComponent The component to be registered.
       
    53      * @since S60 5.0
       
    54      */
       
    55     virtual void RegisterComponentL(
       
    56         MMIDCustomComponent* aComponent) = 0;
       
    57 
       
    58     /**
       
    59      * Unregisters an existing custom component from this container.
       
    60      *
       
    61      * Nothing happens if the component is not found from this container.
       
    62      *
       
    63      * @param aComponent The component to be unregistered.
       
    64      * @since S60 5.0
       
    65      */
       
    66     virtual void UnregisterComponent(
       
    67         MMIDCustomComponent* aComponent) = 0;
       
    68 
       
    69     /**
       
    70      * Changes the index of the specified custom component.
       
    71      *
       
    72      * @param aComponent The component which index will be changed
       
    73      * @param aNewIndex The new index of the component.
       
    74      */
       
    75     virtual void SetComponentIndexL(
       
    76         MMIDCustomComponent* aComponent,
       
    77         TInt aNewIndex) = 0;
       
    78 
       
    79     /**
       
    80      * Stores the index of focused component in parent.
       
    81      *
       
    82      * @param aComponent The component which gained focus
       
    83      * @since S60 5.0
       
    84      */
       
    85     virtual void SetFocusedComponent(
       
    86         MMIDCustomComponent* aComponent) = 0;
       
    87 
       
    88     /**
       
    89      * Returns the index of the given component in this container.
       
    90      *
       
    91      * @return The index of the given component in this container.
       
    92      *         KErrNotFound is returned if this container does not have
       
    93      *         the specified component.
       
    94      * @since S60 5.0
       
    95      */
       
    96     virtual TInt ComponentIndex(
       
    97         MMIDCustomComponent* aComponent) const = 0;
       
    98 
       
    99     /**
       
   100      * Returns the control of this component container or NULL of one does
       
   101      * not exist.
       
   102      *
       
   103      * @return The control of this container.
       
   104      * @since S60 5.0
       
   105      */
       
   106     virtual CCoeControl& Control() = 0;
       
   107 
       
   108     /**
       
   109      * Gets the full screen status of this component container.
       
   110      *
       
   111      * Typically the container is the same object which is returned when
       
   112      * calling <code>Control()</code>.
       
   113      *
       
   114      * @return <code>ETrue</code> if this component container is set to
       
   115      *         full screen and <code>EFalse</code> if not.
       
   116      * @since S60 5.0
       
   117      */
       
   118     virtual TBool IsFullScreen() const = 0;
       
   119 
       
   120 protected: // Destructor
       
   121 
       
   122     /**
       
   123      * Destructor. Disallows destruction through this interface
       
   124      */
       
   125     virtual ~MMIDCustomComponentContainer() {}
       
   126 };
       
   127 
       
   128 #endif // MMIDCUSTOMCOMPONENTCONTAINER_H
       
   129 
       
   130 // End of file