您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetEnabled函数代码示例

51自学网 2021-06-01 21:07:08
  C++
这篇教程C++ GetEnabled函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetEnabled函数的典型用法代码示例。如果您正苦于以下问题:C++ GetEnabled函数的具体用法?C++ GetEnabled怎么用?C++ GetEnabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetEnabled函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例7: GetEnabled

void CXTPControlCustom::OnEnabledChanged(){	if (m_hwndControl)	{		::EnableWindow(m_hwndControl, GetEnabled());	}}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:7,


示例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,


示例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,


示例10: GetIconId

int pgRule::GetIconId(){	if (GetEnabled())		return ruleFactory.GetIconId();	else		return ruleFactory.GetClosedIconId();}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:7,


示例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,


示例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,


示例13: GetIconId

int pgTrigger::GetIconId(){	if (GetEnabled())		return triggerFactory.GetIconId();	else		return triggerFactory.GetClosedIconId();}
开发者ID:zr40,项目名称:pgadmin3-light,代码行数:7,


示例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,


示例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,


示例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,


示例17: GetIconId

int pgaJob::GetIconId(){	if (GetEnabled())		return jobFactory.GetIconId();	else		return jobFactory.GetDisabledId();}
开发者ID:zr40,项目名称:pgadmin3-light,代码行数:7,


示例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,


示例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,


示例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,


示例21: NS_ENSURE_ARG

