66
|
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 |
#ifdef RD_JAVA_S60_RELEASE_9_2
|
|
30 |
class CMIDDisplayable;
|
|
31 |
#endif // RD_JAVA_S60_RELEASE_9_2
|
|
32 |
|
|
33 |
|
|
34 |
/**
|
|
35 |
* Interface for LCDUI custom component container.
|
|
36 |
*
|
|
37 |
* This interface can be used to provide services for storing and handling
|
|
38 |
* LCDUI custom UI components.
|
|
39 |
*
|
|
40 |
* @lib lcdui
|
|
41 |
* @since S60 5.0
|
|
42 |
*/
|
|
43 |
class MMIDCustomComponentContainer
|
|
44 |
{
|
|
45 |
public: // New methods
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Registers a new custom component to this container.
|
|
49 |
*
|
|
50 |
* The ownership of the component is NOT transfferred. Nothing happens
|
|
51 |
* if the component has already been registered. The component is
|
|
52 |
* added on top of the stack in this container. Index can be changed
|
|
53 |
* later.
|
|
54 |
*
|
|
55 |
* @param aComponent The component to be registered.
|
|
56 |
* @since S60 5.0
|
|
57 |
*/
|
|
58 |
virtual void RegisterComponentL(
|
|
59 |
MMIDCustomComponent* aComponent) = 0;
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Unregisters an existing custom component from this container.
|
|
63 |
*
|
|
64 |
* Nothing happens if the component is not found from this container.
|
|
65 |
*
|
|
66 |
* @param aComponent The component to be unregistered.
|
|
67 |
* @since S60 5.0
|
|
68 |
*/
|
|
69 |
virtual void UnregisterComponent(
|
|
70 |
MMIDCustomComponent* aComponent) = 0;
|
|
71 |
|
|
72 |
/**
|
|
73 |
* Changes the index of the specified custom component.
|
|
74 |
*
|
|
75 |
* @param aComponent The component which index will be changed
|
|
76 |
* @param aNewIndex The new index of the component.
|
|
77 |
*/
|
|
78 |
virtual void SetComponentIndexL(
|
|
79 |
MMIDCustomComponent* aComponent,
|
|
80 |
TInt aNewIndex) = 0;
|
|
81 |
|
|
82 |
/**
|
|
83 |
* Stores the index of focused component in parent.
|
|
84 |
*
|
|
85 |
* @param aComponent The component which gained focus
|
|
86 |
* @since S60 5.0
|
|
87 |
*/
|
|
88 |
virtual void SetFocusedComponent(
|
|
89 |
MMIDCustomComponent* aComponent) = 0;
|
|
90 |
|
|
91 |
/**
|
|
92 |
* Returns the index of the given component in this container.
|
|
93 |
*
|
|
94 |
* @return The index of the given component in this container.
|
|
95 |
* KErrNotFound is returned if this container does not have
|
|
96 |
* the specified component.
|
|
97 |
* @since S60 5.0
|
|
98 |
*/
|
|
99 |
virtual TInt ComponentIndex(
|
|
100 |
MMIDCustomComponent* aComponent) const = 0;
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Returns the control of this component container or NULL of one does
|
|
104 |
* not exist.
|
|
105 |
*
|
|
106 |
* @return The control of this container.
|
|
107 |
* @since S60 5.0
|
|
108 |
*/
|
|
109 |
virtual CCoeControl& Control() = 0;
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Gets the full screen status of this component container.
|
|
113 |
*
|
|
114 |
* Typically the container is the same object which is returned when
|
|
115 |
* calling <code>Control()</code>.
|
|
116 |
*
|
|
117 |
* @return <code>ETrue</code> if this component container is set to
|
|
118 |
* full screen and <code>EFalse</code> if not.
|
|
119 |
* @since S60 5.0
|
|
120 |
*/
|
|
121 |
virtual TBool IsFullScreen() const = 0;
|
|
122 |
|
|
123 |
#ifdef RD_JAVA_S60_RELEASE_9_2
|
|
124 |
/**
|
|
125 |
* Gets the Displayable from container.
|
|
126 |
*
|
|
127 |
* @return The Displayable from container.
|
|
128 |
* @since S60 5.0
|
|
129 |
*/
|
|
130 |
virtual CMIDDisplayable* GetDisplayable() const = 0;
|
|
131 |
#endif // RD_JAVA_S60_RELEASE_9_2
|
|
132 |
|
|
133 |
protected: // Destructor
|
|
134 |
|
|
135 |
/**
|
|
136 |
* Destructor. Disallows destruction through this interface
|
|
137 |
*/
|
|
138 |
virtual ~MMIDCustomComponentContainer() {}
|
|
139 |
};
|
|
140 |
|
|
141 |
#endif // MMIDCUSTOMCOMPONENTCONTAINER_H
|
|
142 |
|
|
143 |
// End of file
|