TKeyResponse CMyHelpContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
{
	TKeyResponse  MyRet = EKeyWasNotConsumed;

	
	switch (aKeyEvent.iCode)
    {
	case EKeyUpArrow:
		if(iEditor)
		{
			iEditor->MoveCursorL(TCursorPosition::EFPageUp, EFalse);
	        iEditor->UpdateScrollBarsL();
			iEditor->DrawNow();
			MyRet = EKeyWasConsumed;
		}
		DrawNow();
		break;
	case EKeyDownArrow:
		if(iEditor)
		{
			iEditor->MoveCursorL(TCursorPosition::EFPageDown,EFalse);
			iEditor->UpdateScrollBarsL();
			iEditor->DrawNow();
			MyRet = EKeyWasConsumed;
		}
		DrawNow();
		break;
	default:
		break;
	}        

	return MyRet;
}
void CMainContainer::HandleViewCommandL(TInt aCommand)
{
	switch(aCommand)
	{
	case EAppHelpBack:
		{
			delete iMyHelpContainer;
			iMyHelpContainer = NULL;
		}
		SetMenuL();
		DrawNow();
		break;
	case EAppHelp:
		{
			delete iMyHelpContainer;
			iMyHelpContainer = NULL;    		
			iMyHelpContainer = CMyHelpContainer::NewL();
		}
		SetMenuL();
		DrawNow();    		
		break;	
	case ESwitchList:
		{
			SetGridOnL(EFalse);
		}
		SetMenuL();
		DrawNow();
		break;
	case ESwitchGrid:
		{
			SetGridOnL(ETrue);
		}
		SetMenuL();
		DrawNow();
		break;
	case EAppOpen:
		if(!iYTasksContainer && iEcomHandler )
		{
			RPointerArray<CHandlerItem> Handlers = iEcomHandler->HandlerArray();
		
			TInt CurrInd = HandleViewSelectedIndex();
			if(CurrInd >= 0 && CurrInd < Handlers.Count())
			{
				if(Handlers[CurrInd])
				{
					iYTasksContainer = iEcomHandler->GetHandlerL(*Handlers[CurrInd],iCba);
				}
			}
		}
		SetMenuL();
		DrawNow();
		break;
	default:
		if(iYTasksContainer)
		{
			iYTasksContainer->HandleCommandL(aCommand);
		}
		break;
	}	
}
Exemple #3
0
EXPORT_C void CEikButtonBase::Animate()
    {
    iButFlags|=KButtonPressedMask;
    StateChanged();
    DrawNow();
    iCoeEnv->Flush(KAnimationDelayInMicroSeconds);
    iButFlags&=(~KButtonPressedMask);
    if (!ClickCompleted())
        StateChanged();
    DrawNow();
	iCoeEnv->WsSession().Flush();
    }
void CYBrowserFileHandler1::HandleCommandL(TInt aCommand)
{
	if(iDebugFile.SubSessionHandle())
	{	
		iDebugFile.Write(_L8("cmd, "));
	}
	
	switch (aCommand)
    { 
	case EPlugAppHelpBack:
		{
			delete iMyHelpContainer;
			iMyHelpContainer = NULL;
		}
		SetMenuL();
		DrawNow();
		break;
	case EPlugAppHelp:
		{
			delete iMyHelpContainer;
			iMyHelpContainer = NULL;    		
			iMyHelpContainer = CMyHelpContainer::NewL();
		}
		SetMenuL();
		DrawNow();    		
		break;
    case EPlugAbout:
    	{			
    		HBufC* Abbout = KMailAbbout().AllocLC();
			TPtr Pointter(Abbout->Des());
			CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter);
			dlg->PrepareLC(R_ABOUT_HEADING_PANE);
			dlg->SetHeaderTextL(KMailAbboutName);  
			dlg->RunLD();
			
			CleanupStack::PopAndDestroy(Abbout);
    	}
    	break;
    case EBacktoYBrowser:
    	if(iFileHandlerUtils)
    	{
    		iFileHandlerUtils->HandleExitL(this,MYBrowserFileHandlerUtils::EChangesMade);	
    	}
    	break; 
	default:
		if(iMailBoxContainer)
		{
			iMailBoxContainer->HandleViewCommandL(aCommand);
		}
		break;
    };
}
// ----------------------------------------------------------------------------
// CAknExQueryContainer::OfferKeyEventL()
// Handles the key events.
// ----------------------------------------------------------------------------
//
TKeyResponse CAknExQueryContainer::OfferKeyEventL(
    const TKeyEvent& aKeyEvent,
    TEventCode aType )
    {
    if ( aType != EEventKey )
        {
        return EKeyWasNotConsumed;
        }
    switch ( aKeyEvent.iCode )
        {
        case EKeySpace:
            if ( iDisplayDialog )
                {
                return EKeyWasNotConsumed;
                }
            iView->DisplayNextOutlineL();
            DrawNow();
            break;
        default:
            if ( !iDisplayDialog && iListBox )
                {
                return iListBox->OfferKeyEventL( aKeyEvent, aType );
                }
            else
                {
                return EKeyWasNotConsumed;
                }
        }
    return EKeyWasConsumed;
    }
