chxavmessagedialog.h
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:3k
- /*****************************************************************************
- * chxavmessagedialog.h
- * --------------------
- *
- * Synopsis:
- * Contains the declaration of the CHXAvMessageDialog. It's used to encapsulate
- * nicely the diffent dialogs and warning boxes, requiring input or yes/no/cancel.
- *
- * Target:
- * Symbian OS
- *
- *
- * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- *****************************************************************************/
- #ifndef _chxavmessagedialog_h_
- #define _chxavmessagedialog_h_
- // Symbian includes...
- #include <aknglobalnote.h>
- #include <aknnotedialog.h>
- #include <aknquerydialog.h>
- #include <aknprogressdialog.h>
- class MProgressDialogCallback;
- class CAknWaitDialog;
- class CAknResourceNoteDialog;
- namespace CHXAvMessageDialog
- {
- // query type (affects softkey text only)
- enum QueryPromptType
- {
- QueryYesNo,
- QueryOkCancel,
- QueryOkBack
- };
- // info type (affects softkey text only)
- enum InfoPromptType
- {
- PromptOk,
- PromptCancel,
- PromptBack,
- PromptClose
- };
- // show info, prompt to continue
- void DoLongTextInfoPromptL(const TDesC& caption, const TDesC& text, InfoPromptType type = PromptOk);
- // show query; wait for affirm or reject
- bool DoQueryL(TInt textResID, QueryPromptType type = QueryYesNo, CAknQueryDialog::TTone tone = CAknQueryDialog::ENoTone);
- bool DoQueryL(const TDesC& promptText, QueryPromptType type = QueryYesNo, CAknQueryDialog::TTone tone = CAknQueryDialog::ENoTone);
- HBufC* DoQueryTextL(const TDesC& prompt, const TDesC& defaultText, TUint cchMax);
-
- // show alert with empty softkey, auto-hide or permanent
- void DoAlertInfoL(const TDesC& text, bool bModal = true,
- CAknNoteDialog::TTimeout timeout = CAknNoteDialog::EShortTimeout,
- CAknNoteDialog::TTone tone = CAknNoteDialog::ENoTone);
- void DoAlertConfirmL(const TDesC& text,
- bool bModal = true,
- CAknNoteDialog::TTimeout timeout = CAknNoteDialog::EShortTimeout,
- CAknNoteDialog::TTone tone = CAknNoteDialog::ENoTone);
- void DoAlertWarnL(const TDesC& text,
- bool bModal = true,
- CAknNoteDialog::TTimeout timeout = CAknNoteDialog::EShortTimeout,
- CAknNoteDialog::TTone tone = CAknNoteDialog::ENoTone);
- void DoAlertErrorL(const TDesC& text,
- bool bModal = true,
- CAknNoteDialog::TTimeout timeout = CAknNoteDialog::ENoTimeout,
- CAknNoteDialog::TTone tone = CAknNoteDialog::ENoTone);
- void DoSystemErrorNoteL(TInt err);
- // ask for unique filename
- TFileName* GetFileNameFromUserL(const TDesC& prompt, const TDesC& oldName = KNullDesC, TUint32 cchMaxName = KMaxFileName);
- TInt DoGlobalNoteL(TAknGlobalNoteType type, TInt textResID);
- TInt DoGlobalNoteL(TAknGlobalNoteType type, const TDesC& text);
- void CancelGlobalNoteL(TInt idNote);
-
- }
- // this enables us to reset the softkeys for the note
- template< typename BaseClass>
- class CHXAvNoteWrapper
- : public BaseClass
- {
- public:
- CHXAvNoteWrapper(bool bIsModal, bool bAddCloseButton)
- : BaseClass(bIsModal), m_bAddCloseButton(bAddCloseButton) {}
- void PostLayoutDynInitL();
- private:
- bool m_bAddCloseButton;
- };
- #endif // _chxavmessagedialog_h_