void MyStatusBar::DoToggle() { #if wxUSE_CHECKBOX if ( m_checkbox->GetValue() ) { #if wxUSE_TIMER m_timer.Start(1000); #endif m_statbmp->SetIcon(wxIcon(green_xpm)); UpdateClock(); } else // don't show clock { #if wxUSE_TIMER m_timer.Stop(); #endif m_statbmp->SetIcon(wxIcon(red_xpm)); SetStatusText(wxEmptyString, Field_Clock); } #endif // wxUSE_CHECKBOX }
void wxNotificationMessageWindow::SetMessageIcon(const wxIcon& icon) { m_messageBmp->SetBitmap(icon); m_messageBmp->Show(icon.IsOk()); }
void MyStatusBar::OnSize(wxSizeEvent& event) { #if wxUSE_CHECKBOX if ( !m_checkbox ) return; #endif wxRect rect; if (!GetFieldRect(Field_Checkbox, rect)) { event.Skip(); return; } #if wxUSE_CHECKBOX wxRect rectCheck = rect; rectCheck.Deflate(2); m_checkbox->SetSize(rectCheck); #endif GetFieldRect(Field_Bitmap, rect); wxSize size = m_statbmp->GetSize(); m_statbmp->Move(rect.x + (rect.width - size.x) / 2, rect.y + (rect.height - size.y) / 2); event.Skip(); }
void OnListItemSelected(wxCommandEvent& event) { int sel = m_listTemplate->GetSelection(); if (sel < 0 || sel >= (int)m_projTempList->size()) { m_curSel = -1; return; } m_curSel = sel; const luProjTemplate& templ = (*m_projTempList)[sel]; m_imgPreview->SetBitmap(wxBitmap(templ.preview, wxBITMAP_TYPE_ANY)); m_textDesc->SetLabelText(templ.desc); m_textTitle->SetLabelText(templ.title); //gkPrintf("%d", sel); }