00001
00002
00003
00004
00005
00006 #ifndef __EIKDIALG_H__
00007 #define __EIKDIALG_H__
00008
00009 #ifndef __COECOBS_H__
00010 #include <coecobs.h>
00011 #endif
00012
00013 #ifndef __COECCNTX_H__
00014 #include <coeccntx.h>
00015 #endif
00016
00017 #ifndef __EIKBCTRL_H__
00018 #include <eikbctrl.h>
00019 #endif
00020
00021 #ifndef __EIKDPOBS_H__
00022 #include <eikdpobs.h>
00023 #endif
00024
00025 #ifndef __BADESCA_H__
00026 #include <badesca.h>
00027 #endif
00028
00029 #ifndef __GULFTFLG_HRH__
00030 #include <gulftflg.hrh>
00031 #endif
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef __EIKBUTB_H__
00040 #include <eikbutb.h>
00041 #endif
00042
00043 #ifndef __EIKBTGPC_H__
00044 #include <eikbtgpc.h>
00045 #endif
00046
00047 #include <aknpopupfader.h>
00048
00049
00050 const TInt KAknMediatorFacade(0x10275076);
00051
00052
00053 class CEikMover;
00054 class CEikCaptionedControl;
00055 class CEikCapCArray;
00056 class CEikDialogPageSelector;
00057 class CEikButtonGroupContainer;
00058 class CEikDialogButtonCommandObserver;
00059 class MEikCommandObserver;
00060 class CAknDialog;
00061 class CAknNoteDialog;
00062
00063 struct SEikControlInfo;
00064
00065 class CEikDialogExtension ;
00066
00067 class CAknsListBoxBackgroundControlContext ;
00068
00069
00070
00071
00072 class CEikLabel;
00073 class CGlobalText;
00074 class MAknDialogMediatorObserver;
00075 struct SEikRange;
00076 struct SEikDegreesMinutesDirection;
00077
00078
00084 class CEikDialog : public CEikBorderedControl,
00085 public MCoeControlObserver,
00086 public MEikDialogPageObserver,
00087 public MCoeControlContext,
00088 public MAknFadedComponent
00089 {
00090
00091 public:
00092
00093 DECLARE_TYPE_ID(0x10282EA8)
00094
00095
00098 IMPORT_C CEikDialog();
00099
00103 IMPORT_C ~CEikDialog();
00104
00124 IMPORT_C virtual TInt ExecuteLD(TInt aResourceId);
00125
00131 IMPORT_C virtual void PrepareLC(TInt aResourceId);
00132
00142 IMPORT_C void ReadResourceLC(TInt aResourceId);
00143
00160 IMPORT_C virtual TInt RunLD();
00161
00168 IMPORT_C void SetTitleL(const TDesC& aText);
00169
00176 IMPORT_C void SetTitleL(TInt aResourceId);
00177
00185 IMPORT_C void SetPageDimmedNow(TInt aPageId,TBool aDimmed);
00186
00194 IMPORT_C void SetLineNonFocusing(TInt aControlId);
00195
00202 IMPORT_C void SetLineDimmedNow(TInt aControlId,TBool aDimmed);
00203
00212 IMPORT_C void MakeLineVisible(TInt aControlId,TBool aVisible);
00213
00224 IMPORT_C void MakeWholeLineVisible(TInt aControlId,TBool aVisible);
00225
00232 IMPORT_C void DeleteLine(TInt aControlId, TBool aRedraw=ETrue);
00233
00243 IMPORT_C void InsertLineL(TInt aIndex,TInt aResourceId,TInt aPageId=0);
00244
00252 IMPORT_C void MakePanelButtonVisible(TInt aButtonId,TBool aVisible);
00253
00261 IMPORT_C void TryChangeFocusToL(TInt aControlId);
00262
00273 IMPORT_C void SwitchLineLatency(TInt aBecomesLatent,TInt aNoLongerLatent);
00274
00283 IMPORT_C void SetPageDensePacking(TInt aPageId,TBool aDensePacking);
00284
00293 IMPORT_C void ConstructAutoDialogLC(TInt aFlags,TInt aButtonsId);
00294
00303 IMPORT_C void DeclareItemAuto(TInt aControlId,
00304 TInt aControlType,
00305 TAny* aReturnValue);
00306
00313 IMPORT_C void Layout();
00314
00323 IMPORT_C TSize PreferredSize(const TSize& aMaxSize) const;
00324
00341 IMPORT_C CCoeControl* CreateLineByTypeL(const TDesC& aCaption,
00342 TInt aControlId,
00343 TInt aControlType,
00344 TAny* aReturnValue);
00345
00367 IMPORT_C CCoeControl* CreateLineByTypeL(const TDesC& aCaption,
00368 TInt aPageId,
00369 TInt aControlId,
00370 TInt aControlType,
00371 TAny* aReturnValue);
00372
00380 IMPORT_C void SetControlCaptionL(TInt aControlId,const TDesC& aText);
00381
00390 IMPORT_C void SetControlCaptionL(TInt aControlId,TInt aResourceId);
00391
00398 IMPORT_C CEikLabel* ControlCaption(TInt aControlId) const;
00399
00409 IMPORT_C CCoeControl* Control(TInt aControlId) const;
00410
00418 IMPORT_C CCoeControl* ControlOrNull(TInt aControlId) const;
00419
00425 IMPORT_C CEikButtonGroupContainer& ButtonGroupContainer() const;
00426
00432 IMPORT_C CEikMover& Title() const;
00433
00439 IMPORT_C TInt ActivePageId() const;
00440
00445 IMPORT_C void ActivateFirstPageL() const;
00446
00447
00448
00449
00450
00451
00458 IMPORT_C void SetEditableL( TBool aEditable ) ;
00459
00465 IMPORT_C TBool IsEditable() const ;
00466
00467
00468 public:
00469
00482 IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
00483 TEventCode aType);
00484
00501 IMPORT_C void FocusChanged(TDrawNow aDrawNow);
00502
00517 IMPORT_C virtual void GetColorUseListL(
00518 CArrayFix<TCoeColorUse>& aColorUseList) const;
00519
00520
00536 IMPORT_C virtual void HandleResourceChange(TInt aType);
00537
00538
00557 IMPORT_C TCoeInputCapabilities InputCapabilities() const;
00558
00567 IMPORT_C void MakeVisible(TBool aVisible);
00568
00588 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00589
00590 protected:
00591
00600 IMPORT_C virtual void PrepareForFocusTransitionL();
00601
00612 IMPORT_C virtual void PageChangedL(TInt aPageId);
00613
00624 IMPORT_C virtual void LineChangedL(TInt aControlId);
00625
00626 public:
00627
00644 IMPORT_C virtual SEikControlInfo CreateCustomControlL(TInt aControlType);
00645
00659 IMPORT_C MEikDialogPageObserver::TFormControlTypes
00660 ConvertCustomControlTypeToBaseControlType(TInt aControlType) const;
00661
00678 IMPORT_C virtual void GetCustomAutoValue(TAny* aReturnValue,
00679 TInt aControlType,
00680 const CCoeControl* aControl);
00681
00682 protected:
00683
00694 IMPORT_C void PrepareContext(CWindowGc& aGc) const;
00695
00696 protected:
00697
00705 IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const;
00706
00707 private:
00708
00709 IMPORT_C void Draw(const TRect& aRect) const;
00710
00711 protected:
00712
00720 IMPORT_C TInt CountComponentControls() const;
00721
00731 IMPORT_C CCoeControl* ComponentControl(TInt aIndex) const;
00732
00733 protected:
00734
00741 IMPORT_C TInt GetNumberOfLinesOnPage(TInt aPageIndex) const;
00742
00748 IMPORT_C TInt GetNumberOfPages() const;
00749
00757 IMPORT_C CEikCaptionedControl* GetLineByLineAndPageIndex(TInt aLineIndex,
00758 TInt aPageIndex) const;
00759
00760 private:
00761
00762 IMPORT_C void SizeChanged();
00763
00764 IMPORT_C TSize MinimumSize();
00765
00766 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
00767
00768 IMPORT_C void Reserved_2();
00769
00770 private:
00771
00775 IMPORT_C void* ExtensionInterface( TUid aInterface );
00776
00777 protected:
00778
00794 IMPORT_C void HandleControlEventL(CCoeControl* aControl,
00795 TCoeEvent aEventType);
00796
00797 protected:
00798
00812 IMPORT_C void TryExitL(TInt aButtonId);
00813
00823 IMPORT_C void AdjustAllIdsOnPage(TInt aPageId,TInt aControlIdDelta);
00824
00833 IMPORT_C void ConstructSleepingDialogL(TInt aResourceId);
00834
00844 IMPORT_C void ConstructSleepingAlertDialogL(TInt aResourceId);
00845
00857 IMPORT_C TInt RouseSleepingDialog();
00858
00862 IMPORT_C void ExitSleepingDialog();
00863
00869 IMPORT_C TInt IdOfFocusControl() const;
00870
00880 IMPORT_C TInt FindLineIndex(const CCoeControl& aControl) const;
00881
00891 IMPORT_C CEikCaptionedControl* Line(TInt aControlId) const;
00892
00900 IMPORT_C CEikCaptionedControl* CurrentLine() const;
00901
00912 IMPORT_C TBool RotateFocusByL(TInt aDelta);
00913
00921 IMPORT_C TInt ActivePageIndex() const;
00922
00928 IMPORT_C void ResetLineMinimumSizes();
00929
00941 IMPORT_C CEikButtonGroupContainer* SwapButtonGroupContainer(
00942 CEikButtonGroupContainer* aContainer);
00943
00958 IMPORT_C MEikCommandObserver* ButtonCommandObserver() const;
00959
00960 protected:
00961
00968 IMPORT_C virtual TBool OkToExitL(TInt aButtonId);
00969
00974 IMPORT_C virtual void PreLayoutDynInitL();
00975
00980 IMPORT_C virtual void PostLayoutDynInitL();
00981
00988 IMPORT_C virtual void SetInitialCurrentLine();
00989
00996 IMPORT_C virtual void HandleControlStateChangeL(TInt aControlId);
00997
01006 IMPORT_C virtual void HandleInteractionRefused(TInt aControlId);
01007
01016 IMPORT_C virtual void SetSizeAndPosition(const TSize& aSize);
01017
01023 IMPORT_C virtual TInt BorderStyle();
01024
01025
01026
01050 IMPORT_C virtual TInt MappedCommandId( TInt aButtonId );
01051
01057 IMPORT_C TInt FormFlagsFromActivePage();
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068
01069
01077 IMPORT_C virtual CEikCaptionedControl* GetFirstLineOnFirstPageOrNull();
01078
01086 IMPORT_C void ControlsOnPage(RArray<CEikCaptionedControl*>& aControls,
01087 TInt aPageId) const;
01088
01089
01090
01091
01092 protected:
01093
01111 IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
01112
01113 private:
01114
01115 IMPORT_C virtual void CEikDialog_Reserved_1();
01116
01117 IMPORT_C virtual void CEikDialog_Reserved_2();
01118
01119 private:
01120
01121 void BaseConstructL();
01122
01123 void StaticConstructL(TInt aResourceId);
01124
01125 void DynamicConstructL();
01126
01127 void CreateTitleBarL();
01128
01129 void CreateButtonGroupContainerL(TInt aResourceId);
01130
01131 void CreatePageSelectorL();
01132
01133 void CreatePageSelectorL(TInt aResourceId);
01134
01135 TInt WaitAsRequired();
01136
01137 void StopWaitingAsRequired();
01138
01139 TKeyResponse TryAnimateButtonAndExitL(TInt aKeycode);
01140
01141 void GetAutoValues();
01142
01143 void CommonConstructSleepingDialogL(TInt aResourceId);
01144
01145 void SetBorderStyle();
01146
01147 void FadeBehindPopup(TBool aFade);
01148
01149 void DoFadeBehindPopup(TBool aFade);
01150
01151 void DoResourceChangeLayout();
01152
01153
01154
01155 IMPORT_C virtual TInt CountFadedComponents();
01156
01157 IMPORT_C virtual CCoeControl* FadedComponent(TInt aIndex);
01158
01159 private:
01160
01161 CEikMover* iTitleBar;
01162
01163 CEikDialogPageSelector* iPageSelector;
01164
01165 CEikButtonGroupContainer* iButtonGroupContainer;
01166
01167 CEikDialogButtonCommandObserver* iButtonCommandObserver;
01168
01169 TInt iDialogFlags;
01170
01171 TInt* iExitConfirmed;
01172
01173 TBool iIsEditable ;
01174
01175 TAknPopupFader iPopupFader;
01176
01177 CActiveSchedulerWait iWait;
01178
01179 public :
01180
01187 IMPORT_C CEikDialogExtension* Extension() const;
01188
01189 private :
01190
01191 CEikDialogExtension* iExtension ;
01192
01193 private:
01194
01195 friend class CEikDialogButtonCommandObserver;
01196
01197 friend class CEikDialogExtension;
01198
01199 friend class CAknDialog;
01200
01201 friend class CAknCharMap;
01202
01203 friend class CAknCharMapDialog;
01204
01205 friend class CAknNoteDialog;
01206
01207 friend class CAknMediatorFacade;
01208
01209 public:
01210
01216 IMPORT_C TInt DialogFlags();
01217
01218 protected:
01219
01223 void RegisterDialgWithPageSelector();
01224
01225
01226
01227
01228
01229 public:
01230
01234 IMPORT_C void DeclareAutoTextEditorL(TInt aId,TDes* aText);
01235
01239 IMPORT_C void DeclareAutoNumberEditor(TInt aId,TInt* aNumber);
01240
01244 IMPORT_C void DeclareAutoRangeEditor(TInt aId,SEikRange* aRange);
01245
01249 IMPORT_C void DeclareAutoTimeEditor(TInt aId,TTime* aTime);
01250
01254 IMPORT_C void DeclareAutoDateEditor(TInt aId,TTime* aDate);
01255
01259 IMPORT_C void DeclareAutoTimeAndDateEditor(TInt aId,TTime* aTimeAndDate);
01260
01264 IMPORT_C void DeclareAutoDurationEditor(TInt aId,
01265 TTimeIntervalSeconds* aDuration);
01266
01270 IMPORT_C void DeclareAutoTimeOffsetEditor(TInt aId,
01271 TTimeIntervalSeconds* aTimeOffset);
01272
01273
01274
01275
01276
01280 IMPORT_C void DeclareAutoFixedPointEditor(TInt aId,TInt* aValue);
01281
01285 IMPORT_C void DeclareAutoSecretEditor(TInt aId,TDes* aText);
01286
01287 public:
01288
01292 IMPORT_C void AddAutoTextEditorL(const TDesC& aPrompt,TInt aId,TInt aFlags,TInt aWidthInChars,TInt aNoOfLines,TDes* aReturn);
01293
01297 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);
01298
01302 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);
01303
01307 IMPORT_C void AddAutoNumberEditorL(const TDesC& aPrompt,TInt aId,TInt aMin,TInt aMax,TInt* aReturn);
01308
01312 IMPORT_C void AddAutoRangeEditorL(const TDesC& aPrompt,TInt aId,TInt aMin,TInt aMax,HBufC* aSeparatorText,SEikRange* aReturn);
01313
01317 IMPORT_C void AddAutoTimeEditorL(const TDesC& aPrompt,TInt aId,const TTime& aMin,const TTime& aMax,TBool aNoSeconds,TTime* aReturn);
01318
01322 IMPORT_C void AddAutoDateEditorL(const TDesC& aPrompt,TInt aId,const TTime& aMin,const TTime& aMax, TBool aNoPopout,TTime* aReturn);
01323
01327 IMPORT_C void AddAutoTimeAndDateEditorL(const TDesC& aPrompt,TInt aId,const TTime& aMin,const TTime& aMax,TBool aNoSeconds,TBool aNoPopout,HBufC* aInterveningText,TTime* aReturn);
01328
01332 IMPORT_C void AddAutoDurationEditorL(const TDesC& aPrompt,TInt aId,const TTimeIntervalSeconds& aMin,const TTimeIntervalSeconds& aMax,TBool aNoSeconds,TTimeIntervalSeconds* aReturn);
01333
01337 IMPORT_C void AddAutoTimeOffsetEditorL(const TDesC& aPrompt,TInt aId,const TTimeIntervalSeconds& aMin,const TTimeIntervalSeconds& aMax,TBool aNoSeconds,TTimeIntervalSeconds* aReturn);
01338
01339
01340
01341
01345 IMPORT_C void AddAutoFloatEditorL(const TDesC& aPrompt,TInt aId,const TReal& aMin,const TReal& aMax,TReal* aReturn);
01346
01350 IMPORT_C void AddAutoFixedPointEditorL(const TDesC& aPrompt,TInt aId,TInt aMin,TInt aMax,TInt* aRetValue,TInt aDecimalPlaces);
01351
01355 IMPORT_C void AddAutoSecretEditorL(const TDesC& aPrompt,TInt aId,TDes* aReturn);
01356
01357 protected:
01358
01362 IMPORT_C void SetLabelL(TInt aControlId, const TDesC& aDes);
01363
01367 IMPORT_C void SetLabelL(TInt aControlId, TInt aResourceId);
01368
01372 IMPORT_C void SetLabelReserveLengthL(TInt aControlId, TInt aLength);
01373
01377 IMPORT_C void SetEdwinTextL(TInt aControlId, const TDesC* aDes);
01378
01382 IMPORT_C void SetTextEditorTextL(TInt aControlId,const CGlobalText* aGlobalText);
01383
01387 IMPORT_C void ResetSecretEditor(TInt aControlId);
01388
01392 IMPORT_C void SetFloatingPointEditorValueL(TInt aControlId, const TReal* aValue);
01393
01397 IMPORT_C void SetFixedPointEditorValueL(TInt aControlId,TInt aValue);
01398
01402 IMPORT_C void SetFixedPointEditorDecimal(TInt aControlId, TInt aDecimal);
01403
01407 IMPORT_C void SetNumberEditorMinAndMax(TInt aControlId, TInt aMinimumValue, TInt aMaximumValue);
01408
01412 IMPORT_C void SetNumberEditorValue(TInt aControlId, TInt aNumber);
01413
01417 IMPORT_C void SetFloatEditorMinAndMax(TInt aControlId,TInt aMin,TInt aMax);
01418
01422 IMPORT_C void SetFloatEditorValueL(TInt aControlId,TReal aFloat);
01423
01427 IMPORT_C void SetRangeEditorMinAndMax(TInt aControlId, TInt aMinimumValue, TInt aMaximumValue);
01428
01432 IMPORT_C void SetRangeEditorValue(TInt aControlId, const SEikRange& aRange);
01433
01437 IMPORT_C void SetTTimeEditorMinAndMax(TInt aControlId, const TTime& aMinimumTime, const TTime& aMaximumTime);
01438
01442 IMPORT_C void SetTTimeEditorValue(TInt aControlId, const TTime& aTime);
01443
01447 IMPORT_C void SetDurationEditorMinAndMax(TInt aControlId, const TTimeIntervalSeconds& aMinimumDuration, const TTimeIntervalSeconds& aMaximumDuration);
01448
01452 IMPORT_C void SetDurationEditorValue(TInt aControlId, const TTimeIntervalSeconds& aDuration);
01453
01457 IMPORT_C void SetTimeOffsetEditorMinAndMax(TInt aControlId, const TTimeIntervalSeconds& aMinimumTimeOffset, const TTimeIntervalSeconds& aMaximumTimeOffset);
01458
01462 IMPORT_C void SetTimeOffsetEditorValue(TInt aControlId, const TTimeIntervalSeconds& aTimeOffset);
01463
01464
01465
01466
01470 IMPORT_C void SetListBoxCurrentItem(TInt aControlId, TInt aItem);
01471
01475 IMPORT_C void SetFileNameL(TInt aControlId, const TDesC* aFileName);
01476
01477 protected:
01478
01482 IMPORT_C void GetLabelText(TDes& aDes,TInt aControlId) const;
01483
01487 IMPORT_C void GetEdwinText(TDes& aDes,TInt aControlId) const;
01488
01492 IMPORT_C void GetTextEditorText(CGlobalText*& aGlobalText,TInt aControlId);
01493
01497 IMPORT_C void GetSecretEditorText(TDes& aDes,TInt aControlId) const;
01498
01502 IMPORT_C TReal FloatingPointEditorValue(TInt aControlId) const;
01503
01507 IMPORT_C TInt FixedPointEditorValue(TInt aControlId) const;
01508
01512 IMPORT_C TInt FixedPointEditorDecimal(TInt aControlId) const;
01513
01517 IMPORT_C TReal FloatEditorValue(TInt aControlId) const;
01518
01522 IMPORT_C TInt NumberEditorValue(TInt aControlId) const;
01523
01527 IMPORT_C SEikRange RangeEditorValue(TInt aControlId) const;
01528
01532 IMPORT_C TTime TTimeEditorValue(TInt aControlId) const;
01533
01537 IMPORT_C TTimeIntervalSeconds DurationEditorValue(TInt aControlId) const;
01538
01542 IMPORT_C TTimeIntervalSeconds TimeOffsetEditorValue(TInt aControlId) const;
01543
01544
01545
01546
01550 IMPORT_C void GetAutoValuesFromPage(CEikCapCArray* aLines);
01551
01555 IMPORT_C TInt ListBoxCurrentItem(TInt aControlId) const;
01556
01560 IMPORT_C void GetFileName(TFileName* aFileName,TInt aControlId) const;
01561
01568 IMPORT_C void UpdatePageL(TBool aRedraw);
01569
01570 public:
01571
01580 IMPORT_C virtual void HandleDialogPageEventL(TInt aEventID);
01581
01591 IMPORT_C void PublishDialogL(TInt aDialogIndex, TUid aCatUid = KNullUid);
01592
01604 IMPORT_C void SetMediatorObserver(MAknDialogMediatorObserver* aObserver);
01605
01606
01607
01608
01609
01610
01611
01612
01613
01614 IMPORT_C void SlideDialog();
01615
01616 public:
01626 IMPORT_C void SetMultilineQuery(TBool aIsMultilineQuery);
01627 };
01628
01629 #endif