本文整理汇总了C++中wxColourPickerEvent::GetId方法的典型用法代码示例。如果您正苦于以下问题:C++ wxColourPickerEvent::GetId方法的具体用法?C++ wxColourPickerEvent::GetId怎么用?C++ wxColourPickerEvent::GetId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxColourPickerEvent
的用法示例。
在下文中一共展示了wxColourPickerEvent::GetId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
}
示例2: 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();
}
示例3: 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();
}