void CPlaylist::ShowHide(Bool show) { if (show) { RefreshPlaylist(); MakeVisible(ETrue); DrawNow(); } else { /*cleanup*/ ResetView(); MakeVisible(EFalse); ((COsmo4AppUi *) CEikonEnv::Static()->AppUi())->SetTitle(NULL, 0); } }
// ----------------------------------------------------------------------------- // ShowL // // ----------------------------------------------------------------------------- // void CAknInfoPopupNote::ShowL() { // Info pop-up note is not shown, when it does not contain any text, or // when the screen background is faded by some other UI component. if ( !iText->Text().Length() || ( !iAvkonAppUi->IsForeground() && iAvkonAppUi->IsFaded() && iHideWhenAppFaded )) { return; } // Because info pop-up note has to be drawn over pop-up toolbar, which has // normal window priority, the window priority of info pop-up note has to // be also set again to be shown over toolbar. Window().SetOrdinalPosition( 0, ECoeWinPriorityNormal ); if( !IsActivated() ) { ActivateL(); } MakeVisible( ETrue ); // Change stacked control not to refuse key events iAvkonAppUi->UpdateStackedControlFlags( this, NULL, ECoeStackFlagRefusesAllKeys ); }
void CWindowMover::show() { qDebug()<<"SHOW CAPTURER WINDOW"; MakeVisible(ETrue); //iWinGroup->SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront+KAddPriority+1); iTimer->start(); }
void AWindShaman::Jump() { ActInAir(); Super::Jump(); MakeVisible(); FadingTime = 0.0f; }
// Activates this view, called by framework void CAafAppFileBrowserView::ViewActivatedL(const TVwsViewId &/*aPrevViewId*/, TUid /*aCustomMessageId*/, const TDesC8 &/*aCustomMessage*/) { // Set files to be displayed SetFileListL(iBrowserEngine->GetCurrentDirectory()); // Set menubar and CBA CEikonEnv* eikonEnv = CEikonEnv::Static(); MEikAppUiFactory* appUiFactory = eikonEnv->AppUiFactory(); CEikMenuBar* menuBar = appUiFactory->MenuBar(); CEikButtonGroupContainer* cba = appUiFactory->Cba(); // If any menubar is displayed - stop displaying if (menuBar) menuBar->StopDisplayingMenuBar(); menuBar->SetMenuTitleResourceId(R_AAF_FILEBROWSER_MENUBAR); cba->SetCommandSetL(R_AAF_CBA_STANDART); cba->DrawDeferred(); // Bring this view to the top of windows stack Window().SetOrdinalPosition(0); // Restore listbox item selection (if it's not empty) if (iListBox->Model()->NumberOfItems()) iListBox->SetCurrentItemIndex(iCurrentItemIndex); // Set view visible MakeVisible(ETrue); }
void COsmo4AppView::ShowHide(Bool show) { #ifndef GPAC_GUI_ONLY if (show) { MakeVisible(ETrue); if (m_term) { gf_term_set_option(m_term, GF_OPT_VISIBLE, 1); DrawDeferred(); } } else { MakeVisible(EFalse); if (m_term) gf_term_set_option(m_term, GF_OPT_VISIBLE, 0); } #else MakeVisible(ETrue); #endif }
// Deactivates this view, called by framework void CAafAppFileBrowserView::ViewDeactivated() { // Remember currently selected listbox item index iCurrentItemIndex = iListBox->CurrentItemIndex(); // Set view invisible MakeVisible(EFalse); }
void CAknNaviForegroundObserver::ConstructL( CAknNavigationControlContainer* aParent ) { iParent = aParent; iHasForegroundGained = EFalse; iCoeEnv->AddForegroundObserverL( *this ); MakeVisible( EFalse ); }
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); }
void DataView::MouseMoved(BPoint where, uint32 transit, const BMessage *dragMessage) { if (transit == B_EXITED_VIEW && fDragMessageSize > 0) { SetSelection(fStoredStart, fStoredEnd); fDragMessageSize = -1; } if (dragMessage && AcceptsDrop(dragMessage)) { // handle drag message and tracking if (transit == B_ENTERED_VIEW) { fStoredStart = fStart; fStoredEnd = fEnd; const void *data; ssize_t size; if (dragMessage->FindData("text/plain", B_MIME_TYPE, &data, &size) == B_OK || dragMessage->FindData("text/plain", B_MIME_TYPE, &data, &size) == B_OK) fDragMessageSize = size; } else if (fDragMessageSize > 0) { view_focus newFocus; int32 start = PositionAt(kNoFocus, where, &newFocus); int32 end = start + fDragMessageSize - 1; SetSelection(start, end); MakeVisible(start); } return; } if (fMouseSelectionStart == -1) return; int32 end = PositionAt(fFocus, where); if (end == -1) return; SetSelection(fMouseSelectionStart, end); MakeVisible(end); }
void QTextPanel::pageClear() { scene->clear(); /* remove all item */ BASE_TEXT = new QTextPanelLayerControl(0); scene->addItem(BASE_TEXT); connect(scene, SIGNAL(MakeVisible(QRectF)), this, SLOT(viewDisplay(QRectF))); connect(BASE_TEXT, SIGNAL(pageCountChange() ), this, SLOT(forceResize())); connect(BASE_TEXT, SIGNAL(autoCursorChange() ), this, SLOT(cursorChange())); /* load document and recalculate the first time */ QTimer::singleShot(22, this, SLOT(forceResize())); }
// ----------------------------------------------------------------------------- // Hide // // ----------------------------------------------------------------------------- // void CAknInfoPopupNote::Hide() { if ( IsVisible() ) { MakeVisible( EFalse ); // Change stacked control to refuse all key events while not visible. iAvkonAppUi->UpdateStackedControlFlags( this, ECoeStackFlagRefusesAllKeys, ECoeStackFlagRefusesAllKeys ); } }
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 AWindShaman::ServerSpawnAirCurrent_Implementation() { UWorld* const World = GetWorld(); if (World) { FActorSpawnParameters SpawnParams; SpawnParams.Owner = Controller; SpawnParams.Instigator = Instigator; AAirCurrent* const AirCurrent = World->SpawnActor<AAirCurrent>(AirCurrentClass, GetActorLocation(), GetControlRotation(), SpawnParams); if (Currents.size() >= MaxAirCurrents) { AAirCurrent* current = Currents[0]; RemoveAirCurrent(current); } Currents.push_back(AirCurrent); if (AirCurrent) { AirCurrent->Caster = this; } } MakeVisible(); FadingTime = 0.0f; #if WRITE_METRICS ATotemPlayerController* control = Cast<ATotemPlayerController>(Controller); if (control) { ATotemPlayerState* state = Cast<ATotemPlayerState>(control->PlayerState); if (state) { std::string team; switch (state->Team) { case ETeam::RED_TEAM: team = "Red"; break; case ETeam::BLUE_TEAM: team = "Blue"; break; default: team = "None"; break; } Metrics::WriteToFile(std::string(TCHAR_TO_UTF8(*(state->MyName))), team, std::string("Air current")); } } #endif }
void AWindShaman::ServerSpawnGrenade_Implementation() { FVector GrenadeLoc; FRotator GrenadeRot; GrenadeLoc = GetActorLocation(); GrenadeRot = GetControlRotation(); UWorld* const World = GetWorld(); if (World != NULL) { //to add owner and instigator information FActorSpawnParameters SpawnParams; SpawnParams.Owner = Controller; SpawnParams.Instigator = Instigator; CurrentGrenade = World->SpawnActor<AVortexGrenade>(VortexClass, GrenadeLoc + GetControlRotation().RotateVector(GunOffset + 15.0f), GrenadeRot, SpawnParams); if (CurrentGrenade) { CurrentGrenade->AddVelocity(GetCharacterMovement()->Velocity); } } MakeVisible(); FadingTime = 0.0f; #if WRITE_METRICS ATotemPlayerController* control = Cast<ATotemPlayerController>(Controller); if (control) { ATotemPlayerState* state = Cast<ATotemPlayerState>(control->PlayerState); if (state) { std::string team; switch (state->Team) { case ETeam::RED_TEAM: team = "Red"; break; case ETeam::BLUE_TEAM: team = "Blue"; break; default: team = "None"; break; } Metrics::WriteToFile(std::string(TCHAR_TO_UTF8(*(state->MyName))), team, std::string("Vortex grenade")); } } #endif }
void AWindShaman::ServerExplodeGrenade_Implementation() { if (CurrentGrenade) { if (WindDetonateState == EWindDetonateState::Holding) { ClientSetWindDetonateState(EWindDetonateState::Detonate); } CurrentGrenade->Explode(); CurrentGrenade = nullptr; MakeVisible(); FadingTime = 0.0f; } }
void MiniStyledTextCtrl::SetVisibleRange(int from, int length, bool force) { int oldVisibleFrom = visibleFrom; int oldVisibleLength = visibleLength; visibleFrom = from; visibleLength = length; if (force || (oldVisibleFrom != visibleFrom) || (oldVisibleLength != visibleLength)) { SetMarker(); MakeVisible(from, length); } }
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 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 AWindShaman::ServerSpawnCyclone_Implementation() { FVector CycloneLoc; FRotator CycloneRot; CycloneLoc = GetActorLocation(); CycloneRot = GetControlRotation(); UWorld* const World = GetWorld(); if (World != NULL) { //to add owner and instigator information FActorSpawnParameters SpawnParams; SpawnParams.Owner = Controller; SpawnParams.Instigator = Instigator; World->SpawnActor<ACyclone>(CycloneClass, CycloneLoc, CycloneRot, SpawnParams); } MakeVisible(); FadingTime = 0.0f; #if WRITE_METRICS ATotemPlayerController* control = Cast<ATotemPlayerController>(Controller); if (control) { ATotemPlayerState* state = Cast<ATotemPlayerState>(control->PlayerState); if (state) { std::string team; switch (state->Team) { case ETeam::RED_TEAM: team = "Red"; break; case ETeam::BLUE_TEAM: team = "Blue"; break; default: team = "None"; break; } Metrics::WriteToFile(std::string(TCHAR_TO_UTF8(*(state->MyName))), team, std::string("Cyclone")); } } #endif }
// Activates this view, called by framework void CAafAppCameraView::ViewActivatedL(const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage) { __LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() ends"); if (!iContainer) { __LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() iContainer initialization begins"); iContainer = CAafCameraContainer::NewL( Rect() ); iContainer->SetContainerWindowL( *this ); iContainer->ActivateL(); __LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() iContainer initialization ends"); } else { iContainer->ActivateL(); iContainer->InitCameraL(); } // Set menubar and CBA CEikonEnv* eikonEnv = CEikonEnv::Static(); MEikAppUiFactory* appUiFactory = eikonEnv->AppUiFactory(); CEikMenuBar* menuBar = appUiFactory->MenuBar(); CEikButtonGroupContainer* cba = appUiFactory->Cba(); // If any menubar is displayed - stop displaying if (menuBar) menuBar->StopDisplayingMenuBar(); menuBar->SetMenuTitleResourceId(R_AAF_CAMERA_VIEW_MENUBAR); cba->SetCommandSetL(R_AAF_CBA_STANDART); cba->DrawDeferred(); // Bring this view to the top of windows stack Window().SetOrdinalPosition(0); MakeVisible(ETrue); __LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() ends"); }
TKeyResponse CHlpSearchPrompt::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) { if (aKeyEvent.iCode == EKeyEnter && aType == EEventKey) { ReportEventL(EEventStateChanged); return EKeyWasConsumed; } else if (aKeyEvent.iCode == EKeyEscape && aType == EEventKey) { MakeVisible(EFalse); return EKeyWasConsumed; } else { iHideTimer->Cancel(); iHideTimer->Start(KTimeOutPeriod, KTimeOutPeriod, TCallBack(HandleTimerExpiredL, this)); return iEdwin->OfferKeyEventL(aKeyEvent, aType); } }
// Activates this view, called by framework void CSupSplashScreenView::ViewActivatedL(const TVwsViewId &/*aPrevViewId*/, TUid /*aCustomMessageId*/, const TDesC8 &/*aCustomMessage*/) { /* if (aCustomMessage.Length() > 0) { if (iViewParam) { delete iViewParam; iViewParam = NULL; } iViewParam = HBufC::NewL(aCustomMessage.Length()); iViewParam->Des().Copy(aCustomMessage); } */ // Bring this view to the top of windows stack Window().SetOrdinalPosition(0); MakeVisible(ETrue); }
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(); }
void CPenUiBackgroundWnd::Hide() { MakeVisible( EFalse ); }
void GraphicsScene::SetVisibleArea( const QRectF area ) { emit MakeVisible(area); }
// Deactivates this view, called by framework void CSupSplashScreenView::ViewDeactivated() { MakeVisible(EFalse); }
void CWindowMover::hide() { MakeVisible(EFalse); qDebug()<<"HIDE CAPTURER WINDOW"; iTimer->stop(); }
void DataView::MessageReceived(BMessage *message) { switch (message->what) { case kMsgUpdateData: case kMsgDataEditorUpdate: UpdateFromEditor(message); break; case kMsgDataEditorParameterChange: { int32 viewSize; off_t offset; if (message->FindInt64("offset", &offset) == B_OK) { fOffset = offset; SetSelection(0, 0); MakeVisible(0); } if (message->FindInt32("view_size", &viewSize) == B_OK) { fDataSize = viewSize; fData = (uint8 *)realloc(fData, fDataSize); UpdateScroller(); SendNotices(kDataViewPreferredSize); } if (message->FindInt64("file_size", &offset) == B_OK) UpdateFromEditor(); break; } case kMsgBaseType: { int32 type; if (message->FindInt32("base", &type) != B_OK) break; SetBase((base_type)type); break; } case kMsgSetSelection: { int64 start, end; if (message->FindInt64("start", &start) != B_OK || message->FindInt64("end", &end) != B_OK) break; SetSelection(start, end); break; } case B_SELECT_ALL: SetSelection(0, fDataSize - 1); break; case B_COPY: Copy(); break; case B_PASTE: Paste(); break; case B_UNDO: fEditor.Undo(); break; case B_REDO: fEditor.Redo(); break; case B_MIME_DATA: if (AcceptsDrop(message)) { const void *data; ssize_t size; if (message->FindData("text/plain", B_MIME_TYPE, &data, &size) == B_OK || message->FindData(B_FILE_MIME_TYPE, B_MIME_TYPE, &data, &size) == B_OK) { if (fEditor.Replace(fOffset + fStart, (const uint8 *)data, size) != B_OK) SetSelection(fStoredStart, fStoredEnd); fDragMessageSize = -1; } } break; default: BView::MessageReceived(message); } }