void PreferencesDialog::OnPromptTextColor(wxColourPickerEvent & evt) { m_frame->m_cluePrompt->SetForegroundColour(evt.GetColour()); m_frame->m_cluePrompt->Refresh(); evt.Skip(); }
void SyntaxHighlightDlg::OnColourChanged(wxColourPickerEvent& event) { CHECK_PTR_RET(m_lexer); m_isModified = true; // update colour wxObject* obj = event.GetEventObject(); if(obj == m_colourPicker) { wxColour colour = event.GetColour(); std::list<StyleProperty>::iterator iter = GetSelectedStyle(); iter->SetFgColour(colour.GetAsString(wxC2S_HTML_SYNTAX)); } else if(obj == m_bgColourPicker) { wxColour colour = event.GetColour(); std::list<StyleProperty>::iterator iter = GetSelectedStyle(); iter->SetBgColour(colour.GetAsString(wxC2S_HTML_SYNTAX)); } else if(obj == m_globalBgColourPicker) { wxColour colour = event.GetColour(); StyleProperty::List_t& properties = m_lexer->GetLexerProperties(); StyleProperty::List_t::iterator iter = properties.begin(); for(; iter != properties.end(); ++iter) { // Dont change the text selection using the global font picker if(iter->GetName() == wxT("Text Selection")) continue; iter->SetBgColour(colour.GetAsString(wxC2S_HTML_SYNTAX)); } // update the style background colour as well m_bgColourPicker->SetColour(colour); } }
void ModelControl::OnColourChange(wxColourPickerEvent &event) { if (!init) return; Vec4D col = fromColWidget(event.GetColour()); wxColourPickerCtrl *cpc; switch (event.GetId()) { case ID_MODEL_PC_START_11 : pcr[0][0] = col; cpc = PC11S; break; case ID_MODEL_PC_MID_11 : pcr[0][1] = col; cpc = PC11M; break; case ID_MODEL_PC_END_11 : pcr[0][2] = col; cpc = PC11E; break; case ID_MODEL_PC_START_12 : pcr[1][0] = col; cpc = PC12S; break; case ID_MODEL_PC_MID_12 : pcr[1][1] = col; cpc = PC12M; break; case ID_MODEL_PC_END_12 : pcr[1][2] = col; cpc = PC12E; break; case ID_MODEL_PC_START_13 : pcr[2][0] = col; cpc = PC13S; break; case ID_MODEL_PC_MID_13 : pcr[2][1] = col; cpc = PC13M; break; case ID_MODEL_PC_END_13 : pcr[2][2] = col; cpc = PC13E; break; } if (cpc) UpdatePCRText(cpc); if (model) { if (particlecolreplace->GetValue() == true) model->particleColorReplacements = pcr; modelPCRSaves[model->modelname] = pcr; } }
void SyntaxHighlightDlg::OnSelTextFgChanged(wxColourPickerEvent& event) { CHECK_PTR_RET(m_lexer); event.Skip(); StyleProperty& selProp = m_lexer->GetProperty(SEL_TEXT_ATTR_ID); if(!selProp.IsNull()) { m_isModified = true; selProp.SetFgColour(event.GetColour().GetAsString(wxC2S_HTML_SYNTAX)); } }
void AuxPlotConfDlg::OnColor(wxColourPickerEvent& event) { int id = event.GetId(); if (id == bg_cp_->GetId()) ap_->set_bg_color(event.GetColour()); else if (id == active_cp_->GetId()) ap_->activeDataCol = event.GetColour(); else if (id == inactive_cp_->GetId()) ap_->inactiveDataCol = event.GetColour(); else if (id == axis_cp_->GetId()) ap_->xAxisCol = event.GetColour(); ap_->refresh(); }
void CGradientCtrl::OnChooseColor(wxColourPickerEvent& event) { BEATS_ASSERT(m_pSelectedCursor != nullptr); BEATS_ASSERT(m_pSelectedCursor->GetType() == eCT_Color); m_pSelectedCursor->SetColor(event.GetColour()); Refresh(true); }
void dlgEffectLight::OnColourPick(wxColourPickerEvent& event) { wxColour col = event.GetColour(); m_doUpdate = false; m_textLightRed->SetValue(wxString::Format("%d", (unsigned int) col.Red())); m_textLightBlue->SetValue(wxString::Format("%d", (unsigned int) col.Blue())); m_doUpdate = true; m_textLightGreen->SetValue(wxString::Format("%d", (unsigned int) col.Green())); }
void wxColourPickerCtrl::OnColourChange(wxColourPickerEvent &ev) { UpdateTextCtrlFromPicker(); // the wxColourPickerWidget sent us a colour-change notification. // forward this event to our parent wxColourPickerEvent event(this, GetId(), ev.GetColour()); GetEventHandler()->ProcessEvent(event); }
void PanelSurface::OnLabelColorChanged( wxColourPickerEvent& event ) { LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer(); if ( surf ) { wxColour c = event.GetColour(); surf->GetActiveLabel()->SetColor( c.Red()/255.0, c.Green()/255.0, c.Blue()/255.0 ); } }
//------------------------------------------------------------------------------ // void OnColorPickerChange(wxColourPickerEvent& event) //------------------------------------------------------------------------------ void GmatColorPanel::OnColorPickerChange(wxColourPickerEvent& event) { #ifdef DEBUG_COLOR_CHANGE MessageInterface::ShowMessage("GmatColorPanel::OnColorPickerChange() entered\n"); #endif if (event.GetEventObject() == mOrbitColorCtrl) { wxColour wxcolor = mOrbitColorCtrl->GetColour(); RgbColor rgbColor = RgbColor(wxcolor.Red(), wxcolor.Green(), wxcolor.Blue()); if (mUseInputObjectColor) { mOrbitIntColor = rgbColor.GetIntColor(); } else { std::string colorStr = RgbColor::ToRgbString(rgbColor.GetIntColor()); theClonedSpacePoint-> SetStringParameter(theClonedSpacePoint->GetParameterID("OrbitColor"), colorStr); } } else if (event.GetEventObject() == mTargetColorCtrl) { wxColour wxcolor = mTargetColorCtrl->GetColour(); RgbColor rgbColor = RgbColor(wxcolor.Red(), wxcolor.Green(), wxcolor.Blue()); if (mUseInputObjectColor) { mTargetIntColor = rgbColor.GetIntColor(); } else { std::string colorStr = RgbColor::ToRgbString(rgbColor.GetIntColor()); theClonedSpacePoint-> SetStringParameter(theClonedSpacePoint->GetParameterID("TargetColor"), colorStr); } } mHasColorChanged = true; theParentGmatPanel->EnableUpdate(true); #ifdef DEBUG_COLOR_CHANGE MessageInterface::ShowMessage("GmatColorPanel::OnColorPickerChange() leaving\n"); #endif }
void ToolWindowEdit::OnColorContour( wxColourPickerEvent& event ) { wxColour c = event.GetColour(); for ( int i = 0; i < 3; i++ ) { RenderView2D* view = ( RenderView2D* )MainWindow::GetMainWindowPointer()->GetRenderView( i ); Contour2D* c2d = view->GetContour2D(); c2d->SetContourColor( c.Red()/255.0, c.Green()/255.0, c.Blue()/255.0 ); } }
/*---------------------------------------------------------------------------*/ void wxPrefDlg::OnItembackColourChanged(wxColourPickerEvent& event) { int index = m_EdItems->GetSelection(); if (index != wxNOT_FOUND) { m_Val_ItemBG[index] = m_ItemBG->GetColour().GetAsString(wxC2S_HTML_SYNTAX); ChangeStyle(index); } event.Skip(); }
//------------------------------------------------------------------------------ // void OnColorPickerChange(wxColourPickerEvent& event) //------------------------------------------------------------------------------ void GroundTrackPlotPanel::OnColorPickerChange(wxColourPickerEvent& event) { #ifdef DEBUG_PANEL_COLOR MessageInterface::ShowMessage("GroundTrackPlotPanel::OnColorPickerChange() entered\n"); #endif wxObject *obj = event.GetEventObject(); std::string selObjName = mObjectCheckListBox->GetStringSelection().c_str(); if (obj == mOrbitColorCtrl) { mOrbitColor = mOrbitColorCtrl->GetColour(); mOrbitColorMap[selObjName].Set(mOrbitColor.Red(), mOrbitColor.Green(), mOrbitColor.Blue(), 0); #ifdef DEBUG_PANEL_COLOR MessageInterface::ShowMessage(" Orbit color changed\n"); MessageInterface::ShowMessage (" red=%u, green=%u, blue=%u, alpha=%u\n", mOrbitColor.Red(), mOrbitColor.Green(), mOrbitColor.Blue(), mOrbitColor.Alpha()); UnsignedInt intColor = mOrbitColorMap[selObjName].GetIntColor(); MessageInterface::ShowMessage (" mOrbitColorMap[%s]=%u<%08X>\n", selObjName.c_str(), intColor, intColor); #endif mHasOrbitColorChanged = true; } else if (obj == mTargetColorCtrl) { mTargetColor = mTargetColorCtrl->GetColour(); mTargetColorMap[selObjName].Set(mTargetColor.Red(), mTargetColor.Green(), mTargetColor.Blue(), 0); #ifdef DEBUG_PANEL_COLOR MessageInterface::ShowMessage(" Target color changed\n"); MessageInterface::ShowMessage (" red=%u, green=%u, blue=%u, alpha=%u\n", mTargetColor.Red(), mTargetColor.Green(), mTargetColor.Blue(), mTargetColor.Alpha()); UnsignedInt intColor = mTargetColorMap[selObjName].GetIntColor(); MessageInterface::ShowMessage (" mTargetColorMap[%s]=%u<%08X>\n", selObjName.c_str(), intColor, intColor); #endif mHasTargetColorChanged = true; } EnableUpdate(true); #ifdef DEBUG_PANEL_COLOR MessageInterface::ShowMessage("GroundTrackPlotPanel::OnColorPickerChange() entered\n"); #endif }
void MainFrame::OnColourChanged( wxColourPickerEvent& event ) { wxColour color = event.GetColour(); Control::getInstance()->setTargetColor(color.Red(), color.Green(), color.Blue()); // process the image Control::getInstance()->process(); //show the result image; this->processed_image->SetBitmap(Control::getInstance()->getResult()); }
void OutputWinConfDlg::OnColor(wxColourPickerEvent& event) { int id = event.GetId(); if (id == cp_bg_->GetId()) ow_->set_bg_color(event.GetColour()); else if (id == cp_input_->GetId()) ow_->text_color_[UserInterface::kInput] = event.GetColour(); else if (id == cp_output_->GetId()) ow_->text_color_[UserInterface::kNormal] = event.GetColour(); else if (id == cp_quote_->GetId()) ow_->text_color_[UserInterface::kQuoted] = event.GetColour(); else if (id == cp_warning_->GetId()) ow_->text_color_[UserInterface::kWarning] = event.GetColour(); show_preview(); }
void SettingsDlg::OnFGColour(wxColourPickerEvent& event) { m_fg_colour = event.GetColour(); }
/*---------------------------------------------------------------------------*/ void wxPrefDlg::OnLinebackColourChanged(wxColourPickerEvent& event) { m_Val_LineBG = m_LineNumberBG->GetColour().GetAsString(wxC2S_HTML_SYNTAX); event.Skip(); }
void PreferencesDialog::OnPencilColor(wxColourPickerEvent & evt) { m_frame->m_gridCtrl->SetPencilColor(evt.GetColour()); evt.Skip(); }
void PreferencesDialog::OnSelectedWordColor(wxColourPickerEvent & evt) { m_frame->m_gridCtrl->SetFocusedWordColor(evt.GetColour()); evt.Skip(); }
void SyntaxHighlightDlg::OnOutputViewColourChanged(wxColourPickerEvent& event) { CHECK_PTR_RET(m_lexer); event.Skip(); m_isModified = true; }
void WeatherDlg::onColorPickerWhite1( wxColourPickerEvent& event ) { m_RGBWPanel->setWhite1Color(event.GetColour().Red(), event.GetColour().Green(), event.GetColour().Blue()); }
void WeatherDlg::onColorPickerSaturation( wxColourPickerEvent& event ) { m_RGBWPanel->setSaturationColor(event.GetColour().Red(), event.GetColour().Green(), event.GetColour().Blue()); }
void WeatherDlg::onColorPickerBrightness( wxColourPickerEvent& event ) { m_RGBWPanel->setBrightnessColor(event.GetColour().Red(), event.GetColour().Green(), event.GetColour().Blue()); }
void MainFrm::OnHowerColor(wxColourPickerEvent& event) { m_pShapeCanvas->SetHoverColour(event.GetColour()); }
void MainFrame::OnColourChanged(wxColourPickerEvent& e){ wxColour colour = e.GetColour(); m_colour->SetBackgroundColour(colour); m_colour->Refresh(); }
/*---------------------------------------------------------------------------*/ void wxPrefDlg::OnOddlinecolourColourChanged(wxColourPickerEvent& event) { m_Val_OddColour = m_OddLineColour->GetColour().GetAsString(wxC2S_HTML_SYNTAX); event.Skip(); }