nsresultnsMsgSearchValidityTable::ValidateTerms (nsISupportsArray *searchTerms){  nsresult err = NS_OK;  PRUint32 count;  NS_ENSURE_ARG(searchTerms);  searchTerms->Count(&count);  for (PRUint32 i = 0; i < count; i++)  {    nsCOMPtr<nsIMsgSearchTerm> pTerm;    searchTerms->QueryElementAt(i, NS_GET_IID(nsIMsgSearchTerm),                             (void **)getter_AddRefs(pTerm));    nsIMsgSearchTerm *iTerm = pTerm;    nsMsgSearchTerm *term = static_cast<nsMsgSearchTerm *>(iTerm);//    XP_ASSERT(term->IsValid());        bool enabled;        bool available;        GetEnabled(term->m_attribute, term->m_operator, &enabled);        GetAvailable(term->m_attribute, term->m_operator, &available);    if (!enabled || !available)    {            bool validNotShown;            GetValidButNotShown(term->m_attribute, term->m_operator,                                &validNotShown);            if (!validNotShown)        err = NS_MSG_ERROR_INVALID_SEARCH_SCOPE;    }  }  return err;}
开发者ID:alanyjw,项目名称:comm-central,代码行数:34,


示例22: PaintBorder

///// Paint the text gadget by painting gadget borders, & then painting text in/// the InnerRect. Empty or 0 text blanks the gadget.///// Calls TGadget::PaintBorder to paint the border. Calls TGadget::GetInnerRect to/// calculate the area of the text gadget's rectangle. If the text is left-aligned,/// Paint calls dc.GetTextExtent to compute the width and height of a line of the/// text. To set the background color, Paint calls dc.GetSysColor and sets the/// default background color to face shading (COLOR_BTNFACE). To set the button text/// color, Paint calls dc.SetTextColor and sets the default button text color to/// COLOR_BTNTEXT. To draw the text, Paint calls dc.ExtTextOut and passes the/// parameters ETO_CLIPPED (so the text is clipped to fit the rectangle) and/// ETO_OPAQUE (so the rectangle is filled with the current background color).//voidTTextGadget::Paint(TDC& dc){  PaintBorder(dc);  TRect  innerRect;  GetInnerRect(innerRect);  if (!Font)    dc.SelectObject(GetGadgetWindow()->GetFont());  else    dc.SelectObject(*Font);  TColor textColor = GetEnabledColor();  if(!GetEnabled())    textColor = TColor::Sys3dHilight;  bool transparent = GetGadgetWindow()->GetFlatStyle() & TGadgetWindow::FlatXPTheme;  if(!Text){    if (!transparent)    {    TColor color = dc.SetBkColor(TColor::Sys3dFace);    dc.ExtTextOut(0,0, ETO_OPAQUE, &innerRect, _T(""), 0);    dc.SetBkColor(color);  }  }  else  {    // Create a UI Face object for this button & let it paint the button face    //    uint align[] = {DT_LEFT, DT_CENTER, DT_RIGHT};    uint format =  DT_SINGLELINE | DT_VCENTER | align[Align];            TUIFace face(innerRect, Text, BkgndColor, format);     TPoint  dstPt(innerRect.TopLeft());      dc.SetBkColor(BkgndColor);     TColor oldTxColor  = dc.SetTextColor(textColor);    if (!GetEnabled())      face.Paint(dc, dstPt, TUIFace::Disabled, false, !transparent);    else      face.Paint(dc, dstPt, TUIFace::Normal, false, !transparent);    dc.SetTextColor(oldTxColor);  }  dc.RestoreFont();}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:61,


示例23: 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();	tRioStatusCode localStatus = NiFpga_Status_Success;	m_fpgaWatchDog->strobeFeed(&localStatus);	wpi_setError(localStatus);	return previous;}
开发者ID:bescovedo,项目名称:becode,代码行数:20,


示例24: ReproduceEntities

bool CollisionSystem::ReproduceEntities(std::shared_ptr<Entity> entity1,    std::shared_ptr<Entity> entity2){    auto reproductionComponent1 = std::static_pointer_cast<ReproductionComponent>(        Engine::GetInstance().GetSingleComponentOfClass(entity1,            "ReproductionComponent"));    auto reproductionComponent2 = std::static_pointer_cast<ReproductionComponent>(        Engine::GetInstance().GetSingleComponentOfClass(entity2,            "ReproductionComponent"));    auto particleComponent1 = std::static_pointer_cast<ParticleComponent>(        Engine::GetInstance().GetSingleComponentOfClass(entity1,            "ParticleComponent"));    auto particleComponent2 = std::static_pointer_cast<ParticleComponent>(        Engine::GetInstance().GetSingleComponentOfClass(entity2,            "ParticleComponent"));    auto position1 = particleComponent1->GetPosition();    auto position2 = particleComponent2->GetPosition();    if (position1.CalculateDistance(position2) >= CFG_GETF("REPRODUCTION_DISTANCE_MAX"))        return true;    auto enabled1 = reproductionComponent1->GetEnabled();    auto enabled2 = reproductionComponent2->GetEnabled();    auto reproduced1 = reproductionComponent1->GetReproduced();    auto reproduced2 = reproductionComponent2->GetReproduced();    auto type1 = reproductionComponent1->GetType();    auto type2 = reproductionComponent2->GetType();    if (enabled1 && enabled2 && !reproduced1 && !reproduced2 && type1 == type2)    {        LOG_D("[CollisionSystem] Reproducing entities " << entity1->GetId()            << " and " << entity2->GetId());        EntityFactory::CreateCell(particleComponent1->GetPosition() + Vector(50, 50));        reproductionComponent1->SetReproduced(true);        reproductionComponent2->SetReproduced(true);        return true;    }    return false;}
开发者ID:matheusportela,项目名称:Poiesis,代码行数:45,


示例25: OnIntervalChanged

void CTimeCtrl::OnIntervalChanged(){	// Restart timer if it's enabled	if (GetEnabled() && AmbientUserMode())	{		StopTimer();		StartTimer();	}	SetModifiedFlag(TRUE);}
开发者ID:jetlive,项目名称:skiaming,代码行数:11,


示例26: OnCreate

int CTimeCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct){	if (COleControl::OnCreate(lpCreateStruct) == -1)		return -1;	// Start timer if in user mode and if enabled	if (AmbientUserMode() && GetEnabled())		StartTimer();	return 0;}
开发者ID:jetlive,项目名称:skiaming,代码行数:11,



注:本文中的GetEnabled函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetEnchantmentCharges函数代码示例
C++ GetEmbraceTarget函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。