Esempio n. 1
0
void CTcContainer::ConstructL( const TRect& aRect )
{
    // Create a window for this application view
    CreateWindowL();

#ifdef __SERIES90_
    // Set skin configuration
    CCknSkinBase& skin = CknEnv().Skin();
    skin.SetAppViewType( ESkinAppViewNoCbaNoToolband );
#endif

    CreateLabelsL( aRect );

    // Set windows size and activate it
    SetRect( aRect );
    ActivateL();
}
void CMainMenuGridContainer::ConstructL(const TRect& aRect, 
                                        CMainMenuGridView* aView, 
                                        const TInt* aMbmImageIds,
                                        const TInt* aMbmMaskIds,
                                        const TInt* aMainMenuCommandIds)
{
   CreateWindowL();

   iView = aView;
   iMbmImageIds = aMbmImageIds;
   iMbmMaskIds = aMbmMaskIds;
   iMainMenuCommandIds = aMainMenuCommandIds;

   //Activate view
   SetRect(aRect);
   ActivateL();
}
Esempio n. 3
0
void CTestContainer::ConstructL()
	{
	iColor = KRgbBlack;
	CreateWindowL();
	RWindow window = Window();
	window.SetTransparencyAlphaChannel();
	window.SetBackgroundColor(TRgb(150,150,150,150));
	iAnimationsArray=new(ELeave) CArrayPtrFlat<CAnimation>(KArrayGranularity);
	
	//Set the background of the container window to the default. 
	iBackgroundType = EBackgroundBlackRedGreenYellowStripes;
	ActivateL();

	//Construct a window that can be used in test cases.
	iCoveringWindowControl = new (ELeave) CTestWindowControl;	
	iCoveringWindowControl->ConstructL();
	}
// ---------------------------------------------------------
// CContextContactsContainer2::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CContextContactsContainer2::ConstructL(const TRect& aRect)
{
	CALLSTACKITEM_N(_CL("CContextContactsContainer2"), _CL("ConstructL"));

	CreateWindowL();
	
	iLabel = new (ELeave) CEikLabel;
	iLabel->SetContainerWindowL( *this );
	iLabel->SetTextL( _L("Group View") );
	
	iToDoLabel = new (ELeave) CEikLabel;
	iToDoLabel->SetContainerWindowL( *this );
	iToDoLabel->SetTextL( _L("Feature not available") );
	
	SetRect(aRect);
	ActivateL();
}
Esempio n. 5
0
// member functions
void CSplashContainer::ConstructL(const TRect &aRect)
{
  iBitmap = new(ELeave)CFbsBitmap();

  CreateWindowL();

  SetRect(aRect);
  SetExtentToWholeScreen();

  TFileName bitmapFile(KDrawBitmapPath);
  User::LeaveIfError(CompleteWithAppPath(bitmapFile));

  iLogoBitmap = new(ELeave)CFbsBitmap();
  User::LeaveIfError(iLogoBitmap->Load(bitmapFile, EMbmMauruSplash));

  ActivateL();
}
Esempio n. 6
0
void CTstControl::ConstructL()
	{
	RWsSession& windowServerSession=iCoeEnv->WsSession();
	windowServerSession.SetAutoFlush(ETrue);
	CreateWindowL();
	EnableDragEvents();
	ClaimPointerGrab();
	RDrawableWindow& window=*DrawableWindow();
	window.SetOrdinalPosition(0);
	window.SetShadowHeight(3);
	CWsScreenDevice& screenDevice=*iCoeEnv->ScreenDevice();
	const TSize screenSize(screenDevice.SizeInPixels());
	SetExtent(TPoint(20, 20), TSize(screenSize.iWidth-40, screenSize.iHeight-40));
	iEikonEnv->AddDialogLikeControlToStackL(this);
	iAppServer=CTstAppServer::NewL();
	ActivateL();
	}
