williamr@2: /* williamr@2: * Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef __EIKDIALG_H__ williamr@2: #define __EIKDIALG_H__ williamr@2: williamr@2: #ifndef __COECOBS_H__ williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #ifndef __COECCNTX_H__ williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #ifndef __EIKBCTRL_H__ williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #ifndef __EIKDPOBS_H__ williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #ifndef __BADESCA_H__ williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #ifndef __GULFTFLG_HRH__ williamr@2: #include williamr@2: #endif williamr@2: williamr@2: williamr@2: williamr@2: // williamr@2: // Header files needed by deprecated interfaces. williamr@2: // williamr@2: williamr@2: #ifndef __EIKBUTB_H__ williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #ifndef __EIKBTGPC_H__ williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #include williamr@2: williamr@2: // constant definitions williamr@2: const TInt KAknMediatorFacade(0x10275076); williamr@2: williamr@2: williamr@2: class CEikMover; williamr@2: class CEikCaptionedControl; williamr@2: class CEikCapCArray; williamr@2: class CEikDialogPageSelector; williamr@2: class CEikButtonGroupContainer; williamr@2: class CEikDialogButtonCommandObserver; williamr@2: class MEikCommandObserver; williamr@2: class CAknDialog; williamr@2: class CAknNoteDialog; williamr@2: williamr@2: struct SEikControlInfo; williamr@2: williamr@2: class CEikDialogExtension ; williamr@2: // williamr@2: class CAknsListBoxBackgroundControlContext ; williamr@2: // williamr@2: // Forward declarations needed by deprecated interfaces. williamr@2: // williamr@2: williamr@2: class CEikLabel; williamr@2: class CGlobalText; williamr@2: class MAknDialogMediatorObserver; williamr@2: struct SEikRange; williamr@2: struct SEikDegreesMinutesDirection; williamr@2: williamr@2: williamr@2: /** williamr@2: * The @c CEikDialog class provides an instantiable base class for dialogs. williamr@2: * Controls can be added directly to this class but it is normal to create williamr@2: * a subclass to handle the controls appearing on the dialog dynamically. williamr@2: */ williamr@2: class CEikDialog : public CEikBorderedControl, williamr@2: public MCoeControlObserver, williamr@2: public MEikDialogPageObserver, williamr@2: public MCoeControlContext, williamr@2: public MAknFadedComponent williamr@2: { williamr@2: williamr@2: public: williamr@2: williamr@2: DECLARE_TYPE_ID(0x10282EA8) williamr@2: williamr@2: /** williamr@2: * C++ default constructor. williamr@2: */ williamr@2: IMPORT_C CEikDialog(); williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: IMPORT_C ~CEikDialog(); williamr@2: williamr@2: /** williamr@2: * Loads, displays, and destroys the dialog. williamr@2: * williamr@2: * This function loads the specified dialog from a resource and displays williamr@2: * it. The method then destroys the dialog when it exits, therefore there williamr@2: * is no need for the application program to destroy the dialog. williamr@2: * williamr@2: * In the resource file, use the @c EEikBidOk dialog button ID for an williamr@2: * OK/Done/Continue button and @c EEikBidCancel for a Cancel button. williamr@2: * williamr@2: * The function returns immediately unless @c EEikDialogFlagWait has been williamr@2: * specified in the @c DIALOG resource. If @c EEikDialogFlagWait is williamr@2: * specified, it returns when the dialog exits. williamr@2: * williamr@2: * @param aResourceId The resource ID of the dialog to load. williamr@2: * @return Zero, unless it is a waiting dialog. For a waiting dialog, williamr@2: * the return value is the ID of the button that closed the dialog, williamr@2: * or zero if it was the cancel button (@c EEikBidCancel). williamr@2: */ williamr@2: IMPORT_C virtual TInt ExecuteLD(TInt aResourceId); williamr@2: williamr@2: /** williamr@2: * Prepares the dialog, constructing it from the specified resource. williamr@2: * williamr@2: * @param aResourceId The resource ID of the dialog. williamr@2: */ williamr@2: IMPORT_C virtual void PrepareLC(TInt aResourceId); williamr@2: williamr@2: /** williamr@2: * Reads the dialog resources into the dialog, constructing it from the specified resource. williamr@2: * The function is only to help loading dialog resources and williamr@2: * extracting dialog data, in other cases use (@c PrepareLC()). williamr@2: * Unlike PrepareLC(), it does not add the dialog to control stack. williamr@2: * @since 3.2 williamr@2: * williamr@2: * @param aResourceId The resource ID of the dialog. williamr@2: */ williamr@2: IMPORT_C void ReadResourceLC(TInt aResourceId); williamr@2: williamr@2: /** williamr@2: * Runs the dialog and returns the ID of the button used to dismiss it. williamr@2: * williamr@2: * The dialog is destroyed on exit. williamr@2: * williamr@2: * This function is called by the dialog framework (@c ExecuteLD()) to williamr@2: * perform dynamic construction (layout) and to display/destroy the williamr@2: * dialog. Static construction of the dialog must already be complete williamr@2: * before this function is called, e.g. using @c PrepareLC(). williamr@2: * williamr@2: * The function returns immediately unless @c EEikDialogFlagWait has williamr@2: * been specified in the @c DIALOG resource. If @c EEikDialogFlagWait is williamr@2: * specified it returns when the dialog exits. williamr@2: * williamr@2: * @return The ID of the button used to dismiss the dialog. williamr@2: */ williamr@2: IMPORT_C virtual TInt RunLD(); williamr@2: williamr@2: /** williamr@2: * Sets the dialog title text from a descriptor. williamr@2: * williamr@2: * @deprecated williamr@2: * @param aText The descriptor containing the new title text. williamr@2: */ williamr@2: IMPORT_C void SetTitleL(const TDesC& aText); williamr@2: williamr@2: /** williamr@2: * Sets the dialog title text from a resource. williamr@2: * williamr@2: * @deprecated williamr@2: * @param aResourceId The ID of the resource containing the title text. williamr@2: */ williamr@2: IMPORT_C void SetTitleL(TInt aResourceId); williamr@2: williamr@2: /** williamr@2: * Sets the specified page to be dimmed or undimmed. The page is redrawn williamr@2: * immediately. williamr@2: * williamr@2: * @param aPageId The ID of the page to be dimmed. williamr@2: * @param aDimmed @c ETrue to dim the page, @c EFalse to un-dim it. williamr@2: */ williamr@2: IMPORT_C void SetPageDimmedNow(TInt aPageId,TBool aDimmed); williamr@2: williamr@2: /** williamr@2: * Sets the specified dialog line to a non-focusing state. After this williamr@2: * function is called, the line will never be given keyboard focus. williamr@2: * williamr@2: * @param aControlId The ID of the control in the line which is to be williamr@2: * set as non-focusing. williamr@2: */ williamr@2: IMPORT_C void SetLineNonFocusing(TInt aControlId); williamr@2: williamr@2: /** williamr@2: * Dims and deactivates, or un-dims and re-activates, the specified line. williamr@2: * williamr@2: * @param aControlId The ID of the line to dim or un-dim. williamr@2: * @param aDimmed @c ETrue to dim the line, @c EFalse to un-dim it. williamr@2: */ williamr@2: IMPORT_C void SetLineDimmedNow(TInt aControlId,TBool aDimmed); williamr@2: williamr@2: /** williamr@2: * Makes the specified control visible or invisible. This function affects williamr@2: * the specified control, the visibility of the caption is not affected. williamr@2: * williamr@2: * @param aControlId The ID of the control to make visible or invisible. williamr@2: * @param aVisible @c ETrue to make the control visible. williamr@2: * @c EFalse to make the control invisible. williamr@2: */ williamr@2: IMPORT_C void MakeLineVisible(TInt aControlId,TBool aVisible); williamr@2: williamr@2: /** williamr@2: * Makes the whole specified line visible and active or invisible and williamr@2: * inactive. This function affects both the specified control and williamr@2: * the caption. williamr@2: * williamr@2: * @param aControlId The ID of the control on the line to make visible williamr@2: * or invisible. williamr@2: * @param aVisible @c ETrue to make the line visible. @c EFalse to make the williamr@2: * line invisible. williamr@2: */ williamr@2: IMPORT_C void MakeWholeLineVisible(TInt aControlId,TBool aVisible); williamr@2: williamr@2: /** williamr@2: * Deletes the specified dialog line. williamr@2: * williamr@2: * @param aControlId The dialog line to delete. williamr@2: * @param aRedraw Whether to redraw the page. Default value is @c ETrue. williamr@2: */ williamr@2: IMPORT_C void DeleteLine(TInt aControlId, TBool aRedraw=ETrue); williamr@2: williamr@2: /** williamr@2: * Inserts a line in the dialog. The function takes as arguments the page williamr@2: * and line index at which the line is to be inserted, and the resource used williamr@2: * to construct it. williamr@2: * williamr@2: * @param aIndex The index at which the line is to be inserted. williamr@2: * @param aResourceId The ID of the resource which defines the line. williamr@2: * @param aPageId The page on which the line is to be added. williamr@2: */ williamr@2: IMPORT_C void InsertLineL(TInt aIndex,TInt aResourceId,TInt aPageId=0); williamr@2: williamr@2: /** williamr@2: * Makes the specified panel button visible or invisible. williamr@2: * williamr@2: * @param aButtonId The ID of the panel button to make visible or invisible. williamr@2: * @param aVisible @c ETrue to make the panel visible. williamr@2: * @c EFalse to make it invisible. williamr@2: */ williamr@2: IMPORT_C void MakePanelButtonVisible(TInt aButtonId,TBool aVisible); williamr@2: williamr@2: /** williamr@2: * Tries to change focus to the specified line. Fails if the line ID is not williamr@2: * valid. Calls @c PrepareForFocusTransitionL() before focus is given to williamr@2: * the line. williamr@2: * williamr@2: * @param aControlId The ID of the line to focus. williamr@2: */ williamr@2: IMPORT_C void TryChangeFocusToL(TInt aControlId); williamr@2: williamr@2: /** williamr@2: * Switches the latent line. The latent line is switched from williamr@2: * @c aNoLongerLatent to @c aBecomesLatent. If dialog lines are latent they williamr@2: * are not visible and are not taken into account when laying out the williamr@2: * dialog. Latent lines can then be swapped around on the dialog later. williamr@2: * williamr@2: * @param aBecomesLatent The line ID of the line to become latent. williamr@2: * @param aNoLongerLatent The line ID of the line to that is no longer williamr@2: * latent. williamr@2: */ williamr@2: IMPORT_C void SwitchLineLatency(TInt aBecomesLatent,TInt aNoLongerLatent); williamr@2: williamr@2: /** williamr@2: * Sets the specified page to be densely packed, or normally packed. This williamr@2: * reduces the spacing between the dialog's lines. williamr@2: * williamr@2: * @param aPageId The ID of the page to be densely packed. williamr@2: * @param aDensePacking @c ETrue for dense packing. @c EFalse for normal williamr@2: * packing. williamr@2: */ williamr@2: IMPORT_C void SetPageDensePacking(TInt aPageId,TBool aDensePacking); williamr@2: williamr@2: /** williamr@2: * Dynamically constructs a dialog with the specified flags and buttons williamr@2: * and with a single activated empty page with ID 0. The dialog is therefore williamr@2: * ready to dynamically add lines to. williamr@2: * williamr@2: * @param aFlags Dialog flags. williamr@2: * @param aButtonsId Dialog buttons. williamr@2: */ williamr@2: IMPORT_C void ConstructAutoDialogLC(TInt aFlags,TInt aButtonsId); williamr@2: williamr@2: /** williamr@2: * Sets controllers return value. williamr@2: * williamr@2: * @param[in] aControlId Control identifier for wanted caption controller. williamr@2: * @param[in] aControlType Type of control. williamr@2: * @param[out] aReturnValue Controllers return value. williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C void DeclareItemAuto(TInt aControlId, williamr@2: TInt aControlType, williamr@2: TAny* aReturnValue); williamr@2: williamr@2: /** williamr@2: * Lays out the dialog, setting it to take its preferred size and williamr@2: * position for the screen. williamr@2: * williamr@2: * @since 5.1 williamr@2: */ williamr@2: IMPORT_C void Layout(); williamr@2: williamr@2: /** williamr@2: * Gets the preferred size of a dialog. The maximum size that the dialog williamr@2: * must fit within must be specified, e.g. the size of the physical screen. williamr@2: * williamr@2: * @param aMaxSize The maximum size of the area in which the dialog must williamr@2: * fit. williamr@2: * @return The preferred size of the dialog. williamr@2: */ williamr@2: IMPORT_C TSize PreferredSize(const TSize& aMaxSize) const; williamr@2: williamr@2: /** williamr@2: * Creates a control line on the page ID specified active page in williamr@2: * the dialog. williamr@2: * The line can thereafter be accessed through the identifier @c aControlId. williamr@2: * A control of type @c aControlType is created by the control factory and williamr@2: * the return value of the line set to @c aReturnValue. If the value of williamr@2: * @c aControlType is not known to the control factory then the construction williamr@2: * of the control must be handled by @c CreateCustomControlL(). williamr@2: * williamr@2: * @param aCaption The caption to appear in the dialog line. williamr@2: * @param aControlId The ID of the active page on which the control williamr@2: * line is to be created. williamr@2: * @param aControlType The type of control to create. williamr@2: * @param aReturnValue Deprecated. A random pointer. williamr@2: * @return A pointer to the newly created control. williamr@2: */ williamr@2: IMPORT_C CCoeControl* CreateLineByTypeL(const TDesC& aCaption, williamr@2: TInt aControlId, williamr@2: TInt aControlType, williamr@2: TAny* aReturnValue); williamr@2: williamr@2: /** williamr@2: * Creates a control line on the caption specified active page williamr@2: * in the dialog. williamr@2: * The line can thereafter be accessed through the identifier williamr@2: * @c aControlId. williamr@2: * A control of type @c aControlType is created by the control williamr@2: * factory and the return value of the line set to @c aReturnValue. williamr@2: * If the value of @c aControlType is not known to the control factory williamr@2: * then the construction of the control must be handled by williamr@2: * @c CreateCustomControlL(). williamr@2: * williamr@2: * @param aCaption The active page on which the control line is williamr@2: * to be created. williamr@2: * @param aPageId The ID of the active page on which the control line is williamr@2: * to be created. williamr@2: * @param aControlId The ID of the control. After the line is created this williamr@2: * can be used to access it. williamr@2: * @param aControlType The type of control to create. williamr@2: * @param aReturnValue Deprecated. A random pointer. williamr@2: * @return A pointer to the newly created control. williamr@2: */ williamr@2: IMPORT_C CCoeControl* CreateLineByTypeL(const TDesC& aCaption, williamr@2: TInt aPageId, williamr@2: TInt aControlId, williamr@2: TInt aControlType, williamr@2: TAny* aReturnValue); williamr@2: williamr@2: /** williamr@2: * Sets the specified control's caption text from a descriptor. williamr@2: * williamr@2: * @param aControlId The ID of the control for which the caption williamr@2: * text is being set. williamr@2: * @param aText The text for the caption. williamr@2: */ williamr@2: IMPORT_C void SetControlCaptionL(TInt aControlId,const TDesC& aText); williamr@2: williamr@2: /** williamr@2: * Sets the specified control's caption text from a resource. williamr@2: * williamr@2: * @param aControlId The ID of the control for which the caption williamr@2: * text is being set. williamr@2: * @param aResourceId The ID of the resource containing the text for williamr@2: * the caption. williamr@2: */ williamr@2: IMPORT_C void SetControlCaptionL(TInt aControlId,TInt aResourceId); williamr@2: williamr@2: /** williamr@2: * Gets a pointer to the specified control's caption. williamr@2: * williamr@2: * @param aControlId The ID of the control for which the label is required. williamr@2: * @return A pointer to the caption. williamr@2: */ williamr@2: IMPORT_C CEikLabel* ControlCaption(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * Returns a pointer to the specified control. williamr@2: * williamr@2: * Panics if the control ID is invalid. Does not imply transfer williamr@2: * of ownership. williamr@2: * williamr@2: * @param aControlId The ID of the control for which a pointer is required. williamr@2: * @return A pointer to the control with ID aControlId. williamr@2: */ williamr@2: IMPORT_C CCoeControl* Control(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * Gets a pointer to the specified control. williamr@2: * williamr@2: * @param aControlId The ID of the control for which a pointer is required. williamr@2: * @return A pointer to the control with ID aControlId, or williamr@2: * NULL if it doesn't exist. williamr@2: */ williamr@2: IMPORT_C CCoeControl* ControlOrNull(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * Gets a reference to the dialog's command button container. williamr@2: * williamr@2: * @return The dialog's button group container. williamr@2: */ williamr@2: IMPORT_C CEikButtonGroupContainer& ButtonGroupContainer() const; williamr@2: williamr@2: /** williamr@2: * Gets a reference to the dialog title bar. williamr@2: * williamr@2: * @return A reference to the dialog title bar. williamr@2: */ williamr@2: IMPORT_C CEikMover& Title() const; williamr@2: williamr@2: /** williamr@2: * Gets a page id for the current page. williamr@2: * williamr@2: * @return Page id. williamr@2: */ williamr@2: IMPORT_C TInt ActivePageId() const; williamr@2: williamr@2: /** williamr@2: * Activates the first page on the dialog. At least one page must be active williamr@2: * before this method can be used. williamr@2: */ williamr@2: IMPORT_C void ActivateFirstPageL() const; williamr@2: williamr@2: williamr@2: williamr@2: // To Support Edit/View state switch for forms (Sapphire DFRD) williamr@2: // This breaks Binary Compatibility williamr@2: williamr@2: /** williamr@2: * Sets the dialog to either editable or uneditable williamr@2: * williamr@2: * @param aEditable @c ETrue if dialog is editable. williamr@2: * @c EFalse if dialog is uneditable. williamr@2: */ williamr@2: IMPORT_C void SetEditableL( TBool aEditable ) ; williamr@2: williamr@2: /** williamr@2: * Checks if the dialog is editable. williamr@2: * williamr@2: * @return @c ETrue if editable. williamr@2: */ williamr@2: IMPORT_C TBool IsEditable() const ; williamr@2: williamr@2: williamr@2: public: // from CCoeControl williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Handles a key event. Overrides @c CCoeControl::OfferKeyEventL(). williamr@2: * williamr@2: * @param aKeyEvent The key event. williamr@2: * @param aType The type of key event: @c EEventKey, @c EEventKeyUp williamr@2: * or @c EEventKeyDown. williamr@2: * @return Indicates whether or not the key event was used by this control. williamr@2: * @c EKeyWasConsumed if the control takes action on the key event williamr@2: * or @c EKeyWasNotConsumed otherwise. williamr@2: */ williamr@2: IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, williamr@2: TEventCode aType); williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Responds to a change in focus. williamr@2: * williamr@2: * This is called whenever the control gains or loses focus, as a result williamr@2: * of a call to @c SetFocus(). A typical use of @c FocusChanged() is to williamr@2: * change the appearance of the control, for example by drawing a focus williamr@2: * rectangle around it. williamr@2: * williamr@2: * The default implementation is empty, and should be overridden by the williamr@2: * @c CCoeControl-derived class. williamr@2: * williamr@2: * @param aDrawNow Contains the value that was passed to it by williamr@2: * @c SetFocus(). williamr@2: */ williamr@2: IMPORT_C void FocusChanged(TDrawNow aDrawNow); williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Gets the list of logical colours used to draw the control. williamr@2: * williamr@2: * The list includes an explanation of how each colour is used. williamr@2: * The default implementation is empty. williamr@2: * williamr@2: * If overriding @c GetColorUseListL(), the implementation must include williamr@2: * a base call to @c CCoeControl's @c GetColorUseListL(). williamr@2: * williamr@2: * @since ER5U williamr@2: * @param &aColorUseList The colour list. williamr@2: */ williamr@2: IMPORT_C virtual void GetColorUseListL( williamr@2: CArrayFix& aColorUseList) const; williamr@2: // not available before Release 005u williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Handles a change to the control's resources. williamr@2: * williamr@2: * The types of resources handled are those which are shared across the williamr@2: * environment, e.g. colours or fonts. For colour scheme changes, williamr@2: * @c DrawDeferred() is called in order to redraw the control. williamr@2: * williamr@2: * If overriding @c HandleResourceChange(), the implementation must include williamr@2: * a base call to @c CCoeControl's @c HandleResourceChange(). williamr@2: * williamr@2: * @since ER5U williamr@2: * @param aType A message UID value. williamr@2: */ williamr@2: IMPORT_C virtual void HandleResourceChange(TInt aType); williamr@2: // not available before Release 005u williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Gets the control's input capabilities. williamr@2: * williamr@2: * Classes that override @c CCoeControl::OfferKeyEventL() should also williamr@2: * override this function, returning a @c TCoeInputCapabilities object williamr@2: * whose attributes correspond to the behaviour of the @c OfferKeyEventL() williamr@2: * function. The default implementation returns williamr@2: * @c TCoeInputCapabilities::ENone. williamr@2: * williamr@2: * It is not necessary to call @c InputCapabilities() on any component williamr@2: * controls from inside a class's @c InputCapabilities() function. This williamr@2: * is done automatically by the UI Control Framework. williamr@2: * williamr@2: * @since ER5U williamr@2: * @return The control's input capabilities. williamr@2: */ williamr@2: IMPORT_C TCoeInputCapabilities InputCapabilities() const; williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Sets the dialog visibility williamr@2: * williamr@2: * @param aVisible @c ETrue control is visible. williamr@2: * @c EFalse control is invisible. williamr@2: */ williamr@2: IMPORT_C void MakeVisible(TBool aVisible); williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Handles pointer events. williamr@2: * williamr@2: * This function gets called whenever a pointer event occurs in the williamr@2: * control, i.e. when the pointer is within the control's extent, williamr@2: * or when the control has grabbed the pointer. The control should williamr@2: * implement this function to handle pointer events. williamr@2: * williamr@2: * Note: events of type @c EButton1Down are processed before williamr@2: * @c HandlePointerEventL() is called, in order to transfer keyboard williamr@2: * focus to the control in which the @c EButton1Down event occurred. williamr@2: * williamr@2: * If overriding @c HandlePointerEventL(), the implementation must include williamr@2: * a base call to @c CCoeControl's @c HandlePointerEventL(). williamr@2: * williamr@2: * @param aPointerEvent The pointer event. williamr@2: */ williamr@2: IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); williamr@2: williamr@2: protected: // from MEikDialogPageObserver williamr@2: williamr@2: /** williamr@2: * From @c MEikDialogPageObserver. williamr@2: * williamr@2: * Should be implemented to prepare for focus transition from the williamr@2: * current line. williamr@2: * williamr@2: * For example to validate the contents of the current control. williamr@2: */ williamr@2: IMPORT_C virtual void PrepareForFocusTransitionL(); williamr@2: williamr@2: /** williamr@2: * From @c MEikDialogPageObserver. williamr@2: * williamr@2: * Should be implemented to take any action required when the active williamr@2: * dialog page is changed. williamr@2: * williamr@2: * Not implemented. williamr@2: * williamr@2: * @param aPageId The ID of the page being switched to. williamr@2: */ williamr@2: IMPORT_C virtual void PageChangedL(TInt aPageId); williamr@2: williamr@2: /** williamr@2: * From @c MEikDialogPageObserver williamr@2: * williamr@2: * Should be implemented to take any action required when the current williamr@2: * line is changed to @c aControlId. williamr@2: * williamr@2: * Not implemented. williamr@2: * williamr@2: * @param aControlId The ID of the control being switched to. williamr@2: */ williamr@2: IMPORT_C virtual void LineChangedL(TInt aControlId); williamr@2: williamr@2: public: // from MEikDialogPageObserver williamr@2: williamr@2: /** williamr@2: * From @c MEikDialogPageObserver. williamr@2: * williamr@2: * Creates a control line in the dialog.on the active page with caption williamr@2: * text @c aCaption. williamr@2: * The line can thereafter be accessed through the identifier williamr@2: * @c aControlId. williamr@2: * A control of type @c aControlType is created by the @c Eikon williamr@2: * control factory and the return value of the line set to @c aReturnValue. williamr@2: * If the value of @c aControlType is not known to the Eikon control williamr@2: * factory then the construction of the control must be handled by williamr@2: * @c CreateCustomControlL. williamr@2: * williamr@2: * @param aControlType The type of the custom control. williamr@2: * @return Information for the custom control. williamr@2: */ williamr@2: IMPORT_C virtual SEikControlInfo CreateCustomControlL(TInt aControlType); williamr@2: williamr@2: /** williamr@2: * From @c MEikDialogPageObserver. williamr@2: * williamr@2: * For forms only: williamr@2: * Ths should be overriden with mappings between the base control types williamr@2: * that form knows how to layout. williamr@2: * williamr@2: * Always returns @c MEikDialogPageObserver::EUnknownType. williamr@2: * williamr@2: * @param aControlType Not used. williamr@2: * @return Current implementation always williamr@2: * returns @c MEikDialogPageObserver::EUnknownType. williamr@2: */ williamr@2: IMPORT_C MEikDialogPageObserver::TFormControlTypes williamr@2: ConvertCustomControlTypeToBaseControlType(TInt aControlType) const; williamr@2: williamr@2: /** williamr@2: * From @c MEikDialogPageObserver. williamr@2: * williamr@2: * Should be implemented to get the custom auto value for the custom control williamr@2: * @c aControl of type @c aControlType with return value @c aReturnValue. williamr@2: * williamr@2: * This method is included in the interface to support deprecated legacy williamr@2: * code only. williamr@2: * williamr@2: * Not implemented. williamr@2: * williamr@2: * @param aReturnValue The custom controls return value. williamr@2: * @param aControlType The type of the custom control. williamr@2: * @param aControl The control whose auto value is being retrieved. williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C virtual void GetCustomAutoValue(TAny* aReturnValue, williamr@2: TInt aControlType, williamr@2: const CCoeControl* aControl); williamr@2: williamr@2: protected: // from MCoeControlContext williamr@2: williamr@2: /** williamr@2: * From @c MCoeControlContext. williamr@2: * williamr@2: * Initialises graphics context settings. williamr@2: * williamr@2: * This function should be implemented by derived classes to initialise williamr@2: * the graphics context, given by @c aGc, with the required settings. williamr@2: * williamr@2: * @param aGc The graphics context to be initialised. williamr@2: */ williamr@2: IMPORT_C void PrepareContext(CWindowGc& aGc) const; williamr@2: williamr@2: protected: //from CCoeControl williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Writes the internal state to the given stream. williamr@2: * williamr@2: * @param[out] aWriteStream Target stream. williamr@2: */ williamr@2: IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const; williamr@2: williamr@2: private: // from CCoeControl williamr@2: williamr@2: IMPORT_C void Draw(const TRect& aRect) const; williamr@2: williamr@2: protected: williamr@2: williamr@2: /** williamr@2: * Returns the number of the control components. williamr@2: * williamr@2: * In Avkon returns 2 as the button group container is not internal. williamr@2: * williamr@2: * @return Number of control components. williamr@2: */ williamr@2: IMPORT_C TInt CountComponentControls() const; williamr@2: williamr@2: /** williamr@2: * Returns a pointer to the component control at the specified index williamr@2: * in the component control list. williamr@2: * williamr@2: * Does not imply transfer of ownership. williamr@2: * williamr@2: * @param aIndex The index of the required component control. williamr@2: * @return The required component control. williamr@2: */ williamr@2: IMPORT_C CCoeControl* ComponentControl(TInt aIndex) const; williamr@2: williamr@2: protected: williamr@2: williamr@2: /** williamr@2: * Gets number of lines in the specified page. williamr@2: * williamr@2: * @param aPageIndex Index of the page container. williamr@2: * @return The number of lines in the page. williamr@2: */ williamr@2: IMPORT_C TInt GetNumberOfLinesOnPage(TInt aPageIndex) const; williamr@2: williamr@2: /** williamr@2: * Gets number of pages in the page selector. williamr@2: * williamr@2: * @return The number of pages. williamr@2: */ williamr@2: IMPORT_C TInt GetNumberOfPages() const; williamr@2: williamr@2: /** williamr@2: * Gets specified line from specified page. williamr@2: * williamr@2: * @param aLineIndex Index of the requested line. williamr@2: * @param aPageIndex Index of the requested page. williamr@2: * @return The wanted line. williamr@2: */ williamr@2: IMPORT_C CEikCaptionedControl* GetLineByLineAndPageIndex(TInt aLineIndex, williamr@2: TInt aPageIndex) const; williamr@2: williamr@2: private: williamr@2: williamr@2: IMPORT_C void SizeChanged(); williamr@2: williamr@2: IMPORT_C TSize MinimumSize(); williamr@2: williamr@2: IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); williamr@2: williamr@2: IMPORT_C void Reserved_2(); williamr@2: williamr@2: private: williamr@2: williamr@2: /** williamr@2: * From CAknControl williamr@2: */ williamr@2: IMPORT_C void* ExtensionInterface( TUid aInterface ); williamr@2: williamr@2: protected: // from MCoeControlObserver williamr@2: williamr@2: /** williamr@2: * From @c MCoeControlObserver. williamr@2: * williamr@2: * Handles control events. williamr@2: * williamr@2: * The default implementation handles events of type @c EEventStateChanged, williamr@2: * @c EEventInteractionRefused, and @c EEventPrepareFocusTransition by williamr@2: * calling @c HandleControlStateChangeL(), @c HandleInteractionRefused(), williamr@2: * and @c PrepareForFocusTransitionL() respectively. williamr@2: * williamr@2: * Overrides @c MCoeControlObserver::HandleControlEventL(). williamr@2: * williamr@2: * @param aControl The control reporting the event. williamr@2: * @param aEventType The event type. williamr@2: */ williamr@2: IMPORT_C void HandleControlEventL(CCoeControl* aControl, williamr@2: TCoeEvent aEventType); williamr@2: williamr@2: protected: // new functions williamr@2: williamr@2: /** williamr@2: * Tries to exit the dialog when the specified button is pressed, if this williamr@2: * button should exit the dialog. williamr@2: * williamr@2: * See @c OkToExitL() to determine which buttons can exit the dialog. williamr@2: * williamr@2: * This will fail if user exit is prevented by the williamr@2: * @c EEikDialogFlagNoUserExit flag. If the @c EEikDialogFlagNotifyEsc flag williamr@2: * is not set and the dialog has been cancelled it immediately deletes williamr@2: * itself. williamr@2: * williamr@2: * @param aButtonId The id of the pressed button. williamr@2: */ williamr@2: IMPORT_C void TryExitL(TInt aButtonId); williamr@2: williamr@2: /** williamr@2: * Adjusts the IDs of all controls on a specified page. williamr@2: * williamr@2: * The adjustment consists of incrementing all the control IDs by williamr@2: * @c aControlIdDelta. williamr@2: * williamr@2: * @param aPageId The page on which the control IDs are to be adjusted. williamr@2: * @param aControlIdDelta The amount to increment the IDs. williamr@2: */ williamr@2: IMPORT_C void AdjustAllIdsOnPage(TInt aPageId,TInt aControlIdDelta); williamr@2: williamr@2: /** williamr@2: * Protected constructor creates a sleeping dialog from a resource. williamr@2: * williamr@2: * A sleeping dialog is one which can be displayed at any time since williamr@2: * its memory resources are pre-allocated. williamr@2: * williamr@2: * @param aResourceId The resource ID of the dialog to be constructed. williamr@2: */ williamr@2: IMPORT_C void ConstructSleepingDialogL(TInt aResourceId); williamr@2: williamr@2: /** williamr@2: * Protected construction of a high priority sleeping dialog from williamr@2: * a resource. williamr@2: * williamr@2: * A sleeping dialog is one which can be displayed at any time since williamr@2: * its memory resources are pre-allocated. williamr@2: * williamr@2: * @param aResourceId The resource ID of the dialog to be constructed. williamr@2: */ williamr@2: IMPORT_C void ConstructSleepingAlertDialogL(TInt aResourceId); williamr@2: williamr@2: /** williamr@2: * Rouses a sleeping dialog by dynamically constructing the dialog and williamr@2: * then bringing it to the front. williamr@2: * williamr@2: * Derived dialogs should pre-allocate any memory they need for williamr@2: * initialisation during construction via @c ConstructFromResourceL() williamr@2: * for each individual control. Derived versions of @c PreLayoutDynInitL() williamr@2: * cannot rely on allocating any further memory. williamr@2: * williamr@2: * @return Zero. williamr@2: */ williamr@2: IMPORT_C TInt RouseSleepingDialog(); williamr@2: williamr@2: /** williamr@2: * Exits sleeping dialog without deleting it. williamr@2: */ williamr@2: IMPORT_C void ExitSleepingDialog(); williamr@2: williamr@2: /** williamr@2: * Gets the ID of the control in the focused line. williamr@2: * williamr@2: * @return Current control ID. williamr@2: */ williamr@2: IMPORT_C TInt IdOfFocusControl() const; williamr@2: williamr@2: /** williamr@2: * Gets the line index of the specified control. williamr@2: * williamr@2: * The control must be on the active page. williamr@2: * williamr@2: * @param aControl The control for which the line index is required. williamr@2: * @return The line index, or @c KErrNotFound if the control is not on the williamr@2: * active page. williamr@2: */ williamr@2: IMPORT_C TInt FindLineIndex(const CCoeControl& aControl) const; williamr@2: williamr@2: /** williamr@2: * Gets a pointer to the line containing the specified control. williamr@2: * williamr@2: * This does not imply transfer of ownership from the dialog. williamr@2: * williamr@2: * @param aControlId The ID of the control. williamr@2: * @return A pointer to the line containing the control identified by williamr@2: * @c aControlId. williamr@2: */ williamr@2: IMPORT_C CEikCaptionedControl* Line(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * Gets a pointer to the current line. williamr@2: * williamr@2: * This does not imply transfer of ownership from the dialog. williamr@2: * williamr@2: * @return A pointer to the current line. williamr@2: */ williamr@2: IMPORT_C CEikCaptionedControl* CurrentLine() const; williamr@2: williamr@2: /** williamr@2: * Rotates the focus by a specified number of steps. williamr@2: * williamr@2: * Each line is a step, as are dialog tabs. williamr@2: * williamr@2: * @param aDelta The number of steps. williamr@2: * @return @c ETrue if rotation of focus is successful, williamr@2: * @c EFalse if there are no lines in the dialog or the rotation is williamr@2: * otherwise unsuccessful. williamr@2: */ williamr@2: IMPORT_C TBool RotateFocusByL(TInt aDelta); williamr@2: williamr@2: /** williamr@2: * Gets the index of the dialog's active page. williamr@2: * williamr@2: * Pages are indexed from 0 in the order they are added. williamr@2: * williamr@2: * @return The index of the active page. williamr@2: */ williamr@2: IMPORT_C TInt ActivePageIndex() const; williamr@2: williamr@2: /** williamr@2: * Recalculates the minimum sizes of the lines on the active page. williamr@2: * williamr@2: * Overrides @c CCoeControl::ResetLineMinimumSizes(). williamr@2: */ williamr@2: IMPORT_C void ResetLineMinimumSizes(); williamr@2: williamr@2: /** williamr@2: * Swaps the dialog's button group container with a new container. williamr@2: * williamr@2: * The dialog takes ownership of the new container. A pointer to the old williamr@2: * button group container is returned and ownership of this object is williamr@2: * transferred to the calling object. williamr@2: * williamr@2: * @param aContainer The new button group container. williamr@2: * @return A pointer to the old button group container. This is no longer williamr@2: * owned by the dialog. williamr@2: */ williamr@2: IMPORT_C CEikButtonGroupContainer* SwapButtonGroupContainer( williamr@2: CEikButtonGroupContainer* aContainer); williamr@2: williamr@2: /** williamr@2: * Gets a pointer to the dialog's internal button command observer. williamr@2: * williamr@2: * This is required when creating a new button group container for williamr@2: * the dialog. williamr@2: * williamr@2: * A dialog uses a proxy to observe button commands. This means dialog williamr@2: * subclasses can directly observe commands, either issued by controls williamr@2: * added to the dialog pages, or by menus launched by the dialog. williamr@2: * williamr@2: * @since 5.1 williamr@2: * @return A pointer to the dialog's internal button williamr@2: * command observer. williamr@2: */ williamr@2: IMPORT_C MEikCommandObserver* ButtonCommandObserver() const; williamr@2: williamr@2: protected: // new functions williamr@2: williamr@2: /** williamr@2: * Not implemented. williamr@2: * williamr@2: * @param aButtonId Not used. williamr@2: * @return Always return @c ETrue. williamr@2: */ williamr@2: IMPORT_C virtual TBool OkToExitL(TInt aButtonId); williamr@2: williamr@2: /** williamr@2: * Initializes the dialog's controls before the dialog is sized and williamr@2: * layed out. Empty by default. williamr@2: */ williamr@2: IMPORT_C virtual void PreLayoutDynInitL(); williamr@2: williamr@2: /** williamr@2: * Initializes the dialog's controls after the dialog has been sized williamr@2: * but before it has been activated. Empty by default. williamr@2: */ williamr@2: IMPORT_C virtual void PostLayoutDynInitL(); williamr@2: williamr@2: /** williamr@2: * Sets the line which initally receives focus. williamr@2: * This is the first focusable line on the first page in the williamr@2: * dialog by default. Reimplementations of this method must williamr@2: * activate a page before doing anything else. williamr@2: */ williamr@2: IMPORT_C virtual void SetInitialCurrentLine(); williamr@2: williamr@2: /** williamr@2: * Handles a state change in the control with id aControlId. williamr@2: * Empty by default. williamr@2: * williamr@2: * @param aControlId Not used. williamr@2: */ williamr@2: IMPORT_C virtual void HandleControlStateChangeL(TInt aControlId); williamr@2: williamr@2: /** williamr@2: * Should handle an attempt by the user to activate a dimmed button with williamr@2: * id aControlId. Prints an info message by default. williamr@2: * williamr@2: * Not implemented / Does nothing in Avkon. williamr@2: * williamr@2: * @param aControlId Not used. williamr@2: */ williamr@2: IMPORT_C virtual void HandleInteractionRefused(TInt aControlId); williamr@2: williamr@2: /** williamr@2: * Sets the size and position of the dialog given the specified size hint. williamr@2: * williamr@2: * The parameter is ignored if the @c FlagFillAppClientRect is set. williamr@2: * Otherwise it it centered and given the size that was asked for. williamr@2: * williamr@2: * @param aSize The new size. williamr@2: */ williamr@2: IMPORT_C virtual void SetSizeAndPosition(const TSize& aSize); williamr@2: williamr@2: /** williamr@2: * Returns the border style for this dialog. williamr@2: * williamr@2: * @return Border style. Always returns @c AknBorderId::EAknBorderNotePopup. williamr@2: */ williamr@2: IMPORT_C virtual TInt BorderStyle(); williamr@2: williamr@2: // Added for Avkon williamr@2: williamr@2: /** williamr@2: * Routine to map the button id ( Avkon softkey command id) to williamr@2: * @c CEikBidCancel if it is a "cancel" type command type. williamr@2: * williamr@2: * The following cases are mapped to a give an @c ExecuteLD return value williamr@2: * of 0: williamr@2: * williamr@2: * @c EAknSoftkeyCancel: williamr@2: * @c EAknSoftkeyBack: williamr@2: * @c EAknSoftkeyNo: williamr@2: * williamr@2: * Other cases are left unchanged. williamr@2: * williamr@2: * This operation is performed at the last minute and does not affect other williamr@2: * processing in @c CEik/AknDialog. williamr@2: * williamr@2: * It is a framework method; It can be overridded to obtain customized williamr@2: * behaviour. williamr@2: * williamr@2: * @param aButtonId input id to map. williamr@2: * @return 0 for re-mapped negative command ids other values williamr@2: * are returned as their original command id values. williamr@2: */ williamr@2: IMPORT_C virtual TInt MappedCommandId( TInt aButtonId ); williamr@2: williamr@2: /** williamr@2: * Get form flags of the active page williamr@2: * williamr@2: * @return Active page's form flags williamr@2: */ williamr@2: IMPORT_C TInt FormFlagsFromActivePage(); williamr@2: williamr@2: /* The following two methods are deprecated williamr@2: GetFirstLineOnFirstPageOrNull williamr@2: ControlsOnPage williamr@2: williamr@2: instead the functionality can be achieved by williamr@2: TInt GetNumberOfLinesOnPage(TInt aPageIndex) const; williamr@2: TInt GetNumberOfPages() const; williamr@2: CEikCaptionedControl* GetLineByLineAndPageIndex(TInt aLineIndex, williamr@2: TInt aPageIndex) const; williamr@2: */ williamr@2: williamr@2: /** williamr@2: * Gets first line of the first page. williamr@2: * williamr@2: * @deprecated williamr@2: * @return Pointer to the first line of the first page. If NULL there is no williamr@2: * such line. williamr@2: */ williamr@2: IMPORT_C virtual CEikCaptionedControl* GetFirstLineOnFirstPageOrNull(); williamr@2: williamr@2: /** williamr@2: * Gets all lines in the given page. williamr@2: * williamr@2: * @param aControls After execution holds all captions in the page. williamr@2: * @param aPageId ID of the target page. williamr@2: * @deprecated williamr@2: */ williamr@2: IMPORT_C void ControlsOnPage(RArray& aControls, williamr@2: TInt aPageId) const; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: protected: // from MObjectProvider williamr@2: williamr@2: /** williamr@2: * From @c MObjectProvider. williamr@2: * williamr@2: * Retrieves an object of the same type as that encapsulated in aId. williamr@2: * williamr@2: * This function is used to allow controls to ask their owners for williamr@2: * access to other objects that they own. williamr@2: * williamr@2: * Other than in the case where NULL is returned, the object returned williamr@2: * must be of the same object type - that is, the @c ETypeId member of williamr@2: * the object pointed to by the pointer returned by this function must williamr@2: * be equal to the iUid member of aId. williamr@2: * williamr@2: * @param aId An encapsulated object type ID. williamr@2: * @return Encapsulates the pointer to the object provided. williamr@2: * Note that the encapsulated pointer may be NULL. williamr@2: */ williamr@2: IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId); williamr@2: williamr@2: private: // new functions williamr@2: williamr@2: IMPORT_C virtual void CEikDialog_Reserved_1(); williamr@2: williamr@2: IMPORT_C virtual void CEikDialog_Reserved_2(); williamr@2: williamr@2: private: // internal functions williamr@2: williamr@2: void BaseConstructL(); williamr@2: williamr@2: void StaticConstructL(TInt aResourceId); williamr@2: williamr@2: void DynamicConstructL(); williamr@2: williamr@2: void CreateTitleBarL(); williamr@2: williamr@2: void CreateButtonGroupContainerL(TInt aResourceId); williamr@2: williamr@2: void CreatePageSelectorL(); williamr@2: williamr@2: void CreatePageSelectorL(TInt aResourceId); williamr@2: williamr@2: TInt WaitAsRequired(); williamr@2: williamr@2: void StopWaitingAsRequired(); williamr@2: williamr@2: TKeyResponse TryAnimateButtonAndExitL(TInt aKeycode); williamr@2: williamr@2: void GetAutoValues(); williamr@2: williamr@2: void CommonConstructSleepingDialogL(TInt aResourceId); williamr@2: williamr@2: void SetBorderStyle(); williamr@2: williamr@2: void FadeBehindPopup(TBool aFade); williamr@2: williamr@2: void DoFadeBehindPopup(TBool aFade); williamr@2: williamr@2: void DoResourceChangeLayout(); williamr@2: williamr@2: // From MAknFadedComponent williamr@2: williamr@2: IMPORT_C virtual TInt CountFadedComponents(); williamr@2: williamr@2: IMPORT_C virtual CCoeControl* FadedComponent(TInt aIndex); williamr@2: williamr@2: private: williamr@2: williamr@2: CEikMover* iTitleBar; williamr@2: williamr@2: CEikDialogPageSelector* iPageSelector; williamr@2: williamr@2: CEikButtonGroupContainer* iButtonGroupContainer; williamr@2: williamr@2: CEikDialogButtonCommandObserver* iButtonCommandObserver; williamr@2: williamr@2: TInt iDialogFlags; williamr@2: williamr@2: TInt* iExitConfirmed; williamr@2: williamr@2: TBool iIsEditable ; williamr@2: williamr@2: TAknPopupFader iPopupFader; williamr@2: williamr@2: CActiveSchedulerWait iWait; // owned, safe to use as direct member data. williamr@2: williamr@2: public : williamr@2: williamr@2: /** williamr@2: * Access to CEikDialog's extension object. williamr@2: * williamr@2: * @return Pointer to extension object. williamr@2: * Constructed in @c CEikDialog::BaseContructL williamr@2: */ williamr@2: IMPORT_C CEikDialogExtension* Extension() const; williamr@2: williamr@2: private : williamr@2: williamr@2: CEikDialogExtension* iExtension ; // owned williamr@2: williamr@2: private: williamr@2: williamr@2: friend class CEikDialogButtonCommandObserver; williamr@2: williamr@2: friend class CEikDialogExtension; williamr@2: williamr@2: friend class CAknDialog; williamr@2: williamr@2: friend class CAknCharMap; williamr@2: williamr@2: friend class CAknCharMapDialog; williamr@2: williamr@2: friend class CAknNoteDialog; williamr@2: williamr@2: friend class CAknMediatorFacade; williamr@2: williamr@2: public: // added JIn to allow access to dialog flags. williamr@2: williamr@2: /** williamr@2: * Gets flags of the dialog. williamr@2: * williamr@2: * @return Dialog flags. williamr@2: */ williamr@2: IMPORT_C TInt DialogFlags(); williamr@2: williamr@2: protected: williamr@2: williamr@2: /** williamr@2: * Sets the current Dialog into the Page selector williamr@2: */ williamr@2: void RegisterDialgWithPageSelector(); williamr@2: williamr@2: // williamr@2: // Deprecated interfaces. williamr@2: // Defined in EIKDLGUT.CPP. williamr@2: // williamr@2: public: // Declare auto interfaces. williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoTextEditorL(TInt aId,TDes* aText); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoNumberEditor(TInt aId,TInt* aNumber); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoRangeEditor(TInt aId,SEikRange* aRange); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoTimeEditor(TInt aId,TTime* aTime); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoDateEditor(TInt aId,TTime* aDate); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoTimeAndDateEditor(TInt aId,TTime* aTimeAndDate); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoDurationEditor(TInt aId, williamr@2: TTimeIntervalSeconds* aDuration); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoTimeOffsetEditor(TInt aId, williamr@2: TTimeIntervalSeconds* aTimeOffset); williamr@2: williamr@2: // IMPORT_C void DeclareAutoLatitudeEditor(TInt aId, williamr@2: // SEikDegreesMinutesDirection* aLatitude); williamr@2: // IMPORT_C void DeclareAutoLongitudeEditor(TInt aId,SEikDegreesMinutesDirection* aLongitude); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoFixedPointEditor(TInt aId,TInt* aValue); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void DeclareAutoSecretEditor(TInt aId,TDes* aText); williamr@2: williamr@2: public: // Add auto interfaces. williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoTextEditorL(const TDesC& aPrompt,TInt aId,TInt aFlags,TInt aWidthInChars,TInt aNoOfLines,TDes* aReturn); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoGlobalTextEditorL(const TDesC& aPrompt,TInt aId,TInt aFlags,TInt aWidthInChars,TInt aNoOfLines,TInt aTextLimit,CGlobalText* aReturn,TInt aFontControlFlags=EGulFontControlAll,TInt aFontNameFlags=EGulNoSymbolFonts); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoRichTextEditorL(const TDesC& aPrompt,TInt aId,TInt aFlags,TInt aWidthInChars,TInt aNoOfLines,TInt aTextLimit,CGlobalText* aReturn,TInt aFontControlFlags=EGulFontControlAll,TInt aFontNameFlags=EGulNoSymbolFonts); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoNumberEditorL(const TDesC& aPrompt,TInt aId,TInt aMin,TInt aMax,TInt* aReturn); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoRangeEditorL(const TDesC& aPrompt,TInt aId,TInt aMin,TInt aMax,HBufC* aSeparatorText,SEikRange* aReturn); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoTimeEditorL(const TDesC& aPrompt,TInt aId,const TTime& aMin,const TTime& aMax,TBool aNoSeconds,TTime* aReturn); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoDateEditorL(const TDesC& aPrompt,TInt aId,const TTime& aMin,const TTime& aMax, TBool aNoPopout,TTime* aReturn); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoTimeAndDateEditorL(const TDesC& aPrompt,TInt aId,const TTime& aMin,const TTime& aMax,TBool aNoSeconds,TBool aNoPopout,HBufC* aInterveningText,TTime* aReturn); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoDurationEditorL(const TDesC& aPrompt,TInt aId,const TTimeIntervalSeconds& aMin,const TTimeIntervalSeconds& aMax,TBool aNoSeconds,TTimeIntervalSeconds* aReturn); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoTimeOffsetEditorL(const TDesC& aPrompt,TInt aId,const TTimeIntervalSeconds& aMin,const TTimeIntervalSeconds& aMax,TBool aNoSeconds,TTimeIntervalSeconds* aReturn); williamr@2: williamr@2: // IMPORT_C void AddAutoLatitudeEditorL(const TDesC& aPrompt,TInt aId,HBufC* aDegreeSign,HBufC* aMinuteSign,HBufC* aSecondSign,HBufC* aTextForNorth,TChar aKeyToMatchForNorth,HBufC* aTextForSouth,TChar aKeyToMatchForSouth,SEikDegreesMinutesDirection* aReturn,TInt aFlags=0); williamr@2: // IMPORT_C void AddAutoLongitudeEditorL(const TDesC& aPrompt,TInt aId,HBufC* aDegreeSign,HBufC* aMinuteSign,HBufC* aSecondSign,HBufC* aTextForEast,TChar aKeyToMatchForEast,HBufC* aTextForWest,TChar aKeyToMatchForWest,SEikDegreesMinutesDirection* aReturn,TInt aFlags=0); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoFloatEditorL(const TDesC& aPrompt,TInt aId,const TReal& aMin,const TReal& aMax,TReal* aReturn); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoFixedPointEditorL(const TDesC& aPrompt,TInt aId,TInt aMin,TInt aMax,TInt* aRetValue,TInt aDecimalPlaces); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void AddAutoSecretEditorL(const TDesC& aPrompt,TInt aId,TDes* aReturn); williamr@2: williamr@2: protected: // Set state interfaces. williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetLabelL(TInt aControlId, const TDesC& aDes); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetLabelL(TInt aControlId, TInt aResourceId); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetLabelReserveLengthL(TInt aControlId, TInt aLength); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetEdwinTextL(TInt aControlId, const TDesC* aDes); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetTextEditorTextL(TInt aControlId,const CGlobalText* aGlobalText); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void ResetSecretEditor(TInt aControlId); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetFloatingPointEditorValueL(TInt aControlId, const TReal* aValue); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetFixedPointEditorValueL(TInt aControlId,TInt aValue); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetFixedPointEditorDecimal(TInt aControlId, TInt aDecimal); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetNumberEditorMinAndMax(TInt aControlId, TInt aMinimumValue, TInt aMaximumValue); // only values inside the initial min and max are permitted williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetNumberEditorValue(TInt aControlId, TInt aNumber); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetFloatEditorMinAndMax(TInt aControlId,TInt aMin,TInt aMax); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetFloatEditorValueL(TInt aControlId,TReal aFloat); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetRangeEditorMinAndMax(TInt aControlId, TInt aMinimumValue, TInt aMaximumValue); // only values inside the initial min and max are permitted williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetRangeEditorValue(TInt aControlId, const SEikRange& aRange); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetTTimeEditorMinAndMax(TInt aControlId, const TTime& aMinimumTime, const TTime& aMaximumTime); // only values inside the initial min and max are permitted williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetTTimeEditorValue(TInt aControlId, const TTime& aTime); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetDurationEditorMinAndMax(TInt aControlId, const TTimeIntervalSeconds& aMinimumDuration, const TTimeIntervalSeconds& aMaximumDuration); // only values inside the initial min and max are permi williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetDurationEditorValue(TInt aControlId, const TTimeIntervalSeconds& aDuration); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetTimeOffsetEditorMinAndMax(TInt aControlId, const TTimeIntervalSeconds& aMinimumTimeOffset, const TTimeIntervalSeconds& aMaximumTimeOffset); // only values inside the initial min and max are williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetTimeOffsetEditorValue(TInt aControlId, const TTimeIntervalSeconds& aTimeOffset); williamr@2: williamr@2: // IMPORT_C void SetLatitudeEditorValue(TInt aControlId, const SEikDegreesMinutesDirection& aLatitude); williamr@2: // IMPORT_C void SetLongitudeEditorValue(TInt aControlId, const SEikDegreesMinutesDirection& aLongitude); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetListBoxCurrentItem(TInt aControlId, TInt aItem); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void SetFileNameL(TInt aControlId, const TDesC* aFileName); williamr@2: williamr@2: protected: // Get state interfaces. williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void GetLabelText(TDes& aDes,TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void GetEdwinText(TDes& aDes,TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void GetTextEditorText(CGlobalText*& aGlobalText,TInt aControlId); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void GetSecretEditorText(TDes& aDes,TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C TReal FloatingPointEditorValue(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C TInt FixedPointEditorValue(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C TInt FixedPointEditorDecimal(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C TReal FloatEditorValue(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C TInt NumberEditorValue(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C SEikRange RangeEditorValue(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C TTime TTimeEditorValue(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C TTimeIntervalSeconds DurationEditorValue(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C TTimeIntervalSeconds TimeOffsetEditorValue(TInt aControlId) const; williamr@2: williamr@2: // IMPORT_C SEikDegreesMinutesDirection LatitudeEditorValue(TInt aControlId) const; williamr@2: // IMPORT_C SEikDegreesMinutesDirection LongitudeEditorValue(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void GetAutoValuesFromPage(CEikCapCArray* aLines); williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C TInt ListBoxCurrentItem(TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * @deprecated Not supported. williamr@2: */ williamr@2: IMPORT_C void GetFileName(TFileName* aFileName,TInt aControlId) const; williamr@2: williamr@2: /** williamr@2: * Only has effect on forms, call this after adding or deleting lines. williamr@2: * williamr@2: * @param aRedraw Whether to redraw the page. Usually expect this to be williamr@2: * @c ETrue. williamr@2: */ williamr@2: IMPORT_C void UpdatePageL(TBool aRedraw); williamr@2: williamr@2: public: williamr@2: williamr@2: /** williamr@2: * From @c CEikDialog (@c MEikDialogPageObserver). williamr@2: * williamr@2: * The interface method which is called when dialog page is tapped with williamr@2: * a stylus. williamr@2: * williamr@2: * @param aEventID An event identification number. williamr@2: */ williamr@2: IMPORT_C virtual void HandleDialogPageEventL(TInt aEventID); williamr@2: williamr@2: /** williamr@2: * Instantiates mediator support and send a command with given parameters williamr@2: * when a dialog is brought to display. williamr@2: * williamr@2: * @since 3.1 williamr@2: * @param aDialogIndex unique index to identify a dialog within the category. williamr@2: * @param aCatUid gategory uid, if default paramter is passed, application williamr@2: * uid is used as a category. williamr@2: */ williamr@2: IMPORT_C void PublishDialogL(TInt aDialogIndex, TUid aCatUid = KNullUid); williamr@2: williamr@2: /** williamr@2: * Instantiates mediator support and passes possible feedback to given williamr@2: * intance. If no observer is set, dialog tries to handle feedback by it williamr@2: * self. williamr@2: * Please note that no commands will be instantiated unless command williamr@2: * identifiers are are set using @c PublishDialogL. williamr@2: * williamr@2: * @since 3.1 williamr@2: * @param aObserver Pointer to instance implementing williamr@2: * @c MAknDialogMediatorObserver API. Can be NULL. williamr@2: */ williamr@2: IMPORT_C void SetMediatorObserver(MAknDialogMediatorObserver* aObserver); williamr@2: williamr@2: /* @since 3.1 williamr@2: * Tries to slide the dialog to the screen. If there is not enough memory for williamr@2: * sliding, the dialog appears as before. williamr@2: * williamr@2: * Method is exported because of delayed notes. williamr@2: * williamr@2: * @return void williamr@2: */ williamr@2: IMPORT_C void SlideDialog(); williamr@2: williamr@2: public: williamr@2: /** @since 3.2 williamr@2: * Sets dialog to be multilinequery. williamr@2: * williamr@2: * This is called by multiline query only. Changes tab-key behaviour williamr@2: * of the dialog page. Tab key works differently for forms and williamr@2: * multiline queries. williamr@2: * williamr@2: * @param aIsMultilineQuery Whether this dialog is multiline query williamr@2: */ williamr@2: IMPORT_C void SetMultilineQuery(TBool aIsMultilineQuery); williamr@2: }; williamr@2: williamr@2: #endif