// ----------------------------------------------------------------------------
// CAknExQueryContainer::SetTextToLabelL()
// Set Label text.
// ----------------------------------------------------------------------------
//
void CAknExQueryContainer::SetTextToLabelL( TInt aResourceId )
    {
    TBuf<KAknExQueryTextBufLength> messageString;
    iCoeEnv->ReadResource( messageString, aResourceId );
    iLabel->SetTextL( messageString );
    DrawNow();
    }
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CYuccaSettings::SizeChanged()
{
/*	if(iAttr)
	{
		TInt Hours(0);
		TInt Minutes(0);
		TInt Seconds(0);
					
		GetValuesL(iReadOnly,iHidden,iSystem,iFileDate,Hours,Minutes,Seconds);
	
		iFileDate.DateTime().SetHour(Hours);
		iFileDate.DateTime().SetMinute(Minutes);
		iFileDate.DateTime().SetSecond(Seconds);
	}
	else
	{
		GetValuesL(iSettings);
	}
*/	
	if(iListBox)
	{
		iListBox->SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect());
	}
	
//	CreateListBoxL(iSettings);
	
	DrawNow();
}
Exemple #8
0
EXPORT_C void CEikFloatingPointEditor::SetValueL(const TReal* aValue)
	{
    if (!aValue)
        {
		SetTextL(NULL);
        return;
        }

	iValue=*aValue;
	// !! Now check for validity?
	TBuf<EAknMaxIntegerDigits> des;
	TRealFormat format(iTextLimit);
	format.iType|=KAllowThreeDigitExp;
	des.Num(iValue,format);

	AknTextUtils::ConvertDigitsTo(des, AknTextUtils::NumericEditorDigitType());

	SetTextL(&des);
	if ( !(iEdwinUserFlags&ENoAutoSelection) )
		{
        SetCursorPosL(des.Length(), ETrue);
        }
	else
		{
		SetCursorPosL(des.Length(), EFalse);
		}
    DrawNow();
	}
/*
-----------------------------------------------------------------------------
----------------------------------------------------------------------------
*/
void CCommandSCSettings::ConstructL(void)
{
    CreateWindowL();
	SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect());
	ActivateL();
	DrawNow();
}
void CTraceContainer::TimerExpired()
{	
	RExampleServerClient CrashClient;
	CrashClient.Connect();

	CrashClient.GetCPUMax(iMaxCpuCount);

	TExampleItem ItemBuffer;

	TFileName Bufferrr;
	TInt ItemCount(0);
	CrashClient.GetItemCount(ItemCount);
	
	TInt GotCunt = iArray.Count();
	
	for(TInt i = (GotCunt - 1); i < ItemCount; i++)
	{
		ItemBuffer.iIndex = i;
		CrashClient.GetItemL(ItemBuffer);	
		AddItemListL(ItemBuffer);
	}

	if(iServerIsOn)
	{
		iTimeOutTimer->After(1000000);
	}

	CrashClient.Close();
	DrawNow();
}
Exemple #11
0
TKeyResponse CSliderControl::OfferKeyEventL(const TKeyEvent& aKeyEvent, enum TEventCode aType)
	{
	if (iSlider)
		{iSlider->OfferKeyEventL(aKeyEvent,aType);}
	return CCoeControl::OfferKeyEventL(aKeyEvent,aType);
	DrawNow();
	}