Esempio n. 7
0
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CYuccaSettings::ConstructL(TBool aReadOnly,TBool aHidden,TBool aSystem,TTime aTime)
{
    CreateWindowL();
	
	iFileDate 	= aTime;
	iReadOnly	= aReadOnly;
	iHidden		= aHidden;
	iSystem		= aSystem;
	iAttr 		= ETrue;
	
	SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect());
	
	CreateListBoxL(iSettings);

	ActivateL();
	DrawNow();
}
void CSearchableListBoxContainer::ConstructL( const TRect& aRect, 
                                              MEikCommandObserver* aCommandObserver )
{
 
   CreateWindowL();

   iFocusControl = NULL;
   iCommandObserver = aCommandObserver;
   InitializeControlsL();
   iListBox->ItemDrawer()->ColumnData()->SetMarqueeParams(5, 6, 1000000, 200000);
   iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
   iListBox->CreateScrollBarFrameL(ETrue);
   iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn,
                                                       CEikScrollBarFrame::EAuto);	
   SetRect( aRect );
   ActivateL();
}
// -----------------------------------------------------------------------------
// CSupSplashScreenView::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CSupSplashScreenView::ConstructL( const TRect& aRect )
{
	// Create a window for this application view
	CreateWindowL();	

	// Creating splash screen control
	iSplashScreen = CSupSplashScreen::NewL();
	iSplashScreen->SetContainerWindowL(*this);

	iSplashScreen->ActivateL();

	// Set the windows size
	SetRect( aRect );

	// Activate the window, which makes it ready to be drawn
	ActivateL();
}
Esempio n. 10
0
// CMainWinControl needs a ConstructL(), because it is a compound control
// (and a window-owning control).
void CMainWinControl::ConstructL(const TRect& rect)
	{
	// Make this a window-owning control.
	CreateWindowL();
	SetRect(rect);

	// Create its only component, a CSmileyContainer
	iContainer = new (ELeave) CSmileyContainer;
	iContainer->SetContainerWindowL(*this);
	TRect containerRect = Rect();
	containerRect.Shrink(10, 10);
	iContainer->ConstructL(containerRect);
	// Activate the main window control - this will also activate the 
	// CSmileyContainer and its components.
	ActivateL();
	DrawNow();
	}
Esempio n. 11
0
// ---------------------------------------------------------
// CFepSetupContainer::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CFepSetupContainer::ConstructL(const TRect& aRect)
    {
    CreateWindowL();

    iLabel = new (ELeave) CEikLabel;
    iLabel->SetContainerWindowL( *this );
    iLabel->SetTextL( KSelectOptions );

	iFepSetting = CFepGenericGlobalSettings::NewL(*iEikonEnv,
					TFepOnOrOffKeyData(EKeyEnter, EModifierFunc|EModifierShift, EModifierFunc),
					TFepOnOrOffKeyData(EKeyEnter, EModifierFunc|EModifierShift, EModifierShift),
					EFalse);

#ifndef __SERIES60_3X__ // Series60 1.x/2.x API
	iFileNamesOfAvailableFeps = iEikonEnv->FileNamesOfAvailableFepsL();

	// Get the number of all Feps available in the system
	const TInt numberOfAvailableFeps = iFileNamesOfAvailableFeps->MdcaCount();

	// Get the name, including the path, of all the Feps in the system
	iNamesOfAvailableFeps = new(ELeave) CDesCArrayFlat(numberOfAvailableFeps+1);
	for(TInt i=0; i<numberOfAvailableFeps; i++)
		{
		// Get name of fep excluding path
		iNamesOfAvailableFeps->AppendL(TParsePtrC(iFileNamesOfAvailableFeps->MdcaPoint(i)).Name());
		}

#else // Series60 3.x API

	// Get available Fep Uids
	iEikonEnv->AvailableFepsL( iFepUids, NULL );
	iNamesOfAvailableFeps = new(ELeave) CDesCArrayFlat( iFepUids.Count() + 1 );
	// Get Fep names also
	iEikonEnv->AvailableFepsL( iFepUids, iNamesOfAvailableFeps );
	for (int i = 0; i < iFepUids.Count(); ++i) {
	  TBuf<50> buf;
	  buf.AppendNum(iFepUids[i].iUid, EHex);
	  buf.Append(' ');
	  buf.Append(iNamesOfAvailableFeps->MdcaPoint(i));
	  RDebug::Print(buf);
	}
#endif

    SetRect(aRect);
    ActivateL();
    }
