本文整理匯總了C++中AddKey函數的典型用法代碼示例。如果您正苦於以下問題:C++ AddKey函數的具體用法?C++ AddKey怎麽用?C++ AddKey使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了AddKey函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: DeleteTrack
void Cinematic::New() {
projectload = false;
numbitmap = -1;
numbitmapsuiv = -1;
fx = -1;
key = NULL;
DeleteTrack();
DeleteAllBitmap();
DeleteAllSound();
AllocTrack(0, 100, 30.f);
FillKeyTemp(&pos, angz, 0, -1, -1, INTERP_BEZIER, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 1.f, -1, 1, NULL, &posgrille, angzgrille, 1.f);
AddKey(&KeyTemp, true, true, true);
FillKeyTemp(&pos, angz, 100, -1, -1, INTERP_BEZIER, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 1.f, -1, 1, NULL, &posgrille, angzgrille, 1.f);
AddKey(&KeyTemp, true, true, true);
this->lightd = this->lightchoose = this->light;
SetCurrFrame(GetStartFrame());
projectload = true;
FlashBlancEnCours = false;
}
示例2: EndEdit
BOOL CHtmlProperties::Show( CReg *pReg)
{
EndEdit();
// Destroy properties list
GetPropList().Destroy();
// Lose list items
GetListCtrl().Destroy();
// Rebuild header
GetListCtrl().GetHeader().Destroy();
GetListCtrl().GetHeader().AddHeaderItem( 120, "Name" );
GetListCtrl().GetHeader().AddHeaderItem( 120, "Value" );
if ( pReg == NULL )
{ LoadList();
RedrawWindow();
return FALSE;
} // end if
// Add variables
AddKey( pReg, pReg->GetKey( "vars" ) );
AddKey( pReg, pReg->GetKey( "lvars" ) );
AddKey( pReg, pReg->GetKey( "dvars" ) );
// AddDynamic( pReg );
// Loadup the list
LoadList();
RedrawWindow();
return TRUE;
}
示例3: AddKey
void Bar::AddKey(KeyInfo& (*key)(), Callback cb)
{
KeyInfo& k = (*key)();
AddKey(k.key[0], cb);
AddKey(k.key[1], cb);
AddKey(k.key[2], cb);
AddKey(k.key[3], cb);
}
示例4: NWidgetHorizontal
/** Construct the top row keys (cancel, ok, backspace). */
static NWidgetBase *MakeTopKeys(int *biggest_index)
{
NWidgetHorizontal *hor = new NWidgetHorizontal();
int key_height = FONT_HEIGHT_NORMAL + 2;
AddKey(hor, key_height, 6 * 2, WWT_TEXTBTN, WID_OSK_CANCEL, STR_BUTTON_CANCEL, biggest_index);
AddKey(hor, key_height, 6 * 2, WWT_TEXTBTN, WID_OSK_OK, STR_BUTTON_OK, biggest_index);
AddKey(hor, key_height, 2 * 2, WWT_PUSHIMGBTN, WID_OSK_BACKSPACE, SPR_OSK_BACKSPACE, biggest_index);
return hor;
}
示例5: NWidgetHorizontalLTR
/** Construct the asdfg row keys. */
static NWidgetBase *MakeAsdfgKeys(int *biggest_index)
{
NWidgetHorizontal *hor = new NWidgetHorizontalLTR();
int key_height = FONT_HEIGHT_NORMAL + 6;
AddKey(hor, key_height, 4, WWT_IMGBTN, WID_OSK_CAPS, SPR_OSK_CAPS, biggest_index);
for (int widnum = WID_OSK_ASDFG_FIRST; widnum <= WID_OSK_ASDFG_LAST; widnum++) {
AddKey(hor, key_height, 2, WWT_PUSHBTN, widnum, 0x0, biggest_index);
}
return hor;
}
示例6: DisplayCharacters
void DisplayCharacters(int nval,int indicator,int j) //indictor value is 0 for anuswara ,1 for consonants , 2 for vowels
{
int k = j ; // --------index for glyph codes---//
while(kFlag.n_back>=1)
{
AddKey(VK_BACK);
kFlag.n_back--;
}
if(indicator==SINGLE)
{
while(single_key[nval].k_val[k]!=-1)
{
AddKey(single_key[nval].k_val[k]);
k++;
}
}
else if(indicator == SLASH)
{
while(double_key_slash[nval].k_val[k]!=-1)
{
AddKey(double_key_slash[nval].k_val[k]);
k++;
}
}
else if(indicator == EE)
{
while(double_key_ee[nval].k_val[k]!=-1)
{
AddKey(double_key_ee[nval].k_val[k]);
k++;
}
}
else if(indicator == F_OTTU)
{
while(double_key_F[nval].k_val[k]!=-1)
{
AddKey(double_key_F[nval].k_val[k]);
k++;
}
}
kFlag.n_back = -1;
}
示例7: AddKey
RESPONSE_HEADER_RESULT ResponseHeaderBuilder::AddBinaryHeaders(
SIZE_T ContentLength,
LPCSTR MimeType)
{
if (!MimeType || !*MimeType)
{
return RESPONSE_HEADER_NEED_CONTENT_MIME;
}
AddKey("Content-Type", MimeType);
AddKey("Content-Length", IntToStr(ContentLength));
AddKey("Connection", "close");
return RESPONSE_HEADER_OK;
}
示例8: PtInKey
void CKeyControl::OnLButtonDown(UINT nFlags, CPoint point)
{
CLinkListNode<KEY> *pNode = PtInKey(point);
if (PtInKey(point))
{
if (GetAsyncKeyState(VK_CONTROL) & 0x8000)
{
pNode->m_Data.m_bSelected = !pNode->m_Data.m_bSelected;
Redraw();
}
else
{
TrackKey(pNode, KeyToPos(&pNode->m_Data), point);
}
return;
}
AddKey(point);
InvalidateRect(NULL, TRUE);
CStatic::OnLButtonDown(nFlags, point);
}
示例9: sprintf
/*=========================================================================
WriteString : Writes a string to the ini file
*========================================================================*/
void CIniFile::WriteString (CCHR *pSection, CCHR *pKey, CCHR *pValue)
{
EFIND List;
char Str [255];
if (ArePtrValid (pSection, pKey, pValue) == FALSE) { return; }
if (FindKey (pSection, pKey, &List) == TRUE)
{
sprintf (Str, "%s=%s%s", List.KeyText, pValue, List.Comment);
FreeMem (List.pKey->pText);
List.pKey->pText = (char *)malloc (strlen (Str)+1);
strcpy (List.pKey->pText, Str);
}
else
{
if ((List.pSec != NULL) && (List.pKey == NULL)) // section exist, Key not
{
AddKey (List.pSec, pKey, pValue);
}
else
{
AddSectionAndKey (pSection, pKey, pValue);
}
}
}
示例10: assert
// --[ Method ]---------------------------------------------------------------
//
// - Class : CSplineTCB
// - Prototype : bool Parse(CAdvancedParser* pParser)
//
// - Purpose : Gets the data parsing the keys from a source.
//
// -----------------------------------------------------------------------------
bool CSplineTCB::Parse(CAdvancedParser* pParser)
{
assert(pParser);
assert(pParser->Ready());
Delete();
CSplineTCB::TKey key;
while(pParser->ReadKeyFloat("#time", '=', &key.fTime, CAdvancedParser::SEARCH_FROMCURPOS))
{
int nError = 0;
if(!pParser->ReadKeyVector3("#value", '=', &key.v3Value, CAdvancedParser::SEARCH_INCURLINE)) nError++;
if(!pParser->ReadKeyFloat ("#tension", '=', &key.fTension, CAdvancedParser::SEARCH_INCURLINE)) nError++;
if(!pParser->ReadKeyFloat ("#continuity", '=', &key.fContinuity, CAdvancedParser::SEARCH_INCURLINE)) nError++;
if(!pParser->ReadKeyFloat ("#bias", '=', &key.fBias, CAdvancedParser::SEARCH_INCURLINE)) nError++;
if(!nError)
{
AddKey(key);
}
else
{
LOG.Write("\nERROR - CSplineTCB::Parse(): missed some field parsing a line.");
return false;
}
}
return true;
}
示例11: XRCCTRL
bool COptionsPageConnectionSFTP::LoadPage()
{
wxListCtrl* pKeys = XRCCTRL(*this, "ID_KEYS", wxListCtrl);
if (!pKeys)
return false;
pKeys->InsertColumn(0, _("Filename"), wxLIST_FORMAT_LEFT, 150);
pKeys->InsertColumn(1, _("Comment"), wxLIST_FORMAT_LEFT, 100);
pKeys->InsertColumn(2, _("Data"), wxLIST_FORMAT_LEFT, 350);
// Generic wxListCtrl has gross minsize
wxSize size = pKeys->GetMinSize();
size.x = 1;
pKeys->SetMinSize(size);
wxString keyFiles = m_pOptions->GetOption(OPTION_SFTP_KEYFILES);
wxStringTokenizer tokens(keyFiles, _T("\n"), wxTOKEN_DEFAULT);
while (tokens.HasMoreTokens())
AddKey(tokens.GetNextToken(), true);
bool failure = false;
SetCtrlState();
return !failure;
}
示例12: FindKey
VariableDATA *Array::ModuleGet(const char *key) {
ARRAY_COUNT_TYPE i = -1;
i = FindKey(key);
if (i == -1) {
AnsiString tmp(key);
AddKey(&tmp, COUNT);
ADD_VARIABLE(0, PIF);
}
if (i < COUNT) {
ARRAY_COUNT_TYPE target_node = i / ARRAY_INCREMENT;
ARRAY_COUNT_TYPE d_count = i % ARRAY_INCREMENT;
NODE *CURRENT = FIRST;
for (ARRAY_COUNT_TYPE k = 0; k < target_node; k++) {
CURRENT = CURRENT->NEXT;
}
ENSURE_ELEMENTS(CURRENT, d_count);
ArrayElement *ELEMENTS = CURRENT->ELEMENTS;
if (!ELEMENTS [d_count]) {
CREATE_VARIABLE(ELEMENTS [d_count], PIF);
}
return ELEMENTS [d_count];
}
ARRAY_COUNT_TYPE target = i;
while (COUNT < target) {
ADD_MULTIPLE_VARIABLE2;
}
ADD_VARIABLE(0, PIF);
return 0;
}
示例13: switch
void CRegisterDlg::OnReceiveComplete(void)
{
switch (m_ContextObject->InDeCompressedBuffer.GetBuffer(0)[0])
{
case TOKEN_REG_PATH:
{
AddPath((char*)(m_ContextObject->InDeCompressedBuffer.GetBuffer(1)));
break;
}
case TOKEN_REG_KEY:
{
AddKey((char*)(m_ContextObject->InDeCompressedBuffer.GetBuffer(1)));
break;
}
default:
// 傳輸發生異常數據
break;
}
}
示例14: AddKey
CRKey* CReg::GetKey(LPCTSTR pKey)
{_STTEX();
LPREGKEY prk = AddKey( pKey );
if ( prk == NULL ) return NULL;
return prk->key;
}
示例15: GetKeyHandle
FKeyHandle FRichCurve::UpdateOrAddKey(float InTime, float InValue, const bool bUnwindRotation)
{
// Search for a key that already exists at the time and if found, update its value
for (int32 KeyIndex = 0; KeyIndex < Keys.Num(); ++KeyIndex)
{
float KeyTime = Keys[KeyIndex].Time;
if (KeyTime > InTime)
{
// All the rest of the keys exist after the key we want to add
// so there is no point in searching
break;
}
if (FMath::IsNearlyEqual(KeyTime, InTime))
{
Keys[KeyIndex].Value = InValue;
return GetKeyHandle(KeyIndex);
}
}
// A key wasnt found, add it now
return AddKey(InTime, InValue, bUnwindRotation);
}