/*
-------------------------------------------------------------------------
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 CCrashContainer::ConstructL(CEikButtonGroupContainer* aCba)
{
	iCba = aCba;
	
 	CreateWindowL();
 	
 	iServerIsOn = IsServerOn();
 	iBgContext = CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnBgAreaMain,TRect(0,0,1,1), ETrue);
	
 	iResId = -1;
 	TFindFile AppFile(CCoeEnv::Static()->FsSession());
	if(KErrNone == AppFile.FindByDir(KCrashResourceFileName, KNullDesC))
	{
 		TFileName resourceName(AppFile.File());
		BaflUtils::NearestLanguageFile(CEikonEnv::Static()->FsSession(), resourceName);
		iResId = CEikonEnv::Static()->AddResourceFileL(resourceName);
	}
	
	SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect()); 	
	
	
	ActivateL();
	SetMenuL();
	DrawNow();
	
	ChangeIconAndNameL();
}
Exemple #13
0
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CShowString::ConstructL(const TDesC& aBuffer)
{
	CreateWindowL();
	
	iMyFont = AknLayoutUtils::FontFromId(EAknLogicalFontSecondaryFont);

/*	_LIT(KFontArial,"Serif");//Latin
	
	TFontSpec MyeFontSpec (KFontArial, 12*10); // 12 points = 1/6 inch
			
	MyeFontSpec.iTypeface.SetIsProportional(ETrue); // Arial is proportional 
	
	User::LeaveIfError(CEikonEnv::Static()->ScreenDevice()->GetNearestFontInTwips(iMyFont,MyeFontSpec));
	*/
	UpDateSizeL();
	
	if(aBuffer.Length())
	{
		iString = aBuffer.AllocL();
	}
	else
	{
		iString = NULL;
	}

	ActivateL();
	CEikonEnv::Static()->AddWindowShadow(this);
	DrawNow();
}
void CPhiImagePane::ScrollL(TUint aCode,TBool aFast)
{
  if(!iLoaded) return;
  TSize size=iBitmap->SizeInPixels();
  TRect rect=Rect();
  TInt step=aFast?EStepFast:EStep;
  switch(aCode)
  {
    case EKeyLeftArrow:
      iOffset.iX-=step;
      break;
    case EKeyRightArrow:
      iOffset.iX+=step;
      break;
    case EKeyUpArrow:
      iOffset.iY-=step;
      break;
    case EKeyDownArrow:
      iOffset.iY+=step;
      break;
  }
  if(iOffset.iX<0) iOffset.iX=0;
  if(iOffset.iY<0) iOffset.iY=0;
  if(iOffset.iX+rect.Width()>size.iWidth) iOffset.iX=size.iWidth-rect.Width();
  if(iOffset.iY+rect.Height()>size.iHeight) iOffset.iY=size.iHeight-rect.Height();
  if(rect.Width()>size.iWidth) iOffset.iX=0;
  if(rect.Height()>size.iHeight) iOffset.iY=0;
  DrawNow();
}
Exemple #15
0
void CSmiley::FocusChanged(TDrawNow aDrawNow)
	{
	if (aDrawNow)
		{
		DrawNow();
		}
	}
// ---------------------------------------------------------
// CIMOpenAPIExampleContainer::OfferKeyEventL
// ---------------------------------------------------------
//
TKeyResponse CIMOpenAPIExampleContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
	{
	
	// if it's not an event key we're not interested so return not consumed
	if (aType != EEventKey)
		return EKeyWasNotConsumed;
	
	TInt code = aKeyEvent.iCode;

    if ( iGamesGrid && ( !iGamesGrid->IsDimmed() ) ) //&& iGamesGrid->IsFocused()) 
        {
        if ( code == EKeyOK)
            {
            PlayMove();
            return( EKeyWasConsumed );
            }
		else
		    {
   			TKeyResponse returnValue = iGamesGrid->OfferKeyEventL( aKeyEvent, aType );
   		    DrawNow();
   		    return returnValue;
    	    }
        }
        
	return EKeyWasNotConsumed;
	}