Esempio n. 12
0
/*
-------------------------------------------------------------------------
This will be called when this file shandler is preraped to be used for, 
opening or constructing a file. The open/new etc. functions are called
strait after calling this function.
-------------------------------------------------------------------------
*/
void CYBrowserFileHandler1::ConstructL()
{
 	CreateWindowL();
 	
 	TFindFile AppFile(CCoeEnv::Static()->FsSession());
	if(KErrNone == AppFile.FindByDir(KMyResourceFileName, KNullDesC))
	{
 		TFileName resourceName(AppFile.File());
		BaflUtils::NearestLanguageFile(CEikonEnv::Static()->FsSession(), resourceName);
		iResId = CEikonEnv::Static()->AddResourceFileL(resourceName);
	}
	
	SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect()); 	
	
 	ActivateL();
	SetMenuL();
}
Esempio n. 13
0
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMainContainer::ConstructL()
{
	CreateWindowL();	

	iEcomHandler = CEcomHandler::NewL(this);

	iTimeOutTimer = CTimeOutTimer::NewL(CActive::EPriorityStandard,*this);
	
	GetSettingsL();
	
	SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect());

	ActivateL();
	SetMenuL();
	DrawNow();

}
Esempio n. 14
0
void CPlaylist::ConstructL(const TRect& aRect, GF_User *user)
{
    CreateWindowL();

#ifdef USE_SKIN
	iListBox = new (ELeave) CAknSingleStyleListBox();
#else
	iListBox = new (ELeave) CEikTextListBox();
#endif
	iListBox->ConstructL(this);
	iListBox->SetContainerWindowL(*this);
	iListBox->SetListBoxObserver(this);

	CDesCArray* textArray = new (ELeave) CDesCArrayFlat(16);
	iListBox->Model()->SetItemTextArray( textArray );
    iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );

    // Creates scrollbar.
    iListBox->CreateScrollBarFrameL( ETrue );
    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto);
    //iListBox->ActivateL();

	iListBox->SetFocus(ETrue);

    SetRect(aRect);
    ActivateL();
	MakeVisible(EFalse);
	m_user = user;

	strcpy(ext_list, "");
	u32 count = gf_cfg_get_key_count(user->config, "MimeTypes");
	for (u32 i=0; i<count; i++) {
		char szKeyList[1000], *sKey;
		const char *sMime = gf_cfg_get_key_name(user->config, "MimeTypes", i);
		const char *opt = gf_cfg_get_key(user->config, "MimeTypes", sMime);
		strcpy(szKeyList, opt+1);
		sKey = strrchr(szKeyList, '\"');
		if (!sKey) continue;
		sKey[0] = 0;
		strcat(ext_list, szKeyList);
		strcat(ext_list, " ");
	}

	strcpy(szCurrentDir, "");
}
Esempio n. 15
0
/**
  Second phase constructor for CLayoutTestAppView class.\n
  Creates a control's window. The created window is the child of the application's window group.\n
  Sets the view's extent i.e dimenstions.\n
  Instantiates Component controls each of CTest5Control class.\n
  Each component control is appended to a control array.\n
  The AppView object is added as the container control for all the component controls.\n
  The Appview is activated.\n
*/
void CLayoutTestAppView::ConstructL(CLayoutTest* aLayoutMan, const TRect& aRect)
    {
	CreateWindowL();
	SetRect(aRect);
	TRect ctrlRect(10, 10, 20, 20);
	for (TInt ctrlCount = 0; ctrlCount < KNumControls; ctrlCount++)
		{
		CTest5Control* testCtrl = CTest5Control::NewL(aLayoutMan, *this, ctrlRect);
		iCtrlArray.Append(testCtrl);
		testCtrl->SetContainerWindowL(*this);
		TPoint offset(20, 0);
		ctrlRect.iTl += offset;
		ctrlRect.iBr += offset;
		}	
	ActivateL();
	TRect rect(TPoint(0,0), aRect.iBr - TPoint(1,1));
 	SetRect(rect);
	}
