static void storeSimpleUpRight(void) { int gesture_code = GCODE_UP_RIGHT; int n = 4; int gesture[4][2] = {{320,120},{240,90},{160,60},{80,30}}; addGesture(gesture_code, n, gesture); }
static void storeSimpleDownLeft(void) { int gesture_code = GCODE_DOWN_LEFT; int n = 4; int gesture[4][2] = {{80,30},{160,60},{240,90},{320,120}}; addGesture(gesture_code, n, gesture); }
void LLFloaterGesture::buildGestureList() { S32 scroll_pos = mGestureList->getScrollPos(); uuid_vec_t selected_items; getSelectedIds(selected_items); LL_DEBUGS("Gesture")<< "Rebuilding gesture list "<< LL_ENDL; // mGestureList->deleteAllItems(); // <FS:ND/> Don't recreate the list over and over. LLGestureMgr::item_map_t::const_iterator it; const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures(); for (it = active_gestures.begin(); it != active_gestures.end(); ++it) { addGesture(it->first,it->second, mGestureList); } // <FS:PP> FIRE-5646: Option to show only active gestures // if (gInventory.isCategoryComplete(mGestureFolderID)) if (gInventory.isCategoryComplete(mGestureFolderID) && !gSavedPerAccountSettings.getBOOL("FSShowOnlyActiveGestures")) // </FS:PP> FIRE-5646: Option to show only active gestures { LLIsType is_gesture(LLAssetType::AT_GESTURE); LLInventoryModel::cat_array_t categories; LLInventoryModel::item_array_t items; gInventory.collectDescendentsIf(mGestureFolderID, categories, items, LLInventoryModel::EXCLUDE_TRASH, is_gesture); for (LLInventoryModel::item_array_t::iterator it = items.begin(); it!= items.end(); ++it) { LLInventoryItem* item = it->get(); if (active_gestures.find(item->getUUID()) == active_gestures.end()) { // if gesture wasn't loaded yet, we can display only name addGesture(item->getUUID(), NULL, mGestureList); } } } // attempt to preserve scroll position through re-builds // since we do re-build whenever something gets dirty for(uuid_vec_t::iterator it = selected_items.begin(); it != selected_items.end(); it++) { mGestureList->selectByID(*it); } mGestureList->setScrollPos(scroll_pos); }
int StateGestureDialog::newGesture() { if(! objectModel_->size()) { QMessageBox::critical(parentWidget(), "Object error", "No objects available", QMessageBox::Ok); return QDialog::Rejected; } reset(); disconnect(ui_->buttonBox, SIGNAL(accepted()), this, 0); connect(ui_->buttonBox, SIGNAL(accepted()), this, SLOT(addGesture())); return QDialog::exec(); }
//-------------------------------------------------------------- void bitmapManipulation::setup(){ ofEnableAlphaBlending(); ofSetFullscreen(true); last_tick_count = GetTickCount(); logo.loadImage("gw_logo.png"); logo1_dimensions = TouchObject(1360, 440, 200, 200, 0, 1); logo2_dimensions = TouchObject(560, 440, 200, 200, 0, 1); if(loadGestureWorks("GestureWorksCore.dll")) { std::cout << "Error loading gestureworks dll" << std::endl; exit(); } if(!loadGML("basic_manipulation.gml")) { std::cout << "Could not find gml file" << std::endl; exit(); } initializeGestureWorks(1920,1080); if( !registerWindowForTouchByName("Bitmap Manipulation") ) { std::cout << "Could not register target window for touch." << std::endl; exit(); } registerTouchObject("logo1"); registerTouchObject("logo2"); addGesture("logo1","n-drag"); addGesture("logo1","n-rotate"); addGesture("logo1","n-scale"); addGesture("logo2","n-drag"); addGesture("logo2","n-rotate"); addGesture("logo2","n-scale"); }