本文整理匯總了C++中GetCtrl函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetCtrl函數的具體用法?C++ GetCtrl怎麽用?C++ GetCtrl使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GetCtrl函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: _Execute
void _Execute(void)
{
if(m_Execute)
GetCtrl()->m_ColorMap.erase(m_fPos);
if(m_bUpdate)
GetCtrl()->OnDataChanged();
}
示例2: switch
void 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;
};
}
示例3: ccEvt
void 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);
}
}
}
示例4: GetCtrl
void EqualizerViewContainer::OnEqualizerState6band()
{
GetCtrl()->SetBandState(MUSIK_EQUALIZER_CTRL_6BANDS);
GetCtrl()->LayoutNewState();
GetCtrl()->DisplayChanged();
Globals::Preferences->SetEqualizerBandState(MUSIK_EQUALIZER_CTRL_6BANDS);
}
示例5: GetCtrl
void 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());
}
示例6: EEdit
LRESULT LoginDlg::OnDocumentComplete()
{
EEdit(GetCtrl("#TXT-NAME")).SetText(L"name");
EPassword(GetCtrl("#TXT-PSWD")).SetText(L"pswd");
ECheck(GetCtrl("#CHK-REMEBER")).SetCheck(TRUE);
return 0;
}
示例7: if
bool 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);
}
}
示例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];
}
示例9: GetCtrl
bool 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);
}
}
示例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;
}
}
示例11: GetType
int 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;
}
示例12: Get0
void 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();
}
}
示例13: GetCtrl
// provide basic indentation
void 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));
}
}
示例14: EnableCtrl
CControl* CGUI::EnableCtrl(int nID, BOOL bEnabled/* =TRUE */)
{
CControl *pCtrl=GetCtrl(nID);
if (pCtrl!=NULL) pCtrl->m_bEnabled=bEnabled;
return pCtrl;
}
示例15: GetCtrl
void 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;
}
}