Esempio n. 16
0
void CVoIPListBox::ConstructL(const TRect& aRect, const CCoeControl* aParent,
        MEikCommandObserver* aCommandObserver)
    {
    CEikonEnv::Static()->ReadResource(KUnnamedStr, R_UNNAMED);

    if (aParent == NULL)
        {
        CreateWindowL();
        }
    else
        {
        SetContainerWindowL(*aParent);
        }
    iCommandObserver = aCommandObserver;
    InitializeControlsL();
    SetRect(aRect);
    ActivateL();
    }
void CZXingBarcodeReaderAppView::ConstructL (const TRect& aRect )
	{
	// Create a window for this application view
	CreateWindowL ();

	iTitleFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimarySmallFont);

	iAppUi = static_cast<CZXingBarcodeReaderAppUi*>(iEikonEnv->EikAppUi());

	// Set the windows size
	SetRect (aRect );

	//Start decoder timer.
	StartTimer();
	
	// Activate the window, which makes it ready to be drawn
	ActivateL ();
	}
// ----------------------------------------------------
// CNormalSettingContainer::ConstructL()
// Symbian OS default constructor can leave.
// ----------------------------------------------------
//
void CNormalSettingContainer::ConstructL(const TRect& aRect)
    {
    // Create a window for this application view
    CreateWindowL();

    TBuf<8> value;
    
    value.FillZ();
    iConfig = CConfiguration::NewL(KConfigFile);
	if (iConfig->Get(KCfgAttFrequency,value))
		{
		iEnumText = CCommonUtils::StrToInt(value);
		iOldEnumText = iEnumText;
		}
	else
		iOldEnumText = -1;
	
	value.FillZ();
	if (iConfig->Get(KCfgAttAutoStart,value))
		{
		iBinary = CCommonUtils::StrToInt(value);
		iOldBinary = iBinary;
		}
	else
		iOldBinary = -1;
    
    iItemList = new (ELeave) CAknSettingItemList;
    iItemList->SetMopParent(this);
    iItemList->ConstructFromResourceL(R_ENTRY_SETTINGS_LIST);

    LoadListL();

    iItemList->MakeVisible(ETrue);
    iItemList->SetRect(aRect);
    iItemList->ActivateL();
    iItemList->ListBox()->UpdateScrollBarsL();
    iItemList->DrawNow();

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }
Esempio n. 19
0
void CTestRectBackground::ConstructL()
    {
    CreateWindowL();    
	CTestRectGc::ConstructL(TPoint(20,20),TSize(600,200), KRgbBlack, KRgbYellow, CGraphicsContext::ESolidBrush);
	InitComponentArrayL();

	//Create a default control
    CreateComponentControlL(2, 7);
    	
	//Control to display the offscreen bitmap
    iControlImage = new (ELeave) CTestRectImageGc();
    iControlImage->CreateWindowL(this);
    iControlImage->DrawableWindow()->SetRequiredDisplayMode(EColor16MA); 
    iControlImage->ConstructL(TPoint(200,36),TSize(128,128), KRgbRed, KRgbGreen, CGraphicsContext::ESolidBrush); 
    iControlImage->ActivateL();

	//Second control to display blended overlay
    iControlImage2 = new (ELeave) CTestRectImageGc();
    iControlImage2->CreateWindowL(this); 
    iControlImage2->DrawableWindow()->SetRequiredDisplayMode(EColor16MA); 
    iControlImage2->ConstructL(TPoint(400,36),TSize(128,128), KRgbRed, KRgbGreen, CGraphicsContext::ESolidBrush); 
    iControlImage2->ActivateL();

	//Create an offscreen bitmap     
    iOffScreen = COffScreenBitmapGc::NewL(TSize(128,128));	
	
	//Create a second offscreen bitmap     
    iOffScreen2 = COffScreenBitmapGc::NewL(TSize(128,128));	
	
	//Set up the control images to display the two offscreen maps
	iControlImage->SetBitmap(iOffScreen->GetBitmap());	
	iControlImage2->SetBitmap(iOffScreen2->GetBitmap());	
    
    iBmpBackground = new (ELeave) CFbsBitmap();
    User::LeaveIfError(iBmpBackground->Load(_L("z:\\conetest\\city.mbm")));

	//Set up the Gc origin so that the offscreen bitmaps can be tiled in the same way as the screen drawn control
	TPoint ControlPos = iControl->PositionRelativeToScreen();
	iOffScreen->OffScreenGc()->SetWindowOrigin(ControlPos);
	iOffScreen2->OffScreenGc()->SetWindowOrigin(ControlPos);
	
    ActivateL();
    
    }
