本文整理汇总了C++中GetCtrl函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCtrl函数的具体用法?C++ GetCtrl怎么用?C++ GetCtrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCtrl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: _Execute
void _Execute(void)
{
if(m_Execute)
GetCtrl()->m_ColorMap.erase(m_fPos);
if(m_bUpdate)
GetCtrl()->OnDataChanged();
}
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:7,代码来源:CColorAnimImp.cpp
示例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;
};
}
开发者ID:HeimdallTeam,项目名称:Alcominance,代码行数:30,代码来源:obj_sugar.cpp
示例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);
}
}
}
开发者ID:MaartenBent,项目名称:codelite,代码行数:26,代码来源:context_base.cpp
示例4: GetCtrl
void EqualizerViewContainer::OnEqualizerState6band()
{
GetCtrl()->SetBandState(MUSIK_EQUALIZER_CTRL_6BANDS);
GetCtrl()->LayoutNewState();
GetCtrl()->DisplayChanged();
Globals::Preferences->SetEqualizerBandState(MUSIK_EQUALIZER_CTRL_6BANDS);
}
开发者ID:stephen-hill,项目名称:musicCube,代码行数:8,代码来源:EqualizerView.cpp
示例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());
}
开发者ID:siangzhang,项目名称:starworld,代码行数:9,代码来源:LuaView.cpp
示例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;
}
开发者ID:qiuchengw,项目名称:qui,代码行数:10,代码来源:LoginDlg.cpp
示例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);
}
}
开发者ID:MaartenBent,项目名称:codelite,代码行数:11,代码来源:context_base.cpp
示例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,代码来源:CColorAnimImp.cpp
示例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);
}
}
开发者ID:Slasher006,项目名称:codelite,代码行数:15,代码来源:ContextPhp.cpp
示例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,代码来源:Vector3EditCtrlImp.cpp
示例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;
}
开发者ID:HeimdallTeam,项目名称:Alcominance,代码行数:48,代码来源:buildings.cpp
示例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();
}
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:27,代码来源:DockCont.cpp
示例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));
}
}
开发者ID:MaartenBent,项目名称:codelite,代码行数:32,代码来源:context_base.cpp
示例14: EnableCtrl
CControl* CGUI::EnableCtrl(int nID, BOOL bEnabled/* =TRUE */)
{
CControl *pCtrl=GetCtrl(nID);
if (pCtrl!=NULL) pCtrl->m_bEnabled=bEnabled;
return pCtrl;
}
开发者ID:releed,项目名称:ruge,代码行数:7,代码来源:GUI.cpp
示例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;
}
}
开发者ID:pedia,项目名称:raidget,代码行数:28,代码来源:DockTabBar.cpp
示例16: switch
LRESULT 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,代码来源:QFrame.cpp
示例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,代码来源:CColorAnimImp.cpp
示例18: ASSERT
int LuaSrcView::ScrollToLine(int line, int &height, bool scroll)
{
ASSERT(line >= 0);
GetCtrl().GotoLine(line);
return 0;
}
开发者ID:siangzhang,项目名称:starworld,代码行数:7,代码来源:LuaView.cpp
示例19: GetCtrl
void CCppDocContentView::OnOptionsDeletemarker()
{
CScintillaCtrl& rCtrl = GetCtrl();
Sci_Position nPos = rCtrl.GetCurrentPos();
int nLine = rCtrl.LineFromPosition(nPos);
rCtrl.MarkerDelete(nLine, 0);
}
开发者ID:NasirA1,项目名称:PLT,代码行数:7,代码来源:CppDocContentView.cpp
示例20: ShowCtrl
CControl* CGUI::ShowCtrl(int nID, BOOL bVisible/* =TRUE */)
{
CControl *pCtrl=GetCtrl(nID);
if (pCtrl!=NULL) pCtrl->m_bVisible=bVisible;
return pCtrl;
}
开发者ID:releed,项目名称:ruge,代码行数:7,代码来源:GUI.cpp
注:本文中的GetCtrl函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论