本文整理汇总了C++中GetEnabled函数的典型用法代码示例。如果您正苦于以下问题:C++ GetEnabled函数的具体用法?C++ GetEnabled怎么用?C++ GetEnabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetEnabled函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetLockedButton
// Called from window. Notifies that button has been clicked.
void CClickWindowController::NotifyButtonClick (CClickWindowController::EButton button)
{
if (m_enabled)
{
if (button== CClickWindowController::NO_CLICK)
// Disable click
m_enabled= false;
else
{
if (m_fastMode || (m_currentButton!= m_lockedButton && button== m_currentButton))
m_lockedButton= button;
m_currentButton= button;
}
m_pWindow->UpdateButtons(GetEnabled(),GetCurrentButton(), GetLockedButton());
}
else
{
// Disabled state. Only handle NO_CLICK button
if (button== CClickWindowController::NO_CLICK)
{
m_enabled= true;
m_pWindow->UpdateButtons(GetEnabled(),GetCurrentButton(), GetLockedButton());
}
}
}
开发者ID:mvancompernolle,项目名称:ai_project,代码行数:28,代码来源:clickwindowcontroller.cpp
示例2: GetCanvas
void Fire::Update()
{
if (GetEnabled() && (millis() - GetLastUpdate()) > 1000 / GetSpeed())
{
if (GetLastUpdate() != 0)
GetCanvas()->InvalidateRect(GetX(), GetY());
SetY(GetY() + GetVDir());
if ((GetY() + GetHeight() - 1) > GetCanvas()->GetScreenHeight() - 1)
{
SetEnabled(false);
SetLastUpdate(0);
}
else if (GetY() < 0)
{
SetEnabled(false);
SetLastUpdate(0);
}
if (GetEnabled())
{
/*
Serial.print(GetX());
Serial.print(",");
Serial.print(GetY());
*/
GetCanvas()->Paint(GetX(), GetY());
SetLastUpdate(millis());
}
}
}
开发者ID:boliveira2010,项目名称:arduino-project-zero,代码行数:33,代码来源:Fire.cpp
示例3: CreateListColumns
void pgaStep::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids = true;
}
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("ID"), GetRecId());
properties->AppendYesNoItem(_("Enabled"), GetEnabled());
properties->AppendItem(_("Kind"), GetKind());
if (GetConnStr().IsEmpty())
properties->AppendItem(_("Database"), GetDbname());
else
properties->AppendItem(_("Connection String"), GetConnStr());
properties->AppendItem(_("Code"), GetCode());
properties->AppendItem(_("On error"), GetOnError());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
开发者ID:Joe-xXx,项目名称:pgadmin3,代码行数:25,代码来源:pgaStep.cpp
示例4: wxCHECK_RET
void wxGISCatalogMainCmd::OnDropDownCommand(int nID)
{
wxCHECK_RET(m_pGxApp, wxT("Application pointer is null"));
wxGxSelection* pSel = m_pGxApp->GetGxSelection();
wxGxCatalogBase* pCat = GetGxCatalog();
if(pSel && pCat && GetEnabled())
{
int nPos = pSel->GetDoPos();
int nNewPos = nID - ID_MENUCMD;
long nSelId = wxNOT_FOUND;
if(nNewPos > nPos)
{
if(pSel->CanRedo())
{
nSelId = pSel->Redo(nNewPos);
}
}
else
{
if(pSel->CanUndo())
{
nSelId = pSel->Undo(nNewPos);
}
}
if(pCat->GetRegisterObject(nSelId))
{
pSel->Select(nSelId, false, wxGxSelection::INIT_ALL);
}
}
}
开发者ID:Mileslee,项目名称:wxgis,代码行数:33,代码来源:catalogcmd.cpp
示例5: CreateListColumns
void pgaSchedule::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (!expandedKids)
{
expandedKids = true;
}
if (properties)
{
CreateListColumns(properties);
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("ID"), GetRecId());
properties->AppendYesNoItem(_("Enabled"), GetEnabled());
properties->AppendItem(_("Start date"), GetStart());
properties->AppendItem(_("End date"), GetEnd());
properties->AppendItem(_("Minutes"), GetMinutesString());
properties->AppendItem(_("Hours"), GetHoursString());
properties->AppendItem(_("Weekdays"), GetWeekdaysString());
properties->AppendItem(_("Monthdays"), GetMonthdaysString());
properties->AppendItem(_("Months"), GetMonthsString());
properties->AppendItem(_("Exceptions"), GetExceptionsString());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
开发者ID:dragansah,项目名称:pgadmin3,代码行数:27,代码来源:pgaSchedule.cpp
示例6: UpdateBB
void CGUITextBox::Draw(CGraphicsHandler *g){
if(GetVisible()){
UpdateBB();
if(m_pSprites){
if(m_bButtonDown && m_bMouseOver && m_pSprites->Button->MouseDown && m_bEnabled)
g->DrawSpriteTL(m_pSprites->Button->MouseDown, 0, m_pos);
else if((m_bMouseOver || m_bButtonDown) && m_pSprites->Button->MouseOver && m_bEnabled)
g->DrawSpriteTL(m_pSprites->Button->MouseOver, 0, m_pos);
else if(m_pSprites->Button->Default)
g->DrawSpriteTL(m_pSprites->Button->Default, 0, m_pos);
}else if(m_pColors)
g->DrawRectTL(m_pos, m_width, m_height, m_pColors->BG, m_border, m_pColors->Border);
if((m_Caretx!=m_SelStartx || m_Carety!=m_SelStarty) && GetFocus()){
if(m_SelStarty==m_Carety && !(m_SelStarty<m_Scrolly) && !(m_SelStarty>=m_Scrolly+((int)(m_height/13))))
g->DrawRectTL(Vector2(m_pos.x+m_border+2+(m_SelStartx-m_Scrollx)*8, m_pos.y+m_border+2+(m_SelStarty-m_Scrolly)*13), (m_Caretx-m_SelStartx)*8, 13, ColorARGB(255, 0,0,255));
else{
if(m_Carety>m_SelStarty){
if(!(m_SelStarty<m_Scrolly) && !(m_SelStarty>=m_Scrolly+((int)(m_height/13))))
g->DrawRectTL(Vector2(m_pos.x+m_border+2+(m_SelStartx-m_Scrollx)*8, m_pos.y+m_border+2+(m_SelStarty-m_Scrolly)*13), m_Text[m_SelStarty].substr(m_SelStartx).length()*8, 13, ColorARGB(255, 0,0,255));
for(UINT a=m_SelStarty+1; a<m_Carety; a++)
if(!(a<m_Scrolly) && !(a>=m_Scrolly+((int)(m_height/13))))
g->DrawRectTL(Vector2(m_pos.x+m_border+2+(-(int)m_Scrollx)*8, m_pos.y+m_border+2+(a-m_Scrolly)*13), m_Text[a].length()*8, 13, ColorARGB(255, 0,0,255));
if(!(m_Carety<m_Scrolly) && !(m_Carety>=m_Scrolly+((int)(m_height/13))))
g->DrawRectTL(Vector2(m_pos.x+m_border+2+(-(int)m_Scrollx)*8, m_pos.y+m_border+2+(m_Carety-m_Scrolly)*13), m_Text[m_Carety].substr(0, m_Caretx).length()*8, 13, ColorARGB(255, 0,0,255));
}else{
if(!(m_SelStarty<m_Scrolly) && !(m_SelStarty>=m_Scrolly+((int)(m_height/13))))
g->DrawRectTL(Vector2(m_pos.x+m_border+2+(m_SelStartx-(int)m_Scrollx)*8, m_pos.y+m_border+2+(m_SelStarty-(int)m_Scrolly)*13), -(int)m_Text[m_SelStarty].substr(0, m_SelStartx).length()*8, 13, ColorARGB(255, 0,0,255));
for(UINT a=m_SelStarty-1; a>m_Carety; a--)
if(!(a<m_Scrolly) && !(a>=m_Scrolly+((int)(m_height/13))))
g->DrawRectTL(Vector2(m_pos.x+m_border+2+(-(int)m_Scrollx)*8, m_pos.y+m_border+2+(a-m_Scrolly)*13), m_Text[a].length()*8, 13, ColorARGB(255, 0,0,255));
if(!(m_Carety<m_Scrolly) && !(m_Carety>=m_Scrolly+((int)(m_height/13))))
g->DrawRectTL(Vector2(m_pos.x+m_border+2+(m_Text[m_Carety].length())*8, m_pos.y+m_border+2+(m_Carety-(int)m_Scrolly)*13), -(int)m_Text[m_Carety].substr(m_Caretx).length()*8, 13, ColorARGB(255, 0,0,255));
}
}
}
if(m_TextDraw!=L"" && m_pColors){
//if(m_Carety==m_SelStarty)
g->DrawTextTL(m_TextDraw, Vector2(m_pos.x+m_border+2, m_pos.y+m_border+3), m_pColors->Text);
//else{
//g->DrawTextTL(m_TextDraw, Vector2(m_pos.x+m_border+2, m_pos.y+m_border+3), ColorARGB(255, 255, 0,0));
//}
}
if(m_bCaretOn && GetFocus() && m_bSelectable && !(m_Carety<m_Scrolly) && !(m_Carety>=m_Scrolly+((int)(m_height/13))))
g->DrawRectTL(Vector2(m_pos.x+m_border+2+(m_Caretx-m_Scrollx)*8, m_pos.y+m_border+2+(m_Carety-m_Scrolly)*13), 1, 13, ColorARGB(255, 0,0,0));
if(m_pVSB!=NULL)
m_pVSB->Draw(g);
if(m_pHSB!=NULL)
m_pHSB->Draw(g);
if(!GetEnabled())
g->DrawRectTL(m_pos, m_width, m_height, ColorARGB(128, 128, 128, 128));
else if(m_bMouseOver && m_pSprites && m_pSprites->Cursor)
g->DrawSpriteTL(m_pSprites->Cursor, 0, m_pos);
}
}
开发者ID:kumorikarasu,项目名称:KylTek,代码行数:60,代码来源:CGUITextBox.cpp
示例7: GetEnabled
void CXTPControlCustom::OnEnabledChanged()
{
if (m_hwndControl)
{
::EnableWindow(m_hwndControl, GetEnabled());
}
}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:7,代码来源:XTPControlCustom.cpp
示例8: Mouse
// Process mouse events and perform arrow selection returning the
// ID of the selected arrow if it has been clicked.
uint32 FullscreenUI::Mouse(const int32 button, const int32 state,
const int32 previousState,
const b2Vec2 &mousePosition)
{
if (GetEnabled() && button == GLUT_LEFT_BUTTON)
{
// If the mouse button is being pressed, update the current
// arrow selection.
if (state == GLUT_DOWN && previousState != GLUT_DOWN)
{
for (uint32 i = 0; i < k_numArrows &&
m_selection == e_SelectionNone; ++i)
{
m_selection = s_arrows[i].Hit(mousePosition,
e_SelectionNone);
}
}
// If the mouse button has been released, return the current
// arrow selection.
if (state == GLUT_UP)
{
const uint32 selectedArrow = m_selection;
m_selection = e_SelectionNone;
return selectedArrow;
}
}
return e_SelectionNone;
}
开发者ID:Ratel13,项目名称:liquidfun,代码行数:30,代码来源:FullscreenUI.cpp
示例9: br
void CColorButtonCtrl::DrawControl(CDC& dc, CRect& rc)
{
// paint the button rect
CBrush br(m_BackColor), *pbrOld;
CRect rcClip;
dc.GetClipBox(&rcClip);
pbrOld = dc.SelectObject(&br);
dc.PatBlt(rcClip.left, rcClip.top, (rcClip.right - rcClip.left),
(rcClip.bottom - rcClip.top), PATCOPY);
dc.SelectObject(pbrOld);
// draw bevel
DrawBevelRaised(&dc, rc);
// draw caption
DrawCaption(&dc, rc, GetEnabled()? m_ForeColor : ::GetSysColor(COLOR_GRAYTEXT));
// draw the frame
if (this == GetFocus() ) {
CBrush br(::GetSysColor(COLOR_3DDKSHADOW));
FrameButton(br);
}
}
开发者ID:trieck,项目名称:source,代码行数:26,代码来源:ColorButtonCtl.cpp
示例10: GetIconId
int pgRule::GetIconId()
{
if (GetEnabled())
return ruleFactory.GetIconId();
else
return ruleFactory.GetClosedIconId();
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:7,代码来源:pgRule.cpp
示例11: switch
wxMenu* wxGISCatalogViewsCmd::GetDropDownMenu(void)
{
switch(m_subtype)
{
case 0:
{
if(GetEnabled())
{
wxMenu* pMenu = new wxMenu();
pMenu->AppendCheckItem(ID_MENUCMD + (int)enumGISCVList, wxString(_("List")));
pMenu->AppendCheckItem(ID_MENUCMD + (int)enumGISCVLarge, wxString(_("Icons")));
pMenu->AppendCheckItem(ID_MENUCMD + (int)enumGISCVSmall, wxString(_("Smal Icons")));
pMenu->AppendCheckItem(ID_MENUCMD + (int)enumGISCVReport, wxString(_("Details")));
for(size_t i = 0; i < m_anContentsWinIDs.GetCount(); ++i)
{
wxWindow* pWnd = wxWindow::FindWindowById(m_anContentsWinIDs[i]);
if(pWnd && pWnd->IsShown())
{
IGxContentsView* pGxContentsView = dynamic_cast<IGxContentsView*>(pWnd);
if(pGxContentsView)
{
wxGISEnumContentsViewStyle nStyle = pGxContentsView->GetStyle();
pMenu->Check(ID_MENUCMD + (int)nStyle, true);
}
}
}
return pMenu;
}
return NULL;
}
default:
return NULL;
}
}
开发者ID:Mileslee,项目名称:wxgis,代码行数:34,代码来源:viewscmd.cpp
示例12: GetStructureLayerFromItem
void LayerDlg::OnUpdateVisible(wxUpdateUIEvent& event)
{
if (!IsShown())
return;
if (g_App.m_state == AS_Terrain)
{
vtStructureLayer *slay = GetStructureLayerFromItem(m_item);
osg::Node *pThing = GetNodeFromItem(m_item);
if (pThing && slay != NULL)
{
event.Check(GetEnabled(pThing));
return;
}
vtLayer *lay = GetLayerFromItem(m_item);
if (lay)
{
event.Check(lay->GetVisible());
}
event.Enable(pThing != NULL || lay != NULL);
}
else if (g_App.m_state == AS_Orbit)
{
LayerItemData *data = GetLayerDataFromItem(m_item);
if (data && data->m_glay)
event.Check(data->m_glay->GetEnabled());
event.Enable(data && data->m_glay);
}
}
开发者ID:kamalsirsa,项目名称:vtp,代码行数:29,代码来源:LayerDlg.cpp
示例13: GetIconId
int pgTrigger::GetIconId()
{
if (GetEnabled())
return triggerFactory.GetIconId();
else
return triggerFactory.GetClosedIconId();
}
开发者ID:zr40,项目名称:pgadmin3-light,代码行数:7,代码来源:pgTrigger.cpp
示例14: OnAction
bool GeometryButton::OnAction(HWND hwnd,GraphicsWindow *gw,IPoint2 hitLoc,IViewportButton::Action action)
{
bool val = false;
if(GetEnabled()==true)
{
IViewportButtonManager *vpm = static_cast<IViewportButtonManager*>(GetCOREInterface(IVIEWPORTBUTTONMANAGER_INTERFACE ));
if(vpm)
val = vpm->HitTest(hwnd,gw,mLocation,hitLoc,mLabel);
}
if(val==true&&(action == IViewportButton::eRightClick||action == IViewportButton::eLeftClick))
{
IGeometryCheckerManager *man = GetIGeometryCheckerManager();
if(man)
man->PopupMenuSelect();
}
//now make sure we set the color correclty, but only set it when it changes
Color textColor;
if(val==true) //okay we hit it so change the color
{
textColor = GetUIColor(COLOR_VP_LABEL_HIGHLIGHT);
}
else
{
COLORREF cr = ColorMan()->GetColor(GEOMETRY_TEXT_COLOR);
textColor = Color(cr);
}
if(textColor!=mColor)
SetColor(textColor);
return val;
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:30,代码来源:GeometryButton.cpp
示例15: GetEnabled
/**
* Throw the dog a bone.
*
* When everything is going well, you feed your dog when you get home.
* Let's hope you don't drive your car off a bridge on the way home...
* Your dog won't get fed and he will starve to death.
*
* By the way, it's not cool to ask the neighbor (some random task) to
* feed your dog for you. He's your responsibility!
*
* @returns Returns the previous state of the watchdog before feeding it.
*/
bool Watchdog::Feed()
{
bool previous = GetEnabled();
m_fpgaWatchDog->strobeFeed(&status);
wpi_assertCleanStatus(status);
return previous;
}
开发者ID:Techbrick,项目名称:MainWorkingCode,代码行数:19,代码来源:Watchdog.cpp
示例16: NS_ENSURE_ARG_POINTER
nsresult nsMsgSearchValidityTable::ValidateTerms(nsIArray *searchTerms) {
nsresult rv = NS_OK;
uint32_t count;
NS_ENSURE_ARG_POINTER(searchTerms);
searchTerms->GetLength(&count);
for (uint32_t i = 0; i < count; i++) {
nsCOMPtr<nsIMsgSearchTerm> pTerm = do_QueryElementAt(searchTerms, i);
nsIMsgSearchTerm *iTerm = pTerm;
nsMsgSearchTerm *term = static_cast<nsMsgSearchTerm *>(iTerm);
// XP_ASSERT(term->IsValid());
bool enabled;
bool available;
rv = GetEnabled(term->m_attribute, term->m_operator, &enabled);
NS_ENSURE_SUCCESS(rv, rv);
rv = GetAvailable(term->m_attribute, term->m_operator, &available);
NS_ENSURE_SUCCESS(rv, rv);
if (!enabled || !available) {
bool validNotShown;
rv = GetValidButNotShown(term->m_attribute, term->m_operator,
&validNotShown);
NS_ENSURE_SUCCESS(rv, rv);
if (!validNotShown) return NS_MSG_ERROR_INVALID_SEARCH_SCOPE;
}
}
return rv;
}
开发者ID:mozilla,项目名称:releases-comm-central,代码行数:30,代码来源:nsMsgSearchAdapter.cpp
示例17: GetIconId
int pgaJob::GetIconId()
{
if (GetEnabled())
return jobFactory.GetIconId();
else
return jobFactory.GetDisabledId();
}
开发者ID:zr40,项目名称:pgadmin3-light,代码行数:7,代码来源:pgaJob.cpp
示例18: CreateListColumns
void pgRule::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
if (properties)
{
CreateListColumns(properties);
wxString def = GetFormattedDefinition();
if (!def.IsEmpty())
{
int doPos = def.Find(wxT(" DO INSTEAD "));
if (doPos > 0)
def = def.Mid(doPos + 12).Strip(wxString::both);
else
{
doPos = def.Find(wxT(" DO "));
if (doPos > 0)
def = def.Mid(doPos + 4).Strip(wxString::both);
}
}
properties->AppendItem(_("Name"), GetName());
properties->AppendItem(_("OID"), GetOid());
properties->AppendItem(_("Event"), GetEvent());
properties->AppendItem(_("Condition"), GetCondition());
properties->AppendYesNoItem(_("Do instead?"), GetDoInstead());
properties->AppendItem(_("Definition"), firstLineOnly(def));
if (this->GetDatabase()->connection()->BackendMinimumVersion(8, 3))
properties->AppendYesNoItem(_("Enabled?"), GetEnabled());
properties->AppendYesNoItem(_("System rule?"), GetSystemObject());
properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
}
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:31,代码来源:pgRule.cpp
示例19: AlterFiringDirection
void CFireModePlugin_AutoAim::AlterFiringDirection( const Vec3& firingPos, Vec3& rFiringDir ) const
{
#if ALLOW_PROJECTILEHELPER_DEBUGGING
m_lastShotAutoAimedStatus.clear();
m_lastTargetRejectionReason.clear();
#endif //#if ALLOW_PROJECTILEHELPER_DEBUGGING
if( GetEnabled() )
{
if(CWeapon* pWeapon = m_pOwnerFiremode->GetWeapon())
{
if(EntityId ownerId = pWeapon->GetOwnerId())
{
AdjustFiringDirection(firingPos, rFiringDir, pWeapon->IsZoomed()||pWeapon->IsZoomingIn(), ownerId);
}
}
}
#if ALLOW_PROJECTILEHELPER_DEBUGGING
if(m_lastShotAutoAimedStatus.empty())
{
m_lastShotAutoAimedStatus.append("FALSE");
}
#endif //#if ALLOW_PROJECTILEHELPER_DEBUGGING
}
开发者ID:Xydrel,项目名称:Infected,代码行数:25,代码来源:ProjectileAutoAimHelper.cpp
示例20: DbgAssert
void GeometryButton::ResetLocation(ViewExp *vpt)
{
if ( ! vpt || ! vpt->IsAlive() )
{
// why are we here?
DbgAssert(!_T("Doing ResetLocation() on invalid viewport!"));
return;
}
if(GetEnabled()==true&&mLabel.Length()>0)
{
SIZE sp;
GraphicsWindow *gw = vpt->getGW();
gw->getTextExtents(mLabel.data(),&sp);
RECT rect;
HWND hWnd = vpt->GetHWnd();
GetWindowRect (hWnd, &rect);
int width = rect.right - rect.left;
mLocation.x = width/2 - sp.cx/2;
//need to reset the y here also...
IGeometryCheckerManager *man = GetIGeometryCheckerManager();
if(man->GetDisplayTextUpTop()==false)
{
int mult = 1; // at least for top
if(man->DoesGeometryCheckerHavePropDlg(man->GetActivatedGeometryCheckerIndex()))
++mult;
if(man->GetAutoUpdate()==false)
++mult;
mLocation.y = (rect.bottom-rect.top) - mult*(4+OFFSET) + OFFSET;
}
}
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:33,代码来源:GeometryButton.cpp
注:本文中的GetEnabled函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论