void JListBox::select(int index) { if (index >= content.size()) return; int oldcurrent = current; makeVisible(index); current = index; JAssociation &obj = *(JAssociation*)content[current]; if (!multipleSelections) { obj.setValue(JInteger(1)); if (current != oldcurrent) { if (oldcurrent != -1) { deselect(oldcurrent); paint(oldcurrent); } paint(current); JEvent event(this, JEvent::ACTION_EVENT, &obj); event.key = index; postJEvent(event); } } else { int oldValue = (int)*(JInteger*)obj.value(); obj.setValue(JInteger(!oldValue)); paint(current); JEvent event(this, JEvent::ACTION_EVENT, &obj); event.key = index; postJEvent(event); } }
boolean JListBox::setCursor(int _cursor) { _cursor = max(0, min(content.size()-1, _cursor)); if (cursor == _cursor) return false; beforePaint(); cursor = _cursor; makeVisible(cursor); afterPaint(); return true; }
/* ** makeAllVisible(). ** Makes all windows invisible (except the command and locator windows) */ void makeAllVisible (int visible) { int i; for (i = 0; i < MAX_MAJOR_WINDOWS; i++) { if (m_winPtrNotNull (winList[i]) && ((winList[i])->generic.type) != CMD_WIN) { if (m_winIsSourceType ((winList[i])->generic.type)) makeVisible ((winList[i])->detail.sourceInfo.executionInfo, visible); makeVisible ((TuiGenWinInfoPtr) winList[i], visible); } } return; } /* makeAllVisible */
SplashScreen::SplashScreen (const String& title, const Image& image, bool useDropShadow) : Component (title), backgroundImage (image), clickCountToDelete (0) { // You must supply a valid image here! jassert (backgroundImage.isValid()); setOpaque (! backgroundImage.hasAlphaChannel()); makeVisible (image.getWidth(), image.getHeight(), useDropShadow); }
void StatusIndicatorMenuWindow::resetMenuWidget() { if (menuWidget) delete menuWidget; menuWidget = new StatusIndicatorMenu(); connect(menuWidget, SIGNAL(showRequested()), this, SLOT(makeVisible())); connect(menuWidget, SIGNAL(hideRequested()), menuWidget, SLOT(disappear())); connect(menuWidget, SIGNAL(disappeared()), this, SLOT(hideWindow())); // Initialize the status indicator menu after the first USB banner has been shown QTimer::singleShot(7000, this, SLOT(initializeMenuWidget())); }
SplashScreen::SplashScreen (const String& title, const Image& image, bool useDropShadow) : Component (title), backgroundImage (image), clickCountToDelete (0) { // You must supply a valid image here! jassert (backgroundImage.isValid()); setOpaque (! backgroundImage.hasAlphaChannel()); #if JUCE_IOS || JUCE_ANDROID const bool useFullScreen = true; #else const bool useFullScreen = false; #endif makeVisible (image.getWidth(), image.getHeight(), useDropShadow, useFullScreen); }
void Exit::doSomething() { if(getWorld()->returnPlayer()->getX() == getX() && getWorld()->returnPlayer()->getY() == getY() && isVisible()) { getWorld()->playSound(SOUND_FINISHED_LEVEL); //if player is on the exit and it's visible, complete level getWorld()->increaseScore(2000 + getWorld()->getBonus()); levelComplete = true; return; } if(getWorld()->numJewels() == 0) //if jewels are finished, make the level visible and play the sound once { if(checker == 1) return; getWorld()->playSound(SOUND_REVEAL_EXIT); makeVisible(); checker++; } }
int Controller::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: questDescriptor2Map((*reinterpret_cast< QuestDescriptor(*)>(_a[1]))); break; case 1: PlayerLocation((*reinterpret_cast< QGeoCoordinate(*)>(_a[1]))); break; case 2: gpsLocationGetter((*reinterpret_cast< QGeoCoordinate(*)>(_a[1]))); break; case 3: answeredQuest((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 4: activatedQuest((*reinterpret_cast< int(*)>(_a[1]))); break; case 5: infoQuestGetter((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 6: makeVisible((*reinterpret_cast< int(*)>(_a[1]))); break; default: ; } _id -= 7; } return _id; }
void LocationQuest::checkVisibility() { qDebug()<<"nono"<<getStatusString().toAscii()<<"id: "<<getId(); //if(status_ == STATUS(UNBLOCKED) && nearLocation_) if(getStatusString().compare("UNBLOCKED")==0 && nearLocation_) { qDebug("sprawdzam widocznosc"); qDebug("widzi mnie !"); setStatus(STATUS(NOACTIVE)); emit makeVisible(id_);//type, type2, geocoordinate, range, name ... } }
bool QListView::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: clear(); break; case 1: invertSelection(); break; case 2: selectAll((bool)static_QUType_bool.get(_o+1)); break; case 3: triggerUpdate(); break; case 4: setContentsPos((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break; case 5: adjustColumn((int)static_QUType_int.get(_o+1)); break; case 6: updateContents(); break; case 7: doAutoScroll(); break; case 8: changeSortColumn((int)static_QUType_int.get(_o+1)); break; case 9: handleIndexChange(); break; case 10: updateDirtyItems(); break; case 11: makeVisible(); break; case 12: handleSizeChange((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2),(int)static_QUType_int.get(_o+3)); break; case 13: startRename(); break; case 14: openFocusItem(); break; default: return QScrollView::qt_invoke( _id, _o ); } return TRUE; }
SplashScreen::SplashScreen (const String& title, int width, int height, bool useDropShadow) : Component (title), clickCountToDelete (0) { makeVisible (width, height, useDropShadow, false); }
void ListBox::draw() { proceedUpdateArea(); // set virtual scroll area width if (screen_area) setScrollWidth(screen_area->getmaxx()); updateScrollHeight(); if (update_area) reposition_widgets = true; proceedUpdateVirtualArea(); if (!area) { // scrollpane will clear the screen (real) area AbstractListBox::draw(); return; } if (reposition_widgets) { autosize_height = 1; int autosize_height_extra = 0; int realh = area->getmaxy(); if (autosize_children && children_height < realh) { int space = realh - (children_height - autosize_children); autosize_height = space / autosize_children; autosize_height_extra = space % autosize_children; } autosize_extra.clear(); int y = 0; for (Children::iterator i = children.begin(); i != children.end(); i++) { Widget *widget = i->widget; if (!widget->isVisible()) continue; int h = widget->getHeight(); if (h == AUTOSIZE) { h = autosize_height; if (autosize_height_extra) { autosize_extra.insert(widget); autosize_height_extra--; h++; } // make sure the area is updated widget->updateArea(); } widget->move(0, y); y += h; } reposition_widgets = false; } // make sure that currently focused widget is visible if (focus_child) { int h = focus_child->getHeight(); if (h == AUTOSIZE) { h = autosize_height; if (autosize_extra.find(focus_child) != autosize_extra.end()) h++; } makeVisible(focus_child->getLeft(), focus_child->getTop(), 1, h); } AbstractListBox::draw(); }
void MainWindow::showNewProjectWizard() { jassert (currentProject == nullptr); setContentOwned (createNewProjectWizardComponent(), true); makeVisible(); }
void Ut_StatusIndicatorMenuWindow::testInitialization() { QVERIFY(statusIndicatorMenuWindow->menuWidget); QVERIFY(disconnect(statusIndicatorMenuWindow, SIGNAL(displayExited()), statusIndicatorMenuWindow, SLOT(displayInActive()))); QVERIFY(disconnect(statusIndicatorMenuWindow, SIGNAL(displayEntered()), statusIndicatorMenuWindow, SLOT(displayActive()))); QVERIFY(disconnect(statusIndicatorMenuWindow->menuWidget, SIGNAL(showRequested()), statusIndicatorMenuWindow, SLOT(makeVisible()))); QVERIFY(disconnect(statusIndicatorMenuWindow->menuWidget, SIGNAL(hideRequested()), statusIndicatorMenuWindow->menuWidget, SLOT(disappear()))); QVERIFY(disconnect(statusIndicatorMenuWindow->menuWidget, SIGNAL(disappeared()), statusIndicatorMenuWindow, SLOT(hideWindow()))); QVERIFY(gSceneWindowStateMap.contains(statusIndicatorMenuWindow->menuWidget)); QCOMPARE(gSceneWindowStateMap[statusIndicatorMenuWindow->menuWidget], MSceneWindow::Disappeared); }
void HorizontalListBox::draw() { proceedUpdateArea(); // set virtual scroll area width if (screen_area) setScrollHeight(screen_area->getmaxy()); updateScrollWidth(); if (update_area) reposition_widgets = true; proceedUpdateVirtualArea(); if (!area) { // scrollpane will clear the screen (real) area AbstractListBox::draw(); return; } if (reposition_widgets) { autosize_width = 1; int autosize_width_extra = 0; int realw = area->getmaxx(); if (autosize_children && children_width < realw) { int space = realw - (children_width - autosize_children); autosize_width = space / autosize_children; autosize_width_extra = space % autosize_children; } autosize_extra.clear(); int x = 0; for (Children::iterator i = children.begin(); i != children.end(); i++) { Widget *widget = i->widget; if (!widget->isVisible()) continue; int w = widget->getWidth(); if (w == AUTOSIZE) { w = autosize_width; if (autosize_width_extra) { autosize_extra.insert(widget); autosize_width_extra--; w++; } // make sure the area is updated widget->updateArea(); } widget->move(x, 0); x += w; } reposition_widgets = false; } // make sure that currently focused widget is visible if (focus_child) { int w = focus_child->getWidth(); if (w == AUTOSIZE) { w = autosize_width; if (autosize_extra.find(focus_child) != autosize_extra.end()) w++; } makeVisible(focus_child->getLeft(), focus_child->getTop(), w, 1); } AbstractListBox::draw(); }