本文整理汇总了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);
}
示例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");
}
}
示例3: stop
void MainWindow::stop() {
pause();
libvlc_media_player_stop(media_player);
stop_button->Enable(false);
setTimeline(0.0);
timeline->Enable(false);
}
示例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));
}
}
示例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"));
}
}
示例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;
}
示例7: UpdateUI
void UpdateUI()
{
m_btn_run->Enable(!Emu.IsStopped());
m_btn_stop->Enable(!Emu.IsStopped());
m_btn_restart->Enable(!Emu.GetPath().empty());
}
示例8: UpdateUI
void UpdateUI()
{
m_btn_run->Enable(!Emu.IsStopped());
m_btn_stop->Enable(!Emu.IsStopped());
m_btn_restart->Enable(!Emu.m_path.IsEmpty());
}