void CSupSplashScreen::ConstructL(void)
{

	CreateWindowL();

	TFindFile AppFile(CCoeEnv::Static()->FsSession());

	if(KErrNone == AppFile.FindByDir(KSupMbm, KNullDesC))
	{			
		iBackgroundPic = new (ELeave) CFbsBitmap();
		TRect clientRect = CEikonEnv::Static()->EikAppUi()->ApplicationRect();

		// Load commerce logo image depends on the current screen width
		switch(clientRect.Width())
		{
		case SCREEN_WIDTH_1:
		case SCREEN_WIDTH_1_2:
			{
				User::LeaveIfError(iBackgroundPic->Load(AppFile.File(), EMbmSupN2f_commercelogo_1));
			}
			break;
		case SCREEN_WIDTH_2:
		case SCREEN_WIDTH_2_2:
			{
				User::LeaveIfError(iBackgroundPic->Load(AppFile.File(), EMbmSupN2f_commercelogo_2));
			}
			break;
		case SCREEN_WIDTH_3:
		case SCREEN_WIDTH_3_2:
			{
				User::LeaveIfError(iBackgroundPic->Load(AppFile.File(), EMbmSupN2f_commercelogo_3));
			}
			break;
		default:
			{
				User::LeaveIfError(iBackgroundPic->Load(AppFile.File(), EMbmSupN2f_commercelogo_1));
			}
			break;
		}

		// Place image right in the screen center
		TSize iconSize = iBackgroundPic->SizeInPixels();

		// Set client rect
		TInt cX = clientRect.Width()/2 - iconSize.iWidth/2;
		TInt cY = clientRect.Height()/2 - iconSize.iHeight/2;

		// Set client rect == bitmaps rect
		SetRect(TRect(TPoint(cX, cY), iconSize));
	}
	else
	{

		SetRect(CEikonEnv::Static()->EikAppUi()->ApplicationRect());
	}

	ActivateL();
	DrawNow();
}
Exemple #18
0
void CSliderControl::SetVal(TInt aVal)
	{
	iVal=aVal;
	TBuf<3> txt;
	txt.Num(iVal);
	iSlider->SetValue(aVal);
	DrawNow();
	}
Exemple #19
0
void CRS_ManContainer::FocusChanged(TDrawNow aDrawNow)
{
    //SetPaused(!IsFocused());
    if (aDrawNow)
    {
        DrawNow();
    }
}
Exemple #20
0
void CPausedContainer::FocusChanged(TDrawNow aDrawNow)
{
    SetPaused(!IsFocused());
    if (aDrawNow)
    {
        DrawNow();
    }
}
void CCdlExplorerContainer::SetRootL(CCdlExplorable* aExplorable)
	{
	delete iStack[0].iExplorable;
	iStack[0].iExplorable = NULL;
	iStack.Reset();
	PushViewL(aExplorable);
	DrawNow();
	}
