xinshebtcontainer.cpp

来自「打开蓝牙」· C++ 代码 · 共 139 行

CPP
139
字号
/*
* ============================================================================
*  Name     : CXinSheBTContainer from CCoeControl, MCoeControlObserver
*  Part of  : XinSheBT
*  Copyright (c) 2009 Xinshe All rights reserved.
* ============================================================================
*/

// INCLUDE FILES
#include <XinSheBT.rsg>	// R_BLUETOOTHCHAT_DIALOG
#include "XinSheBT.hrh"	// commands
#include "XinSheBTContainer.h"
#include "BluetoothDefinitions.h"

// System includes
#include <AknGlobalNote.h>
#include <AknNoteWrappers.h>
#include <AknQueryDialog.h>
#include <AknWaitDialog.h>
#include <eikmenup.h>
#include <stringloader.h>		// StringLoader

// User includes
#include "XinSheBTDialog.h"	// CBluetoothChatDialog
#include "BluetoothDeviceSearcher.h"	// CBluetoothDeviceSearcher
#include "BluetoothServiceSearcher.h"	// CBluetoothServiceSearcher
#include "BluetoothClient.h" 

// ================= MEMBER FUNCTIONS =======================

// C++ default constructor can NOT contain any code, that
// might leave.
//
CXinSheBTContainer::CXinSheBTContainer()
    {
    }

// EPOC default constructor can leave.
void CXinSheBTContainer::ConstructL(const TRect& aRect)
    {
// 
// 	iAppDialog = new (ELeave) CBluetoothChatDialog;
// 	iAppDialog->SetMopParent(this);
// 	iAppDialog->ExecuteLD(R_BLUETOOTHCHAT_DIALOG);
// 	AddToStackL(iAppDialog);	
// 	iClient = CBluetoothClient::NewL(*this);


    CreateWindowL();
    SetRect(aRect);
    ActivateL();
     }

// Destructor
CXinSheBTContainer::~CXinSheBTContainer()
    {
    }

// ---------------------------------------------------------
// CXinSheBTContainer::FocusTo(TInt aCommand)
// Change foccused control.
// (other items were commented in a header).
// ---------------------------------------------------------
//

void CXinSheBTContainer::FocusTo(TInt aCommand)
    {
    }

// ---------------------------------------------------------
// CXinSheBTContainer::SizeChanged()
// Called by framework when the view size is changed
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CXinSheBTContainer::SizeChanged()
    {
    }

// ---------------------------------------------------------
// CXinSheBTContainer::CountComponentControls() const
// (other items were commented in a header).
// ---------------------------------------------------------
//
TInt CXinSheBTContainer::CountComponentControls() const
    {
    return 0; // return nbr of controls inside this container
    }

// ---------------------------------------------------------
// CXinSheBTContainer::ComponentControl(TInt aIndex) const
// (other items were commented in a header).
// ---------------------------------------------------------
//
CCoeControl* CXinSheBTContainer::ComponentControl(TInt aIndex) const
    {
		return NULL;
    }

// ---------------------------------------------------------
// CXinSheBTContainer::Draw(const TRect& aRect) const
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CXinSheBTContainer::Draw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();
    gc.SetPenStyle(CGraphicsContext::ENullPen);
    gc.SetBrushColor(KRgbWhite);
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    gc.DrawRect(aRect);
    }

// ---------------------------------------------------------
// CXinSheBTContainer::OfferKeyEventL(...)
// Notify key events to editors.
// (other items were commented in a header).
// ---------------------------------------------------------
//
TKeyResponse CXinSheBTContainer::OfferKeyEventL(
    const TKeyEvent& aKeyEvent, TEventCode aType)
    {
    return EKeyWasNotConsumed;
    }


// ---------------------------------------------------------
// CXinSheBTContainer::HandleControlEventL(
//     CCoeControl* aControl,TCoeEvent aEventType)
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CXinSheBTContainer::HandleControlEventL(
    CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
    {
    }

// End of File  

⌨️ 快捷键说明

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