void CUnRegisterContainer::ConstructL(const TRect& aRect)
    {
    CreateWindowL();

    iLabel = new (ELeave) CEikLabel;
    iLabel->SetContainerWindowL( *this );
	iLabel->SetFont(iEikonEnv->LegendFont());
    iLabel->SetTextL(*(iEikonEnv->AllocReadResourceL(R_PURPLEACE_WEB)));

	CEikStatusPane* statusPane=iEikonEnv->AppUiFactory()->StatusPane();

	TBuf<10> message;
	message.Copy(_L(""));

	CAknNavigationControlContainer* aNaviPane = (CAknNavigationControlContainer *)statusPane->ControlL(TUid::Uid(EEikStatusPaneUidNavi));

	CAknNavigationDecorator* aNaviDecorator = aNaviPane->CreateMessageLabelL(message);

    aNaviPane->PushL(*aNaviDecorator);

	CAknContextPane* cp=(CAknContextPane *)statusPane->ControlL(TUid::Uid(EEikStatusPaneUidContext));

	TBuf<128> path;
	path = CRippleVaultAppUi::ApplicationDriveAndPath();
	path.Append(KRippleImageMbmFileName);

	CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(path, EMbmRippleimageRippleimage);
	CleanupStack::PushL(bitmap);
	CFbsBitmap* bitmapmask = iEikonEnv->CreateBitmapL(path, EMbmRippleimageRippleimagem);
	CleanupStack::PushL(bitmapmask);
	cp->SetPicture(bitmap, bitmapmask);
	CleanupStack::Pop(); // bitmapmask
	CleanupStack::Pop(); // bitmap
	DrawNow();

	CAknTitlePane* tp=(CAknTitlePane*)statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle)); 
    tp->SetTextL(*(iEikonEnv->AllocReadResourceL(R_EXAMPLE_RIPPLE_PUBLISH))); // Set the text string.

	TRect Please(TPoint(0,44),TPoint(176,188));
    SetRect(Please);
    //SetRect(aRect);
    ActivateL();
    }
void CFontSizeTestControl::ConstructL(const CCoeControl* aParent)
    {
    User::LeaveIfError(iSemaphore.OpenGlobal(KSemaphore));
    
    iBidiText = TBidiText::NewL(KFullScreenSampleText, EMaximumTextLines, TBidiText::ELeftToRight);
    if (aParent)
        {
        SetContainerWindowL(*aParent);
        }
    else
        {
        CreateWindowL();        
        }
    SetRect(TRect(TPoint(0,0), CTWindow::GetDisplaySizeInPixels()));
    if (!aParent)
        {
        ActivateL();
        }
    }
