当前位置: 首页>>代码示例>>C++>>正文


C++ wxButton::Enable方法代码示例

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


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

示例1: play

void MainWindow::play() {
    libvlc_media_player_play(media_player);
    playpause_button->SetLabel(wxT("Pause"));
    playpause_button->Enable(true);
    stop_button->Enable(true);
    timeline->Enable(true);
}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:7,代码来源:wx_player.cpp

示例2: UpdateUI

	void UpdateUI()
	{
		const auto status = Emu.GetStatus();

		if (m_last_status != status)
		{
			m_last_status = status;

			m_btn_run->Enable(status != system_state::stopped);
			m_btn_stop->Enable(status != system_state::stopped);
			m_btn_restart->Enable(!Emu.GetPath().empty());
			m_btn_run->SetLabel(status == system_state::paused ? "Resume" : status == system_state::running ? "Pause" : "Run");
		}
	}
开发者ID:cornytrace,项目名称:rpcs3,代码行数:14,代码来源:Debugger.cpp

示例3: stop

void MainWindow::stop() {
    pause();
    libvlc_media_player_stop(media_player);
    stop_button->Enable(false);
    setTimeline(0.0);
    timeline->Enable(false);
}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:7,代码来源:wx_player.cpp

示例4: UpdateButtons

void SjMyMusicConfigPage::UpdateButtons()
{
	bool enable = GetSelFromDialog()!=NULL;

	if( m_configMenuButton )
	{
		m_configMenuButton->Enable(enable);
	}

	if( m_removeButton )
	{
		m_removeButton->Enable(enable);
	}

	if( m_updateButton )
	{
		m_updateButton->SetLabel(wxString::Format(m_idxChanged? "* %s%s" : " %s%s ", _("Update music library"), SJ_BUTTON_MENU_ARROW));
	}
}
开发者ID:r10s,项目名称:silverjuke,代码行数:19,代码来源:mymusic.cpp

示例5: DoIt

void wxMiniApp::DoIt()
{
	download_file(wxT("check.txt"));
	
	status->AppendText(wxT("\n"));
	status_text->SetLabel(wxT("Checking files..."));
	 
	ifstream checkfile("check.txt");
	string line;
	vector<string> files_list;
	
	if(checkfile.is_open())
	{
		while(checkfile.good())
		{
			getline(checkfile,line);
			files_list.push_back(line);
		}
		checkfile.close();
	
		for(int i=0; i<files_list.size();i+=2)
		{
				// Check all the files
			wxString mystring1(files_list[i].c_str(), wxConvUTF8);
			wxString mystring2(files_list[i+1].c_str(), wxConvUTF8);
			check_file_integrity(mystring1, mystring2);
		}
		
		// Say something
		status_text->SetLabel(wxT("Update finished"));
		start_button->Enable(true);
		
	}
	else
	{
		// Do nothing if check.txt fails
		status_text->SetLabel(wxT("Error while updating"));
		
	}
}
开发者ID:Dahrkael,项目名称:toys,代码行数:40,代码来源:main.cpp

示例6: OnInit

bool wxMiniApp::OnInit()
{
	//update_server = "http://vengeance-rpg.com/updates/";
	update_server = wxT("http://ofarts.rpgmaker.es/updater-test/");
	local_path = wxT("./");
	window = new wxFrame( NULL, -1, wxT("Vengeance RPG Online Updater"), wxDefaultPosition, wxSize( 400, 300) );
    SetTopWindow( window );
	
	GetTopWindow()->SetMinSize(wxSize(400,300));
	GetTopWindow()->SetMaxSize(wxSize(400,300));
	
	main_panel = new wxPanel(GetTopWindow(), wxID_ANY, wxPoint(0, 0), wxSize(400, 300));
	
	wxImage::AddHandler(new wxPNGHandler);	
	initialize_images();
	// 134 height
	logo = new wxBitmapButton(main_panel, wxID_ANY, _img_vengeance, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);

	status = new wxTextCtrl(main_panel, wxID_ANY, wxT(""), wxPoint(1,135), wxSize(389,100), wxTE_READONLY|wxTE_MULTILINE);
	
	status_text = new wxStaticText(main_panel, wxID_ANY, wxT("Conectando..."), wxPoint(15, 245), wxDefaultSize);
    
	start_button = new wxButton(main_panel, 21, wxT("Start Game"), wxPoint(210, 242), wxSize(80,20));
	start_button->Enable(false);
	exit_button = new wxButton(main_panel, wxID_EXIT, wxT("Exit"), wxPoint(305, 242), wxSize(80,20));
	
	Connect(21, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxMiniApp::launch_game) );
    Connect(wxID_EXIT, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxMiniApp::OnClick) );

	// show main frame
    GetTopWindow()->Show();
	DoIt();
	
	// enter the application's main loop
    return true;
}
开发者ID:Dahrkael,项目名称:toys,代码行数:36,代码来源:main.cpp

示例7: UpdateUI

	void UpdateUI()
	{
		m_btn_run->Enable(!Emu.IsStopped());
		m_btn_stop->Enable(!Emu.IsStopped());
		m_btn_restart->Enable(!Emu.GetPath().empty());
	}
开发者ID:976717326,项目名称:rpcs3,代码行数:6,代码来源:Debugger.cpp

示例8: UpdateUI

	void UpdateUI()
	{
		m_btn_run->Enable(!Emu.IsStopped());
		m_btn_stop->Enable(!Emu.IsStopped());
		m_btn_restart->Enable(!Emu.m_path.IsEmpty());
	}
开发者ID:deadpool101,项目名称:RPCS3-Fork,代码行数:6,代码来源:Debugger.cpp


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