当前位置: 首页>>代码示例>>C++>>正文


C++ wxColourPickerEvent::GetId方法代码示例

本文整理汇总了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;
  }
}
开发者ID:3dseals,项目名称:wowmodelviewer,代码行数:57,代码来源:modelcontrol.cpp

示例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();
}
开发者ID:darckense,项目名称:fityk,代码行数:13,代码来源:aplot.cpp

示例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();
}
开发者ID:darckense,项目名称:fityk,代码行数:15,代码来源:textpane.cpp


注:本文中的wxColourPickerEvent::GetId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。