static const jsmntok_t * setCellExtendedField(const jsmntok_t *valueTok, const char *name, const char *value, void *cfg){ CellularConfig *cellCfg = (CellularConfig *)cfg; if (NAME_EQU("apnHost", name)) setTextField(cellCfg->apnHost, value, CELL_APN_HOST_LENGTH); else if (NAME_EQU("apnUser", name)) setTextField(cellCfg->apnUser, value, CELL_APN_USER_LENGTH); else if (NAME_EQU("apnPass", name)) setTextField(cellCfg->apnPass, value, CELL_APN_PASS_LENGTH); return valueTok + 1; }
bool FacebookSprite::init() { ////////////////////////////// // 1. super init first if ( !Sprite::init() ) { return false; } thisPopupWidth = visibleSize.width - (20 * visibleSize.width / 100); thisPopupHeight = visibleSize.height - (30 * visibleSize.height / 100); this->setTextureRect(Rect(0, 0,thisPopupWidth , thisPopupHeight)); this->setColor(FacebookContainer_bk_color); thisSize = this->getBoundingBox().size; m_buttonsScalFacor = 0.7f; fOffSetFromButtom = 10.0f; setButtons(); setCapturedImage(pSendToFacebookButt); setTextField(pCaturedImage); return true; }
void SpinnerDefaultEditor::onCreate(const SpinnerDefaultEditor * Id) { if(Id != NULL && Id->getTextField() != NULL) { FieldContainerUnrecPtr TheFC(Id->getTextField()->shallowCopy()); setTextField(dynamic_pointer_cast<TextField>(TheFC)); } }
void rgbReset () { if (thePixel <= 255) { XColor def; char tempStr[256]; def.pixel = thePixel; XQueryColor(theDisplay, theColormap, &def); sprintf(tempStr, "Pixel %3ld = $%04x, $%04x, $%04x", thePixel, def.red, def.green, def.blue); setRgbScale (redScale, def.red / 256); setRgbScale (greenScale, def.green / 256); setRgbScale (blueScale, def.blue / 256); setTextField (redText, def.red / 256); setTextField (greenText, def.green / 256); setTextField (blueText, def.blue / 256); setLabel (pixLabel, tempStr); rgbCellsFree (); drawSwatch (thePixel); } else { printf("Pix %3ld is out of legal range. \n", thePixel); } }
static void scaleChanged (Widget w, XtPointer textField, XmScaleCallbackStruct *cbs) { setTextField ((Widget) textField, cbs->value); setCell (getScale(redScale), getScale(greenScale), getScale(blueScale)); }
static const jsmntok_t * setBluetoothExtendedField(const jsmntok_t *valueTok, const char *name, const char *value, void *cfg){ BluetoothConfig *btCfg = (BluetoothConfig *)cfg; if (NAME_EQU("name", name)) setTextField(btCfg->deviceName, value, BT_DEVICE_NAME_LENGTH); else if (NAME_EQU("pass", name)) setTextField(btCfg->passcode, value, BT_PASSCODE_LENGTH); return valueTok + 1; }