本文整理汇总了C++中wxColourPickerEvent类的典型用法代码示例。如果您正苦于以下问题:C++ wxColourPickerEvent类的具体用法?C++ wxColourPickerEvent怎么用?C++ wxColourPickerEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxColourPickerEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1:
void
PreferencesDialog::OnPromptTextColor(wxColourPickerEvent & evt)
{
m_frame->m_cluePrompt->SetForegroundColour(evt.GetColour());
m_frame->m_cluePrompt->Refresh();
evt.Skip();
}
开发者ID:brho,项目名称:xword,代码行数:7,代码来源:Preferences.cpp
示例2: OnColourChanged
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);
}
}
开发者ID:wanglc,项目名称:codelite,代码行数:33,代码来源:syntaxhighlightdlg.cpp
示例3: OnColourChange
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;
}
}
开发者ID:3dseals,项目名称:wowmodelviewer,代码行数:57,代码来源:modelcontrol.cpp
示例4: OnSelTextFgChanged
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));
}
}
开发者ID:wanglc,项目名称:codelite,代码行数:10,代码来源:syntaxhighlightdlg.cpp
示例5: OnColor
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();
}
开发者ID:darckense,项目名称:fityk,代码行数:13,代码来源:aplot.cpp
示例6: OnChooseColor
void CGradientCtrl::OnChooseColor(wxColourPickerEvent& event)
{
BEATS_ASSERT(m_pSelectedCursor != nullptr);
BEATS_ASSERT(m_pSelectedCursor->GetType() == eCT_Color);
m_pSelectedCursor->SetColor(event.GetColour());
Refresh(true);
}
开发者ID:hejiero,项目名称:BeyondEngine,代码行数:7,代码来源:GradientCtrl.cpp
示例7: OnColourPick
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()));
}
开发者ID:Joeywp,项目名称:OVLMake,代码行数:8,代码来源:wxdlgEffectLight.cpp
示例8: UpdateTextCtrlFromPicker
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);
}
开发者ID:Zombiebest,项目名称:Dolphin,代码行数:9,代码来源:clrpickercmn.cpp
示例9: OnLabelColorChanged
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 );
}
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:9,代码来源:PanelSurface.cpp
示例10: OnColorPickerChange
//------------------------------------------------------------------------------
// 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
}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:47,代码来源:GmatColorPanel.cpp
示例11: OnColorContour
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 );
}
}
开发者ID:CBoensel,项目名称:freesurfer,代码行数:10,代码来源:ToolWindowEdit.cpp
示例12: OnItembackColourChanged
/*---------------------------------------------------------------------------*/
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();
}
开发者ID:zaytcev-andrey,项目名称:sqlite-crc,代码行数:11,代码来源:preferences.cpp
示例13: OnColorPickerChange
//------------------------------------------------------------------------------
// 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
}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:57,代码来源:GroundTrackPlotPanel.cpp
示例14: OnColourChanged
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());
}
开发者ID:snyh,项目名称:toy,代码行数:11,代码来源:MainFrame.cpp
示例15: OnColor
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();
}
开发者ID:darckense,项目名称:fityk,代码行数:15,代码来源:textpane.cpp
示例16: OnFGColour
void SettingsDlg::OnFGColour(wxColourPickerEvent& event)
{
m_fg_colour = event.GetColour();
}
开发者ID:05storm26,项目名称:codelite,代码行数:4,代码来源:SettingsDlg.cpp
示例17: OnLinebackColourChanged
/*---------------------------------------------------------------------------*/
void wxPrefDlg::OnLinebackColourChanged(wxColourPickerEvent& event)
{
m_Val_LineBG = m_LineNumberBG->GetColour().GetAsString(wxC2S_HTML_SYNTAX);
event.Skip();
}
开发者ID:zaytcev-andrey,项目名称:sqlite-crc,代码行数:6,代码来源:preferences.cpp
示例18: OnOutputViewColourChanged
void SyntaxHighlightDlg::OnOutputViewColourChanged(wxColourPickerEvent& event)
{
CHECK_PTR_RET(m_lexer);
event.Skip();
m_isModified = true;
}
开发者ID:wanglc,项目名称:codelite,代码行数:6,代码来源:syntaxhighlightdlg.cpp
示例19:
void WeatherDlg::onColorPickerWhite1( wxColourPickerEvent& event ) {
m_RGBWPanel->setWhite1Color(event.GetColour().Red(), event.GetColour().Green(), event.GetColour().Blue());
}
开发者ID:pmansvelder,项目名称:Rocrail,代码行数:3,代码来源:weatherdlg.cpp
示例20: onColorPickerSaturation
void WeatherDlg::onColorPickerSaturation( wxColourPickerEvent& event ) {
m_RGBWPanel->setSaturationColor(event.GetColour().Red(), event.GetColour().Green(), event.GetColour().Blue());
}
开发者ID:pmansvelder,项目名称:Rocrail,代码行数:3,代码来源:weatherdlg.cpp
注:本文中的wxColourPickerEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论