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

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

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

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

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

示例1: GeGetPluginPath

Bool ApplinkDialog::InitValues(void){	if (!GeDialog::InitValues()) return FALSE;    	filenamePrefs = GeGetPluginPath()+ "preference.ini";	dirty = FALSE;		AutoAlloc<HyperFile> hyperfilePrefs;    	if(!GeFExist(filenamePrefs, FALSE))	{		if (!hyperfilePrefs->Open(filenamePrefs.GetString(), GE_WRITE, FILE_NODIALOG)) return FALSE;        		gPreferences.SetString(IDC_TMP_FOLDER, "");                Filename path;#ifdef _WIN32 || _WIN64        path = GeGetC4DPath(C4D_PATH_MYDOCUMENTS);#elif __APPLE__        path = GeGetC4DPath(C4D_PATH_HOME);#endif		Filename exFolder = path + "3D-CoatV3" + "Exchange";		if(GeFExist(exFolder, TRUE))		{			gPreferences.SetString(IDC_EXCH_FOLDER, exFolder.GetString());		}		else		{#ifdef _WIN32 || _WIN64			GePrint(String("Folder ..//MyDocuments//3D-CoatV3//Exchange not found!"));#elif __APPLE__            GePrint(String("Folder ../Users/admin/3D-CoatV3/Exchange  not found!"));#endif			gPreferences.SetString(IDC_EXCH_FOLDER, "");		}        		gPreferences.SetLong(IDC_COMBO_MAP_TYPE, 0);		gPreferences.SetBool(IDC_CHK_EXP_MAT, TRUE);		gPreferences.SetBool(IDC_CHK_EXP_UV, TRUE);		gPreferences.SetBool(IDC_CHK_SKIP_IMP_DIALOG, FALSE);		gPreferences.SetBool(IDC_CHK_SKIP_EXP_DIALOG, FALSE);        		gPreferences.SetBool(IDC_CHK_IMP_MAT, TRUE);		gPreferences.SetLong(IDC_COMBO_MAP_IMPORT, 0);		gPreferences.SetBool(IDC_CHK_IMP_UV, TRUE);		gPreferences.SetBool(IDC_CHK_REPLACE, TRUE);		gPreferences.SetBool(IDC_CHK_PROMPT, FALSE);				gPreferences.SetString(IDC_COAT_EXE_PATH, "");		gPreferences.SetBool(IDC_CHK_COAT_START, FALSE);        		hyperfilePrefs->WriteContainer(gPreferences);		hyperfilePrefs->Close();	}    	if(!hyperfilePrefs->Open(filenamePrefs.GetString(), GE_READ, FILE_NODIALOG)) return FALSE;    	hyperfilePrefs->ReadContainer(&gPreferences, TRUE);	hyperfilePrefs->Close();    	SetString(IDC_TMP_FOLDER, gPreferences.GetString(IDC_TMP_FOLDER));	SetString(IDC_EXCH_FOLDER, gPreferences.GetString(IDC_EXCH_FOLDER));    	SetLong(IDC_COMBO_MAP_TYPE, gPreferences.GetLong(IDC_COMBO_MAP_TYPE));	SetBool(IDC_CHK_EXP_MAT, gPreferences.GetBool(IDC_CHK_EXP_MAT));	SetBool(IDC_CHK_EXP_UV, gPreferences.GetBool(IDC_CHK_EXP_UV));	SetBool(IDC_CHK_SKIP_IMP_DIALOG, gPreferences.GetBool(IDC_CHK_SKIP_IMP_DIALOG));	SetBool(IDC_CHK_SKIP_EXP_DIALOG, gPreferences.GetBool(IDC_CHK_SKIP_EXP_DIALOG));    	SetBool(IDC_CHK_IMP_MAT, gPreferences.GetBool(IDC_CHK_IMP_MAT));	SetLong(IDC_COMBO_MAP_IMPORT, gPreferences.GetLong(IDC_COMBO_MAP_IMPORT));	SetBool(IDC_CHK_IMP_UV, gPreferences.GetBool(IDC_CHK_IMP_UV));	SetBool(IDC_CHK_REPLACE, gPreferences.GetBool(IDC_CHK_REPLACE));	SetBool(IDC_CHK_PROMPT, gPreferences.GetBool(IDC_CHK_PROMPT));		SetString(IDC_COAT_EXE_PATH, gPreferences.GetString(IDC_COAT_EXE_PATH));	SetBool(IDC_CHK_COAT_START, gPreferences.GetBool(IDC_CHK_COAT_START));    #ifdef __APPLE__    //------------ temp        Enable(IDC_CHK_COAT_START, false);    Enable(IDC_COAT_EXE_PATH, false);        //-------------//    SetString(IDS_STATIC12, "Folder ../Users/user/3D-CoatV3/Exchange  not found!");#endif    	SetTimer(1000);    	return TRUE;}
开发者ID:oyaGG,项目名称:3DCoat_Applinks,代码行数:92,


示例2: Enable

Updatable::Updatable(){	Enable();}
开发者ID:LuciusSixPercent,项目名称:SFML_Test,代码行数:4,


示例3: UpdateGadgets

  void UpdateGadgets(Bool relevants=false)  {    Int32 mode;    Bool add_dynamics;    GetBool(CHK_ADDDYNAMICS, add_dynamics);    GetInt32(CMB_MODE, mode);    BaseDocument* doc = GetActiveDocument();    BaseObject* op = doc ? doc->GetActiveObject() : nullptr;    Enable(EDT_MAXCONN, mode != CMB_MODE_CHAIN);    Enable(EDT_RADIUS, mode != CMB_MODE_CHAIN);    Enable(CHK_CLOSED, mode == CMB_MODE_CHAIN);    Enable(CHK_COMPOUND, add_dynamics);    // Need at least two child objects on the active object.    Bool execEnabled = op != nullptr && op->GetDown() != nullptr        && op->GetDown()->GetNext() != nullptr;    Enable(BTN_EXECUTE, execEnabled);    if (relevants)    {      FreeChildren(CMB_TYPE);      Int32 pluginid;      GetInt32(CMB_FORCE, pluginid);      do {        BaseObject* op = BaseObject::Alloc(pluginid);        if (!op) break;        AutoFree<BaseObject> free(op);        AutoAlloc<Description> desc;        if (!op->GetDescription(desc, DESCFLAGS_DESC_0)) break;        BaseContainer temp;        AutoAlloc<AtomArray> arr;        const BaseContainer* param = desc->GetParameter(FORCE_TYPE, temp, arr);        if (!param) break;        const BaseContainer* cycle = param->GetContainerInstance(DESC_CYCLE);        if (!cycle) break;        const BaseContainer* icons = param->GetContainerInstance(DESC_CYCLEICONS);        Int32 i = 0;        Int32 last_id = -1;        while (true) {          Int32 id = cycle->GetIndexId(i++);          if (id == NOTOK) break;          Int32 icon = icons ? icons->GetInt32(id) : -1;          String name = cycle->GetString(id);          if (name.Content()) {            if (icon > 0) name += "&i" + String::IntToString(icon);            if (last_id < 0) last_id = id;            AddChild(CMB_TYPE, id, name);          }        }        SetInt32(CMB_TYPE, last_id);      } while (0);      LayoutChanged(CMB_TYPE);    }  }
开发者ID:nr-plugins,项目名称:auto-connect,代码行数:67,


示例4: Enable

/*================idTrigger_Hurt::Spawn	Damages activator	Can be turned on or off by using.================*/void idTrigger_Hurt::Spawn( void ) {	spawnArgs.GetBool( "on", "1", on );	spawnArgs.GetFloat( "delay", "1.0", delay );	nextTime = gameLocal.time;	Enable();}
开发者ID:tankorsmash,项目名称:quadcow,代码行数:14,


示例5: Enable

void Console::ToggleConsole(){    Enable( !IsEnabled() );}
开发者ID:chrishaukap,项目名称:GameDev,代码行数:4,


示例6: Enable

	~CFlowNode_MsgReceiver()	{		Enable(false); // This unregisters the listener	}
开发者ID:joewan,项目名称:pycmake,代码行数:4,


示例7: Enable

void wxCheckedListCtrl::EnableAll(bool enable){	for (int i = 0; i < GetItemCount(); i++)		Enable(i, enable);}
开发者ID:MrSwiss,项目名称:visualboyadvance-m,代码行数:5,


示例8: Disable

			void Disable()			{				Enable( false );			}
开发者ID:JasonGoemaat,项目名称:NestopiaDx9,代码行数:4,


示例9: Enable

void CAI_ScriptConditions::InputEnable( inputdata_t &inputdata ){	m_bLeaveAsleep = false;	Enable();}
开发者ID:EspyEspurr,项目名称:game,代码行数:5,


示例10: switch

void Scene_Shop::SetMode(int nmode) {	mode = nmode;	help_window->SetText("");	// Central panel	switch (mode) {		case BuySellLeave:		case BuySellLeave2:			empty_window->SetVisible(true);			Enable(sell_window.get(), false);			break;		case Sell:			empty_window->SetVisible(false);			Enable(sell_window.get(), true);			break;		case Buy:		case BuyHowMany:		case SellHowMany:		case Bought:		case Sold:			empty_window->SetVisible(false);			Enable(sell_window.get(), false);			break;	}	// Right-hand panels	switch (mode) {		case BuySellLeave:		case BuySellLeave2:		case Sell:			party_window->SetVisible(false);			status_window->SetVisible(false);			gold_window->SetVisible(false);			break;		case Buy:		case BuyHowMany:		case SellHowMany:		case Bought:		case Sold:			party_window->SetVisible(true);			status_window->SetVisible(true);			gold_window->SetVisible(true);			break;	}	// Left-hand panels	switch (mode) {		case BuySellLeave:		case BuySellLeave2:		case Sell:			Enable(buy_window.get(), false);			Enable(number_window.get(), false);			empty_window2->SetVisible(false);			break;		case Buy:			buy_window->Refresh();			Enable(buy_window.get(), true);			Enable(number_window.get(), false);			empty_window2->SetVisible(false);			break;		case BuyHowMany:		case SellHowMany:			number_window.get()->Refresh();			Enable(buy_window.get(), false);			Enable(number_window.get(), true);			break;		case Bought:		case Sold:			Enable(buy_window.get(), false);			Enable(number_window.get(), false);			empty_window2->SetVisible(true);			timer = DEFAULT_FPS;			break;	}	shop_window->SetMode(mode);}
开发者ID:Zhek,项目名称:Player,代码行数:78,


示例11: OnEnableClicked

static voidOnEnableClicked(gcc_unused WndButton &Sender){  Enable();}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:5,


示例12: Enable

//-----------------------------------------------------------------------------// Purpose: Input hander that starts the spawner//-----------------------------------------------------------------------------void CMomentaryRotButton::InputEnable( inputdata_t &inputdata ){	Enable();}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:7,


示例13: SetTopParent

bool wxGenericProgressDialog::Create( const wxString& title,                                      const wxString& message,                                      int maximum,                                      wxWindow *parent,                                      int style ){    SetTopParent(parent);    m_parentTop = wxGetTopLevelParent(parent);    m_pdStyle = style;    wxWindow* const        realParent = GetParentForModalDialog(parent, GetWindowStyle());    if (!wxDialog::Create(realParent, wxID_ANY, title))        return false;    SetMaximum(maximum);    // We need a running event loop in order to update the dialog and be able    // to process clicks on its buttons, so ensure that there is one running    // even if this means we have to start it ourselves (this happens most    // commonly during the program initialization, e.g. for the progress    // dialogs shown from overridden wxApp::OnInit()).    if ( !wxEventLoopBase::GetActive() )    {        m_tempEventLoop = new wxEventLoop;        wxEventLoop::SetActive(m_tempEventLoop);    }#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)    // we have to remove the "Close" button from the title bar then as it is    // confusing to have it - it doesn't work anyhow    //    // FIXME: should probably have a (extended?) window style for this    if ( !HasPDFlag(wxPD_CAN_ABORT) )    {        EnableCloseButton(false);    }#endif // wxMSW#if defined(__SMARTPHONE__)    SetLeftMenu();#endif    m_state = HasPDFlag(wxPD_CAN_ABORT) ? Continue : Uncancelable;    // top-level sizerTop    wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL);    m_msg = new wxStaticText(this, wxID_ANY, message);    sizerTop->Add(m_msg, 0, wxLEFT | wxTOP, 2*LAYOUT_MARGIN);    int gauge_style = wxGA_HORIZONTAL;    if ( style & wxPD_SMOOTH )        gauge_style |= wxGA_SMOOTH;#ifdef __WXMSW__    maximum /= m_factor;#endif    m_gauge = new wxGauge                  (                    this,                    wxID_ANY,                    maximum,                    wxDefaultPosition,                    // make the progress bar sufficiently long                    wxSize(wxMin(wxGetClientDisplayRect().width/3, 300), -1),                    gauge_style                  );    sizerTop->Add(m_gauge, 0, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, 2*LAYOUT_MARGIN);    m_gauge->SetValue(0);    // create the estimated/remaining/total time zones if requested    m_elapsed =    m_estimated =    m_remaining = NULL;    // also count how many labels we really have    size_t nTimeLabels = 0;    wxSizer * const sizerLabels = new wxFlexGridSizer(2);    if ( style & wxPD_ELAPSED_TIME )    {        nTimeLabels++;        m_elapsed = CreateLabel(GetElapsedLabel(), sizerLabels);    }    if ( style & wxPD_ESTIMATED_TIME )    {        nTimeLabels++;        m_estimated = CreateLabel(GetEstimatedLabel(), sizerLabels);    }    if ( style & wxPD_REMAINING_TIME )//.........这里部分代码省略.........
开发者ID:0ryuO,项目名称:dolphin-avsync,代码行数:101,


示例14: OperThreadWin

NCDialog::NCDialog( bool asChild, int nId, NCDialogParent* parent, const unicode_t* headerText, ButtonDataNode* blist ) //, unsigned bcolor, unsigned fcolor)	: OperThreadWin( asChild ? Win::WT_CHILD : WT_MAIN /*WT_POPUP*/, 0, nId, parent ), //, &crect(0,0,300,100)),	  _shadow( parent ),//	_fcolor(fcolor),//	_bcolor(bcolor),	  _header( nId, this, headerText ),	  _lo( 9, 9 ),	  _buttonLo( 3, 16 ),	  _headerLo( 3, 3 ),	  _parentLo( 3, 3 ),	  enterCmd( 0 ),	  m_nId( nId ){	Enable();	_lo.SetLineGrowth( 4 );	_lo.SetColGrowth( 4 );	_lo.ColSet( 0, 2 );	_lo.ColSet( 1, 10 );	_lo.ColSet( 2, 3 );	_lo.ColSet( 3, 5 );	_lo.ColSet( 5, 5 );	_lo.ColSet( 6, 3 );	_lo.ColSet( 7, 10 );	_lo.ColSet( 8, 2 );	_lo.LineSet( 0, 2 );	_lo.LineSet( 1, 10 );	_lo.LineSet( 2, 3 );	_lo.LineSet( 3, 3 );	//_lo.LineSet(5, 5);	_lo.LineSet( 6, 3 );	_lo.LineSet( 7, 5 );	_lo.LineSet( 8, 2 );	_lo.ColSet( 4, 16, 100000 );	_lo.LineSet( 4, 16, 100000 );	_lo.AddRect( &_borderRect, 0, 0, 8, 8 );	_lo.AddRect( &_frameRect, 2, 2, 6, 6 );	_headerLo.ColSet( 0, 1, 1000 );	_headerLo.ColSet( 2, 1, 1000 );	_headerLo.LineSet( 0, 2 );	_headerLo.LineSet( 2, 2 );	_headerLo.AddWin( &_header, 1, 1 );	_lo.AddLayout( &_headerLo, 1, 4 );	_buttonLo.ColSet( 0, 10, 1000 );	_buttonLo.ColSet( 15, 10, 1000 );	_buttonLo.LineSet( 0, 2 );	_buttonLo.LineSet( 2, 2 );	_parentLo.ColSet( 0, 20, 1000 );	_parentLo.ColSet( 2, 20, 1000 );	_parentLo.LineSet( 0, 20, 1000 );	_parentLo.LineSet( 2, 20, 1000 );	_parentLo.AddWin( this, 1, 1 );	_parentLo.SetLineGrowth( 0 );	_parentLo.SetLineGrowth( 2 );	_parentLo.SetColGrowth( 0 );	_parentLo.SetColGrowth( 2 );	if ( blist )	{		int n = 0;		int minW = 0;		for ( ; blist->utf8text && n < 7; blist++, n++ )		{			clPtr<Button> p = new Button( 0, this, utf8_to_unicode( _LT( carray_cat<char>( "DB>", blist->utf8text ).data(), blist->utf8text ) ).data(), blist->cmd );			p->Show();			p->Enable();			if ( n > 0 )			{				_buttonLo.ColSet( n * 2, 5 );			}			_buttonLo.AddWin( p.ptr(), 1, n * 2 + 1 );			if ( minW < p->GetLSize().x.minimal )			{				minW = p->GetLSize().x.minimal;			}			_bList.append( p );//break; ???		}//.........这里部分代码省略.........
开发者ID:FaionWeb,项目名称:WCMCommander,代码行数:101,


示例15: glEnable

GL_APICALL void GL_APIENTRY glEnable (GLenum cap){    CONTEXT_EXEC(Enable(cap));}
开发者ID:arnochiu,项目名称:OpenGLES-sim,代码行数:4,


示例16: rect

suic::Rect ScrollBar::GetScrollThumbRect(const suic::Size & size, bool bThumb){    int iMin = 0;    int nxHScroll = (int)_decreaseBtn.GetWidth();    int nxVScroll = (int)_decreaseBtn.GetHeight();    suic::Rect rectThumb;	if (bThumb || !_rcTrack.Empty())	{		rectThumb = _rcTrack;	}	else	{        suic::Rect rect(0, 0, size.cx, size.cy);		rectThumb = rect;		int nClientSize = 0;		int nThumbSize  = 0;		if (GetOrientation() == CoreFlags::Horizontal)		{			nThumbSize = nxHScroll;            if (_decreaseBtn.IsVisible())            {                rectThumb.left += nThumbSize;            }            if (_increaseBtn.IsVisible())            {                rectThumb.right -= nThumbSize;            }			nClientSize = rectThumb.Width();		}		else		{			nThumbSize = nxVScroll;                        if (_decreaseBtn.IsVisible())            {                rectThumb.top += nThumbSize;            }            if (_increaseBtn.IsVisible())            {                rectThumb.bottom -= nThumbSize;            }			nClientSize = rectThumb.Height();		}		if (nClientSize <= cst_ScrollMin)		{            rectThumb.SetEmpty();			return rectThumb;		}		int nThumbPos = 0;//nThumbSize;		if (_scroInfo.iPage != 0)		{			nThumbSize = max (::MulDiv(nClientSize, _scroInfo.iPage, _scroInfo.iMax - iMin + 1), cst_ScrollThumbMin);		}		if (nClientSize < nThumbSize || nThumbSize == 0)		{			rectThumb.SetEmpty ();            Enable(!rectThumb.Empty());			return rectThumb;		}		else		{			nClientSize -= nThumbSize;			int nMax = _scroInfo.iMax - max (_scroInfo.iPage - 1, 0);			if (iMin < nMax)			{                nThumbPos += ::MulDiv(nClientSize, _scroInfo.iVisualPos - iMin, nMax - iMin);			}		}		if (GetOrientation() == CoreFlags::Horizontal)		{			rectThumb.left   = rect.left + nThumbPos                + (_decreaseBtn.IsVisible() ? (int)_decreaseBtn.GetWidth() : 0);			rectThumb.right  = rectThumb.left + nThumbSize;		}		else		{			rectThumb.top    = rect.top + nThumbPos                 + (_decreaseBtn.IsVisible() ? (int)_decreaseBtn.GetHeight() : 0);			rectThumb.bottom = rectThumb.top + nThumbSize;		}        Enable(!rectThumb.Empty());	}    return rectThumb;//.........这里部分代码省略.........
开发者ID:tfzxyinhao,项目名称:sharpui,代码行数:101,


示例17: wxTreeItemId

void CRemoteTreeView::SetDirectoryListing(const CSharedPointer<const CDirectoryListing> &pListing, bool modified){	m_busy = true;	if (!pListing)	{		m_ExpandAfterList = wxTreeItemId();		DeleteAllItems();		AddRoot(_T(""));		m_busy = false;		if (FindFocus() == this)		{			wxNavigationKeyEvent evt;			evt.SetFromTab(true);			evt.SetEventObject(this);			evt.SetDirection(true);			AddPendingEvent(evt);		}		Enable(false);		m_contextMenuItem = wxTreeItemId();		return;	}	Enable(true);	if (pListing->m_hasUnsureEntries && !(pListing->m_hasUnsureEntries & ~(CDirectoryListing::unsure_unknown | CDirectoryListing::unsure_file_mask)))	{		// Just files changed, does not affect directory tree		m_busy = false;		return;	}#ifndef __WXMSW__	Freeze();#endif	wxTreeItemId parent = MakeParent(pListing->path, !modified);	if (!parent)	{		m_busy = false;#ifndef __WXMSW__		Thaw();#endif		return;	}	if (!IsExpanded(parent) && parent != m_ExpandAfterList)	{		DeleteChildren(parent);		CFilterManager filter;		if (HasSubdirs(*pListing, filter))			AppendItem(parent, _T(""), -1, -1);	}	else	{		RefreshItem(parent, *pListing, !modified);		if (m_ExpandAfterList == parent)		{#ifndef __WXMSW__			// Prevent CalculatePositions from being called			wxGenericTreeItem *anchor = m_anchor;			m_anchor = 0;#endif			Expand(parent);#ifndef __WXMSW__			m_anchor = anchor;#endif		}	}	m_ExpandAfterList = wxTreeItemId();	SetItemImages(parent, false);#ifndef __WXMSW__	m_freezeCount--;#endif	if (!modified)		SafeSelectItem(parent);#ifndef __WXMSW__	else		Refresh();#endif	m_busy = false;}
开发者ID:AbelTian,项目名称:filezilla,代码行数:84,


示例18: wxDialog

wxProgressDialog::wxProgressDialog(const wxString& title,                                   const wxString& message,                                   int maximum,                                   wxWindow *parent,                                   int style)                : wxDialog(GetParentForModalDialog(parent), wxID_ANY, title),                  m_skip(false),                  m_delay(3),                  m_hasAbortButton(false),                  m_hasSkipButton(false){    // we may disappear at any moment, let the others know about it    SetExtraStyle(GetExtraStyle() | wxWS_EX_TRANSIENT);    m_windowStyle |= style;    m_hasAbortButton = (style & wxPD_CAN_ABORT) != 0;    m_hasSkipButton = (style & wxPD_CAN_SKIP) != 0;#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)    // we have to remove the "Close" button from the title bar then as it is    // confusing to have it - it doesn't work anyhow    //    // FIXME: should probably have a (extended?) window style for this    if ( !m_hasAbortButton )    {        EnableCloseButton(false);    }#endif // wxMSW#if defined(__SMARTPHONE__)    SetLeftMenu();#endif    m_state = m_hasAbortButton ? Continue : Uncancelable;    m_maximum = maximum;#if defined(__WXMSW__) || defined(__WXPM__)    // we can't have values > 65,536 in the progress control under Windows, so    // scale everything down    m_factor = m_maximum / 65536 + 1;    m_maximum /= m_factor;#endif // __WXMSW__    m_parentTop = wxGetTopLevelParent(parent);    wxClientDC dc(this);    dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));    wxCoord widthText = 0;    dc.GetTextExtent(message, &widthText, NULL, NULL, NULL, NULL);    // top-level sizerTop    wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL);    m_msg = new wxStaticText(this, wxID_ANY, message);    sizerTop->Add(m_msg, 0, wxLEFT | wxTOP, 2*LAYOUT_MARGIN);    if ( maximum > 0 )    {        int gauge_style = wxGA_HORIZONTAL;        if ( style & wxPD_SMOOTH )            gauge_style |= wxGA_SMOOTH;        m_gauge = new wxGauge                      (                        this,                        wxID_ANY,                        m_maximum,                        wxDefaultPosition,                        // make the progress bar sufficiently long                        wxSize(wxMin(wxGetClientDisplayRect().width/3, 300), -1),                        gauge_style                      );        sizerTop->Add(m_gauge, 0, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, 2*LAYOUT_MARGIN);        m_gauge->SetValue(0);    }    else    {        m_gauge = NULL;    }    // create the estimated/remaining/total time zones if requested    m_elapsed =    m_estimated =    m_remaining = NULL;    m_display_estimated =    m_last_timeupdate =    m_break = 0;    m_ctdelay = 0;    // also count how many labels we really have    size_t nTimeLabels = 0;    wxSizer * const sizerLabels = new wxFlexGridSizer(2);    if ( style & wxPD_ELAPSED_TIME )    {        nTimeLabels++;        m_elapsed = CreateLabel(_("Elapsed time:"), sizerLabels);    }//.........这里部分代码省略.........
开发者ID:DumaGit,项目名称:winsparkle,代码行数:101,


示例19: event

bool wxMenu::HandleCommandUpdateStatus( wxMenuItem* item, wxWindow* senderWindow ){    int menuid = item ? item->GetId() : 0;    wxUpdateUIEvent event(menuid);    event.SetEventObject( this );    bool processed = false;    // Try the menu's event handler    {        wxEvtHandler *handler = GetEventHandler();        if ( handler )            processed = handler->ProcessEvent(event);    }    // Try the window the menu was popped up from    // (and up through the hierarchy)    if ( !processed )    {        wxWindow *win = GetWindow();        if ( win )            processed = win->HandleWindowEvent(event);    }    if ( !processed && senderWindow != NULL)    {        processed = senderWindow->HandleWindowEvent(event);    }    if ( processed )    {        // if anything changed, update the changed attribute        if (event.GetSetText())            SetLabel(menuid, event.GetText());        if (event.GetSetChecked())            Check(menuid, event.GetChecked());        if (event.GetSetEnabled())            Enable(menuid, event.GetEnabled());    }    else    {#if wxOSX_USE_CARBON        // these two items are also managed by the Carbon Menu Manager, therefore we must        // always reset them ourselves        UInt32 cmd = 0;        if ( menuid == wxApp::s_macExitMenuItemId )        {            cmd = kHICommandQuit;        }        else if (menuid == wxApp::s_macPreferencesMenuItemId )        {            cmd = kHICommandPreferences;        }        if ( cmd != 0 )        {            if ( !item->IsEnabled() || wxDialog::OSXHasModalDialogsOpen() )                DisableMenuCommand( NULL , cmd ) ;            else                EnableMenuCommand( NULL , cmd ) ;        }#endif    }    return processed;}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:68,


示例20: fn00001000

void fn00001000(int32 d0, byte * a0){	struct Eq_4 * a6_8 = *(struct Eq_4 **) 0x04;	int32 d2_166 = d0;	byte * a2_249 = a0;	if (a6_8->w0014 < 0x24)	{		word32 * a0_505 = &globals->ptr2B88;		word32 d0_508 = 0x0C;		do		{			*a0_505 = 0x00;			a0_505 = a0_505 + 0x01;			d0_508 = d0_508 - 0x01;		} while (d0_508 != 0x00);	}	*&globals->ptr2B88 = fp;	*&globals->ptr2B8C = (struct Eq_4 **) a6_8;	struct Eq_25 * d0_19 = FindTask(0x00);	struct Eq_31 * d0_112 = OpenLibrary(0x12BC, 0x00);	if (d0_112 != null)	{		int32 d4_460;		*&globals->ptr2B90 = (struct Eq_31 **) d0_112;		if (d0_19->ptr00AC == null)		{			d4_460 = 0x02;			d2_166 = 0x08;		}		else		{			byte * a0_463 = a0;			d4_460 = 0x03;			do			{				if (*a0_517 == 0x20)					d4_460 = DPB(d4_460, (word16) d4_460 + 0x01, 0);				a0_463 = a0_517 + 0x01;				byte * a0_517 = a0_463;			} while (*a0_517 != 0x00);		}		int32 d0_105 = d4_460 << 0x02;		int32 d0_107 = d0_105 + d2_166;		int32 d3_110 = d0_107 + 0x11;		int32 d1_111 = 0x00010001;		d0_112 = AllocMem(d0_107 + 0x11, 0x00010001);		if (d0_112 != null)		{			Eq_119 a6_162;			struct Eq_67 * dwLoc14_159;			word32 a0_164;			d0_112->dw0000 = (word32) (d0_107 + 0x11);			Eq_126 d4_123 = d4_460 - 0x01;			d0_112[0x03] = (struct Eq_31) d4_123;			d0_112[0x02] = (struct Eq_31) (d0_112 + 0x04 + d0_105 / 0x04);			Mem131[0x00:word32] = 0x00;			struct Eq_67 * d0_132 = d0_19->ptr00AC;			d0_132->ptr0000 = d0_107 + 0x11;			d0_132->dw000C = d4_123 - 0x01;			d0_132->ptr0008 = (byte *) (&d0_132->ptr0010 + d0_105 / 0x0028);			Mem150[0x00:word32] = 0x00;			struct Eq_67 * d0_151 = d0_19->ptr00AC;			if (d0_151 == null)			{				fn00001214(d0_19);				*&globals->ptr2B94 = (struct Eq_67 **) d0_151;				*&globals->ptr2B98 = (struct Eq_67 **) d0_151;				Mem403[0x00:word32] = 0x00;				dwLoc14_159 = d0_151;				ui32 d0_406 = d0_151->dw0024;				if (d0_406 != 0x00)					Enable();				Supervisor(d0_132);				d0_132->dw0004 = d0_406;				d2_166 = 1005;				if (d0_406 == 0x00)				{					fn0000127C(0x0014);					return;				}				*&globals->dw2B9C = d0_406;				*&globals->dw2BA0 = d0_406;				*&globals->dw2BA4 = d0_406;				d0_19->dw009C = d0_406;				d0_19->dw00A0 = d0_406;				word32 d0_432 = ((word32[]) 0x08)[d0_406];				if (d0_432 != 0x00)					d0_19->dw00A4 = d0_432;				a6_162 = *&globals->ptr2B8C;l000011F8:				a0_164 = d0_19->dw003A;				goto l00001202;			}
开发者ID:uxmal,项目名称:reko,代码行数:93,


示例21: OnModulesLoaded

		/**		 * name:	OnModulesLoaded		 * desc:	initialize stuff, which require all standard modules to bee loaded		 * params:	none		 * return:	0		 **/		void OnModulesLoaded()		{			Enable(db_get_b(NULL, MODNAME, SET_ZODIAC_AVATARS, FALSE));		}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:10,


示例22: GetRect

void CSlideShowPanel::AdvanceSlideShow(bool changeSlide, bool reload) {    double xRatio, yRatio, ratio;    TaskSelectionData* selData = ((CSimpleTaskPanel*)GetParent())->GetTaskSelectionData();    if (selData == NULL) return;    if (reload) {        m_bCurrentSlideIsDefault = false;        selData->lastSlideShown = -1;    }    int numSlides = (int)selData->slideShowFileNames.size();#if TESTALLDESCRIPTIONS // For testingnumSlides = 0;#endif    if (numSlides <= 0) {#if HIDEDEFAULTSLIDE        if (!reload) {            return;        }        wxRect r = GetRect();        wxBitmap backgroundBitmap = ((CSimpleTaskPanel*)GetParent())->GetBackgroundBmp().GetSubBitmap(r);        wxWindowDC dc(this);        dc.DrawBitmap(backgroundBitmap, 0, 0);        // Force redraws if text unchanged; hide all if not in all-projects list        m_description->Show(false);        Enable( false );                if (!m_bGotAllProjectsList) {            CMainDocument* pDoc = wxGetApp().GetDocument();            wxASSERT(pDoc);            pDoc->rpc.get_all_projects_list(m_AllProjectsList);            m_bGotAllProjectsList = true;        }                SetDescriptionText();        return;#else   // HIDEDEFAULTSLIDE        SetBackgroundColour(*wxBLACK);        if (m_bCurrentSlideIsDefault) return;                CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();        wxASSERT(pSkinSimple);        wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple));        m_SlideBitmap = *pSkinSimple->GetWorkunitAnimationImage()->GetBitmap();        if (m_SlideBitmap.Ok()) {            m_bCurrentSlideIsDefault = true;        }#endif  // HIDEDEFAULTSLIDE    } else {#if HIDEDEFAULTSLIDE        m_description->Show(false);        Enable( false );#endif  // HIDEDEFAULTSLIDE        // TODO: Should we allow slide show to advance if task is not running?        int newSlide = selData->lastSlideShown;                if (selData->dotColor == runningIcon) {    // Advance only if running            if (changeSlide) {                if (++newSlide >= numSlides) {                    newSlide = 0;                }            }        }        if (newSlide < 0) {            newSlide = 0;        }                if (selData->lastSlideShown != newSlide) {  // Don't update if only one slide                    selData->lastSlideShown = newSlide;            wxBitmap *bm = new wxBitmap();            bm->LoadFile(selData->slideShowFileNames[newSlide], wxBITMAP_TYPE_ANY);            if (bm->Ok()) {                m_SlideBitmap = *bm;                delete bm;                m_bCurrentSlideIsDefault = false;            }        }    }    if (m_SlideBitmap.Ok()) {        // Check to see if they need to be rescaled to fit in the window        ratio = 1.0;        xRatio = (double)SLIDESHOWWIDTH / (double)m_SlideBitmap.GetWidth();        yRatio = (double)SLIDESHOWHEIGHT / (double)m_SlideBitmap.GetHeight();        if ( xRatio < ratio ) {            ratio = xRatio;        }        if ( yRatio < ratio ) {            ratio = yRatio;        }        if ( ratio < 1.0 ) {            wxImage img = m_SlideBitmap.ConvertToImage();            img.Rescale((int) (m_SlideBitmap.GetWidth()*ratio), (int) (m_SlideBitmap.GetHeight()*ratio));//.........这里部分代码省略.........
开发者ID:Murph9000,项目名称:boinc-v2,代码行数:101,


示例23: SetSetpoint

void Shooter::SetSpeed(double speed){	SetSetpoint(speed);	Enable();}
开发者ID:TwilitProgrammer,项目名称:HVA_Robot_2013,代码行数:5,


示例24: Enable

void CBaseMenuEdit::EnableEditDirectory(bool bEnable){  Enable(IDmenuEditDirectory,bEnable);}
开发者ID:HelloWilliam,项目名称:osiris,代码行数:4,


示例25: switch

int Dss1ToSip::NObjDss1::qt_metacall(QMetaObject::Call _c, int _id, void **_a){    typedef Domain::NamedObject QMocSuperClass;    _id = QMocSuperClass::qt_metacall(_c, _id, _a);    if (_id < 0)        return _id;    if (_c == QMetaObject::InvokeMetaMethod) {        switch (_id) {        case 0: Enable((*reinterpret_cast< bool(*)>(_a[1]))); break;        case 1: AddInterface((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;        case 2: DeleteInterface((*reinterpret_cast< const QString(*)>(_a[1]))); break;        case 3: Calls((*reinterpret_cast< DRI::ICmdOutput*(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;        case 4: Calls((*reinterpret_cast< DRI::ICmdOutput*(*)>(_a[1]))); break;        case 5: Info((*reinterpret_cast< DRI::ICmdOutput*(*)>(_a[1]))); break;        case 6: Stat((*reinterpret_cast< DRI::ICmdOutput*(*)>(_a[1]))); break;        case 7: RestartStat(); break;        case 8: CallsDetail((*reinterpret_cast< QString(*)>(_a[1]))); break;        case 9: L2Statistic((*reinterpret_cast< DRI::ICmdOutput*(*)>(_a[1]))); break;        case 10: ClearL2Statistic(); break;        case 11: L3Statistic((*reinterpret_cast< DRI::ICmdOutput*(*)>(_a[1]))); break;        case 12: ClearL3Statistic(); break;        default: ;        }        _id -= 13;    }#ifndef QT_NO_PROPERTIES      else if (_c == QMetaObject::ReadProperty) {        void *_v = _a[0];        switch (_id) {        case 0: *reinterpret_cast< QString*>(_v) = GetStateStr(); break;        case 1: *reinterpret_cast< int*>(_v) = m_activationCount; break;        case 2: *reinterpret_cast< QString*>(_v) = LastActivation(); break;        case 3: *reinterpret_cast< QString*>(_v) = LastDeactivation(); break;        case 4: *reinterpret_cast< QString*>(_v) = HardwareType(); break;        case 5: *reinterpret_cast< int*>(_v) = SigInterface(); break;        case 6: *reinterpret_cast< int*>(_v) = m_addressCompleteSize; break;        case 7: *reinterpret_cast< bool*>(_v) = m_sendAlertingTone; break;        case 8: *reinterpret_cast< bool*>(_v) = m_useSharpAsNumberComplete; break;        case 9: *reinterpret_cast< bool*>(_v) = m_relAnonymCall; break;        case 10: *reinterpret_cast< QString*>(_v) = AnonymCallingAddr(); break;        case 11: *reinterpret_cast< bool*>(_v) = m_restartReq; break;        case 12: *reinterpret_cast< bool*>(_v) = L2TraceInd(); break;        case 13: *reinterpret_cast< int*>(_v) = m_waitAnswerTimeout; break;        }        _id -= 14;    } else if (_c == QMetaObject::WriteProperty) {        void *_v = _a[0];        switch (_id) {        case 5: SigInterface(*reinterpret_cast< int*>(_v)); break;        case 6: m_addressCompleteSize = *reinterpret_cast< int*>(_v); break;        case 7: m_sendAlertingTone = *reinterpret_cast< bool*>(_v); break;        case 8: m_useSharpAsNumberComplete = *reinterpret_cast< bool*>(_v); break;        case 9: m_relAnonymCall = *reinterpret_cast< bool*>(_v); break;        case 10: AnonymCallingAddr(*reinterpret_cast< QString*>(_v)); break;        case 11: m_restartReq = *reinterpret_cast< bool*>(_v); break;        case 12: L2TraceInd(*reinterpret_cast< bool*>(_v)); break;        case 13: m_waitAnswerTimeout = *reinterpret_cast< int*>(_v); break;        }        _id -= 14;    } else if (_c == QMetaObject::ResetProperty) {        _id -= 14;    } else if (_c == QMetaObject::QueryPropertyDesignable) {        _id -= 14;    } else if (_c == QMetaObject::QueryPropertyScriptable) {        _id -= 14;    } else if (_c == QMetaObject::QueryPropertyStored) {        _id -= 14;    } else if (_c == QMetaObject::QueryPropertyEditable) {        _id -= 14;    } else if (_c == QMetaObject::QueryPropertyUser) {        _id -= 14;    }#endif // QT_NO_PROPERTIES    return _id;}
开发者ID:ixc-software,项目名称:lucksi,代码行数:75,



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


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