chxavmessagedialog.h

来自「symbian 下的helix player源代码」· C头文件 代码 · 共 109 行

H
109
字号
/*****************************************************************************
 * 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_


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?