// ---------------------------------------------------------
// CContextNoteContainer::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CContextNoteContainer::ConstructL(const TRect& aRect)
{
	CreateWindowL();
	
	iEdit=new (ELeave) CEikEdwin;
	iEdit->SetContainerWindowL( *this );
	iEdit->ConstructL();
	iEdit->AddEdwinObserverL(this);

	TRect r(aRect);
	r.Move(4, 4);
	r.Resize(-8, -8);
	iEdit->SetRect(r);
	iEdit->ActivateL();
	iEdit->SetFocus(ETrue);
	
	SetRect(aRect);
	ActivateL();
}
Esempio n. 23
0
/*
-----------------------------------------------------------------------
-----------------------------------------------------------------------
*/
void CMailBoxContainer::ConstructL(const TRect& aRect)
{
    CreateWindowL();
    
    iUtils.GetFileUtils().GetCurrentPath(iCurrPath);
    
    iBgContext = CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnBgAreaMain,TRect(0,0,aRect.Width(),aRect.Height()), ETrue);
	iBgContext->SetParentPos(aRect.iTl);
	
    SetRect(aRect);
    
  	ActivateL();	
	SetMenuL();
	
	CEikStatusPane*		sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane();
	if(sp)
	{		
		if(sp->CurrentLayoutResId() != R_AVKON_STATUS_PANE_LAYOUT_USUAL)//R_AVKON_STATUS_PANE_LAYOUT_SMALL_WITH_SIGNAL_PANE)
		{
			sp->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
		}
	}
	
	iSession = CMsvSession::OpenSyncL(*this);
	

	iCurrentFolder = 0;
    GetFoldersL();
    MakeNavipanelL();
    
	if(iFolderArray.Count() <= iCurrentFolder)
	{
		iCurrentFolder = 0;
	}
	
	if(iCurrentFolder < iFolderArray.Count())
	{
		if(iFolderArray[iCurrentFolder])
		{
			ReadMailFolderL(iFolderArray[iCurrentFolder]->iMscId);
		}
	}
}
Esempio n. 24
0
void CPausedContainer::ConstructL(const TRect& aRect)
{
    CreateWindowL();
    SetBlank();
    SetRect(aRect);

    //初始化BitMap变量
    iBackupBitmap = new (ELeave) CWsBitmap(iCoeEnv->WsSession());
    iBackupBitmap->Create(Rect().Size(), EColor16M);
    iBitmapDevice = CFbsBitmapDevice::NewL(iBackupBitmap);
    User::LeaveIfError(iBitmapDevice->CreateContext(iBitmapGc));
    //初始化心跳包
    iGfxTimer = new (ELeave) CGfxTimer(*this, NULL);
    iGfxTimer->ConstructL();
    iGfxTimer->StartPulse(KONE_SECOND_IN_MICRO_SECONDS / KFRAMES_PER_SECOND);
    iIsFlagDelete = EFalse;
    TRAPD(err2, iBackGroundSheep= iEikonEnv->CreateBitmapL(_L("\\resource\\apps\\RS_Man.mbm"),EMbmRs_manSheepbg));
    ActivateL();
}
Esempio n. 25
0
void CContainer3::ConstructL(const TRect& /* aRect */)
{
	CreateWindowL();

	// Construct the CSendAppUi object
	iSendAppUi = CSendAppUi::NewL(ECmdBaseId);
	iSendAppUiCapabilities.iFlags = TSendingCapabilities::ESupportsBodyText;

	// Construct the CRichText object
	iRichText = CRichText::NewL(iEikonEnv->SystemParaFormatLayerL(),
		iEikonEnv->SystemCharFormatLayerL()); 

	iFocus = 0;

	// sets full screen
	SetRect( TRect( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT ) );
	ActivateL();
	InitiateDraw();
}
// ---------------------------------------------------------------------------
// Symbian 2nd phase constructor can leave.
// ---------------------------------------------------------------------------
//
void CTactileExampleSquare::ConstructL(
    const TRect& aRect, const CCoeControl* aParent )
    {
    // Get a pointer to touch feedback instance
    iFeedback = MTouchFeedback::Instance();
    User::LeaveIfNull( iFeedback );

    SetContainerWindowL( *aParent );
    SetRect( aRect );
    
    // Set hit tester to be object itself
    SetHitTest( this );

    // Set feedback area for this control
    iFeedback->SetFeedbackArea( this, 0, Rect(),
        ETouchFeedbackBasic, ETouchEventStylusDown );

    ActivateL();
    }
