这篇教程C++ GetCtrl函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetCtrl函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCtrl函数的具体用法?C++ GetCtrl怎么用?C++ GetCtrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetCtrl函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: _Execute void _Execute(void) { if(m_Execute) GetCtrl()->m_ColorMap.erase(m_fPos); if(m_bUpdate) GetCtrl()->OnDataChanged(); }
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:7,
示例2: switchvoid Sugar::SetMode(EBuildingMode mode){ // odmazat if (mode == m_mode) return; // pri buildingu nastavit kolize switch (m_mode) { case EBM_Build: GetCtrl()->SetOverColor(0xffffffff); break; case EBM_Select: GetCtrl()->SetOverColor(0xffffffff); break; case EBM_Normal: CRR::Get()->Unregister(&m_sugar); break; }; m_mode = mode; switch (mode) { case EBM_Build: GetCtrl()->SetOverColor(0xffffff00); break; case EBM_Normal: Show(true); CRR::Get()->Register(&m_sugar); break; };}
开发者ID:HeimdallTeam,项目名称:Alcominance,代码行数:30,
示例3: ccEvtvoid ContextBase::OnUserTypedXChars(const wxString& word){ // user typed more than X chars // trigger code complete event (as if the user typed ctrl-space) // if no one handles this event, fire a word completion event if(IsCommentOrString(GetCtrl().GetCurrentPos())) { return; } const TagsOptionsData& options = TagsManagerST::Get()->GetCtagsOptions(); if(options.GetFlags() & CC_WORD_ASSIST) { // Try to call code completion clCodeCompletionEvent ccEvt(wxEVT_CC_CODE_COMPLETE); ccEvt.SetEditor(&GetCtrl()); ccEvt.SetPosition(GetCtrl().GetCurrentPos()); ccEvt.SetWord(word); if(!EventNotifier::Get()->ProcessEvent(ccEvt)) { // This is ugly, since CodeLite should not be calling // the plugins... we take comfort in the fact that it // merely fires an event and not calling it directly wxCommandEvent wordCompleteEvent(wxEVT_MENU, XRCID("word_complete_no_single_insert")); wxTheApp->ProcessEvent(wordCompleteEvent); } }}
开发者ID:MaartenBent,项目名称:codelite,代码行数:26,
示例4: GetCtrlvoid EqualizerViewContainer::OnEqualizerState6band(){ GetCtrl()->SetBandState(MUSIK_EQUALIZER_CTRL_6BANDS); GetCtrl()->LayoutNewState(); GetCtrl()->DisplayChanged(); Globals::Preferences->SetEqualizerBandState(MUSIK_EQUALIZER_CTRL_6BANDS);}
开发者ID:stephen-hill,项目名称:musicCube,代码行数:8,
示例5: GetCtrlvoid LuaSrcView::OnUpdateUI(SCNotification* notification){ long pos= GetCtrl().GetCurrentPos(); int line= GetCtrl().LineFromPosition(pos); int col= GetCtrl().GetColumn(pos); CMainFrame* main = (CMainFrame*) AfxGetApp()->m_pMainWnd; main->SetPositionText(line + 1, col + 1, !GetCtrl().GetOvertype());}
开发者ID:siangzhang,项目名称:starworld,代码行数:9,
示例6: EEditLRESULT LoginDlg::OnDocumentComplete(){ EEdit(GetCtrl("#TXT-NAME")).SetText(L"name"); EPassword(GetCtrl("#TXT-PSWD")).SetText(L"pswd"); ECheck(GetCtrl("#CHK-REMEBER")).SetCheck(TRUE); return 0;}
开发者ID:qiuchengw,项目名称:qui,代码行数:10,
示例7: ifbool ContextBase::IsStringTriggerCodeComplete(const wxString& str) const{ // default behavior is to check if 'str' exists in the m_completionTriggerStrings container if(GetCtrl().GetLexer() == wxSTC_LEX_XML) { return str == "<" || str == "</"; } else if(GetCtrl().GetLexer() == wxSTC_LEX_CSS) { return str == ":"; } else { return (m_completionTriggerStrings.count(str) > 0); }}
开发者ID:MaartenBent,项目名称:codelite,代码行数:11,
示例8: ColorDelCmd ColorDelCmd( CColorAnimImp* pCtrl, float pos ,bool update = false ) : CPropBaseCmd(pCtrl) { m_fPos = pos; m_Execute = true; m_bUpdate = update; if(GetCtrl()->m_ColorMap.find(pos) == GetCtrl()->m_ColorMap.end()) { m_Execute = false; } else m_cData = GetCtrl()->m_ColorMap[m_fPos]; }
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:13,
示例9: GetCtrlbool ContextPhp::IsStringTriggerCodeComplete(const wxString& str) const{ int style = GetCtrl().GetStyleAt(GetCtrl().GetCurrentPos()); if(IS_BETWEEN(style, wxSTC_HJ_START, wxSTC_HJA_REGEX)) { // When in JS section, trigger CC if str is a dot return str == "."; } else if(IS_BETWEEN(style, wxSTC_H_DEFAULT, wxSTC_H_ENTITY)){ return str == "</" || str == "<"; } else { return (m_completionTriggerStrings.count(str) > 0); }}
开发者ID:Slasher006,项目名称:codelite,代码行数:15,
示例10: _UnExecute void _UnExecute(void) { switch(m_Type) { case Edit_X: GetCtrl()->_SetImpXValue(m_bOld); break; case Edit_Y: GetCtrl()->_SetImpYValue(m_bOld); break; case Edit_Z: GetCtrl()->_SetImpZValue(m_bOld); break; } }
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:15,
示例11: GetTypeint BecherBuilding::StatusPlace(float *pos){ // pozice v mape#ifndef BECHER_EDITOR // type, model // vysku, destinaci od ostatnich ziskam z... v_sizzing float min,max; float x=pos[0]; float y=pos[1]; int type = GetType(); float height = v_sizzing.GetFloat(SIZZ(type,ESSZ_height)); float dobj = v_sizzing.GetFloat(SIZZ(type,ESSZ_dobj)); bool ok; THoeParameter par; IHoeModel * m = GetModel(); if (m) m->GetParameter("boundbox",&par); else memset(&par,0, sizeof(par)); max = min = 0.f; // 177 132 ok = GetLevel()->GetScene()->GetScenePhysics()->GetCamber( x+par.box.left,x+par.box.right,y+par.box.front,y+par.box.back,min,max); SetPosition(x,y,max); if (!ok || (max-min) > height) { GetCtrl()->SetOverColor(0xffff0000); return 1; } // zjistit zda muze byt cerveny nebo jiny for (int i=0; i < GetLevel()->GetNumObj();i++) { float x = GetLevel()->GetObj(i)->GetPosX(); float y = GetLevel()->GetObj(i)->GetPosY(); x -= GetPosX(); y -= GetPosY(); if (x*x+y*y < dobj) { GetCtrl()->SetOverColor(0xffff0000); return 2; } } GetCtrl()->SetOverColor(0xffffffff);#endif return 0;}
开发者ID:HeimdallTeam,项目名称:Alcominance,代码行数:48,
示例12: Get0void DockCont::TabSelected(){ int ix = tabbar.GetCursor(); if (ix >= 0) { DockableCtrl *dc = Get0(ix); if (!dc) return; Ctrl *ctrl = GetCtrl(ix); Ctrl *first = &handle; for (Ctrl *c = first->GetNext(); c; c = c->GetNext()) if (c != ctrl) c->Hide(); ctrl->Show(); Icon(dc->GetIcon()).Title(dc->GetTitle()); handle.dc = dc; SyncButtons(*dc); if (IsTabbed()) { DockCont *c = static_cast<DockCont *>(GetParent()); c->tabbar.SyncRepos(); c->TabSelected(); c->RefreshFrame(); } else RefreshLayout(); }}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:27,
示例13: GetCtrl// provide basic indentationvoid ContextBase::AutoIndent(const wxChar& ch){ LEditor& rCtrl = GetCtrl(); int prevpos(wxNOT_FOUND); int curpos = rCtrl.GetCurrentPos(); int line = rCtrl.LineFromPosition(curpos); if(ch == wxT('/n')) { wxChar prevCh = rCtrl.PreviousChar(curpos, prevpos); if(prevCh == '{') { // an enter was hit just after an open brace int prevLine = rCtrl.LineFromPosition(prevpos); rCtrl.SetLineIndentation(line, rCtrl.GetIndent() + rCtrl.GetLineIndentation(prevLine)); rCtrl.SetCaretAt(rCtrl.GetLineIndentPosition(line)); } else { // just copy the previous line indentation int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPos()); rCtrl.SetLineIndentation(line, rCtrl.GetLineIndentation(line - 1)); // place the caret at the end of the line rCtrl.SetCaretAt(rCtrl.GetLineIndentPosition(line)); rCtrl.ChooseCaretX(); } } else if(ch == '}' && !IsCommentOrString(curpos)) { long matchPos = wxNOT_FOUND; if(!rCtrl.MatchBraceBack(wxT('}'), rCtrl.PositionBefore(curpos), matchPos)) return; int secondLine = rCtrl.LineFromPosition(matchPos); if(secondLine == line) return; rCtrl.SetLineIndentation(line, rCtrl.GetLineIndentation(secondLine)); }}
开发者ID:MaartenBent,项目名称:codelite,代码行数:32,
示例14: EnableCtrlCControl* CGUI::EnableCtrl(int nID, BOOL bEnabled/* =TRUE */){ CControl *pCtrl=GetCtrl(nID); if (pCtrl!=NULL) pCtrl->m_bEnabled=bEnabled; return pCtrl;}
开发者ID:releed,项目名称:ruge,代码行数:7,
示例15: GetCtrlvoid AutoHideBar::TabHighlight(){ Ctrl *c = NULL; int ix = TabBar::GetHighlight(); if (ix >= 0) c = GetCtrl(ix); if (!c || ctrl == c) return; else if (ctrl) { if (c) { if (popup.IsPopUp()) popup.Close(); ctrl->Remove(); ctrl = NULL; } else HideAnimate(ctrl); } if (c) { ASSERT(ix >= 0 && ix < GetCount()); // Clear WhenHighlight ot prevent stack overflow. Perhaps a better solution should be found... Callback cb = WhenHighlight; WhenHighlight = Callback(); SetCursor(ix); ShowAnimate(c); WhenHighlight = cb; }}
开发者ID:pedia,项目名称:raidget,代码行数:28,
示例16: switchLRESULT QFrame::OnHtmlNotify( UINT uMsg, WPARAM wParam, LPARAM lParam ){ switch(((NMHDR*)lParam)->code) { case HLN_DOCUMENT_COMPLETE: { if ( !_HasFlag(GetStyle(),WS_CHILD) ) { WTL::CRect r; GetWindowRect(&r); // 非子窗口,调整窗体为合适大小 int nWidth = max(HTMLayoutGetMinWidth(m_hWnd), (UINT)r.Width()); WTL::CRect rcNew; rcNew.SetRect(r.left, r.top, nWidth + r.left, r.top + max((UINT)r.Height(), HTMLayoutGetMinHeight(m_hWnd,nWidth))); AdjustWindowRectEx( &rcNew, GetStyle(), FALSE, GetExStyle()); // 调整大小,位置不变 SetWindowPos(NULL, 0, 0, rcNew.Width(), rcNew.Height(), SWP_NOZORDER | SWP_NOMOVE); size_min_ = rcNew.Size(); // 设置title ctl_title_ = GetCtrl("#wc-title"); if (ctl_title_.is_valid()) { SetWindowText(ctl_title_.GetText()); } } break; } } return QView::OnHtmlNotify(uMsg, wParam, lParam);}
开发者ID:Beifeng,项目名称:qui,代码行数:35,
示例17: ColorEditCmd ColorEditCmd( CColorAnimImp* pCtrl, float pos,ColorAnimNode& node ) : CPropBaseCmd(pCtrl) { m_fPos = pos; m_cOld = GetCtrl()->m_ColorMap[m_fPos]; m_cData = node; }
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:7,
示例18: ASSERTint LuaSrcView::ScrollToLine(int line, int &height, bool scroll){ ASSERT(line >= 0); GetCtrl().GotoLine(line); return 0;}
开发者ID:siangzhang,项目名称:starworld,代码行数:7,
示例19: GetCtrlvoid CCppDocContentView::OnOptionsDeletemarker(){ CScintillaCtrl& rCtrl = GetCtrl(); Sci_Position nPos = rCtrl.GetCurrentPos(); int nLine = rCtrl.LineFromPosition(nPos); rCtrl.MarkerDelete(nLine, 0);}
开发者ID:NasirA1,项目名称:PLT,代码行数:7,
示例20: ShowCtrlCControl* CGUI::ShowCtrl(int nID, BOOL bVisible/* =TRUE */){ CControl *pCtrl=GetCtrl(nID); if (pCtrl!=NULL) pCtrl->m_bVisible=bVisible; return pCtrl;}
开发者ID:releed,项目名称:ruge,代码行数:7,
示例21: GetCtrlvoid CCsgIdeView::OnCharAdded( SCNotification* pSCNotification ){ CScintillaCtrl& ctrl = GetCtrl(); if (/*pSCNotification->ch == '/r' ||*/ pSCNotification->ch == '/n') { char linebuf[1000]; int curLine = ctrl.LineFromPosition(ctrl.GetCurrentPos()); int lineLength = ctrl.LineLength(curLine); if (curLine > 0 && lineLength <= 2) { int prevLineLength = ctrl.LineLength(curLine - 1); if (prevLineLength < sizeof(linebuf)) { WORD buflen = sizeof(linebuf); memcpy(linebuf, &buflen, sizeof(buflen)); ctrl.GetLine(curLine - 1, static_cast<char *>(linebuf)); linebuf[prevLineLength] = '/0'; for (int pos = 0; linebuf[pos]; pos++) { if (linebuf[pos] != ' ' && linebuf[pos] != '/t') linebuf[pos] = '/0'; } ctrl.ReplaceSel(static_cast<char *>(linebuf)); } } } GetDocument()->SetModifiedFlag(TRUE);}
开发者ID:mrusinovic,项目名称:csg-ide,代码行数:30,
示例22: GetCtrlvoid ContextPhp::OnSciUpdateUI(wxStyledTextEvent& event){ LEditor& ctrl = GetCtrl(); if(ctrl.GetFunctionTip()->IsActive()) { ctrl.GetFunctionTip()->Highlight(DoGetCalltipParamterIndex()); }}
开发者ID:292388900,项目名称:codelite,代码行数:7,
示例23: OnUpdateInsertvoid CCppDocContentView::OnUpdateInsert(CCmdUI* pCmdUI){ CString sText; if (GetCtrl().GetOvertype()) VERIFY(sText.LoadString(ID_INDICATOR_OVR)); pCmdUI->SetText(sText);}
开发者ID:NasirA1,项目名称:PLT,代码行数:7,
示例24: foundPosvoid ContextPhp::SemicolonShift(){ int foundPos(wxNOT_FOUND); int semiColonPos(wxNOT_FOUND); LEditor& ctrl = GetCtrl(); if(ctrl.NextChar(ctrl.GetCurrentPos(), semiColonPos) == wxT(')')) { // test to see if we are inside a 'for' statement long openBracePos(wxNOT_FOUND); int posWordBeforeOpenBrace(wxNOT_FOUND); if(ctrl.MatchBraceBack(wxT(')'), semiColonPos, openBracePos)) { ctrl.PreviousChar(openBracePos, posWordBeforeOpenBrace); if(posWordBeforeOpenBrace != wxNOT_FOUND) { wxString word = ctrl.PreviousWord(posWordBeforeOpenBrace, foundPos); // At the current pos, we got a ';' // at semiColonPos we got ; // switch ctrl.DeleteBack(); ctrl.SetCurrentPos(semiColonPos); ctrl.InsertText(semiColonPos, wxT(";")); ctrl.SetCaretAt(semiColonPos + 1); ctrl.GetFunctionTip()->Deactivate(); } } }}
开发者ID:292388900,项目名称:codelite,代码行数:28,
示例25: GetCtrlImage DockCont::GetHighlightImage(){ Ctrl *ctrl = GetCtrl(GetCursor()); ImageDraw img(ctrl->GetRect().GetSize()); ctrl->DrawCtrlWithParent(img); return img;}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:7,
示例26: CStrSetCmd CStrSetCmd( EStrMapEditCtrlImp* pCtrl, float pos, const char* str ) : CPropBaseCmd(pCtrl) { m_fPos = pos; m_strOld = GetCtrl()->GetEStrNode(m_fPos); m_strData = str; }
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:7,
示例27: MoveCtrlvoid hgeGUI::MoveCtrl(int id, float x, float y){ hgeGUIObject *ctrl=GetCtrl(id); ctrl->rect.x2=x + (ctrl->rect.x2 - ctrl->rect.x1); ctrl->rect.y2=y + (ctrl->rect.y2 - ctrl->rect.y1); ctrl->rect.x1=x; ctrl->rect.y1=y;}
开发者ID:XadillaX,项目名称:xaengine,代码行数:8,
注:本文中的GetCtrl函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetCtrlVal函数代码示例 C++ GetCrossHairPosition函数代码示例 |