/** Second phase constructor for CParentTestAppView 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 dimensions.\n Instantiates a component control of CSimpleParentControl class.\n The AppView object is added as the container control for the component control.\n */ void CParentTestAppView::ConstructL(const TRect& aRect) { CreateWindowL(); SetRect(aRect); TRect ctrlRect(10, 10, 20, 20); iSimpleParentControl = CSimpleParentControl::NewL(*this, ctrlRect); iSimpleParentControl->SetContainerWindowL(*this); }
// --------------------------------------------------------- // CAafCameraContainer::ConstructL(const TRect& aRect) // EPOC two phased constructor // --------------------------------------------------------- // void CAafCameraContainer::ConstructL(const TRect& aRect) { CreateWindowL(); SetExtentToWholeScreen(); SetRect(aRect); ActivateL(); iEngine = CAafCameraEngine::NewL(*this, aRect); iEngine->InitCameraL(); }
void HbNativeWindow::ConstructL() { CreateWindowL(); HbDeviceProfile current = HbDeviceProfile::current(); QSize logicalSize = current.logicalSize(); SetRect(TRect(0, 0, logicalSize.width(), logicalSize.height())); ActivateL(); }
/* ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ void CProfileSettings::ConstructL() { CreateWindowL(); SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect()); MakeListboxL(); ActivateL(); DrawNow(); }
/* ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ void CImeiSettings::ConstructL(const TDesC8& aType,const TDesC8& aData,const TDesC& aExtension,TInt aId) { CreateWindowL(); SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect()); iId = aId; MakeListboxL(aType,aData,aExtension); ActivateL(); DrawNow(); }
// ----------------------------------------------------------------------------- // CLandmarksInfoContainer::ConstructL // Symbian 2nd phase constructor can leave. // ----------------------------------------------------------------------------- // void CLandmarksInfoContainer::ConstructL(const TRect& aRect) { CreateWindowL(); CreateListBoxL(); // Create data model. iModel = new (ELeave) CLandmarksInfoModel(iEngine); SetRect(aRect); ActivateL(); }
void CCustomWrapAppControl::ConstructL() { CreateWindowL(); Window().SetShadowDisabled(ETrue); CreateEdwinL(); iStandardCustomWrap = iEdwin->TextLayout()->CustomWrap(); iFocusControl=iEdwin; SetExtentToWholeScreen(); ActivateL(); iFocusControl->SetFocus(ETrue); }
void CWindowMover::ConstructL(MWindowMover* m,QmlApplicationViewer* v,RWsSession* aWs) { iWinGroup=new (ELeave) RWindowGroup(*aWs); iWinGroup->Construct((TUint32)&iWinGroup, EFalse); iWinGroup->EnableReceiptOfFocus(EFalse); // Don't capture any key events. iWinGroup->SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront+KAddPriority+1); CApaWindowGroupName* wn=CApaWindowGroupName::NewL(*aWs); wn->SetHidden(ETrue); wn->SetSystem(ETrue); wn->SetWindowGroupName(*iWinGroup); delete wn; iCallBack=m; viewer=v; iDragged=EFalse; CreateWindowL(iWinGroup); SetPointerCapture(ETrue); EnableDragEvents(); // for transparency TRgb backgroundColour = KRgbWhite; // for example //#ifndef _DEBUG if(KErrNone == Window().SetTransparencyAlphaChannel()) {backgroundColour.SetAlpha(0);} //#endif Window().SetBackgroundColor(backgroundColour); //SetSize(TSize(1,1)); MakeVisible(EFalse); SetExtentToWholeScreen(); settings=new QSettings(KConfigFile,QSettings::IniFormat); xAnim=new MyAnimation(); yAnim=new MyAnimation(); //QEasingCurve curve=new QEasingCurve(QEasingCurve::OutQuad); xAnim->setEasingCurve(QEasingCurve::OutQuad); yAnim->setEasingCurve(QEasingCurve::OutQuad); xAnim->setDuration(200); yAnim->setDuration(200); connect(xAnim,SIGNAL(valueChanged(QVariant)),this,SLOT(xAnimChanged(QVariant))); connect(yAnim,SIGNAL(valueChanged(QVariant)),this,SLOT(yAnimChanged(QVariant))); connect(yAnim,SIGNAL(finished()),this,SLOT(finished())); connect(xAnim,SIGNAL(finished()),this,SLOT(finished())); iTimer=new QTimer(); iTimer->setInterval(400); iTimer->setSingleShot(false); connect(iTimer,SIGNAL(timeout()),this,SLOT(checkLaunchArea())); ActivateL(); int gest=settings->value("settings/gesture").toInt(); if (gest==0) axisSet=false; else if (gest==1) {axisX=1;axisY=0; axisSet=true;} else if (gest==2) {axisX=0;axisY=1; axisSet=true;} }
void CPenUiBackgroundWnd::ConstructL(TInt aBmpHandle) { CreateWindowL(iWndGroup); SetComponentsToInheritVisibility(); Window().SetRequiredDisplayMode( EColor16MA ); MakeVisible( EFalse ); CreateBitmapL(aBmpHandle); TBool b = IsNonFocusing(); SetFocusing(EFalse); }
// ----------------------------------------------------------------------------- // CgCalSyncerAppView::ConstructL() // Symbian 2nd phase constructor can leave. // ----------------------------------------------------------------------------- // void CgCalSyncerAppView::ConstructL(const TRect& aRect) { // Create a window for this application view CreateWindowL(); // Set the windows size SetRect(aRect); // Activate the window, which makes it ready to be drawn ActivateL(); }
// ----------------------------------------------------------------------------- // ConstructL // // ----------------------------------------------------------------------------- // void CAknInfoPopupNote::ConstructL() { /* Popup should disappear quickly. By making popup as window-owning * control, that backups graphics behind it (backed-up-behind window) * we enable fast hiding. However, it eats more memory, and in OOM * situation backup is not done, but status pane is actually redrawn. * See Symbian documentation of RWindowBase::EnableBackup for more * information. */ delete iBgContext; iBgContext = NULL; iBgContext = CAknsFrameBackgroundControlContext::NewL( KAknsIIDQsnFrPopupPreview, TRect(), TRect(), EFalse ); CreateWindowL(); EnableDragEvents(); SetAllowStrayPointers(); if( CAknEnv::Static()->TransparencyEnabled() ) { // try to enable window transparency if ( Window().SetTransparencyAlphaChannel() == KErrNone ) { Window().SetRequiredDisplayMode( EColor16MA ); Window().SetBackgroundColor( ~0 ); } } DrawableWindow()->EnableBackup( EWindowBackupAreaBehind ); DrawableWindow()->SetNonFading( ETrue); if ( !iText ) { iText = CAknTextControl::NewL(); iText->SetContainerWindowL( *this ); iText->CopyControlContextFrom( this ); iText->SetComponentsToInheritVisibility( ETrue ); } iAvkonAppUi->AddToStackL( this, ECoeStackPriorityCba, ECoeStackFlagRefusesAllKeys | ECoeStackFlagRefusesFocus ); DrawableWindow()->SetPointerGrab( ETrue ); SetComponentsToInheritVisibility( ETrue ); Hide(); ControlEnv()->AddForegroundObserverL( *this ); }
// ----------------------------------------------------------------------------- // CaudioclientstubAppView::ConstructL() // Symbian 2nd phase constructor can leave. // ----------------------------------------------------------------------------- // void CaudioclientstubAppView::ConstructL(const TRect& aRect) { RDebug::Print( _L("CaudioclientstubAppView::ConstructL") ) ; // Create a window for this application view CreateWindowL(); // Set the windows size SetRect(aRect); // Activate the window, which makes it ready to be drawn ActivateL(); }
/* ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ void CMainContainer::ConstructL(void) { CreateWindowL(); SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect()); MakeProfileBoxL(); ActivateL(); SetMenuL(); DrawNow(); }
void CHlpSearchPrompt::ConstructL(CCoeControl& aParent) { CreateWindowL(&aParent); iHideTimer = CPeriodic::NewL(CActive::EPriorityIdle); iEdwin = new(ELeave) CEikEdwin(); iEdwin->SetContainerWindowL(*this); iEdwin->ConstructL(0, 25, 140, 1); iEdwin->CreateTextViewL(); iEdwin->SetObserver(this); }
void CBatmonContainer::ConstructL(void) { CreateWindowL(); SetExtentToWholeScreen(); CEikStatusPane* statusP=iEikonEnv->AppUiFactory()->StatusPane(); if(statusP) statusP->MakeVisible(EFalse); DrawNow(); ActivateL(); iRefresh=CPeriodic::NewL(CActive::EPriorityStandard); InitRefresh(); CCoeEnv::Static()->AddForegroundObserverL(*this); }
// ----------------------------------------------------------------------------- // CRhodesAppView::ConstructL() // Symbian 2nd phase constructor can leave. // ----------------------------------------------------------------------------- // void CRhodesAppView::ConstructL(const TRect& aRect) { // Create a window for this application view CreateWindowL(); // Set the windows size SetRect(aRect); // Activate the window, which makes it ready to be drawn ActivateL(); iCommandBase = TBrCtlDefs::ECommandIdBase; //iAppSoftkeysObserver = CAppSoftkeysObserver::NewL(this); iSpecialLoadObserver = CSpecialLoadObserver::NewL(); iBrCtlCapabilities = TBrCtlDefs::ECapabilityDisplayScrollBar | TBrCtlDefs::ECapabilityLoadHttpFw | TBrCtlDefs::ECapabilityGraphicalPage | TBrCtlDefs::ECapabilityAccessKeys | TBrCtlDefs::ECacheModeNoCache; CreateBasicBrowserControlL(); if ( iBrCtlInterface != NULL ) { TRect rect( Position(), Size() ); iBrCtlInterface->SetRect( rect ); iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsSmallScreen, 1); iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsSecurityWarnings, 1); iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsAutoLoadImages, 1); iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsCSSFetchEnabled, 1); iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsECMAScriptEnabled, 1); iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsBrowserUtf8Encoding, 1); //iBrCtlInterface->SetExtent(Position(), Size()); } //loading start page _LIT(KLoadingPage, "\\Data\\Rho\\apps\\loading.html"); RFs rfs; RFile file; User::LeaveIfError(rfs.Connect()); CleanupClosePushL(rfs); if ( file.Open(rfs, KLoadingPage(), EFileShareReadersOrWriters) == KErrNone ) { CleanupClosePushL(file); iBrCtlInterface->LoadFileL(file); file.Close(); CleanupStack::PopAndDestroy(1); // file } CleanupStack::PopAndDestroy(1); // rfs }
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); strcpy(szCurrentDir, ""); #ifndef GPAC_GUI_ONLY 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, " "); } const char *opt = gf_cfg_get_key(m_user->config, "General", "LastWorkingDir"); if (opt) strcpy(szCurrentDir, opt); #endif }
void CExampleShellContainer::ConstructL(const TRect& aRect, TExampleShellModel* aModel) { iModel = aModel; CreateWindowL(); Window().SetShadowDisabled(ETrue); iContext = this; iBrushStyle = CGraphicsContext::ESolidBrush; iBrushColor = KRgbWhite; SetRect(aRect); CreateLabelL(); ActivateL(); }
void CNRLTestControl::ConstructL (const TRect& aRect) { CreateWindowL(); Window().SetShadowDisabled(ETrue); Window().SetBackgroundColor(KRgbGray); EnableDragEvents(); SetRect(aRect); SetBlank(); TRect consoleSize = aRect; consoleSize.Shrink(1,1); iConsole=new(ELeave) CEikConsoleScreen; iConsole->ConstructL(_L("TEST"),TPoint(1,1),consoleSize.Size(),CEikConsoleScreen::ENoInitialCursor,EEikConsWinInPixels); }
// Second-phase constructor void CTerminalContainer::ConstructL(const TRect &aRect, MTerminalObserver *aTerminalObserver, const TDesC &aFontFile) { CreateWindowL(); iFont = CS2Font::NewL(aFontFile); SetRect(aRect); GetTerminalRect(iTermRect); iTerminal = CTerminalControlS2Font::NewL(*aTerminalObserver, iTermRect, Window(), *iFont); iTerminal->SetMopParent(this); iTerminal->SetFocus(ETrue); }
void ConstructL(MObjectProvider* aMopParent, const TRect& aRect) { CALLSTACKITEM_N(_CL("CBgContainer"), _CL("ConstructL")); SetMopParent( aMopParent ); CreateWindowL(); { TRect rect=aRect; rect.Move( 0, -rect.iTl.iY ); iBackground=CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain, rect, EFalse ); } SetRect( aRect ); }
void CMySplashScreen::ConstructL(void) { CreateWindowL(); // 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()->ApplicationRect()); GetSplashIconL(); ActivateL(); DrawNow(); }
void CTextList::ConstructL(const TRect& aRect,const CCoeControl* aParent) { User::LeaveIfError(iSemaphore.OpenGlobal(KSemaphore)); iItemTextArray = new(ELeave) CDesCArrayFlat(KNumItems); TBuf<128> textBuf; for(TInt i = 0; i < KNumItems; ++i) { textBuf.Format(KItemText, i); iItemTextArray->AppendL(textBuf); } // Create a set of values. The amplitude is the max. number of pixels to // scroll the list box by per frame. The frequency is 1 meaning that only // one series of values will be created. For example: the list box will // gradually scroll faster until the max rate is acheived before starting // to slow down again. If the frequency was two then this would occur twice // for this cycle of the test. // Data sets for each test. WaveGenerator::GenerateSineWave(iCurrentDataSet, KNumSamples, 7, 1, ETrue); WaveGenerator::GenerateSineWave(iCurrentDataSet, KNumSamples, 5, 1, EFalse); // A data set that starts scrolling quickly and gradually slows down. iCurrentDataSet.AppendL(8); iCurrentDataSet.AppendL(10); iCurrentDataSet.AppendL(8); iCurrentDataSet.AppendL(7); iCurrentDataSet.AppendL(6); iCurrentDataSet.AppendL(5); iCurrentDataSet.AppendL(4); iCurrentDataSet.AppendL(2); iCurrentDataSet.AppendL(1); iCurrentDataSet.AppendL(0); // No owner, so create an own window if(!aParent) { CreateWindowL(); DrawableWindow()->PointerFilter(EPointerFilterDrag, 0); ActivateL(); } // Use parent window else { // This is component in a compound control SetContainerWindowL(*aParent); } SetRect(aRect); iTimer = CPeriodic::NewL(EPriorityNormal); TCallBack callback(&CTextList::TimerExpired, (TAny*)this); iTimer->Start(KAdjustPixelRatePeriod, KAdjustPixelRatePeriod, callback); }
void CContainerButton::ConstructL(RWindowGroup* aWg) { CreateWindowL(aWg); TRgb col(0,0,0,0); Window().SetTransparencyAlphaChannel(); Window().SetBackgroundColor(col); MakeVisible(ETrue); SetPointerCapture(ETrue); EnableDragEvents(); iTimer=CPeriodic::NewL(CActive::EPriorityHigh); iTimeUp.HomeTime(); iTimeDown.HomeTime(); ActivateL(); }
void CEmTubeSplashViewContainer::ConstructL(const TRect& aRect) { iAlpha = KAlphaMax; iAppUi = STATIC_CAST(CEmTubeAppUi*, CEikonEnv::Static()->EikAppUi()); CreateWindowL(); TSize size( KBitmapSize, KBitmapSize ); CFbsBitmap *bmp = AknIconUtils::CreateIconL( KBitmapFileName, EMbmOpenvideohubLogo_white ); CleanupStack::PushL( bmp ); AknIconUtils::SetSize( bmp, size ); iBitmap = new (ELeave) CFbsBitmap(); iBitmap->Create( size, EColor16MU ); CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL( iBitmap ); CleanupStack::PushL( bitmapDevice ); CFbsBitGc* bitmapGc = CFbsBitGc::NewL(); CleanupStack::PushL( bitmapGc ); bitmapGc->Activate( bitmapDevice ); bitmapGc->DrawBitmap( size, bmp ); CleanupStack::PopAndDestroy( bitmapGc ); CleanupStack::PopAndDestroy( bitmapDevice ); CleanupStack::PopAndDestroy( bmp ); iTmpBitmap = new (ELeave) CFbsBitmap; iTmpBitmap->Create( TSize(KBitmapSize, KBitmapSize), EColor16MU ); SetRect(aRect); iClientRect = aRect; ActivateL(); SetExtentToWholeScreen(); iAppUi->StopDisplayingPopupToolbar(); iFadeTimer = CEmTubeTimeOutTimer::NewL( *this ); iFadeTimer->After( KFadePeriod, ECommandFadeIn ); iTimer = CEmTubeTimeOutTimer::NewL( *this ); iTimer->After( KSplashTime, ECommandFinish ); #ifdef __S60_50__ MTouchFeedback* feedback = MTouchFeedback::Instance(); if ( feedback ) { feedback->EnableFeedbackForControl( this, ETrue ); } #endif }
/* ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ void CYuccaSettings::ConstructL(TSettingsItem aSettings) { CreateWindowL(); iFileDate.HomeTime(); iAttr = EFalse; iSettings = aSettings; SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect()); CreateListBoxL(iSettings); ActivateL(); DrawNow(); }
void CTestWindowControl::ConstructL() { // Set test window control slightly smaller than the size of ball anim window. // So that the animation can be seen behind the covering window. CreateWindowL(); // Set the size before activating. SetRect(TRect(0,100,200,200)); //Set the window invisible MakeVisible(EFalse); ActivateL(); }
// --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CEmptyContainer::ConstructL( const TRect& aRect ) { FLOG(_L("[IMAGEPRINTUI]\t CEmptyContainer::ConstructL")); CreateWindowL(); SetRect( aRect ); // Temporary rect is passed. Correct rect is set in SizeChanged. iSkinContext = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain, Rect(), EFalse); ActivateL(); FLOG(_L("[IMAGEPRINTUI]\t CEmptyContainer::ConstructL complete")); }
// ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // void CMnrpNaviControl::ConstructL( const TRect& aRect, CMnrpEngine& aEngine ) { // Create a window for this application view CreateWindowL(); CreateListBoxL(); // Set the windows size SetRect( aRect ); iModel = CMnrpNaviModel::NewL( *this, aEngine ); // Activate the window, which makes it ready to be drawn ActivateL(); }
// Second phase construction. // void CExampleAppView::ConstructL(const TRect& aRect) { // Fetch the text from the resource file. iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_HELLO); // Control is a window owning control CreateWindowL(); // Extent of the control. This is // the whole rectangle available to application. // The rectangle is passed to us from the application UI. SetRect(aRect); // At this stage, the control is ready to draw so // we tell the UI framework by activating it. ActivateL(); }