void CEdwinTestControl::ConstructL()
    {
    CreateWindowL();
 
    iEditWin = new (ELeave) CEikEdwin();
    iEditWin->ConstructL( 0, 100, 100, 1 );
    iEditWin->SetContainerWindowL( *this );
    iEditWin->CreateTextViewL();
//    iEditWin->SetInputCapabilitiesL( TCoeInputCapabilities::EAllText );
    
	// make first with no size at all
	iBgContext = CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnBgScreen,TRect(0,0,1,1), ETrue );
	// Setting rect will cause SizeChanged to be called
	// and iBgContext size & position is updated accordingly.
	SetRect( CEikonEnv::Static()->EikAppUi()->ClientRect() );	
	
	ActivateL();
	DrawNow();
    }
Esempio n. 28
0
void CPenUiBackgroundWnd::Show(const TRect& aExtend, TBool aGlobalNotes, 
    TBool aInternal, TInt aPriority, TBool aResource)
    {
    //Show the window will cause a focus group change in global notes showing case.
    if (!iBitmap)
        {
        return;    
        }
    TUid curApp = GetCurAppUid();
    TUid focusApp = GetFocusAppUid();
    //dim effect due to global notes will not done by background control
    if(!aInternal || aGlobalNotes)
        return;    
      
//     if (iBitmapCpoy)
        {
//        delete iBitmapCpoy;
//        iBitmapCpoy = NULL;    
        }
    SetRect(aExtend);
    TRAP_IGNORE(ActivateL());
    MakeVisible(ETrue);
    if (!aResource)
        {
        RWsSession &ws = CCoeEnv::Static()->WsSession();
        TInt wgId =ws.GetFocusWindowGroup();    
        TInt priority = ws.GetWindowGroupOrdinalPriority(wgId);
        
        iWndGroup.SetOrdinalPosition( 0, aPriority); 

        Window().SetOrdinalPosition(0,aPriority);      
     
        Window().SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly);
        }
     else
        {
        Window().SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly);    
        }
 
    Window().Invalidate();
    DrawNow();
    }
Esempio n. 29
0
// ---------------------------------------------------------
// CGreg2Container::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CGreg2Container::ConstructL(const TRect& aRect)
{
    CreateWindowL();

    iLabel = new (ELeave) CEikLabel;
    iLabel->SetContainerWindowL( *this );
    iLabel->SetTextL( _L("Audio Device Test") );

    iToDoLabel = new (ELeave) CEikLabel;
    iToDoLabel->SetContainerWindowL( *this );
    iToDoLabel->SetTextL( _L("Use the 'options' menu") );

    
    iToDoLabel2 = new (ELeave) CEikLabel;
    iToDoLabel2->SetContainerWindowL( *this );
    iToDoLabel2->SetTextL( _L("to start the test.") );

    SetRect(aRect);
    ActivateL();
}
Esempio n. 30
0
/**
 * Construct the control (second phase).
 *  Creates a window to contain the controls and activates it.
 * @param aRect bounding rectangle
 * @param aCommandObserver command observer
 * @param aParent owning parent, or NULL
 */ 
void CCalendarManagerContainer::ConstructL( const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver )
	{
	if ( aParent == NULL )
	    {
		CreateWindowL();
	    }
	else
	    {
	    SetContainerWindowL( *aParent );
	    }
	iFocusControl = NULL;
	iCommandObserver = aCommandObserver;
	InitializeControlsL();
	SetRect( aRect );
	ActivateL();
	
	// [[[ begin generated region: do not modify [Post-ActivateL initializations]
	// ]]] end generated region [Post-ActivateL initializations]
	g_BgContext = CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnBgAreaMain, aRect, ETrue);		
	}