bool CSettingTypeRDBCpuType::Load ( int Index, uint32_t & Value ) const { stdstr strValue; bool bRes = m_SettingsIniFile->GetString(m_SectionIdent->c_str(),m_KeyName.c_str(),m_DefaultStr,strValue); if (!bRes) { LoadDefault(Index,Value); return false; } const char * String = strValue.c_str(); if (_stricmp(String,"Interpreter") == 0) { Value = CPU_Interpreter; } else if (_stricmp(String,"Recompiler") == 0) { Value = CPU_Recompiler; } else if (_stricmp(String,"SyncCores") == 0) { Value = CPU_SyncCores; } else if (_stricmp(String,"default") == 0) { LoadDefault(Index,Value); return false; } else { g_Notify->BreakPoint(__FILEW__,__LINE__); } return true; }
bool CSettingTypeRDBYesNo::Load(uint32_t Index, bool & Value) const { stdstr strValue; bool bRes = m_SettingsIniFile->GetString(m_SectionIdent->c_str(), m_KeyName.c_str(), m_DefaultStr, strValue); if (!bRes) { LoadDefault(Index, Value); return false; } const char * String = strValue.c_str(); if (_stricmp(String, "Yes") == 0) { Value = true; } else if (_stricmp(String, "No") == 0) { Value = false; } else if (_stricmp(String, "default") == 0) { LoadDefault(Index, Value); return false; } else { WriteTrace(TraceSettings, TraceError, "Invalid Yes/No setting value (Section: %s Key: %s Value: %s)", m_SectionIdent->c_str(), String, m_KeyName.c_str(), strValue.c_str()); LoadDefault(Index, Value); return false; } return true; }
bool CSettingTypeRDBSaveChip::Load ( int Index, uint32_t & Value ) const { stdstr strValue; bool bRes = m_SettingsIniFile->GetString(m_SectionIdent->c_str(),m_KeyName.c_str(),m_DefaultStr,strValue); if (!bRes) { LoadDefault(Index,Value); return false; } const char * String = strValue.c_str(); if (_stricmp(String,"First Save Type") == 0) { Value = (uint32_t)SaveChip_Auto; } else if (_stricmp(String,"4kbit Eeprom") == 0) { Value = SaveChip_Eeprom_4K; } else if (_stricmp(String,"16kbit Eeprom") == 0) { Value = SaveChip_Eeprom_16K; } else if (_stricmp(String,"Sram") == 0) { Value = SaveChip_Sram; } else if (_stricmp(String,"FlashRam") == 0) { Value = SaveChip_FlashRam; } else if (_stricmp(String,"default") == 0) { LoadDefault(Index,Value); return false; } else { g_Notify->BreakPoint(__FILEW__,__LINE__); } return true; }
void Pages::Initialise(const PageSettings &_settings) { settings = _settings; LoadDefault(); Update(); }
bool CSettingTypeRDBOnOff::Load ( int Index, bool & Value ) const { stdstr strValue; bool bRes = m_SettingsIniFile->GetString(m_SectionIdent->c_str(),m_KeyName.c_str(),m_DefaultStr,strValue); if (!bRes) { LoadDefault(Index,Value); return false; } const char * String = strValue.c_str(); if (_stricmp(String,"On") == 0) { Value = true; } else if (_stricmp(String,"Off") == 0) { Value = false; } else if (_stricmp(String,"Global") == 0 || _stricmp(String,"default")) { LoadDefault(Index,Value); return false; } else { g_Notify->BreakPoint(__FILE__, __LINE__); } return true; }
bool CSettingTypeRDBRDRamSize::Load (uint32_t Index, uint32_t & Value ) const { uint32_t ulValue; bool bRes = m_SettingsIniFile->GetNumber(m_SectionIdent->c_str(),m_KeyName.c_str(),m_DefaultValue,ulValue); if (!bRes) { LoadDefault(Index,ulValue); } Value = 0x400000; if (ulValue == 8) { Value = 0x800000; } return bRes; }
void ButcherProjectFilePaths::LoadMetadata(ButcherMetadataDataList *metadatalist) { ButcherProjectBaseAutoUpdate autoupd(this); if (metadatalist->Count()>0) { Clear(); for (unsigned int i=0; i<metadatalist->Count(); i++) { Add(&metadatalist->Get(i)); } } if (Count()==0) LoadDefault(); }
//Update the settings void CSettingTypeGame::Save ( int Index, bool Value ) { if (m_EraseDefaults) { bool bDefault; LoadDefault(Index,bDefault); if (bDefault == Value) { Delete(Index); return; } } if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase) { if (g_Settings->IndexBasedSetting(m_DefaultSetting)) { g_Settings->SaveBoolIndex(m_DefaultSetting,Index,Value); } else { g_Settings->SaveBool(m_DefaultSetting,Value); } } else { CSettingTypeApplication::Save(Index,Value); } }
MainWindow::MainWindow( os::String zPath ) : os::Window( os::Rect( 0, 0, 500, 400 ), "main_wnd", MSG_MAINWND_TITLE ) { SetTitle( zPath ); CenterInScreen(); /* Create toolbar */ m_pcToolBar = new os::ToolBar( os::Rect( 0, 0, GetBounds().Width(), 40 ), "" ); os::HLayoutNode* pcNode = new os::HLayoutNode( "h_root" ); pcNode->SetBorders( os::Rect( 0, 4, 5, 4 ) ); os::ImageButton* pcBreaker = new os::ImageButton(os::Rect(), "breaker", "",NULL,NULL, os::ImageButton::IB_TEXT_BOTTOM,false,false,false); SetButtonImageFromResource( pcBreaker, "breaker.png" ); pcNode->AddChild( pcBreaker, 0.0f ); m_pcBackButton = new os::ImageButton( os::Rect(), "back", "",new os::Message( M_BACK ) ,NULL, os::ImageButton::IB_TEXT_BOTTOM, true, false, true ); m_pcBackButton->SetEnable( false ); SetButtonImageFromResource( m_pcBackButton, "back.png" ); pcNode->AddChild( m_pcBackButton, 0.0f ); os::ImageButton* pcUp = new os::ImageButton( os::Rect(), "up", "",new os::Message( M_UP ) ,NULL, os::ImageButton::IB_TEXT_BOTTOM, true, false, true ); SetButtonImageFromResource( pcUp, "up.png" ); pcNode->AddChild( pcUp, 0.0f ); os::ImageButton* pcReload = new os::ImageButton( os::Rect(), "reload", "",new os::Message( M_RELOAD ) ,NULL, os::ImageButton::IB_TEXT_BOTTOM, true, false, true ); SetButtonImageFromResource( pcReload, "reload.png" ); pcNode->AddChild( pcReload, 0.0f ); os::ImageButton* pcHome = new os::ImageButton( os::Rect(), "home", "",new os::Message( M_HOME ) ,NULL, os::ImageButton::IB_TEXT_BOTTOM, true, false, true ); SetButtonImageFromResource( pcHome, "home.png" ); pcNode->AddChild( pcHome, 0.0f ); pcNode->AddChild( new os::HLayoutSpacer( "" ) ); /* Create popupmenu */ os::Menu* pcPopupMenu = new os::Menu( os::Rect(), "", os::ITEMS_IN_COLUMN ); pcPopupMenu->AddItem( MSG_MENU_VIEW_ICONS, new os::Message( M_VIEW_ICONS ) ); pcPopupMenu->AddItem( MSG_MENU_VIEW_LIST, new os::Message( M_VIEW_LIST ) ); pcPopupMenu->AddItem( MSG_MENU_VIEW_DETAILS, new os::Message( M_VIEW_DETAILS ) ); pcPopupMenu->AddItem( new os::MenuSeparator() ); pcPopupMenu->AddItem( MSG_MENU_VIEW_SAVE, new os::Message( M_SAVE_WINDOW ) ); pcPopupMenu->AddItem( MSG_MENU_VIEW_SAVE_DEFAULT, new os::Message( M_SAVE_DEFAULT ) ); pcPopupMenu->SetTargetForItems( this ); os::BitmapImage* pcView = new os::BitmapImage(); os::File cSelf( open_image_file( get_image_id() ) ); os::Resources cCol( &cSelf ); os::ResStream *pcStream = cCol.GetResourceStream( "view.png" ); pcView->Load( pcStream ); delete( pcStream ); m_pcViewMenu = new os::PopupMenu( os::Rect( GetBounds().Width() - 70, 2, GetBounds().Width() - 5, 32 ), "", MSG_MENU_VIEW, pcPopupMenu, pcView, os::CF_FOLLOW_RIGHT | os::CF_FOLLOW_RIGHT ); pcNode->AddChild( m_pcViewMenu ); /* Create icon view */ m_pcView = new os::IconDirectoryView( os::Rect( 0, 41, GetBounds().Width(), GetBounds().Height() ), zPath, os::CF_FOLLOW_ALL ); m_pcView->SetDirChangeMsg( new os::Message( M_CHANGE_DIR ) ); os::BitmapImage* pcDirIcon = static_cast<os::BitmapImage*>(m_pcView->GetDirIcon()); pcDirIcon->SetSize( os::Point( 24, 24 ) ); SetIcon( pcDirIcon->LockBitmap() ); delete( pcDirIcon ); m_cBackStack.push( zPath ); m_pcToolBar->SetRoot( pcNode ); AddChild( m_pcToolBar ); AddChild( m_pcView ); m_pcView->MakeFocus(); /* Load default folder style & window position; this will be overridden later by folder-specific settings, if any */ LoadDefault(); LoadWindow( false ); /* Load folder's saved style, window position */ m_pcView->ReRead(); }
int EqualizerView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CWnd::OnCreate(lpCreateStruct) == -1) return -1; // // small font // CDC* pDC = GetDC(); int ppi = pDC->GetDeviceCaps(LOGPIXELSX); int pointsize = MulDiv(65, 96, ppi); m_Font.CreatePointFont(pointsize, _T("")); ReleaseDC(pDC); CString sTemp; m_Tips.Create(this, TTS_ALWAYSTIP); // // bands // for (size_t i = 0; i < 18; i++) { m_LeftBands[i].Create(WS_CHILD | WS_VISIBLE | TBS_VERT, CRect(0, 0, 0, 0), this, 123); m_LeftBands[i].SetRange(0, m_FullRange); m_LeftBands[i].SetPos(m_FullRange / 2); m_Labels[i].Create( CString(IntToString(musik::Core::GetEQFreqs()[i]).c_str()), WS_CHILD | WS_VISIBLE | SS_CENTER, CRect(0, 0, 0, 0), this, 123); m_Labels[i].SetFont(&m_Font); sTemp.Format(_T("left: %d hz"), musik::Core::GetEQFreqs()[i]); m_Tips.AddTool(&m_LeftBands[i], sTemp); } // // preamp // m_LeftBands[18].Create(WS_CHILD | WS_VISIBLE | TBS_VERT, CRect(0, 0, 0, 0), this, 123); m_LeftBands[18].SetRange(0, m_FullRange); m_LeftBands[18].SetPos(Globals::Preferences->GetEqualizerMultiplier()); m_Labels[18].Create( _T("pre"), WS_CHILD | WS_VISIBLE | SS_CENTER, CRect(0, 0, 0, 0), this, 123); m_Labels[18].SetFont(&m_Font); // makes sure the tooltips are always displayed, even // if the main window is specified as always on top ::SetWindowPos(m_Tips.GetSafeHwnd(), HWND_TOPMOST, 0, 0, 0, 0, NULL); LoadDefault(); m_BandState = Globals::Preferences->GetEqualizerBandState(); LayoutNewState(); SetBandsFrom(Globals::Player->GetEQSettings()); return 0; }
COneCleanSetting::COneCleanSetting() { Load(); LoadDefault(); }
ReadConf() { LoadDefault(); ReadFromFile(); }
CGUIScheme::CGUIScheme() { LoadDefault(); }
GLDeviceConfig::GLDeviceConfig() { LoadDefault(); }
BrushToolDlg::BrushToolDlg(wxWindow *frame, wxWindow *parent) : wxPanel(parent, wxID_ANY, wxPoint(500, 150), wxSize(400, 550), 0, "BrushToolDlg"), m_frame(parent), m_cur_view(0), m_vol1(0), m_vol2(0), m_max_value(255.0), m_dft_ini_thresh(0.0), m_dft_gm_falloff(0.0), m_dft_scl_falloff(0.0), m_dft_scl_translate(0.0), m_dft_ca_min(0.0), m_dft_ca_max(0.0), m_dft_ca_thresh(0.0), m_dft_ca_falloff(1.0), m_dft_nr_thresh(0.0), m_dft_nr_size(0.0) { if (!((VRenderFrame*)m_frame)->GetFreeVersion()) SetSize(400, 750); //validator: floating point 1 wxFloatingPointValidator<double> vald_fp1(1); //validator: floating point 2 wxFloatingPointValidator<double> vald_fp2(2); //validator: integer wxIntegerValidator<unsigned int> vald_int; wxStaticText *st = 0; //group1 //paint tools wxBoxSizer *group1 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, "Selection"), wxVERTICAL); //toolbar m_toolbar = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_TOP|wxTB_NODIVIDER|wxTB_TEXT); m_toolbar->AddTool(ID_BrushUndo, "Undo", wxGetBitmapFromMemory(undo), "Rollback previous brush operation"); m_toolbar->AddTool(ID_BrushRedo, "Redo", wxGetBitmapFromMemory(redo), "Redo the rollback brush operation"); m_toolbar->AddSeparator(); m_toolbar->AddCheckTool(ID_BrushAppend, "Select", wxGetBitmapFromMemory(listicon_brushappend), wxNullBitmap, "Highlight structures by painting on the render view (hold Shift)"); m_toolbar->AddCheckTool(ID_BrushDiffuse, "Diffuse", wxGetBitmapFromMemory(listicon_brushdiffuse), wxNullBitmap, "Diffuse highlighted structures by painting (hold Z)"); m_toolbar->AddCheckTool(ID_BrushSolid, "Solid", wxGetBitmapFromMemory(listicon_brushsolid), wxNullBitmap, "Highlight structures with solid mask"); m_toolbar->AddCheckTool(ID_BrushDesel, "Unselect", wxGetBitmapFromMemory(listicon_brushdesel), wxNullBitmap, "Reset highlighted structures by painting (hold X)"); m_toolbar->AddTool(ID_BrushClear, "Reset All", wxGetBitmapFromMemory(listicon_brushclear), "Reset all highlighted structures"); m_toolbar->AddSeparator(); m_toolbar->AddTool(ID_BrushErase, "Erase", wxGetBitmapFromMemory(listicon_brusherase), "Erase highlighted structures"); m_toolbar->AddTool(ID_BrushCreate, "Extract", wxGetBitmapFromMemory(listicon_brushcreate), "Extract highlighted structures out and create a new volume"); //m_toolbar->AddSeparator(); //m_toolbar->AddTool(ID_HelpBtn, "Help", // wxGetBitmapFromMemory(listicon_qmark), // "Help on the settings"); m_toolbar->Realize(); //Selection adjustment wxBoxSizer *sizer11 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, "Selection Settings"), wxVERTICAL); //stop at boundary wxBoxSizer *sizer11_1 = new wxBoxSizer(wxHORIZONTAL); m_estimate_thresh_chk = new wxCheckBox(this, ID_EstimateThreshChk, "Auto Thresh:", wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); m_edge_detect_chk = new wxCheckBox(this, ID_BrushEdgeDetectChk, "Edge Detect:", wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); m_hidden_removal_chk = new wxCheckBox(this, ID_BrushHiddenRemovalChk, "Visible Only:", wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); m_select_group_chk = new wxCheckBox(this, ID_BrushSelectGroupChk, "Apply to Group:", wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); sizer11_1->Add(m_estimate_thresh_chk, 0, wxALIGN_CENTER); sizer11_1->Add(5, 5); sizer11_1->Add(m_edge_detect_chk, 0, wxALIGN_CENTER); sizer11_1->Add(5, 5); sizer11_1->Add(m_hidden_removal_chk, 0, wxALIGN_CENTER); sizer11_1->Add(5, 5); sizer11_1->Add(m_select_group_chk, 0, wxALIGN_CENTER); //threshold4 wxBoxSizer *sizer11_2 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "Threshold:", wxDefaultPosition, wxSize(70, 20)); m_brush_scl_translate_sldr = new wxSlider(this, ID_BrushSclTranslateSldr, 0, 0, 2550, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); m_brush_scl_translate_text = new wxTextCtrl(this, ID_BrushSclTranslateText, "0.0", wxDefaultPosition, wxSize(50, 20), 0, vald_fp1); sizer11_2->Add(5, 5); sizer11_2->Add(st, 0, wxALIGN_CENTER); sizer11_2->Add(m_brush_scl_translate_sldr, 1, wxEXPAND); sizer11_2->Add(m_brush_scl_translate_text, 0, wxALIGN_CENTER); sizer11_2->Add(15, 15); //2d wxBoxSizer *sizer11_3 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "2D Adj. Infl.:", wxDefaultPosition, wxSize(70, 20)); m_brush_2dinfl_sldr = new wxSlider(this, ID_Brush2dinflSldr, 100, 0, 200, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_INVERSE); m_brush_2dinfl_text = new wxTextCtrl(this, ID_Brush2dinflText, "1.00", wxDefaultPosition, wxSize(40, 20), 0, vald_fp2); sizer11_3->Add(5, 5); sizer11_3->Add(st, 0, wxALIGN_CENTER); sizer11_3->Add(m_brush_2dinfl_sldr, 1, wxEXPAND); sizer11_3->Add(m_brush_2dinfl_text, 0, wxALIGN_CENTER); sizer11_3->Add(15, 15); //sizer21 sizer11->Add(sizer11_1, 0, wxEXPAND); sizer11->Add(5, 5); sizer11->Add(sizer11_2, 0, wxEXPAND); sizer11->Add(sizer11_3, 0, wxEXPAND); sizer11->Hide(sizer11_3, true); //Brush properties wxBoxSizer *sizer12 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, "Brush Properties"), wxVERTICAL); wxBoxSizer *sizer12_1 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "Brush sizes can also be set with mouse wheel in painting mode."); sizer12_1->Add(5, 5); sizer12_1->Add(st, 0, wxALIGN_CENTER); //brush size 1 wxBoxSizer *sizer12_2 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "Center Size:", wxDefaultPosition, wxSize(80, 20)); m_brush_size1_sldr = new wxSlider(this, ID_BrushSize1Sldr, 10, 1, 300, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); m_brush_size1_text = new wxTextCtrl(this, ID_BrushSize1Text, "10", wxDefaultPosition, wxSize(50, 20), 0, vald_int); sizer12_2->Add(5, 5); sizer12_2->Add(st, 0, wxALIGN_CENTER); sizer12_2->Add(m_brush_size1_sldr, 1, wxEXPAND); sizer12_2->Add(m_brush_size1_text, 0, wxALIGN_CENTER); st = new wxStaticText(this, 0, "px", wxDefaultPosition, wxSize(25, 15)); sizer12_2->Add(st, 0, wxALIGN_CENTER); //brush size 2 wxBoxSizer *sizer12_3 = new wxBoxSizer(wxHORIZONTAL); m_brush_size2_chk = new wxCheckBox(this, ID_BrushSize2Chk, "GrowSize", wxDefaultPosition, wxSize(80, 20), wxALIGN_RIGHT); st = new wxStaticText(this, 0, ":", wxDefaultPosition, wxSize(5, 20), wxALIGN_RIGHT); m_brush_size2_sldr = new wxSlider(this, ID_BrushSize2Sldr, 30, 1, 300, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); m_brush_size2_text = new wxTextCtrl(this, ID_BrushSize2Text, "30", wxDefaultPosition, wxSize(50, 20), 0, vald_int); m_brush_size2_chk->SetValue(true); m_brush_size2_sldr->Enable(); m_brush_size2_text->Enable(); sizer12_3->Add(m_brush_size2_chk, 0, wxALIGN_CENTER); sizer12_3->Add(st, 0, wxALIGN_CENTER); sizer12_3->Add(m_brush_size2_sldr, 1, wxEXPAND); sizer12_3->Add(m_brush_size2_text, 0, wxALIGN_CENTER); st = new wxStaticText(this, 0, "px", wxDefaultPosition, wxSize(25, 15)); sizer12_3->Add(st, 0, wxALIGN_CENTER); //iterations wxBoxSizer *sizer12_4 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "Growth:", wxDefaultPosition, wxSize(70, 20)); m_brush_iterw_rb = new wxRadioButton(this, ID_BrushIterWRd, "Weak", wxDefaultPosition, wxDefaultSize, wxRB_GROUP); m_brush_iters_rb = new wxRadioButton(this, ID_BrushIterSRd, "Normal", wxDefaultPosition, wxDefaultSize); m_brush_iterss_rb = new wxRadioButton(this, ID_BrushIterSSRd, "Strong", wxDefaultPosition, wxDefaultSize); m_brush_iterw_rb->SetValue(false); m_brush_iters_rb->SetValue(true); m_brush_iterss_rb->SetValue(false); sizer12_4->Add(5, 5); sizer12_4->Add(st, 0, wxALIGN_CENTER); sizer12_4->Add(m_brush_iterw_rb, 0, wxALIGN_CENTER); sizer12_4->Add(15, 15); sizer12_4->Add(m_brush_iters_rb, 0, wxALIGN_CENTER); sizer12_4->Add(15, 15); sizer12_4->Add(m_brush_iterss_rb, 0, wxALIGN_CENTER); //sizer12 sizer12->Add(sizer12_4, 0, wxEXPAND); sizer12->Add(5, 5); sizer12->Add(sizer12_2, 0, wxEXPAND); sizer12->Add(sizer12_3, 0, wxEXPAND); sizer12->Add(5, 5); sizer12->Add(sizer12_1, 0, wxEXPAND); //group1 group1->Add(m_toolbar, 0, wxEXPAND); group1->Add(5, 5); group1->Add(sizer11, 0, wxEXPAND); group1->Add(sizer12, 0, wxEXPAND); //component analyzer wxBoxSizer *sizer13 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, "Component Analyzer"), wxVERTICAL); //threshold of ccl wxBoxSizer *sizer13_1 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "Threshold:", wxDefaultPosition, wxSize(75, 20)); m_ca_thresh_sldr = new wxSlider(this, ID_CAThreshSldr, 0, 0, 2550, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); m_ca_thresh_text = new wxTextCtrl(this, ID_CAThreshText, "0.0", wxDefaultPosition, wxSize(50, 20), 0, vald_fp1); sizer13_1->Add(st, 0, wxALIGN_CENTER); sizer13_1->Add(m_ca_thresh_sldr, 1, wxEXPAND); sizer13_1->Add(m_ca_thresh_text, 0, wxALIGN_CENTER); m_ca_analyze_btn = new wxButton(this, ID_CAAnalyzeBtn, "Analyze", wxDefaultPosition, wxSize(-1, 23)); sizer13_1->Add(m_ca_analyze_btn, 0, wxALIGN_CENTER); //size of ccl wxBoxSizer *sizer13_2 = new wxBoxSizer(wxHORIZONTAL); m_ca_select_only_chk = new wxCheckBox(this, ID_CASelectOnlyChk, "Selct. Only", wxDefaultPosition, wxSize(90, 20)); sizer13_2->Add(m_ca_select_only_chk, 0, wxALIGN_CENTER); sizer13_2->AddStretchSpacer(); st = new wxStaticText(this, 0, "Min:", wxDefaultPosition, wxSize(40, 15)); sizer13_2->Add(st, 0, wxALIGN_CENTER); m_ca_min_text = new wxTextCtrl(this, ID_CAMinText, "0", wxDefaultPosition, wxSize(40, 20), 0, vald_int); sizer13_2->Add(m_ca_min_text, 0, wxALIGN_CENTER); st = new wxStaticText(this, 0, "vx", wxDefaultPosition, wxSize(15, 15)); sizer13_2->Add(st, 0, wxALIGN_CENTER); sizer13_2->AddStretchSpacer(); st = new wxStaticText(this, 0, "Max:", wxDefaultPosition, wxSize(40, 15)); sizer13_2->Add(st, 0, wxALIGN_CENTER); m_ca_max_text = new wxTextCtrl(this, ID_CAMaxText, "1000", wxDefaultPosition, wxSize(40, 20), 0, vald_int); sizer13_2->Add(m_ca_max_text, 0, wxALIGN_CENTER); st = new wxStaticText(this, 0, "vx", wxDefaultPosition, wxSize(15, 15)); sizer13_2->Add(st, 0, wxALIGN_CENTER); sizer13_2->AddStretchSpacer(); m_ca_ignore_max_chk = new wxCheckBox(this, ID_CAIgnoreMaxChk, "Ignore Max"); sizer13_2->Add(m_ca_ignore_max_chk, 0, wxALIGN_CENTER); //text result wxBoxSizer *sizer13_3 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "Components:"); sizer13_3->Add(st, 0, wxALIGN_CENTER); m_ca_comps_text = new wxTextCtrl(this, ID_CACompsText, "0", wxDefaultPosition, wxSize(70, 20), wxTE_READONLY); sizer13_3->Add(m_ca_comps_text, 0, wxALIGN_CENTER); st = new wxStaticText(this, 0, "Total Volume:"); sizer13_3->Add(st, 0, wxALIGN_CENTER); m_ca_volume_text = new wxTextCtrl(this, ID_CAVolumeText, "0", wxDefaultPosition, wxSize(70, 20), wxTE_READONLY); sizer13_3->Add(m_ca_volume_text, 0, wxALIGN_CENTER); m_ca_size_map_chk = new wxCheckBox(this, ID_CASizeMapChk, "Size-Color", wxDefaultPosition, wxSize(75, 20)); sizer13_3->Add(m_ca_size_map_chk, 0, wxALIGN_CENTER); //export wxBoxSizer *sizer13_4 = new wxBoxSizer(wxHORIZONTAL); sizer13_4->AddStretchSpacer(); st = new wxStaticText(this, 0, "Export: "); sizer13_4->Add(st, 0, wxALIGN_CENTER); m_ca_multi_chann_btn = new wxButton(this, ID_CAMultiChannBtn, "Multi-Channels", wxDefaultPosition, wxSize(-1, 23)); m_ca_random_color_btn = new wxButton(this, ID_CARandomColorBtn, "Random Colors", wxDefaultPosition, wxSize(-1, 23)); m_ca_annotations_btn = new wxButton(this, ID_CAAnnotationsBtn, "Show Annotations", wxDefaultPosition, wxSize(-1, 23)); sizer13_4->Add(m_ca_multi_chann_btn, 0, wxALIGN_CENTER); sizer13_4->Add(m_ca_random_color_btn, 0, wxALIGN_CENTER); sizer13_4->Add(m_ca_annotations_btn, 0, wxALIGN_CENTER); //sizer13 sizer13->Add(sizer13_1, 0, wxEXPAND); sizer13->Add(sizer13_2, 0, wxEXPAND); sizer13->Add(sizer13_3, 0, wxEXPAND); sizer13->Add(sizer13_4, 0, wxEXPAND); //noise removal wxBoxSizer *sizer14 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, "Noise Removal"), wxVERTICAL); //size threshold wxBoxSizer *sizer14_1 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "Size Thresh.:", wxDefaultPosition, wxSize(75, -1)); m_nr_size_sldr = new wxSlider(this, ID_NRSizeSldr, 10, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); m_nr_size_text = new wxTextCtrl(this, ID_NRSizeText, "10", wxDefaultPosition, wxSize(40, -1), 0, vald_int); sizer14_1->Add(st, 0, wxALIGN_CENTER); sizer14_1->Add(m_nr_size_sldr, 1, wxEXPAND); sizer14_1->Add(m_nr_size_text, 0, wxALIGN_CENTER); st = new wxStaticText(this, 0, "vx", wxDefaultPosition, wxSize(25, 15)); sizer14_1->Add(st, 0, wxALIGN_CENTER); //buttons wxBoxSizer *sizer14_2 = new wxBoxSizer(wxHORIZONTAL); m_nr_analyze_btn = new wxButton(this, ID_NRAnalyzeBtn, "Analyze", wxDefaultPosition, wxSize(-1, 23)); m_nr_remove_btn = new wxButton(this, ID_NRRemoveBtn, "Remove", wxDefaultPosition, wxSize(-1, 23)); sizer14_2->AddStretchSpacer(); sizer14_2->Add(m_nr_analyze_btn, 0, wxALIGN_CENTER); sizer14_2->Add(m_nr_remove_btn, 0, wxALIGN_CENTER); //sizer14 sizer14->Add(sizer14_1, 0, wxEXPAND); sizer14->Add(sizer14_2, 0, wxEXPAND); //group 2 //calculations wxBoxSizer* group2 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, "Analysis"), wxVERTICAL); //operand A wxBoxSizer *sizer21 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "Volume A:", wxDefaultPosition, wxSize(75, 20)); m_calc_load_a_btn = new wxButton(this, ID_CalcLoadABtn, "Load", wxDefaultPosition, wxSize(50, 20)); m_calc_a_text = new wxTextCtrl(this, ID_CalcAText, "", wxDefaultPosition, wxSize(200, 20)); sizer21->Add(st, 0, wxALIGN_CENTER); sizer21->Add(m_calc_load_a_btn, 0, wxALIGN_CENTER); sizer21->Add(m_calc_a_text, 1, wxEXPAND); //operand B wxBoxSizer *sizer22 = new wxBoxSizer(wxHORIZONTAL); st = new wxStaticText(this, 0, "Volume B:", wxDefaultPosition, wxSize(75, 20)); m_calc_load_b_btn = new wxButton(this, ID_CalcLoadBBtn, "Load", wxDefaultPosition, wxSize(50, 20)); m_calc_b_text = new wxTextCtrl(this, ID_CalcBText, "", wxDefaultPosition, wxSize(200, 20)); sizer22->Add(st, 0, wxALIGN_CENTER); sizer22->Add(m_calc_load_b_btn, 0, wxALIGN_CENTER); sizer22->Add(m_calc_b_text, 1, wxEXPAND); //single operators wxBoxSizer *sizer23 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, "Single-valued Operators (Require A)"), wxVERTICAL); //sizer23 m_calc_fill_btn = new wxButton(this, ID_CalcFillBtn, "Consolidate Voxels", wxDefaultPosition, wxDefaultSize); sizer23->Add(m_calc_fill_btn, 0, wxEXPAND); //two operators wxBoxSizer *sizer24 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, "Two-valued Operators (Require both A and B)"), wxHORIZONTAL); m_calc_sub_btn = new wxButton(this, ID_CalcSubBtn, "Subtract", wxDefaultPosition, wxSize(50, 25)); m_calc_add_btn = new wxButton(this, ID_CalcAddBtn, "Add", wxDefaultPosition, wxSize(50, 25)); m_calc_div_btn = new wxButton(this, ID_CalcDivBtn, "Divide", wxDefaultPosition, wxSize(50, 25)); m_calc_isc_btn = new wxButton(this, ID_CalcIscBtn, "Colocalize", wxDefaultPosition, wxSize(50, 25)); sizer24->Add(m_calc_sub_btn, 1, wxEXPAND); sizer24->Add(m_calc_add_btn, 1, wxEXPAND); sizer24->Add(m_calc_div_btn, 1, wxEXPAND); sizer24->Add(m_calc_isc_btn, 1, wxEXPAND); //group group2->Add(5, 5); group2->Add(sizer13, 0, wxEXPAND); group2->Add(5, 5); group2->Add(sizer14, 0, wxEXPAND); group2->Add(5, 5); group2->Add(sizer21, 0, wxEXPAND); group2->Add(5, 5); group2->Add(sizer22, 0, wxEXPAND); group2->Add(5, 5); group2->Add(sizer23, 0, wxEXPAND); group2->Add(5, 5); group2->Add(sizer24, 0, wxEXPAND); //all controls wxBoxSizer *sizerV = new wxBoxSizer(wxVERTICAL); sizerV->Add(10, 10); sizerV->Add(group1, 0, wxEXPAND); sizerV->Add(10, 5); sizerV->Add(group2, 0, wxEXPAND); SetSizerAndFit(sizerV); Layout(); LoadDefault(); }