Exemple #1
0
HWND CStatusControl::Create(HWND hParent) {
  CWindowImpl<CStatusControl>::Create(hParent, 0, 0, WS_VISIBLE | WS_CHILD );

  CreateChildren();

  PopulateCombo();
  PopulateSpeed();

  LayoutChildrenInitial();

  return m_hWnd;
}
void DlgEncrypt::dialog()
{
    if (!already_init)
    {
        // ----------------------------
        Focuser f(this);
        f.show();
        f.focus();
        // ----------------------------
        if (m_bEncrypt)
        {
            ui->checkBoxEncrypt->toggle();
        }
        else
        {
            ui->checkBoxEncrypt->toggle();
            ui->checkBoxEncrypt->toggle();
        }
        // ----------------------------
        if (m_bSign)
        {
            ui->checkBoxSign->toggle();
        }
        else
        {
            ui->checkBoxSign->toggle();
            ui->checkBoxSign->toggle();
        }

//        ui->fromButton->setFocus();

        QString qstrTempID = Moneychanger::It()->get_default_nym_id();

        if (!qstrTempID.isEmpty())
            m_nymId = qstrTempID;

        PopulateCombo();
        PopulateWidgetNotAdded();

        already_init = true;
    }
}
Exemple #3
0
void CCrossDlg::OnSetfocusNameB() 
{
	PopulateCombo(SEL_B);
}
Exemple #4
0
void CCrossDlg::OnSetfocusNameA() 
{
	PopulateCombo(SEL_A);
}
//----------------------------------------------------------------------------
mafGUI *medPipeTensorFieldSurface::CreateGui()
//----------------------------------------------------------------------------
{
  int nTensors = GetNumberOfTensors();
  
  m_Gui = new mafGUI(this);
     
  wxBoxSizer* bSizerMain = new wxBoxSizer( wxVERTICAL );
  if (nTensors == 0)  //no tensor field available, this pipe does not work
    bSizerMain->Add(new wxStaticText( m_Gui, wxID_ANY, _("No tensor field to visualize.")));
  else
  {
    if (nTensors > 1)      
    {
      wxBoxSizer* bSizer1 = new wxBoxSizer( wxHORIZONTAL );
      bSizer1->Add( new wxStaticText( m_Gui, wxID_ANY, _("Tensor Field:"), 
        wxDefaultPosition, wxSize( 60,-1 ), 0 ), 0, wxALL, 5 );

      wxComboBox* comboField = new wxComboBox( m_Gui, ID_VECTORFIELD, wxEmptyString, 
        wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); 
      comboField->SetToolTip( _("Selects the tensor field to be visualized.") );
      PopulateCombo(comboField, true);  //at least one tensor is available
      bSizer1->Add( comboField, 1, wxALL, 1 );
      bSizerMain->Add( bSizer1, 0, wxEXPAND, 0 );

      //and validator
      comboField->SetValidator(mafGUIValidator(this, ID_VECTORFIELD, comboField, &m_TensorFieldIndex));
    }
    
    wxBoxSizer* bSizer2 = new wxBoxSizer( wxHORIZONTAL );
    bSizer2->Add( new wxStaticText( m_Gui, wxID_ANY, _("Color by:"), 
      wxDefaultPosition, wxSize( 60,-1 ), 0 ), 0, wxALL, 5 );

    m_ComboColorBy = new wxComboBox( m_Gui, ID_COLOR_MAPPING_MODE, 
      wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
    UpdateColorByCombo();      
    
    m_ComboColorBy->SetToolTip( 
      _("Specifies how the specified tensor field should be transformed into colors.") );
    bSizer2->Add( m_ComboColorBy, 1, wxALL, 0 );
    bSizerMain->Add( bSizer2, 0, wxEXPAND, 5 );

    //and validator
    m_ComboColorBy->SetValidator(mafGUIValidator(this, ID_COLOR_MAPPING_MODE, m_ComboColorBy, &m_ColorMappingMode));
  
    wxBoxSizer* bSizer3 = new wxBoxSizer( wxHORIZONTAL );    
    bSizer3->Add( new wxStaticText( m_Gui, wxID_ANY, _("LUT:")), 0, wxALL, 5 );

    mafGUILutSwatch* luts2 = new mafGUILutSwatch(m_Gui, ID_COLOR_MAPPING_LUT, 
      wxDefaultPosition, wxSize(140, 18), wxTAB_TRAVERSAL | wxSIMPLE_BORDER );
    luts2->SetLut(m_ColorMappingLUT);
    luts2->SetEditable(true);
    luts2->SetListener(this);
    bSizer3->Add(luts2, 0, 0/*wxEXPAND*/, 5 );
    bSizerMain->Add( bSizer3, 1, wxEXPAND, 5 );

    wxCheckBox* chckShowSFLegend1 = new wxCheckBox( m_Gui, ID_SHOW_COLOR_MAPPING, 
      _("Show Color Mapping"), wxDefaultPosition, wxDefaultSize, 0 );
    chckShowSFLegend1->SetToolTip( _("If checked, mapping is displayed "
      "as a colored bar in the main view.") );
    bSizerMain->Add( chckShowSFLegend1, 0, wxALL|wxEXPAND, 5 );

    //and validator
    chckShowSFLegend1->SetValidator(mafGUIValidator(this, ID_SHOW_COLOR_MAPPING,       
      chckShowSFLegend1, &m_ShowMapping));
  }

  m_Gui->Add(bSizerMain);
  return m_Gui;
}