Exemple #22
0
void CRS_ManContainer::SizeChanged()
{
    //if (iEditor)
    //{
    //    iEditor->SetExtent(TPoint(10, 180), iEditor->MinimumSize());
    //}
    DrawNow();
}
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/			
void CMyHelpContainer::ConstructL()
    {
    CreateWindowL();
    iBgContext = CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnBgAreaMain,TRect(0,0,1,1), ETrue);
    iMirroRed = AknLayoutUtils::LayoutMirrored();
    
	iEditor = new (ELeave) CEikRichTextEditor;
	iEditor->SetAknEditorFlags(EAknEditorFlagEnableScrollBars);
	iEditor->SetContainerWindowL(*this);
	iEditor->ConstructL(this,0,0,0);
	
	iEditor->CreateScrollBarFrameL();
	iEditor->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto);
	    
	TCharFormat		charFormat;	
    TCharFormatMask charFormatMask;	

	_LIT(KFontArial,"Arial");
	
	TRgb textcol;
	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
	AknsUtils::GetCachedColor(skin,textcol,KAknsIIDQsnTextColors,EAknsCIQsnTextColorsCG6);
	
	charFormat.iFontSpec = AknLayoutUtils::FontFromId(EAknLogicalFontPrimaryFont)->FontSpecInTwips();
	charFormat.iFontPresentation.iTextColor = TLogicalRgb(textcol);;
	charFormatMask.SetAll();

	iParaformMe = CParaFormatLayer::NewL(); 
	iCharformMe = CCharFormatLayer::NewL(charFormat,charFormatMask); 
	iRichMessageMe  = CRichText::NewL(iParaformMe,iCharformMe);
	
	AddTextToEditorL();
	iEditor->SetDocumentContentL(*iRichMessageMe);
	iEditor->SetDocumentContentL(*iRichMessageMe);
	iEditor->SetCursorPosL(0,EFalse);
	
	iEditor->SetFocus(EFalse);
	iEditor->SetFocusing(ETrue);
	
	
	TRect MyRect(CEikonEnv::Static()->EikAppUi()->ClientRect());
	SetRect(MyRect);
	ActivateL();
	DrawNow();
	
	SizeChanged();
	iEditor->ClearSelectionL();	
	iEditor->MoveCursorL(TCursorPosition::EFPageUp, EFalse);
	iEditor->MoveCursorL(TCursorPosition::EFPageUp, EFalse);
	iEditor->MoveCursorL(TCursorPosition::EFPageUp, EFalse);
	iEditor->MoveCursorL(TCursorPosition::EFPageUp, EFalse);
	iEditor->MoveCursorL(TCursorPosition::EFPageUp, EFalse);
	iEditor->MoveCursorL(TCursorPosition::EFPageUp, EFalse);
	iEditor->MoveCursorL(TCursorPosition::EFPageUp, EFalse);
	iEditor->MoveCursorL(TCursorPosition::EFPageUp, EFalse);	
	iEditor->UpdateScrollBarsL();
	iEditor->DrawNow();
    }
Exemple #24
0
void CSmiley::HandlePointerEventL(const TPointerEvent& aPointerEvent)
	{
	RDebug::Print(_L("=>CSmiley::HandlePointerEventL(const TPointerEvent& aPointerEvent)"));
	if (aPointerEvent.iType == TPointerEvent::EButton1Down)
		{
		SetSmiling(!IsSmiling());
		DrawNow();
		}
	}
// -----------------------------------------------------------------------------
// CWazeCameraView::DrawImage()
// Draws the frame to the buffer.
// -----------------------------------------------------------------------------
//
void CWazeCameraView::DrawImage( const CFbsBitmap& aFrame )
{
	if ( iCacheGcInitialized )
	{		
		iCacheGcScreenContext->BitBlt( TPoint( 0, 0 ), &aFrame );
		iCacheGcDirty = ETrue;
		DrawNow();
	}
}
void CPaintCursorAppView::ResetCursor()
    {   
    TRect mainPaneRect;
    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
    SetRect( mainPaneRect );
    DrawNow();
    iClientCommander.ImageCommand( KResetBTCursorAnim );
    iMouseInitialized = ETrue;
    }
void CEmTubeSplashViewContainer::HandleResourceChange(TInt aType)
	{
	CCoeControl::HandleResourceChange(aType);
	SetRect( iView.ClientRect() );
	iClientRect = iView.ClientRect();
	SetExtentToWholeScreen();
	iAppUi->StopDisplayingPopupToolbar();
	DrawNow();
	}
//////////////////////////////////////////////////////////////////////////
//From MTimerNotifier
//////////////////////////////////////////////////////////////////////////
TBool CWapBrowserAppView::DoPeriodTask()
{
	if(3 == ++iWaitingPos)
	{
		iWaitingPos = 0;
	}
	DrawNow();
	return ETrue;
}
/*
-----------------------------------------------------------------------------
----------------------------------------------------------------------------
*/
void CProfileSettings::ConstructL(void)
{
    CreateWindowL();
	iBgContext = CAknsBasicBackgroundControlContext::NewL(KAknsIIDSkinBmpMainPaneUsual, TRect(0,0,1,1), ETrue);
    
	SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect());
	ActivateL();
	DrawNow();
}
void CTcContainer::UpdateStatus( const TDesC8& aStatus )
{
    // Update "Status" label
    SetLabelText( EStatusValue, aStatus );

    // Force screen update NOW
    DrawNow();
    CEikonEnv::Static()->WsSession().Flush();
}