void wxGenericColourDialog::OnAlphaSlider(wxCommandEvent& WXUNUSED(event)) { wxColour c = m_colourData.GetColour(); m_colourData.SetColour(wxColour(c.Red(), c.Green(), c.Blue(), (unsigned char)m_alphaSlider->GetValue())); wxClientDC dc(this); PaintCustomColour(dc); }
void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event)) { if (!blueSlider) return; wxClientDC dc(this); colourData.m_dataColour.Set(colourData.m_dataColour.Red(), colourData.m_dataColour.Green(), (unsigned char)blueSlider->GetValue()); PaintCustomColour(dc); }
void wxGenericColourDialog::OnRedSlider(wxCommandEvent& WXUNUSED(event)) { if (!m_redSlider) return; wxClientDC dc(this); m_colourData.m_dataColour.Set((unsigned char)m_redSlider->GetValue(), m_colourData.m_dataColour.Green(), m_colourData.m_dataColour.Blue()); PaintCustomColour(dc); }
void wxGenericColourDialog::OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); PaintBasicColours(dc); PaintCustomColours(dc); PaintCustomColour(dc); PaintHighlight(dc, true); }
void wxGenericColourDialog::OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); PaintBasicColours(dc); // wxStaticBitmap controls are updated on their own. #if !wxCLRDLGG_USE_PREVIEW_WITH_ALPHA PaintCustomColours(dc, -1); PaintCustomColour(dc); #endif // !wxCLRDLGG_USE_PREVIEW_WITH_ALPHA PaintHighlight(dc, true); }
void wxGenericColourDialog::OnPaint(wxPaintEvent& event) { #if !defined(__WXMOTIF__) && !defined(__WXPM__) && !defined(__WXCOCOA__) wxDialog::OnPaint(event); #endif wxPaintDC dc(this); PaintBasicColours(dc); PaintCustomColours(dc); PaintCustomColour(dc); PaintHighlight(dc, true); }
void wxGenericColourDialog::OnCustomColourClick(int which) { wxClientDC dc(this); PaintHighlight(dc, false); whichKind = 2; colourSelection = which; #if wxUSE_SLIDER redSlider->SetValue( customColours[colourSelection].Red() ); greenSlider->SetValue( customColours[colourSelection].Green() ); blueSlider->SetValue( customColours[colourSelection].Blue() ); #endif // wxUSE_SLIDER colourData.m_dataColour.Set(customColours[colourSelection].Red(), customColours[colourSelection].Green(), customColours[colourSelection].Blue()); PaintCustomColour(dc); PaintHighlight(dc, true); }
void wxGenericColourDialog::OnBasicColourClick(int which) { wxClientDC dc(this); PaintHighlight(dc, false); m_whichKind = 1; m_colourSelection = which; #if wxUSE_SLIDER m_redSlider->SetValue( m_standardColours[m_colourSelection].Red() ); m_greenSlider->SetValue( m_standardColours[m_colourSelection].Green() ); m_blueSlider->SetValue( m_standardColours[m_colourSelection].Blue() ); #endif // wxUSE_SLIDER m_colourData.m_dataColour.Set(m_standardColours[m_colourSelection].Red(), m_standardColours[m_colourSelection].Green(), m_standardColours[m_colourSelection].Blue()); PaintCustomColour(dc); PaintHighlight(dc, true); }
void wxGenericColourDialog::OnCustomColourClick(int which) { wxClientDC dc(this); PaintHighlight(dc, false); m_whichKind = 2; m_colourSelection = which; #if wxUSE_SLIDER m_redSlider->SetValue( m_customColours[m_colourSelection].Red() ); m_greenSlider->SetValue( m_customColours[m_colourSelection].Green() ); m_blueSlider->SetValue( m_customColours[m_colourSelection].Blue() ); if ( m_colourData.GetChooseAlpha() ) { m_alphaSlider->SetValue( m_customColours[m_colourSelection].Alpha() ); } #endif // wxUSE_SLIDER m_colourData.SetColour(m_customColours[m_colourSelection]); PaintCustomColour(dc); PaintHighlight(dc, true); }