00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013 #if defined(__GNUG__) && !defined(__APPLE__)
00014 #pragma implementation "mainframe.h"
00015 #endif
00016
00017
00018 #include "wx/wxprec.h"
00019
00020 #ifdef __BORLANDC__
00021 #pragma hdrstop
00022 #endif
00023
00024 #ifndef WX_PRECOMP
00025 #include "wx/wx.h"
00026 #endif
00027 #include <wx/cmndata.h>
00028 #include <wx/colordlg.h>
00029 #include <wx/log.h>
00030 #include <wx/dir.h>
00031 #include <wx/dirdlg.h>
00032 #include <wx/generic/dirdlgg.h>
00033 #include <wx/datetime.h>
00034 #include <wx/list.h>
00035 #include <wx/filename.h>
00036
00039
00040 #include "generic_board.h"
00041 #include "common_ch_control.h"
00042 #include "virtual_common_ch_control.h"
00043 #include "trigger_ch_control.h"
00044 #include "view_ch_control.h"
00045 #include "record_ch_control.h"
00046 #include "drawing_panel.h"
00047 #include "infodialog.h"
00048 #include "cursor_ch_control.h"
00049 #include "mainframe.h"
00050 #include "wxBackgroundBitmap.h"
00051
00052
00055
00056 static const double SEC_PER_DIV_TABLE[]=
00057 {
00058 0.000000100,
00059 0.000000500,
00060 0.000001000,
00061 0.000005000,
00062 0.000010000,
00063 0.000050000,
00064 0.000100000,
00065 0.000500000,
00066 0.001000000,
00067 0.005000000,
00068 };
00069
00070 DrawingPanel* MainFrame::g_scope_panel_array[];
00071 wxStatusBar* MainFrame::g_main_statusbar= NULL;
00072
00077 IMPLEMENT_CLASS( MainFrame, wxFrame )
00078
00079
00083 BEGIN_EVENT_TABLE( MainFrame, wxFrame )
00084
00086 EVT_CLOSE( MainFrame::OnCloseWindow )
00087 EVT_SIZE( MainFrame::OnSize )
00088
00089 EVT_SASH_DRAGGED( ID_SASHLAYOUTWINDOW2, MainFrame::OnBottomWindowSashDragged )
00090
00091 EVT_TOGGLEBUTTON( ID_COMMON_RUN_TOGGLEBUTTON, MainFrame::OnCommonRunTogglebuttonClick )
00092
00093 EVT_TOGGLEBUTTON( ID_FRONT_PANEL_NIM_TOGGLEBUTTON, MainFrame::OnFrontPanelNimTogglebuttonClick )
00094
00095 EVT_CHOICE( ID_SIZE_X_CHOICE, MainFrame::OnSizeXChoiceSelected )
00096
00097 EVT_CHECKBOX( ID_EXT_CLOCK_CHECKBOX, MainFrame::OnExtClockCheckboxClick )
00098
00099 EVT_SPINCTRL( ID_EXT_CLOCK_SPINCTRL, MainFrame::OnExtClockSpinctrlUpdated )
00100
00101 EVT_TOGGLEBUTTON( ID_TRIGGER_EXT_TOGGLEBUTTON, MainFrame::OnTriggerExtTogglebuttonClick )
00102
00103 EVT_TOGGLEBUTTON( ID_TRIGGER_AUTO_TOGGLEBUTTON, MainFrame::OnTriggerAutoTogglebuttonClick )
00104
00105 EVT_BUTTON( ID_TRIGGER_FORCE_BUTTON, MainFrame::OnTriggerForceButtonClick )
00106
00107 EVT_SPINCTRL( ID_TRIGGER_POST_SPINCTRL, MainFrame::OnTriggerPostSpinctrlUpdated )
00108
00109 EVT_CHECKBOX( ID_TRIGGER_POSITION_KEEP_CHECKBOX, MainFrame::OnTriggerPositionKeepCheckboxClick )
00110
00111 EVT_CHOICE( ID_TRIGGER_EDGE_CHOICE, MainFrame::OnTriggerEdgeChoiceSelected )
00112
00113 EVT_TOGGLEBUTTON( ID_RECORDTOGGLEBUTTON, MainFrame::OnRecordtogglebuttonClick )
00114
00115 EVT_TEXT( ID_RECORDDIRTEXTCTRL, MainFrame::OnRecorddirtextctrlUpdated )
00116
00117 EVT_BUTTON( ID_RECORDDIRBUTTON, MainFrame::OnRecorddirbuttonClick )
00118
00119 EVT_SASH_DRAGGED( ID_SASHLAYOUTWINDOW, MainFrame::OnLeftWindowSashDragged )
00120
00121 EVT_BUTTON( ID_BACK_CHOOSE_COLOR_1_BUTTON, MainFrame::OnBackChooseColor1ButtonClick )
00122
00123 EVT_CHOICE( ID_SEC_PER_DIV_1_CHOICE, MainFrame::OnSecPerDiv1ChoiceSelected )
00124
00125 EVT_SPINCTRL( ID_OFFSET_SEC_1_SPINCTRL, MainFrame::OnOffsetSec1SpinctrlUpdated )
00126
00127 EVT_BUTTON( ID_GRID_CHOOSE_COLOR_1_BUTTON, MainFrame::OnGridChooseColor1ButtonClick )
00128
00129 EVT_SPINCTRL( ID_GRID_LINE_WIDTH_1_SPINCTRL, MainFrame::OnGridLineWidth1SpinctrlUpdated )
00130
00131 EVT_CHOICE( ID_GRID_LINE_TYPE_1_CHOICE, MainFrame::OnGridLineType1ChoiceSelected )
00132
00133 EVT_BUTTON( ID_BACK_CHOOSE_COLOR_2_BUTTON, MainFrame::OnBackChooseColor2ButtonClick )
00134
00135 EVT_CHOICE( ID_SEC_PER_DIV_2_CHOICE, MainFrame::OnSecPerDiv2ChoiceSelected )
00136
00137 EVT_SPINCTRL( ID_OFFSET_SEC_2_SPINCTRL, MainFrame::OnOffsetSec2SpinctrlUpdated )
00138
00139 EVT_BUTTON( ID_GRID_CHOOSE_COLOR_2_BUTTON, MainFrame::OnGridChooseColor2ButtonClick )
00140
00141 EVT_SPINCTRL( ID_GRID_LINE_WIDTH_2_SPINCTRL, MainFrame::OnGridLineWidth2SpinctrlUpdated )
00142
00143 EVT_CHOICE( ID_GRID_LINE_TYPE_2_CHOICE, MainFrame::OnGridLineType2ChoiceSelected )
00144
00145 EVT_BUTTON( ID_BACK_CHOOSE_COLOR_3_BUTTON, MainFrame::OnBackChooseColor3ButtonClick )
00146
00147 EVT_CHOICE( ID_SEC_PER_DIV_3_CHOICE, MainFrame::OnSecPerDiv3ChoiceSelected )
00148
00149 EVT_SPINCTRL( ID_OFFSET_SEC_3_SPINCTRL, MainFrame::OnOffsetSec3SpinctrlUpdated )
00150
00151 EVT_BUTTON( ID_GRID_CHOOSE_COLOR_3_BUTTON, MainFrame::OnGridChooseColor3ButtonClick )
00152
00153 EVT_SPINCTRL( ID_GRID_LINE_WIDTH_3_SPINCTRL, MainFrame::OnGridLineWidth3SpinctrlUpdated )
00154
00155 EVT_CHOICE( ID_GRID_LINE_TYPE_3_CHOICE, MainFrame::OnGridLineType3ChoiceSelected )
00156
00157 EVT_BUTTON( ID_BACK_CHOOSE_COLOR_4_BUTTON, MainFrame::OnBackChooseColor4ButtonClick )
00158
00159 EVT_CHOICE( ID_SEC_PER_DIV_4_CHOICE, MainFrame::OnSecPerDiv4ChoiceSelected )
00160
00161 EVT_SPINCTRL( ID_OFFSET_SEC_4_SPINCTRL, MainFrame::OnOffsetSec4SpinctrlUpdated )
00162
00163 EVT_BUTTON( ID_GRID_CHOOSE_COLOR_4_BUTTON, MainFrame::OnGridChooseColor4ButtonClick )
00164
00165 EVT_SPINCTRL( ID_GRID_LINE_WIDTH_4_SPINCTRL, MainFrame::OnGridLineWidth4SpinctrlUpdated )
00166
00167 EVT_CHOICE( ID_GRID_LINE_TYPE_4_CHOICE, MainFrame::OnGridLineType4ChoiceSelected )
00168
00169 EVT_SPLITTER_SASH_POS_CHANGED( ID_SCOPE_HORIZ_SPLITTERWINDOW, MainFrame::OnScopeHorizSplitterwindowSashPosChanged )
00170
00171 EVT_MENU( ID_EXIT_TOOL, MainFrame::OnExitToolClick )
00172
00173 EVT_MENU( ID_VIEW_LEFT_TOOL, MainFrame::OnViewLeftToolClick )
00174
00175 EVT_MENU( ID_VIEW_BOTTOM_TOOL, MainFrame::OnViewBottomToolClick )
00176
00177 EVT_MENU( ID_VIEW_SCOPE_LEFT_TOP_TOOL, MainFrame::OnViewScopeLeftTopToolClick )
00178
00179 EVT_MENU( ID_VIEW_SCOPE_RIGHT_TOP_TOOL, MainFrame::OnViewScopeRightTopToolClick )
00180
00181 EVT_MENU( ID_VIEW_SCOPE_LEFT_BOTTOM_TOOL, MainFrame::OnViewScopeLeftBottomToolClick )
00182
00183 EVT_MENU( ID_VIEW_SCOPE_RIGHT_BOTTOM_TOOL, MainFrame::OnViewScopeRightBottomToolClick )
00184
00185 EVT_MENU( ID_HELP_TOOL, MainFrame::OnHelpToolClick )
00186
00188 EVT_TEXT_ENTER( ID_OFFSET_SEC_1_SPINCTRL, MainFrame::OnOffsetSec1SpinctrlTextUpdated )
00189 EVT_TEXT_ENTER( ID_GRID_LINE_WIDTH_1_SPINCTRL, MainFrame::OnGridLineWidth1SpinctrlTextUpdated )
00190 EVT_TEXT_ENTER( ID_OFFSET_SEC_2_SPINCTRL, MainFrame::OnOffsetSec2SpinctrlTextUpdated )
00191 EVT_TEXT_ENTER( ID_GRID_LINE_WIDTH_2_SPINCTRL, MainFrame::OnGridLineWidth2SpinctrlTextUpdated )
00192 EVT_TEXT_ENTER( ID_OFFSET_SEC_3_SPINCTRL, MainFrame::OnOffsetSec3SpinctrlTextUpdated )
00193 EVT_TEXT_ENTER( ID_GRID_LINE_WIDTH_3_SPINCTRL, MainFrame::OnGridLineWidth3SpinctrlTextUpdated )
00194 EVT_TEXT_ENTER( ID_OFFSET_SEC_4_SPINCTRL, MainFrame::OnOffsetSec4SpinctrlTextUpdated )
00195 EVT_TEXT_ENTER( ID_GRID_LINE_WIDTH_4_SPINCTRL, MainFrame::OnGridLineWidth4SpinctrlTextUpdated )
00196 EVT_TEXT_ENTER( ID_EXT_CLOCK_SPINCTRL, MainFrame::OnExtClockSpinctrlTextUpdated )
00197 EVT_TEXT_ENTER( ID_TRIGGER_POST_SPINCTRL, MainFrame::OnTriggerPostSpinctrlTextUpdated )
00198 EVT_TEXT_ENTER( ID_RECORDDIRTEXTCTRL, MainFrame::OnRecorddirtextctrlEnter )
00199 EVT_SPLITTER_SASH_POS_CHANGED( ID_SCOPE_VERT_TOP_SPLITTERWINDOW, MainFrame::OnScopeVertTopSplitterwindowSashPosChanged )
00200 EVT_SPLITTER_SASH_POS_CHANGED( ID_SCOPE_VERT_BOTTOM_SPLITTERWINDOW, MainFrame::OnScopeVertBottomSplitterwindowSashPosChanged )
00201
00202 END_EVENT_TABLE()
00203
00204
00209 MainFrame::MainFrame( )
00210 {
00211 }
00212
00213 MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
00214 {
00215 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
00216 {
00217 this->m_scope_panel_array[ i] = NULL;
00218 }
00219 Create( parent, id, caption, pos, size, style );
00220 }
00221
00226 bool MainFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
00227 {
00229 m_bottom_pane = NULL;
00230 m_common_settings_notebook = NULL;
00231 m_common_panel = NULL;
00232 m_common_main_sizer = NULL;
00233 m_common_run_control = NULL;
00234 m_common_TTL_control = NULL;
00235 m_size_X_control = NULL;
00236 m_use_ext_clock_control = NULL;
00237 m_ext_clock_control = NULL;
00238 m_trigger_panel = NULL;
00239 m_trigger_main_sizer = NULL;
00240 m_trigger_ext_control = NULL;
00241 m_trigger_auto_control = NULL;
00242 m_force_trigger_control = NULL;
00243 m_trigger_post_control = NULL;
00244 m_trigger_position_keep_control = NULL;
00245 m_trigger_edge_control = NULL;
00246 m_record_panel = NULL;
00247 m_record_main_sizer = NULL;
00248 m_record_start_stop_control = NULL;
00249 m_record_folder_sizer = NULL;
00250 m_record_dir_control = NULL;
00251 m_record_dir_browse_button = NULL;
00252 m_left_pane = NULL;
00253 m_specific_settings_notebook = NULL;
00254 m_specific_settings_scope_1_notebook = NULL;
00255 m_view_scope_1_panel = NULL;
00256 m_view_1_main_sizer = NULL;
00257 m_back_color_1_control = NULL;
00258 m_main_sizer_1_text = NULL;
00259 m_sec_per_div_1_control = NULL;
00260 m_offset_sec_1_control = NULL;
00261 m_grid_color_1_control = NULL;
00262 m_grid_line_width_1_control = NULL;
00263 m_grid_line_type_1_control = NULL;
00264 m_cursor_1_panel = NULL;
00265 m_cursor_1_main_sizer = NULL;
00266 m_specific_settings_scope_2_notebook = NULL;
00267 m_view_scope_2_panel = NULL;
00268 m_view_2_main_sizer = NULL;
00269 m_back_color_2_control = NULL;
00270 m_main_sizer_2_text = NULL;
00271 m_sec_per_div_2_control = NULL;
00272 m_offset_sec_2_control = NULL;
00273 m_grid_color_2_control = NULL;
00274 m_grid_line_width_2_control = NULL;
00275 m_grid_line_type_2_control = NULL;
00276 m_cursor_2_panel = NULL;
00277 m_cursor_2_main_sizer = NULL;
00278 m_specific_settings_scope_3_notebook = NULL;
00279 m_view_scope_3_panel = NULL;
00280 m_view_3_main_sizer = NULL;
00281 m_back_color_3_control = NULL;
00282 m_main_sizer_3_text = NULL;
00283 m_sec_per_div_3_control = NULL;
00284 m_offset_sec_3_control = NULL;
00285 m_grid_color_3_control = NULL;
00286 m_grid_line_width_3_control = NULL;
00287 m_grid_line_type_3_control = NULL;
00288 m_cursor_3_panel = NULL;
00289 m_cursor_3_main_sizer = NULL;
00290 m_specific_settings_scope_4_notebook = NULL;
00291 m_view_scope_4_panel = NULL;
00292 m_view_4_main_sizer = NULL;
00293 m_back_color_4_control = NULL;
00294 m_main_sizer_4_text = NULL;
00295 m_sec_per_div_4_control = NULL;
00296 m_offset_sec_4_control = NULL;
00297 m_grid_color_4_control = NULL;
00298 m_grid_line_width_4_control = NULL;
00299 m_grid_line_type_4_control = NULL;
00300 m_cursor_4_panel = NULL;
00301 m_cursor_4_main_sizer = NULL;
00302 m_top_pane = NULL;
00303 m_scope_notebook = NULL;
00304 m_scope_horiz_splitter = NULL;
00305 m_main_toolbar = NULL;
00306 m_main_statusbar = NULL;
00308
00309 wxFileName fn( MainFrame::GetExecutablePath());
00310 wxFileName::SetCwd( fn.GetPath());
00311
00313 wxFrame::Create( parent, id, caption, pos, size, style );
00314
00315 this->SetFont(wxFont(9, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Verdana")));
00316 CreateControls();
00317 SetIcon(GetIconResource(wxT("scope2.png")));
00318 Centre();
00320
00321
00322
00323
00324 this->m_app_settings= new AppSettings( MainFrame::ScopeRefresh);
00325
00326
00327
00328
00329 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
00330 {
00331 this->m_scope_panel_array[ i]->m_app_settings= this->m_app_settings;
00332 }
00333
00334 if( !this->m_app_settings->Load( ))
00335 {
00336 wxLogError( _("Error loading application settings ..."));
00337 return false;
00338 }
00339
00340
00341
00342 if( !this->CreateDynControls())
00343 return false;
00344
00345 if( !this->UpdateControls())
00346 return false;
00347
00348 Centre();
00349
00350 if( this->m_app_settings->m_started)
00351 {
00352 this->m_common_run_control->SetValue( true);
00353 this->DoStartStopRunning( );
00354 }
00355
00356 if( this->m_app_settings->m_show_bottom_pane)
00357 {
00358 this->m_main_toolbar->ToggleTool( ID_VIEW_BOTTOM_TOOL, true);
00359 }
00360 else
00361 {
00362 this->DoShowHideBottomPane();
00363 }
00364 if( this->m_app_settings->m_show_left_pane)
00365 {
00366 this->m_main_toolbar->ToggleTool( ID_VIEW_LEFT_TOOL, true);
00367 }
00368 else
00369 {
00370 this->DoShowHideLeftPane();
00371 }
00372
00373 if( this->m_app_settings->m_show_scope_left_top_pane)
00374 {
00375 this->m_main_toolbar->ToggleTool( ID_VIEW_SCOPE_LEFT_TOP_TOOL, true);
00376 }
00377 else
00378 {
00379 this->DoShowHideScopeLeftTopPane( false);
00380 }
00381 if( this->m_app_settings->m_show_scope_right_top_pane)
00382 {
00383 this->m_main_toolbar->ToggleTool( ID_VIEW_SCOPE_RIGHT_TOP_TOOL, true);
00384 }
00385 else
00386 {
00387 this->DoShowHideScopeRightTopPane( false);
00388 }
00389 if( this->m_app_settings->m_show_scope_left_bottom_pane)
00390 {
00391 this->m_main_toolbar->ToggleTool( ID_VIEW_SCOPE_LEFT_BOTTOM_TOOL, true);
00392 }
00393 else
00394 {
00395 this->DoShowHideScopeLeftBottomPane( false);
00396 }
00397 if( this->m_app_settings->m_show_scope_right_bottom_pane)
00398 {
00399 this->m_main_toolbar->ToggleTool( ID_VIEW_SCOPE_RIGHT_BOTTOM_TOOL, true);
00400 }
00401 else
00402 {
00403 this->DoShowHideScopeRightBottomPane( false);
00404 }
00405
00406 return true;
00407 }
00408
00409 wxString MainFrame::GetExecutablePath()
00410 {
00411 static bool found = false;
00412 static wxString path;
00413
00414 if (found)
00415 return path;
00416 else
00417 {
00418 #ifdef __WXMSW__
00419
00420 char buf[512];
00421 *buf = '\0';
00422 GetModuleFileName(NULL, buf, 511);
00423 path = buf;
00424
00425 #elif defined(__WXMAC__)
00426
00427 ProcessInfoRec processinfo;
00428 ProcessSerialNumber procno ;
00429 FSSpec fsSpec;
00430
00431 procno.highLongOfPSN = NULL ;
00432 procno.lowLongOfPSN = kCurrentProcess ;
00433 processinfo.processInfoLength = sizeof(ProcessInfoRec);
00434 processinfo.processName = NULL;
00435 processinfo.processAppSpec = &fsSpec;
00436
00437 GetProcessInformation( &procno , &processinfo ) ;
00438 path = wxMacFSSpec2MacFilename(&fsSpec);
00439 #else
00440 wxString argv0 = wxTheApp->argv[0];
00441
00442 if (wxIsAbsolutePath(argv0))
00443 path = argv0;
00444 else
00445 {
00446 wxPathList pathlist;
00447 pathlist.AddEnvList(wxT("PATH"));
00448 path = pathlist.FindAbsoluteValidPath(argv0);
00449 }
00450
00451 wxFileName filename(path);
00452 filename.Normalize();
00453 path = filename.GetFullPath();
00454 #endif
00455 found = true;
00456 return path;
00457 }
00458 }
00459 bool MainFrame::CreateDynControls()
00460 {
00461 wxBoxSizer* common_panel_HBoxSizer= new wxBoxSizer( wxHORIZONTAL);
00462 this->m_common_main_sizer->Add( common_panel_HBoxSizer, 1, wxGROW|wxALL, 5);
00463
00464 wxBoxSizer* trigger_panel_HBoxSizer= new wxBoxSizer( wxHORIZONTAL);
00465 this->m_trigger_main_sizer->Add( trigger_panel_HBoxSizer, 1, wxGROW|wxALL, 5);
00466
00467 wxBoxSizer* record_panel_HBoxSizer= new wxBoxSizer( wxHORIZONTAL);
00468 this->m_record_main_sizer->Add( record_panel_HBoxSizer, 1, wxGROW|wxALL, 5);
00469
00470 wxBoxSizer* view_1_panel_VBoxSizer= new wxBoxSizer( wxVERTICAL);
00471 this->m_view_1_main_sizer->Add( view_1_panel_VBoxSizer, 1, wxGROW|wxALL, 5);
00472
00473 wxBoxSizer* view_2_panel_VBoxSizer= new wxBoxSizer( wxVERTICAL);
00474 this->m_view_2_main_sizer->Add( view_2_panel_VBoxSizer, 1, wxGROW|wxALL, 5);
00475
00476 wxBoxSizer* view_3_panel_VBoxSizer= new wxBoxSizer( wxVERTICAL);
00477 this->m_view_3_main_sizer->Add( view_3_panel_VBoxSizer, 1, wxGROW|wxALL, 5);
00478
00479 wxBoxSizer* view_4_panel_VBoxSizer= new wxBoxSizer( wxVERTICAL);
00480 this->m_view_4_main_sizer->Add( view_4_panel_VBoxSizer, 1, wxGROW|wxALL, 5);
00481
00482 wxBoxSizer* cursor_1_panel_VBoxSizer= new wxBoxSizer( wxVERTICAL);
00483 this->m_cursor_1_main_sizer->Add( cursor_1_panel_VBoxSizer, 1, wxGROW|wxALL, 5);
00484
00485 wxBoxSizer* cursor_2_panel_VBoxSizer= new wxBoxSizer( wxVERTICAL);
00486 this->m_cursor_2_main_sizer->Add( cursor_2_panel_VBoxSizer, 1, wxGROW|wxALL, 5);
00487
00488 wxBoxSizer* cursor_3_panel_VBoxSizer= new wxBoxSizer( wxVERTICAL);
00489 this->m_cursor_3_main_sizer->Add( cursor_3_panel_VBoxSizer, 1, wxGROW|wxALL, 5);
00490
00491 wxBoxSizer* cursor_4_panel_VBoxSizer= new wxBoxSizer( wxVERTICAL);
00492 this->m_cursor_4_main_sizer->Add( cursor_4_panel_VBoxSizer, 1, wxGROW|wxALL, 5);
00493
00494
00495 int ch_count= 0;
00496 int virt_ch_count= 0;
00497 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
00498 {
00499 for( size_t j= 0; j< ((GenericBoard*)this->m_app_settings->m_board_array[i])->m_channel_array.GetCount(); j++, ch_count++)
00500 {
00501
00502
00503 CommonChControl *common_ch_ctrl= new CommonChControl( this->m_common_panel);
00504 common_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count);
00505
00506 common_panel_HBoxSizer->Add( common_ch_ctrl, 0, wxGROW|wxALL, 1);
00507
00508
00509 TriggerChControl *trigger_ch_ctrl= new TriggerChControl( this->m_trigger_panel);
00510 trigger_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count);
00511
00512 trigger_panel_HBoxSizer->Add( trigger_ch_ctrl, 0, wxGROW|wxALL, 1);
00513
00514
00515 RecordChControl *record_ch_ctrl= new RecordChControl( this->m_record_panel);
00516 record_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count, false);
00517
00518 record_panel_HBoxSizer->Add( record_ch_ctrl, 0, wxGROW|wxALL, 1);
00519
00520
00521
00522 ViewChControl *view_1_ch_ctrl= new ViewChControl( this->m_view_scope_1_panel);
00523 view_1_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count, 0, false);
00524 view_1_panel_VBoxSizer->Add( view_1_ch_ctrl, 0, wxGROW|wxALL, 1);
00525
00526 ViewChControl *view_2_ch_ctrl= new ViewChControl( this->m_view_scope_2_panel);
00527 view_2_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count, 1, false);
00528 view_2_panel_VBoxSizer->Add( view_2_ch_ctrl, 0, wxGROW|wxALL, 1);
00529
00530 ViewChControl *view_3_ch_ctrl= new ViewChControl( this->m_view_scope_3_panel);
00531 view_3_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count, 2, false);
00532 view_3_panel_VBoxSizer->Add( view_3_ch_ctrl, 0, wxGROW|wxALL, 1);
00533
00534 ViewChControl *view_4_ch_ctrl= new ViewChControl( this->m_view_scope_4_panel);
00535 view_4_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count, 3, false);
00536 view_4_panel_VBoxSizer->Add( view_4_ch_ctrl, 0, wxGROW|wxALL, 1);
00537
00538
00539
00540 CursorChControl *cursor_1_ch_ctrl= new CursorChControl( this->m_cursor_1_panel);
00541 cursor_1_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count, 0, false);
00542 cursor_1_panel_VBoxSizer->Add( cursor_1_ch_ctrl, 0, wxGROW|wxALL, 1);
00543
00544 CursorChControl *cursor_2_ch_ctrl= new CursorChControl( this->m_cursor_2_panel);
00545 cursor_2_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count, 1, false);
00546 cursor_2_panel_VBoxSizer->Add( cursor_2_ch_ctrl, 0, wxGROW|wxALL, 1);
00547
00548 CursorChControl *cursor_3_ch_ctrl= new CursorChControl( this->m_cursor_3_panel);
00549 cursor_3_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count, 2, false);
00550 cursor_3_panel_VBoxSizer->Add( cursor_3_ch_ctrl, 0, wxGROW|wxALL, 1);
00551
00552 CursorChControl *cursor_4_ch_ctrl= new CursorChControl( this->m_cursor_4_panel);
00553 cursor_4_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, ch_count, 3, false);
00554 cursor_4_panel_VBoxSizer->Add( cursor_4_ch_ctrl, 0, wxGROW|wxALL, 1);
00555 }
00556
00557 for( size_t j= 0; j< ((GenericBoard*)this->m_app_settings->m_board_array[i])->m_virtual_channel_array.GetCount(); j++, virt_ch_count++)
00558 {
00559
00560
00561 VirtualCommonChControl *common_ch_ctrl= new VirtualCommonChControl( this->m_common_panel);
00562 common_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count);
00563
00564 common_panel_HBoxSizer->Add( common_ch_ctrl, 0, wxGROW|wxALL, 1);
00565
00566
00567
00568 RecordChControl *record_ch_ctrl= new RecordChControl( this->m_record_panel);
00569 record_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count, true);
00570
00571 record_panel_HBoxSizer->Add( record_ch_ctrl, 0, wxGROW|wxALL, 1);
00572
00573
00574
00575 ViewChControl *view_1_ch_ctrl= new ViewChControl( this->m_view_scope_1_panel);
00576 view_1_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count, 0, true);
00577 view_1_panel_VBoxSizer->Add( view_1_ch_ctrl, 0, wxGROW|wxALL, 1);
00578
00579 ViewChControl *view_2_ch_ctrl= new ViewChControl( this->m_view_scope_2_panel);
00580 view_2_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count, 1, true);
00581 view_2_panel_VBoxSizer->Add( view_2_ch_ctrl, 0, wxGROW|wxALL, 1);
00582
00583 ViewChControl *view_3_ch_ctrl= new ViewChControl( this->m_view_scope_3_panel);
00584 view_3_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count, 2, true);
00585 view_3_panel_VBoxSizer->Add( view_3_ch_ctrl, 0, wxGROW|wxALL, 1);
00586
00587 ViewChControl *view_4_ch_ctrl= new ViewChControl( this->m_view_scope_4_panel);
00588 view_4_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count, 3, true);
00589 view_4_panel_VBoxSizer->Add( view_4_ch_ctrl, 0, wxGROW|wxALL, 1);
00590
00591
00592
00593 CursorChControl *cursor_1_ch_ctrl= new CursorChControl( this->m_cursor_1_panel);
00594 cursor_1_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count, 0, true);
00595 cursor_1_panel_VBoxSizer->Add( cursor_1_ch_ctrl, 0, wxGROW|wxALL, 1);
00596
00597 CursorChControl *cursor_2_ch_ctrl= new CursorChControl( this->m_cursor_2_panel);
00598 cursor_2_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count, 1, true);
00599 cursor_2_panel_VBoxSizer->Add( cursor_2_ch_ctrl, 0, wxGROW|wxALL, 1);
00600
00601 CursorChControl *cursor_3_ch_ctrl= new CursorChControl( this->m_cursor_3_panel);
00602 cursor_3_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count, 2, true);
00603 cursor_3_panel_VBoxSizer->Add( cursor_3_ch_ctrl, 0, wxGROW|wxALL, 1);
00604
00605 CursorChControl *cursor_4_ch_ctrl= new CursorChControl( this->m_cursor_4_panel);
00606 cursor_4_ch_ctrl->SetupBoard( (GenericBoard*)this->m_app_settings->m_board_array[i], j, virt_ch_count, 3, true);
00607 cursor_4_panel_VBoxSizer->Add( cursor_4_ch_ctrl, 0, wxGROW|wxALL, 1);
00608 }
00609 }
00610 return true;
00611 }
00612
00617 void MainFrame::CreateControls()
00618 {
00620
00621
00622 MainFrame* itemFrame1 = this;
00623
00624 wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
00625 itemFrame1->SetSizer(itemBoxSizer2);
00626
00627 m_bottom_pane = new wxSashLayoutWindow( itemFrame1, ID_SASHLAYOUTWINDOW2, wxDefaultPosition, itemFrame1->ConvertDialogToPixels(wxSize(66, 110)), wxSW_3DBORDER|wxSW_3DSASH|wxNO_BORDER );
00628 m_bottom_pane->SetSashVisible(wxSASH_TOP, true);
00629 m_bottom_pane->SetOrientation(wxLAYOUT_HORIZONTAL);
00630 m_bottom_pane->SetAlignment(wxLAYOUT_BOTTOM);
00631 m_bottom_pane->SetDefaultSize(itemFrame1->ConvertDialogToPixels(wxSize(66, 110)));
00632 m_bottom_pane->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Verdana")));
00633 itemBoxSizer2->Add(m_bottom_pane, 0, wxGROW|wxALL, 0);
00634
00635 m_common_settings_notebook = new wxNotebook( m_bottom_pane, ID_BOTTOM_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxNB_TOP );
00636
00637 m_common_panel = new wxScrolledWindow( m_common_settings_notebook, ID_COMMON_SCROLLEDWINDOW, wxDefaultPosition, m_common_settings_notebook->ConvertDialogToPixels(wxSize(133, 43)), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
00638 m_common_panel->SetScrollbars(1, 1, 1, 1);
00639 m_common_main_sizer = new wxBoxSizer(wxHORIZONTAL);
00640 m_common_panel->SetSizer(m_common_main_sizer);
00641
00642 wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxVERTICAL);
00643 m_common_main_sizer->Add(itemBoxSizer7, 0, wxALIGN_TOP|wxALL, 5);
00644 m_common_run_control = new wxToggleButton( m_common_panel, ID_COMMON_RUN_TOGGLEBUTTON, _("Run"), wxDefaultPosition, wxDefaultSize, 0 );
00645 m_common_run_control->SetValue(false);
00646 m_common_run_control->SetHelpText(_("Start/Stop acqusition"));
00647 if (ShowToolTips())
00648 m_common_run_control->SetToolTip(_("Start/Stop acqusition"));
00649 m_common_run_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00650 itemBoxSizer7->Add(m_common_run_control, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00651
00652 wxStaticBox* itemStaticBoxSizer9Static = new wxStaticBox(m_common_panel, wxID_ANY, _("Ext. signals"));
00653 wxStaticBoxSizer* itemStaticBoxSizer9 = new wxStaticBoxSizer(itemStaticBoxSizer9Static, wxHORIZONTAL);
00654 itemBoxSizer7->Add(itemStaticBoxSizer9, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 2);
00655 m_common_TTL_control = new wxToggleButton( m_common_panel, ID_FRONT_PANEL_NIM_TOGGLEBUTTON, _("TTL"), wxDefaultPosition, wxDefaultSize, 0 );
00656 m_common_TTL_control->SetValue(false);
00657 m_common_TTL_control->SetHelpText(_("Set external signal standard TTL\\NIM"));
00658 if (ShowToolTips())
00659 m_common_TTL_control->SetToolTip(_("Set external signal standard TTL\\NIM"));
00660 m_common_TTL_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00661 itemStaticBoxSizer9->Add(m_common_TTL_control, 0, wxALIGN_TOP|wxALL, 5);
00662
00663 wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
00664 m_common_main_sizer->Add(itemBoxSizer11, 0, wxALIGN_TOP|wxALL, 5);
00665 wxStaticBox* itemStaticBoxSizer12Static = new wxStaticBox(m_common_panel, wxID_ANY, _("Buffer size"));
00666 wxStaticBoxSizer* itemStaticBoxSizer12 = new wxStaticBoxSizer(itemStaticBoxSizer12Static, wxHORIZONTAL);
00667 itemBoxSizer11->Add(itemStaticBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 2);
00668 wxString* m_size_X_controlStrings = NULL;
00669 m_size_X_control = new wxChoice( m_common_panel, ID_SIZE_X_CHOICE, wxDefaultPosition, m_common_panel->ConvertDialogToPixels(wxSize(46, -1)), 0, m_size_X_controlStrings, 0 );
00670 m_size_X_control->SetHelpText(_("Horizontal size"));
00671 if (ShowToolTips())
00672 m_size_X_control->SetToolTip(_("Horizontal size"));
00673 m_size_X_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
00674 itemStaticBoxSizer12->Add(m_size_X_control, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3);
00675
00676 wxStaticBox* itemStaticBoxSizer14Static = new wxStaticBox(m_common_panel, wxID_ANY, _("Ext. clock"));
00677 wxStaticBoxSizer* itemStaticBoxSizer14 = new wxStaticBoxSizer(itemStaticBoxSizer14Static, wxHORIZONTAL);
00678 itemBoxSizer11->Add(itemStaticBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 2);
00679 m_use_ext_clock_control = new wxCheckBox( m_common_panel, ID_EXT_CLOCK_CHECKBOX, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
00680 m_use_ext_clock_control->SetValue(false);
00681 m_use_ext_clock_control->SetHelpText(_("Use external clock"));
00682 if (ShowToolTips())
00683 m_use_ext_clock_control->SetToolTip(_("Use external clock"));
00684 itemStaticBoxSizer14->Add(m_use_ext_clock_control, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
00685
00686 m_ext_clock_control = new wxSpinCtrl( m_common_panel, ID_EXT_CLOCK_SPINCTRL, _T("1"), wxDefaultPosition, m_common_panel->ConvertDialogToPixels(wxSize(33, -1)), wxSP_ARROW_KEYS, 1, 100, 1 );
00687 m_ext_clock_control->SetHelpText(_("Set external sample rate (MHz)"));
00688 if (ShowToolTips())
00689 m_ext_clock_control->SetToolTip(_("Set external sample rate (MHz)"));
00690 itemStaticBoxSizer14->Add(m_ext_clock_control, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 1);
00691
00692 wxStaticBox* itemStaticBoxSizer17Static = new wxStaticBox(m_common_panel, wxID_ANY, _("Channels"));
00693 wxStaticBoxSizer* itemStaticBoxSizer17 = new wxStaticBoxSizer(itemStaticBoxSizer17Static, wxVERTICAL);
00694 m_common_main_sizer->Add(itemStaticBoxSizer17, 0, wxGROW|wxALL, 5);
00695 wxStaticText* itemStaticText18 = new wxStaticText( m_common_panel, wxID_STATIC, _("Enable:"), wxDefaultPosition, wxDefaultSize, 0 );
00696 itemStaticText18->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00697 itemStaticBoxSizer17->Add(itemStaticText18, 0, wxALIGN_RIGHT|wxLEFT|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5);
00698
00699 wxStaticText* itemStaticText19 = new wxStaticText( m_common_panel, wxID_STATIC, _("DAC offset:"), wxDefaultPosition, wxDefaultSize, 0 );
00700 itemStaticText19->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00701 itemStaticBoxSizer17->Add(itemStaticText19, 0, wxALIGN_RIGHT|wxLEFT|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 18);
00702
00703 wxStaticText* itemStaticText20 = new wxStaticText( m_common_panel, wxID_STATIC, _("Medium (mV):"), wxDefaultPosition, wxDefaultSize, 0 );
00704 itemStaticText20->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00705 itemStaticBoxSizer17->Add(itemStaticText20, 0, wxALIGN_RIGHT|wxLEFT|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5);
00706
00707 wxStaticText* itemStaticText21 = new wxStaticText( m_common_panel, wxID_STATIC, _("Overload:"), wxDefaultPosition, wxDefaultSize, 0 );
00708 itemStaticText21->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00709 itemStaticBoxSizer17->Add(itemStaticText21, 0, wxALIGN_RIGHT|wxLEFT|wxTOP|wxADJUST_MINSIZE, 5);
00710
00711 m_common_panel->FitInside();
00712 m_common_settings_notebook->AddPage(m_common_panel, _("COMMON"));
00713
00714 m_trigger_panel = new wxScrolledWindow( m_common_settings_notebook, ID_TRIGGER_SCROLLEDWINDOW, wxDefaultPosition, m_common_settings_notebook->ConvertDialogToPixels(wxSize(133, 43)), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
00715 m_trigger_panel->SetScrollbars(1, 1, 1, 1);
00716 m_trigger_main_sizer = new wxBoxSizer(wxHORIZONTAL);
00717 m_trigger_panel->SetSizer(m_trigger_main_sizer);
00718
00719 wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxVERTICAL);
00720 m_trigger_main_sizer->Add(itemBoxSizer24, 0, wxALIGN_TOP|wxALL, 5);
00721 m_trigger_ext_control = new wxToggleButton( m_trigger_panel, ID_TRIGGER_EXT_TOGGLEBUTTON, _("Ext."), wxDefaultPosition, wxDefaultSize, 0 );
00722 m_trigger_ext_control->SetValue(false);
00723 m_trigger_ext_control->SetHelpText(_("Enable/Disable external trigger"));
00724 if (ShowToolTips())
00725 m_trigger_ext_control->SetToolTip(_("Enable/Disable external trigger"));
00726 m_trigger_ext_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00727 itemBoxSizer24->Add(m_trigger_ext_control, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00728
00729 m_trigger_auto_control = new wxToggleButton( m_trigger_panel, ID_TRIGGER_AUTO_TOGGLEBUTTON, _("Auto"), wxDefaultPosition, wxDefaultSize, 0 );
00730 m_trigger_auto_control->SetValue(false);
00731 m_trigger_auto_control->SetHelpText(_("Enable/Disable auto trigger"));
00732 if (ShowToolTips())
00733 m_trigger_auto_control->SetToolTip(_("Enable/Disable auto trigger"));
00734 m_trigger_auto_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00735 itemBoxSizer24->Add(m_trigger_auto_control, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00736
00737 m_force_trigger_control = new wxButton( m_trigger_panel, ID_TRIGGER_FORCE_BUTTON, _("Force"), wxDefaultPosition, wxDefaultSize, 0 );
00738 m_force_trigger_control->SetHelpText(_("Force trigger"));
00739 if (ShowToolTips())
00740 m_force_trigger_control->SetToolTip(_("Force trigger"));
00741 m_force_trigger_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00742 itemBoxSizer24->Add(m_force_trigger_control, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00743
00744 wxBoxSizer* itemBoxSizer28 = new wxBoxSizer(wxVERTICAL);
00745 m_trigger_main_sizer->Add(itemBoxSizer28, 0, wxALIGN_TOP|wxALL, 5);
00746 wxStaticBox* itemStaticBoxSizer29Static = new wxStaticBox(m_trigger_panel, wxID_ANY, _("Post Trigger"));
00747 wxStaticBoxSizer* itemStaticBoxSizer29 = new wxStaticBoxSizer(itemStaticBoxSizer29Static, wxVERTICAL);
00748 itemBoxSizer28->Add(itemStaticBoxSizer29, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxTOP, 0);
00749 m_trigger_post_control = new wxSpinCtrl( m_trigger_panel, ID_TRIGGER_POST_SPINCTRL, _T("0"), wxDefaultPosition, m_trigger_panel->ConvertDialogToPixels(wxSize(60, -1)), wxSP_ARROW_KEYS, 0, 999999999, 0 );
00750 m_trigger_post_control->SetHelpText(_("Set post trigger samples"));
00751 if (ShowToolTips())
00752 m_trigger_post_control->SetToolTip(_("Set post trigger samples"));
00753 itemStaticBoxSizer29->Add(m_trigger_post_control, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
00754
00755 m_trigger_position_keep_control = new wxCheckBox( m_trigger_panel, ID_TRIGGER_POSITION_KEEP_CHECKBOX, _("Keep position"), wxDefaultPosition, wxDefaultSize, 0 );
00756 m_trigger_position_keep_control->SetValue(false);
00757 m_trigger_position_keep_control->SetHelpText(_("Keep trigger postion on screen"));
00758 if (ShowToolTips())
00759 m_trigger_position_keep_control->SetToolTip(_("Keep trigger postion on screen"));
00760 itemStaticBoxSizer29->Add(m_trigger_position_keep_control, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00761
00762 wxStaticBox* itemStaticBoxSizer32Static = new wxStaticBox(m_trigger_panel, wxID_ANY, _("Edge"));
00763 wxStaticBoxSizer* itemStaticBoxSizer32 = new wxStaticBoxSizer(itemStaticBoxSizer32Static, wxHORIZONTAL);
00764 itemBoxSizer28->Add(itemStaticBoxSizer32, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
00765 wxString* m_trigger_edge_controlStrings = NULL;
00766 m_trigger_edge_control = new wxChoice( m_trigger_panel, ID_TRIGGER_EDGE_CHOICE, wxDefaultPosition, m_trigger_panel->ConvertDialogToPixels(wxSize(60, -1)), 0, m_trigger_edge_controlStrings, 0 );
00767 m_trigger_edge_control->SetStringSelection(_("NO TRIG"));
00768 m_trigger_edge_control->SetHelpText(_("Select trigger edge"));
00769 if (ShowToolTips())
00770 m_trigger_edge_control->SetToolTip(_("Select trigger edge"));
00771 m_trigger_edge_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
00772 itemStaticBoxSizer32->Add(m_trigger_edge_control, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 3);
00773
00774 wxStaticBox* itemStaticBoxSizer34Static = new wxStaticBox(m_trigger_panel, wxID_ANY, _("Channels"));
00775 wxStaticBoxSizer* itemStaticBoxSizer34 = new wxStaticBoxSizer(itemStaticBoxSizer34Static, wxVERTICAL);
00776 m_trigger_main_sizer->Add(itemStaticBoxSizer34, 0, wxGROW|wxALL, 5);
00777 itemStaticBoxSizer34->Add(4, 1, 0, wxGROW|wxALL, 0);
00778
00779 wxStaticText* itemStaticText36 = new wxStaticText( m_trigger_panel, wxID_STATIC, _("Threshold (mV):"), wxDefaultPosition, wxDefaultSize, 0 );
00780 itemStaticText36->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00781 itemStaticBoxSizer34->Add(itemStaticText36, 0, wxALIGN_RIGHT|wxALL|wxADJUST_MINSIZE, 5);
00782
00783 wxStaticText* itemStaticText37 = new wxStaticText( m_trigger_panel, wxID_STATIC, _("Thr. samples :"), wxDefaultPosition, wxDefaultSize, 0 );
00784 itemStaticText37->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00785 itemStaticBoxSizer34->Add(itemStaticText37, 0, wxALIGN_RIGHT|wxALL|wxADJUST_MINSIZE, 5);
00786
00787 m_trigger_panel->FitInside();
00788 m_common_settings_notebook->AddPage(m_trigger_panel, _("TRIGGER"));
00789
00790 m_record_panel = new wxScrolledWindow( m_common_settings_notebook, ID_RECORD_SCROLLEDWINDOW, wxDefaultPosition, m_common_settings_notebook->ConvertDialogToPixels(wxSize(133, 43)), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
00791 m_record_panel->SetScrollbars(1, 1, 1, 1);
00792 m_record_main_sizer = new wxBoxSizer(wxHORIZONTAL);
00793 m_record_panel->SetSizer(m_record_main_sizer);
00794
00795 wxBoxSizer* itemBoxSizer40 = new wxBoxSizer(wxVERTICAL);
00796 m_record_main_sizer->Add(itemBoxSizer40, 0, wxALIGN_TOP|wxALL, 5);
00797 m_record_start_stop_control = new wxToggleButton( m_record_panel, ID_RECORDTOGGLEBUTTON, _("Start"), wxDefaultPosition, wxDefaultSize, 0 );
00798 m_record_start_stop_control->SetValue(false);
00799 m_record_start_stop_control->SetHelpText(_("Start/ stop recording"));
00800 if (ShowToolTips())
00801 m_record_start_stop_control->SetToolTip(_("Start/ stop recording"));
00802 m_record_start_stop_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00803 itemBoxSizer40->Add(m_record_start_stop_control, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00804
00805 wxStaticText* itemStaticText42 = new wxStaticText( m_record_panel, wxID_STATIC, _("Folder :"), wxDefaultPosition, wxDefaultSize, 0 );
00806 itemStaticText42->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00807 itemBoxSizer40->Add(itemStaticText42, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
00808
00809 m_record_folder_sizer = new wxBoxSizer(wxHORIZONTAL);
00810 itemBoxSizer40->Add(m_record_folder_sizer, 1, wxGROW|wxALL, 2);
00811 m_record_dir_control = new wxTextCtrl( m_record_panel, ID_RECORDDIRTEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
00812 m_record_dir_control->SetHelpText(_("Insert the folder where to store record files"));
00813 if (ShowToolTips())
00814 m_record_dir_control->SetToolTip(_("Insert the folder where to store record files"));
00815 m_record_folder_sizer->Add(m_record_dir_control, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
00816
00817 m_record_dir_browse_button = new wxButton( m_record_panel, ID_RECORDDIRBUTTON, _("..."), wxDefaultPosition, m_record_panel->ConvertDialogToPixels(wxSize(13, -1)), 0 );
00818 m_record_dir_browse_button->SetHelpText(_("Select a recording folder"));
00819 if (ShowToolTips())
00820 m_record_dir_browse_button->SetToolTip(_("Select a recording folder"));
00821 m_record_dir_browse_button->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00822 m_record_folder_sizer->Add(m_record_dir_browse_button, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2);
00823
00824 wxStaticBox* itemStaticBoxSizer46Static = new wxStaticBox(m_record_panel, wxID_ANY, _("Channels"));
00825 wxStaticBoxSizer* itemStaticBoxSizer46 = new wxStaticBoxSizer(itemStaticBoxSizer46Static, wxVERTICAL);
00826 m_record_main_sizer->Add(itemStaticBoxSizer46, 0, wxGROW|wxALL, 5);
00827 itemStaticBoxSizer46->Add(4, 1, 0, wxGROW|wxALL, 0);
00828
00829 wxStaticText* itemStaticText48 = new wxStaticText( m_record_panel, wxID_STATIC, _("Enable :"), wxDefaultPosition, wxDefaultSize, 0 );
00830 itemStaticText48->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00831 itemStaticBoxSizer46->Add(itemStaticText48, 0, wxALIGN_RIGHT|wxALL|wxADJUST_MINSIZE, 5);
00832
00833 wxStaticText* itemStaticText49 = new wxStaticText( m_record_panel, wxID_STATIC, _("Rate divider :"), wxDefaultPosition, wxDefaultSize, 0 );
00834 itemStaticText49->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00835 itemStaticBoxSizer46->Add(itemStaticText49, 0, wxALIGN_RIGHT|wxALL|wxADJUST_MINSIZE, 5);
00836
00837 wxStaticText* itemStaticText50 = new wxStaticText( m_record_panel, wxID_STATIC, _("File format :"), wxDefaultPosition, wxDefaultSize, 0 );
00838 itemStaticText50->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00839 itemStaticBoxSizer46->Add(itemStaticText50, 0, wxALIGN_RIGHT|wxALL|wxADJUST_MINSIZE, 5);
00840
00841 m_record_panel->FitInside();
00842 m_common_settings_notebook->AddPage(m_record_panel, _("RECORD"));
00843
00844 wxBoxSizer* itemBoxSizer51 = new wxBoxSizer(wxHORIZONTAL);
00845 itemBoxSizer2->Add(itemBoxSizer51, 1, wxGROW|wxALL, 0);
00846
00847 m_left_pane = new wxSashLayoutWindow( itemFrame1, ID_SASHLAYOUTWINDOW, wxDefaultPosition, itemFrame1->ConvertDialogToPixels(wxSize(176, 61)), wxSW_3DBORDER|wxSW_3DSASH|wxNO_BORDER );
00848 m_left_pane->SetSashVisible(wxSASH_RIGHT, true);
00849 m_left_pane->SetOrientation(wxLAYOUT_VERTICAL);
00850 m_left_pane->SetAlignment(wxLAYOUT_LEFT);
00851 m_left_pane->SetDefaultSize(itemFrame1->ConvertDialogToPixels(wxSize(176, 61)));
00852 m_left_pane->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Verdana")));
00853 itemBoxSizer51->Add(m_left_pane, 0, wxGROW|wxALL, 0);
00854
00855 m_specific_settings_notebook = new wxNotebook( m_left_pane, ID_LEFT_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxNB_TOP );
00856
00857 m_specific_settings_scope_1_notebook = new wxNotebook( m_specific_settings_notebook, ID_SCOPE_1_VIEW_NOTEBOOK, wxDefaultPosition, m_specific_settings_notebook->ConvertDialogToPixels(wxSize(150, -1)), wxNB_TOP );
00858
00859 m_view_scope_1_panel = new wxScrolledWindow( m_specific_settings_scope_1_notebook, ID_VIEW_1_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
00860 m_view_scope_1_panel->SetScrollbars(1, 1, 1, 1);
00861 m_view_1_main_sizer = new wxBoxSizer(wxVERTICAL);
00862 m_view_scope_1_panel->SetSizer(m_view_1_main_sizer);
00863
00864 wxStaticBox* itemStaticBoxSizer57Static = new wxStaticBox(m_view_scope_1_panel, wxID_ANY, _("Background"));
00865 wxStaticBoxSizer* itemStaticBoxSizer57 = new wxStaticBoxSizer(itemStaticBoxSizer57Static, wxHORIZONTAL);
00866 m_view_1_main_sizer->Add(itemStaticBoxSizer57, 0, wxGROW|wxLEFT|wxRIGHT, 6);
00867 m_back_color_1_control = new wxPanel( m_view_scope_1_panel, ID_PANEL, wxDefaultPosition, m_view_scope_1_panel->ConvertDialogToPixels(wxSize(20, 9)), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
00868 itemStaticBoxSizer57->Add(m_back_color_1_control, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
00869
00870 wxButton* itemButton59 = new wxButton( m_view_scope_1_panel, ID_BACK_CHOOSE_COLOR_1_BUTTON, _("..."), wxDefaultPosition, m_view_scope_1_panel->ConvertDialogToPixels(wxSize(20, 12)), 0 );
00871 itemButton59->SetHelpText(_("Choose background color"));
00872 if (ShowToolTips())
00873 itemButton59->SetToolTip(_("Choose background color"));
00874 itemButton59->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00875 itemStaticBoxSizer57->Add(itemButton59, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
00876
00877 m_main_sizer_1_text = new wxStaticBox(m_view_scope_1_panel, wxID_ANY, _("Horizontal"));
00878 wxStaticBoxSizer* itemStaticBoxSizer60 = new wxStaticBoxSizer(m_main_sizer_1_text, wxHORIZONTAL);
00879 m_view_1_main_sizer->Add(itemStaticBoxSizer60, 0, wxGROW|wxALL, 6);
00880 wxString* m_sec_per_div_1_controlStrings = NULL;
00881 m_sec_per_div_1_control = new wxChoice( m_view_scope_1_panel, ID_SEC_PER_DIV_1_CHOICE, wxDefaultPosition, m_view_scope_1_panel->ConvertDialogToPixels(wxSize(46, -1)), 0, m_sec_per_div_1_controlStrings, 0 );
00882 m_sec_per_div_1_control->SetHelpText(_("Seconds per division"));
00883 if (ShowToolTips())
00884 m_sec_per_div_1_control->SetToolTip(_("Seconds per division"));
00885 m_sec_per_div_1_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
00886 itemStaticBoxSizer60->Add(m_sec_per_div_1_control, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3);
00887
00888 m_offset_sec_1_control = new wxSpinCtrl( m_view_scope_1_panel, ID_OFFSET_SEC_1_SPINCTRL, _T("0"), wxDefaultPosition, m_view_scope_1_panel->ConvertDialogToPixels(wxSize(66, -1)), wxSP_ARROW_KEYS, -99999999, 99999999, 0 );
00889 m_offset_sec_1_control->SetHelpText(_("Set time scale offset (uSec)"));
00890 if (ShowToolTips())
00891 m_offset_sec_1_control->SetToolTip(_("Set time scale offset (uSec)"));
00892 itemStaticBoxSizer60->Add(m_offset_sec_1_control, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 1);
00893
00894 wxStaticBox* itemStaticBoxSizer63Static = new wxStaticBox(m_view_scope_1_panel, wxID_ANY, _("Grid"));
00895 wxStaticBoxSizer* itemStaticBoxSizer63 = new wxStaticBoxSizer(itemStaticBoxSizer63Static, wxHORIZONTAL);
00896 m_view_1_main_sizer->Add(itemStaticBoxSizer63, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 6);
00897 m_grid_color_1_control = new wxPanel( m_view_scope_1_panel, ID_GRID_COLOR_1_PANEL, wxDefaultPosition, m_view_scope_1_panel->ConvertDialogToPixels(wxSize(20, 9)), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
00898 itemStaticBoxSizer63->Add(m_grid_color_1_control, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
00899
00900 wxButton* itemButton65 = new wxButton( m_view_scope_1_panel, ID_GRID_CHOOSE_COLOR_1_BUTTON, _("..."), wxDefaultPosition, m_view_scope_1_panel->ConvertDialogToPixels(wxSize(20, 12)), 0 );
00901 itemButton65->SetHelpText(_("Choose grid color"));
00902 if (ShowToolTips())
00903 itemButton65->SetToolTip(_("Choose grid color"));
00904 itemButton65->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00905 itemStaticBoxSizer63->Add(itemButton65, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
00906
00907 m_grid_line_width_1_control = new wxSpinCtrl( m_view_scope_1_panel, ID_GRID_LINE_WIDTH_1_SPINCTRL, _T("1"), wxDefaultPosition, m_view_scope_1_panel->ConvertDialogToPixels(wxSize(30, -1)), wxSP_ARROW_KEYS, 1, 20, 1 );
00908 m_grid_line_width_1_control->SetHelpText(_("Set grid line width"));
00909 if (ShowToolTips())
00910 m_grid_line_width_1_control->SetToolTip(_("Set grid line width"));
00911 itemStaticBoxSizer63->Add(m_grid_line_width_1_control, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 1);
00912
00913 wxString* m_grid_line_type_1_controlStrings = NULL;
00914 m_grid_line_type_1_control = new wxChoice( m_view_scope_1_panel, ID_GRID_LINE_TYPE_1_CHOICE, wxDefaultPosition, m_view_scope_1_panel->ConvertDialogToPixels(wxSize(33, -1)), 0, m_grid_line_type_1_controlStrings, 0 );
00915 m_grid_line_type_1_control->SetHelpText(_("Set grid line type"));
00916 if (ShowToolTips())
00917 m_grid_line_type_1_control->SetToolTip(_("Set grid line type"));
00918 m_grid_line_type_1_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
00919 itemStaticBoxSizer63->Add(m_grid_line_type_1_control, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 2);
00920
00921 m_view_scope_1_panel->FitInside();
00922 m_specific_settings_scope_1_notebook->AddPage(m_view_scope_1_panel, _("VIEW"));
00923
00924 m_cursor_1_panel = new wxScrolledWindow( m_specific_settings_scope_1_notebook, ID_CURSOR_1_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
00925 m_cursor_1_panel->SetScrollbars(1, 1, 1, 1);
00926 m_cursor_1_main_sizer = new wxBoxSizer(wxVERTICAL);
00927 m_cursor_1_panel->SetSizer(m_cursor_1_main_sizer);
00928
00929 m_cursor_1_panel->FitInside();
00930 m_specific_settings_scope_1_notebook->AddPage(m_cursor_1_panel, _("CURSORS"));
00931
00932 m_specific_settings_notebook->AddPage(m_specific_settings_scope_1_notebook, _("SCOPE 1"));
00933
00934 m_specific_settings_scope_2_notebook = new wxNotebook( m_specific_settings_notebook, ID_SCOPE_2_VIEW_NOTEBOOK, wxDefaultPosition, m_specific_settings_notebook->ConvertDialogToPixels(wxSize(150, -1)), wxNB_TOP );
00935
00936 m_view_scope_2_panel = new wxScrolledWindow( m_specific_settings_scope_2_notebook, ID_VIEW_2_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
00937 m_view_scope_2_panel->SetScrollbars(1, 1, 1, 1);
00938 m_view_2_main_sizer = new wxBoxSizer(wxVERTICAL);
00939 m_view_scope_2_panel->SetSizer(m_view_2_main_sizer);
00940
00941 wxStaticBox* itemStaticBoxSizer73Static = new wxStaticBox(m_view_scope_2_panel, wxID_ANY, _("Background"));
00942 wxStaticBoxSizer* itemStaticBoxSizer73 = new wxStaticBoxSizer(itemStaticBoxSizer73Static, wxHORIZONTAL);
00943 m_view_2_main_sizer->Add(itemStaticBoxSizer73, 0, wxGROW|wxLEFT|wxRIGHT, 6);
00944 m_back_color_2_control = new wxPanel( m_view_scope_2_panel, ID_PANEL6, wxDefaultPosition, m_view_scope_2_panel->ConvertDialogToPixels(wxSize(20, 9)), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
00945 itemStaticBoxSizer73->Add(m_back_color_2_control, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
00946
00947 wxButton* itemButton75 = new wxButton( m_view_scope_2_panel, ID_BACK_CHOOSE_COLOR_2_BUTTON, _("..."), wxDefaultPosition, m_view_scope_2_panel->ConvertDialogToPixels(wxSize(20, 12)), 0 );
00948 itemButton75->SetHelpText(_("Choose background color"));
00949 if (ShowToolTips())
00950 itemButton75->SetToolTip(_("Choose background color"));
00951 itemButton75->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00952 itemStaticBoxSizer73->Add(itemButton75, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
00953
00954 m_main_sizer_2_text = new wxStaticBox(m_view_scope_2_panel, wxID_ANY, _("Horizontal"));
00955 wxStaticBoxSizer* itemStaticBoxSizer76 = new wxStaticBoxSizer(m_main_sizer_2_text, wxHORIZONTAL);
00956 m_view_2_main_sizer->Add(itemStaticBoxSizer76, 0, wxGROW|wxALL, 6);
00957 wxString* m_sec_per_div_2_controlStrings = NULL;
00958 m_sec_per_div_2_control = new wxChoice( m_view_scope_2_panel, ID_SEC_PER_DIV_2_CHOICE, wxDefaultPosition, m_view_scope_2_panel->ConvertDialogToPixels(wxSize(46, -1)), 0, m_sec_per_div_2_controlStrings, 0 );
00959 m_sec_per_div_2_control->SetHelpText(_("Seconds per division"));
00960 if (ShowToolTips())
00961 m_sec_per_div_2_control->SetToolTip(_("Seconds per division"));
00962 m_sec_per_div_2_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
00963 itemStaticBoxSizer76->Add(m_sec_per_div_2_control, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3);
00964
00965 m_offset_sec_2_control = new wxSpinCtrl( m_view_scope_2_panel, ID_OFFSET_SEC_2_SPINCTRL, _T("0"), wxDefaultPosition, m_view_scope_2_panel->ConvertDialogToPixels(wxSize(66, -1)), wxSP_ARROW_KEYS, -99999999, 99999999, 0 );
00966 m_offset_sec_2_control->SetHelpText(_("Set time scale offset (uSec)"));
00967 if (ShowToolTips())
00968 m_offset_sec_2_control->SetToolTip(_("Set time scale offset (uSec)"));
00969 itemStaticBoxSizer76->Add(m_offset_sec_2_control, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 1);
00970
00971 wxStaticBox* itemStaticBoxSizer79Static = new wxStaticBox(m_view_scope_2_panel, wxID_ANY, _("Grid"));
00972 wxStaticBoxSizer* itemStaticBoxSizer79 = new wxStaticBoxSizer(itemStaticBoxSizer79Static, wxHORIZONTAL);
00973 m_view_2_main_sizer->Add(itemStaticBoxSizer79, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 6);
00974 m_grid_color_2_control = new wxPanel( m_view_scope_2_panel, ID_GRID_COLOR_2_PANEL, wxDefaultPosition, m_view_scope_2_panel->ConvertDialogToPixels(wxSize(20, 9)), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
00975 itemStaticBoxSizer79->Add(m_grid_color_2_control, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
00976
00977 wxButton* itemButton81 = new wxButton( m_view_scope_2_panel, ID_GRID_CHOOSE_COLOR_2_BUTTON, _("..."), wxDefaultPosition, m_view_scope_2_panel->ConvertDialogToPixels(wxSize(20, 12)), 0 );
00978 itemButton81->SetHelpText(_("Choose grid color"));
00979 if (ShowToolTips())
00980 itemButton81->SetToolTip(_("Choose grid color"));
00981 itemButton81->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
00982 itemStaticBoxSizer79->Add(itemButton81, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
00983
00984 m_grid_line_width_2_control = new wxSpinCtrl( m_view_scope_2_panel, ID_GRID_LINE_WIDTH_2_SPINCTRL, _T("1"), wxDefaultPosition, m_view_scope_2_panel->ConvertDialogToPixels(wxSize(30, -1)), wxSP_ARROW_KEYS, 1, 20, 1 );
00985 m_grid_line_width_2_control->SetHelpText(_("Set grid line width"));
00986 if (ShowToolTips())
00987 m_grid_line_width_2_control->SetToolTip(_("Set grid line width"));
00988 itemStaticBoxSizer79->Add(m_grid_line_width_2_control, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 1);
00989
00990 wxString* m_grid_line_type_2_controlStrings = NULL;
00991 m_grid_line_type_2_control = new wxChoice( m_view_scope_2_panel, ID_GRID_LINE_TYPE_2_CHOICE, wxDefaultPosition, m_view_scope_2_panel->ConvertDialogToPixels(wxSize(33, -1)), 0, m_grid_line_type_2_controlStrings, 0 );
00992 m_grid_line_type_2_control->SetHelpText(_("Set grid line type"));
00993 if (ShowToolTips())
00994 m_grid_line_type_2_control->SetToolTip(_("Set grid line type"));
00995 m_grid_line_type_2_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
00996 itemStaticBoxSizer79->Add(m_grid_line_type_2_control, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 2);
00997
00998 m_view_scope_2_panel->FitInside();
00999 m_specific_settings_scope_2_notebook->AddPage(m_view_scope_2_panel, _("VIEW"));
01000
01001 m_cursor_2_panel = new wxScrolledWindow( m_specific_settings_scope_2_notebook, ID_CURSOR_2_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
01002 m_cursor_2_panel->SetScrollbars(1, 1, 1, 1);
01003 m_cursor_2_main_sizer = new wxBoxSizer(wxVERTICAL);
01004 m_cursor_2_panel->SetSizer(m_cursor_2_main_sizer);
01005
01006 m_cursor_2_panel->FitInside();
01007 m_specific_settings_scope_2_notebook->AddPage(m_cursor_2_panel, _("CURSORS"));
01008
01009 m_specific_settings_notebook->AddPage(m_specific_settings_scope_2_notebook, _("SCOPE 2"));
01010
01011 m_specific_settings_scope_3_notebook = new wxNotebook( m_specific_settings_notebook, ID_SCOPE_3_VIEW_NOTEBOOK, wxDefaultPosition, m_specific_settings_notebook->ConvertDialogToPixels(wxSize(150, -1)), wxNB_TOP );
01012
01013 m_view_scope_3_panel = new wxScrolledWindow( m_specific_settings_scope_3_notebook, ID_VIEW_3_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
01014 m_view_scope_3_panel->SetScrollbars(1, 1, 1, 1);
01015 m_view_3_main_sizer = new wxBoxSizer(wxVERTICAL);
01016 m_view_scope_3_panel->SetSizer(m_view_3_main_sizer);
01017
01018 wxStaticBox* itemStaticBoxSizer89Static = new wxStaticBox(m_view_scope_3_panel, wxID_ANY, _("Background"));
01019 wxStaticBoxSizer* itemStaticBoxSizer89 = new wxStaticBoxSizer(itemStaticBoxSizer89Static, wxHORIZONTAL);
01020 m_view_3_main_sizer->Add(itemStaticBoxSizer89, 0, wxGROW|wxLEFT|wxRIGHT, 6);
01021 m_back_color_3_control = new wxPanel( m_view_scope_3_panel, ID_PANEL3, wxDefaultPosition, m_view_scope_3_panel->ConvertDialogToPixels(wxSize(20, 9)), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
01022 itemStaticBoxSizer89->Add(m_back_color_3_control, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
01023
01024 wxButton* itemButton91 = new wxButton( m_view_scope_3_panel, ID_BACK_CHOOSE_COLOR_3_BUTTON, _("..."), wxDefaultPosition, m_view_scope_3_panel->ConvertDialogToPixels(wxSize(20, 12)), 0 );
01025 itemButton91->SetHelpText(_("Choose background color"));
01026 if (ShowToolTips())
01027 itemButton91->SetToolTip(_("Choose background color"));
01028 itemButton91->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
01029 itemStaticBoxSizer89->Add(itemButton91, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
01030
01031 m_main_sizer_3_text = new wxStaticBox(m_view_scope_3_panel, wxID_ANY, _("Horizontal"));
01032 wxStaticBoxSizer* itemStaticBoxSizer92 = new wxStaticBoxSizer(m_main_sizer_3_text, wxHORIZONTAL);
01033 m_view_3_main_sizer->Add(itemStaticBoxSizer92, 0, wxGROW|wxALL, 6);
01034 wxString* m_sec_per_div_3_controlStrings = NULL;
01035 m_sec_per_div_3_control = new wxChoice( m_view_scope_3_panel, ID_SEC_PER_DIV_3_CHOICE, wxDefaultPosition, m_view_scope_3_panel->ConvertDialogToPixels(wxSize(46, -1)), 0, m_sec_per_div_3_controlStrings, 0 );
01036 m_sec_per_div_3_control->SetHelpText(_("Seconds per division"));
01037 if (ShowToolTips())
01038 m_sec_per_div_3_control->SetToolTip(_("Seconds per division"));
01039 m_sec_per_div_3_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
01040 itemStaticBoxSizer92->Add(m_sec_per_div_3_control, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3);
01041
01042 m_offset_sec_3_control = new wxSpinCtrl( m_view_scope_3_panel, ID_OFFSET_SEC_3_SPINCTRL, _T("0"), wxDefaultPosition, m_view_scope_3_panel->ConvertDialogToPixels(wxSize(66, -1)), wxSP_ARROW_KEYS, -99999999, 99999999, 0 );
01043 m_offset_sec_3_control->SetHelpText(_("Set time scale offset (uSec)"));
01044 if (ShowToolTips())
01045 m_offset_sec_3_control->SetToolTip(_("Set time scale offset (uSec)"));
01046 itemStaticBoxSizer92->Add(m_offset_sec_3_control, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 1);
01047
01048 wxStaticBox* itemStaticBoxSizer95Static = new wxStaticBox(m_view_scope_3_panel, wxID_ANY, _("Grid"));
01049 wxStaticBoxSizer* itemStaticBoxSizer95 = new wxStaticBoxSizer(itemStaticBoxSizer95Static, wxHORIZONTAL);
01050 m_view_3_main_sizer->Add(itemStaticBoxSizer95, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 6);
01051 m_grid_color_3_control = new wxPanel( m_view_scope_3_panel, ID_GRID_COLOR_3_PANEL, wxDefaultPosition, m_view_scope_3_panel->ConvertDialogToPixels(wxSize(20, 9)), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
01052 itemStaticBoxSizer95->Add(m_grid_color_3_control, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
01053
01054 wxButton* itemButton97 = new wxButton( m_view_scope_3_panel, ID_GRID_CHOOSE_COLOR_3_BUTTON, _("..."), wxDefaultPosition, m_view_scope_3_panel->ConvertDialogToPixels(wxSize(20, 12)), 0 );
01055 itemButton97->SetHelpText(_("Choose grid color"));
01056 if (ShowToolTips())
01057 itemButton97->SetToolTip(_("Choose grid color"));
01058 itemButton97->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
01059 itemStaticBoxSizer95->Add(itemButton97, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
01060
01061 m_grid_line_width_3_control = new wxSpinCtrl( m_view_scope_3_panel, ID_GRID_LINE_WIDTH_3_SPINCTRL, _T("1"), wxDefaultPosition, m_view_scope_3_panel->ConvertDialogToPixels(wxSize(30, -1)), wxSP_ARROW_KEYS, 1, 20, 1 );
01062 m_grid_line_width_3_control->SetHelpText(_("Set grid line width"));
01063 if (ShowToolTips())
01064 m_grid_line_width_3_control->SetToolTip(_("Set grid line width"));
01065 itemStaticBoxSizer95->Add(m_grid_line_width_3_control, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 1);
01066
01067 wxString* m_grid_line_type_3_controlStrings = NULL;
01068 m_grid_line_type_3_control = new wxChoice( m_view_scope_3_panel, ID_GRID_LINE_TYPE_3_CHOICE, wxDefaultPosition, m_view_scope_3_panel->ConvertDialogToPixels(wxSize(33, -1)), 0, m_grid_line_type_3_controlStrings, 0 );
01069 m_grid_line_type_3_control->SetHelpText(_("Set grid line type"));
01070 if (ShowToolTips())
01071 m_grid_line_type_3_control->SetToolTip(_("Set grid line type"));
01072 m_grid_line_type_3_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
01073 itemStaticBoxSizer95->Add(m_grid_line_type_3_control, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 2);
01074
01075 m_view_scope_3_panel->FitInside();
01076 m_specific_settings_scope_3_notebook->AddPage(m_view_scope_3_panel, _("VIEW"));
01077
01078 m_cursor_3_panel = new wxScrolledWindow( m_specific_settings_scope_3_notebook, ID_CURSOR_3_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
01079 m_cursor_3_panel->SetScrollbars(1, 1, 1, 1);
01080 m_cursor_3_main_sizer = new wxBoxSizer(wxVERTICAL);
01081 m_cursor_3_panel->SetSizer(m_cursor_3_main_sizer);
01082
01083 m_cursor_3_panel->FitInside();
01084 m_specific_settings_scope_3_notebook->AddPage(m_cursor_3_panel, _("CURSORS"));
01085
01086 m_specific_settings_notebook->AddPage(m_specific_settings_scope_3_notebook, _("SCOPE 3"));
01087
01088 m_specific_settings_scope_4_notebook = new wxNotebook( m_specific_settings_notebook, ID_SCOPE_4_VIEW_NOTEBOOK, wxDefaultPosition, m_specific_settings_notebook->ConvertDialogToPixels(wxSize(150, -1)), wxNB_TOP );
01089
01090 m_view_scope_4_panel = new wxScrolledWindow( m_specific_settings_scope_4_notebook, ID_VIEW_4_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
01091 m_view_scope_4_panel->SetScrollbars(1, 1, 1, 1);
01092 m_view_4_main_sizer = new wxBoxSizer(wxVERTICAL);
01093 m_view_scope_4_panel->SetSizer(m_view_4_main_sizer);
01094
01095 wxStaticBox* itemStaticBoxSizer105Static = new wxStaticBox(m_view_scope_4_panel, wxID_ANY, _("Background"));
01096 wxStaticBoxSizer* itemStaticBoxSizer105 = new wxStaticBoxSizer(itemStaticBoxSizer105Static, wxHORIZONTAL);
01097 m_view_4_main_sizer->Add(itemStaticBoxSizer105, 0, wxGROW|wxLEFT|wxRIGHT, 6);
01098 m_back_color_4_control = new wxPanel( m_view_scope_4_panel, ID_PANEL5, wxDefaultPosition, m_view_scope_4_panel->ConvertDialogToPixels(wxSize(20, 9)), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
01099 itemStaticBoxSizer105->Add(m_back_color_4_control, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
01100
01101 wxButton* itemButton107 = new wxButton( m_view_scope_4_panel, ID_BACK_CHOOSE_COLOR_4_BUTTON, _("..."), wxDefaultPosition, m_view_scope_4_panel->ConvertDialogToPixels(wxSize(20, 12)), 0 );
01102 itemButton107->SetHelpText(_("Choose background color"));
01103 if (ShowToolTips())
01104 itemButton107->SetToolTip(_("Choose background color"));
01105 itemButton107->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
01106 itemStaticBoxSizer105->Add(itemButton107, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
01107
01108 m_main_sizer_4_text = new wxStaticBox(m_view_scope_4_panel, wxID_ANY, _("Horizontal"));
01109 wxStaticBoxSizer* itemStaticBoxSizer108 = new wxStaticBoxSizer(m_main_sizer_4_text, wxHORIZONTAL);
01110 m_view_4_main_sizer->Add(itemStaticBoxSizer108, 0, wxGROW|wxALL, 6);
01111 wxString* m_sec_per_div_4_controlStrings = NULL;
01112 m_sec_per_div_4_control = new wxChoice( m_view_scope_4_panel, ID_SEC_PER_DIV_4_CHOICE, wxDefaultPosition, m_view_scope_4_panel->ConvertDialogToPixels(wxSize(46, -1)), 0, m_sec_per_div_4_controlStrings, 0 );
01113 m_sec_per_div_4_control->SetHelpText(_("Seconds per division"));
01114 if (ShowToolTips())
01115 m_sec_per_div_4_control->SetToolTip(_("Seconds per division"));
01116 m_sec_per_div_4_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
01117 itemStaticBoxSizer108->Add(m_sec_per_div_4_control, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3);
01118
01119 m_offset_sec_4_control = new wxSpinCtrl( m_view_scope_4_panel, ID_OFFSET_SEC_4_SPINCTRL, _T("0"), wxDefaultPosition, m_view_scope_4_panel->ConvertDialogToPixels(wxSize(66, -1)), wxSP_ARROW_KEYS, -99999999, 99999999, 0 );
01120 m_offset_sec_4_control->SetHelpText(_("Set time scale offset (uSec)"));
01121 if (ShowToolTips())
01122 m_offset_sec_4_control->SetToolTip(_("Set time scale offset (uSec)"));
01123 itemStaticBoxSizer108->Add(m_offset_sec_4_control, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 1);
01124
01125 wxStaticBox* itemStaticBoxSizer111Static = new wxStaticBox(m_view_scope_4_panel, wxID_ANY, _("Grid"));
01126 wxStaticBoxSizer* itemStaticBoxSizer111 = new wxStaticBoxSizer(itemStaticBoxSizer111Static, wxHORIZONTAL);
01127 m_view_4_main_sizer->Add(itemStaticBoxSizer111, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 6);
01128 m_grid_color_4_control = new wxPanel( m_view_scope_4_panel, ID_GRID_COLOR_4_PANEL, wxDefaultPosition, m_view_scope_4_panel->ConvertDialogToPixels(wxSize(20, 9)), wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
01129 itemStaticBoxSizer111->Add(m_grid_color_4_control, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
01130
01131 wxButton* itemButton113 = new wxButton( m_view_scope_4_panel, ID_GRID_CHOOSE_COLOR_4_BUTTON, _("..."), wxDefaultPosition, m_view_scope_4_panel->ConvertDialogToPixels(wxSize(20, 12)), 0 );
01132 itemButton113->SetHelpText(_("Choose grid color"));
01133 if (ShowToolTips())
01134 itemButton113->SetToolTip(_("Choose grid color"));
01135 itemButton113->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
01136 itemStaticBoxSizer111->Add(itemButton113, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
01137
01138 m_grid_line_width_4_control = new wxSpinCtrl( m_view_scope_4_panel, ID_GRID_LINE_WIDTH_4_SPINCTRL, _T("1"), wxDefaultPosition, m_view_scope_4_panel->ConvertDialogToPixels(wxSize(30, -1)), wxSP_ARROW_KEYS, 1, 20, 1 );
01139 m_grid_line_width_4_control->SetHelpText(_("Set grid line width"));
01140 if (ShowToolTips())
01141 m_grid_line_width_4_control->SetToolTip(_("Set grid line width"));
01142 itemStaticBoxSizer111->Add(m_grid_line_width_4_control, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 1);
01143
01144 wxString* m_grid_line_type_4_controlStrings = NULL;
01145 m_grid_line_type_4_control = new wxChoice( m_view_scope_4_panel, ID_GRID_LINE_TYPE_4_CHOICE, wxDefaultPosition, m_view_scope_4_panel->ConvertDialogToPixels(wxSize(33, -1)), 0, m_grid_line_type_4_controlStrings, 0 );
01146 m_grid_line_type_4_control->SetHelpText(_("Set grid line type"));
01147 if (ShowToolTips())
01148 m_grid_line_type_4_control->SetToolTip(_("Set grid line type"));
01149 m_grid_line_type_4_control->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Arial")));
01150 itemStaticBoxSizer111->Add(m_grid_line_type_4_control, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 2);
01151
01152 m_view_scope_4_panel->FitInside();
01153 m_specific_settings_scope_4_notebook->AddPage(m_view_scope_4_panel, _("VIEW"));
01154
01155 m_cursor_4_panel = new wxScrolledWindow( m_specific_settings_scope_4_notebook, ID_CURSOR_4_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL );
01156 m_cursor_4_panel->SetScrollbars(1, 1, 1, 1);
01157 m_cursor_4_main_sizer = new wxBoxSizer(wxVERTICAL);
01158 m_cursor_4_panel->SetSizer(m_cursor_4_main_sizer);
01159
01160 m_cursor_4_panel->FitInside();
01161 m_specific_settings_scope_4_notebook->AddPage(m_cursor_4_panel, _("CURSORS"));
01162
01163 m_specific_settings_notebook->AddPage(m_specific_settings_scope_4_notebook, _("SCOPE 4"));
01164
01165 m_top_pane = new wxSashLayoutWindow( itemFrame1, ID_SASHLAYOUTWINDOW1, wxDefaultPosition, itemFrame1->ConvertDialogToPixels(wxSize(200, 184)), wxSW_3DBORDER|wxSW_3DSASH|wxNO_BORDER );
01166 m_top_pane->SetOrientation(wxLAYOUT_HORIZONTAL);
01167 m_top_pane->SetAlignment(wxLAYOUT_TOP);
01168 m_top_pane->SetDefaultSize(itemFrame1->ConvertDialogToPixels(wxSize(200, 184)));
01169 m_top_pane->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, _T("Verdana")));
01170 itemBoxSizer51->Add(m_top_pane, 1, wxGROW|wxALL, 0);
01171
01172 m_scope_notebook = new wxNotebook( m_top_pane, ID_SCOPE_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxNB_TOP );
01173
01174 m_scope_horiz_splitter = new wxSplitterWindow( m_scope_notebook, ID_SCOPE_HORIZ_SPLITTERWINDOW, wxDefaultPosition, m_scope_notebook->ConvertDialogToPixels(wxSize(100, 100)), wxSP_3DBORDER|wxSP_3DSASH|wxSP_PERMIT_UNSPLIT|wxNO_BORDER );
01175 m_scope_horiz_splitter->SetMinimumPaneSize(50);
01176 m_scope_notebook->AddPage(m_scope_horiz_splitter, _("SCOPE"));
01177
01178 m_main_toolbar = CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL|wxTB_TEXT|wxWANTS_CHARS, ID_MAIN_TOOLBAR );
01179 m_main_toolbar->SetToolBitmapSize(wxSize(34, 34));
01180 wxBitmap itemtool122Bitmap(itemFrame1->GetBitmapResource(wxT("exit_34.png")));
01181 wxBitmap itemtool122BitmapDisabled;
01182 m_main_toolbar->AddTool(ID_EXIT_TOOL, _("Exit"), itemtool122Bitmap, itemtool122BitmapDisabled, wxITEM_NORMAL, _("Close application and exit to system."), _("Close application and exit to system."));
01183 m_main_toolbar->AddSeparator();
01184 wxBitmap itemtool124Bitmap(itemFrame1->GetBitmapResource(wxT("view_left_34.PNG")));
01185 wxBitmap itemtool124BitmapDisabled;
01186 m_main_toolbar->AddTool(ID_VIEW_LEFT_TOOL, _("Left"), itemtool124Bitmap, itemtool124BitmapDisabled, wxITEM_CHECK, _("Show/Hide left pane"), _("Show/Hide left pane"));
01187 wxBitmap itemtool125Bitmap(itemFrame1->GetBitmapResource(wxT("view_bottom_34.PNG")));
01188 wxBitmap itemtool125BitmapDisabled;
01189 m_main_toolbar->AddTool(ID_VIEW_BOTTOM_TOOL, _("Bottom"), itemtool125Bitmap, itemtool125BitmapDisabled, wxITEM_CHECK, _("Show/Hide bottom pane"), _("Show/Hide bottom pane"));
01190 m_main_toolbar->AddSeparator();
01191 wxBitmap itemtool127Bitmap(itemFrame1->GetBitmapResource(wxT("scope_lt.png")));
01192 wxBitmap itemtool127BitmapDisabled;
01193 m_main_toolbar->AddTool(ID_VIEW_SCOPE_LEFT_TOP_TOOL, _("Scope 1"), itemtool127Bitmap, itemtool127BitmapDisabled, wxITEM_CHECK, _("Show/Hide scope left top pane"), _("Show/Hide scope left top pane"));
01194 wxBitmap itemtool128Bitmap(itemFrame1->GetBitmapResource(wxT("scope_rt.png")));
01195 wxBitmap itemtool128BitmapDisabled;
01196 m_main_toolbar->AddTool(ID_VIEW_SCOPE_RIGHT_TOP_TOOL, _("Scope 2"), itemtool128Bitmap, itemtool128BitmapDisabled, wxITEM_CHECK, _("Show/Hide scope right top pane"), _("Show/Hide scope right top pane"));
01197 wxBitmap itemtool129Bitmap(itemFrame1->GetBitmapResource(wxT("scope_lb.png")));
01198 wxBitmap itemtool129BitmapDisabled;
01199 m_main_toolbar->AddTool(ID_VIEW_SCOPE_LEFT_BOTTOM_TOOL, _("Scope 3"), itemtool129Bitmap, itemtool129BitmapDisabled, wxITEM_CHECK, _("Show/Hide scope left bottom pane"), _("Show/Hide scope left bottom pane"));
01200 wxBitmap itemtool130Bitmap(itemFrame1->GetBitmapResource(wxT("scope_rb.png")));
01201 wxBitmap itemtool130BitmapDisabled;
01202 m_main_toolbar->AddTool(ID_VIEW_SCOPE_RIGHT_BOTTOM_TOOL, _("Scope 4"), itemtool130Bitmap, itemtool130BitmapDisabled, wxITEM_CHECK, _("Show/Hide scope right bottom pane"), _("Show/Hide scope right bottom pane"));
01203 m_main_toolbar->AddSeparator();
01204 wxBitmap itemtool132Bitmap(itemFrame1->GetBitmapResource(wxT("about_34.png")));
01205 wxBitmap itemtool132BitmapDisabled;
01206 m_main_toolbar->AddTool(ID_HELP_TOOL, _("About"), itemtool132Bitmap, itemtool132BitmapDisabled, wxITEM_NORMAL, _("About CAEN scope"), _("About CAEN scope"));
01207 m_main_toolbar->Realize();
01208 itemFrame1->SetToolBar(m_main_toolbar);
01209
01210 m_main_statusbar = new wxStatusBar( itemFrame1, ID_MAIN_STATUSBAR, 0 );
01211 m_main_statusbar->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Verdana")));
01212 m_main_statusbar->SetFieldsCount(7);
01213 int m_main_statusbarWidths[7];
01214 m_main_statusbarWidths[0] = -1;
01215 m_main_statusbarWidths[1] = 80;
01216 m_main_statusbarWidths[2] = 80;
01217 m_main_statusbarWidths[3] = 80;
01218 m_main_statusbarWidths[4] = 80;
01219 m_main_statusbarWidths[5] = 120;
01220 m_main_statusbarWidths[6] = 60;
01221 m_main_statusbar->SetStatusWidths(7, m_main_statusbarWidths);
01222 itemFrame1->SetStatusBar(m_main_statusbar);
01223
01225
01226
01227 m_scope_horiz_splitter->Connect(ID_SCOPE_HORIZ_SPLITTERWINDOW, wxEVT_SIZE, wxSizeEventHandler(MainFrame::OnSize), NULL, this);
01228
01229
01230 m_main_toolbar->PushEventHandler( new wxBackgroundBitmap( wxBitmap(_T("caen.png"), wxBITMAP_TYPE_PNG), this));
01231
01232 MainFrame::g_main_statusbar= this->m_main_statusbar;
01233
01234
01235
01236
01237 this->m_scope_vert_splitter_top = new wxSplitterWindow( this->m_scope_horiz_splitter, ID_SCOPE_VERT_TOP_SPLITTERWINDOW, wxDefaultPosition, this->m_scope_horiz_splitter->ConvertDialogToPixels(wxSize(100, 100)), wxSP_3DBORDER|wxSP_3DSASH|wxSP_PERMIT_UNSPLIT|wxNO_BORDER );
01238 this->m_scope_vert_splitter_top->SetMinimumPaneSize( 50);
01239
01240 this->m_scope_vert_splitter_bottom = new wxSplitterWindow( this->m_scope_horiz_splitter, ID_SCOPE_VERT_BOTTOM_SPLITTERWINDOW, wxDefaultPosition, this->m_scope_horiz_splitter->ConvertDialogToPixels(wxSize(100, 100)), wxSP_3DBORDER|wxSP_3DSASH|wxSP_PERMIT_UNSPLIT|wxNO_BORDER );
01241 this->m_scope_vert_splitter_bottom->SetMinimumPaneSize( 50);
01242
01243 for( int i= 0; i< SCOPE_NUM_PANELS/ 2; i++)
01244 {
01245 this->m_scope_panel_array[ i] = new DrawingPanel( i, this->m_scope_vert_splitter_top, ID_DRAWING_PANEL+ 1000+ i, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
01246 MainFrame::g_scope_panel_array[ i]= this->m_scope_panel_array[ i];
01247 }
01248 for( ; i< SCOPE_NUM_PANELS; i++)
01249 {
01250 this->m_scope_panel_array[ i] = new DrawingPanel( i, this->m_scope_vert_splitter_bottom, ID_DRAWING_PANEL+ 1000+ i, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
01251 MainFrame::g_scope_panel_array[ i]= this->m_scope_panel_array[ i];
01252 }
01253
01254 this->m_scope_vert_splitter_top->SetSashGravity( 0.5);
01255 this->m_scope_vert_splitter_bottom->SetSashGravity( 0.5);
01256 this->m_scope_horiz_splitter->SetSashGravity( 0.5);
01257
01258
01259
01260 this->m_grid_line_type_1_control->Append( _("NO GRID"));
01261 this->m_grid_line_type_1_control->Append( _("SOLID"));
01262 this->m_grid_line_type_1_control->Append( _("DASHED"));
01263 this->m_grid_line_type_1_control->Append( _("DASH-DOT"));
01264 this->m_grid_line_type_1_control->Append( _("DOTTED"));
01265
01266 this->m_grid_line_type_1_control->SetSelection( 0);
01267
01268 this->m_grid_line_type_2_control->Append( _("NO GRID"));
01269 this->m_grid_line_type_2_control->Append( _("SOLID"));
01270 this->m_grid_line_type_2_control->Append( _("DASHED"));
01271 this->m_grid_line_type_2_control->Append( _("DASH-DOT"));
01272 this->m_grid_line_type_2_control->Append( _("DOTTED"));
01273
01274 this->m_grid_line_type_2_control->SetSelection( 0);
01275
01276 this->m_grid_line_type_3_control->Append( _("NO GRID"));
01277 this->m_grid_line_type_3_control->Append( _("SOLID"));
01278 this->m_grid_line_type_3_control->Append( _("DASHED"));
01279 this->m_grid_line_type_3_control->Append( _("DASH-DOT"));
01280 this->m_grid_line_type_3_control->Append( _("DOTTED"));
01281
01282 this->m_grid_line_type_3_control->SetSelection( 0);
01283
01284 this->m_grid_line_type_4_control->Append( _("NO GRID"));
01285 this->m_grid_line_type_4_control->Append( _("SOLID"));
01286 this->m_grid_line_type_4_control->Append( _("DASHED"));
01287 this->m_grid_line_type_4_control->Append( _("DASH-DOT"));
01288 this->m_grid_line_type_4_control->Append( _("DOTTED"));
01289
01290 this->m_grid_line_type_4_control->SetSelection( 0);
01291
01292
01293
01294
01295 this->m_size_X_control->Append( _("512"));
01296 this->m_size_X_control->Append( _("1 K"));
01297 this->m_size_X_control->Append( _("2 K"));
01298 this->m_size_X_control->Append( _("4 K"));
01299 this->m_size_X_control->Append( _("8 K"));
01300 this->m_size_X_control->Append( _("16 K"));
01301 this->m_size_X_control->Append( _("32 K"));
01302 this->m_size_X_control->Append( _("64 K"));
01303 this->m_size_X_control->Append( _("128 K"));
01304 this->m_size_X_control->Append( _("256 K"));
01305 this->m_size_X_control->Append( _("512 K"));
01306
01307 this->m_size_X_control->SetSelection( 0);
01308
01309
01310
01311
01312 this->m_sec_per_div_1_control->Append( _("100 nS"));
01313 this->m_sec_per_div_1_control->Append( _("500 nS"));
01314 this->m_sec_per_div_1_control->Append( _(" 1 uS"));
01315 this->m_sec_per_div_1_control->Append( _(" 5 uS"));
01316 this->m_sec_per_div_1_control->Append( _(" 10 uS"));
01317 this->m_sec_per_div_1_control->Append( _(" 50 uS"));
01318 this->m_sec_per_div_1_control->Append( _("100 uS"));
01319 this->m_sec_per_div_1_control->Append( _("500 uS"));
01320 this->m_sec_per_div_1_control->Append( _(" 1 mS"));
01321 this->m_sec_per_div_1_control->Append( _(" 5 mS"));
01322
01323 this->m_sec_per_div_1_control->SetSelection( 0);
01324
01325 this->m_sec_per_div_2_control->Append( _("100 nS"));
01326 this->m_sec_per_div_2_control->Append( _("500 nS"));
01327 this->m_sec_per_div_2_control->Append( _(" 1 uS"));
01328 this->m_sec_per_div_2_control->Append( _(" 5 uS"));
01329 this->m_sec_per_div_2_control->Append( _(" 10 uS"));
01330 this->m_sec_per_div_2_control->Append( _(" 50 uS"));
01331 this->m_sec_per_div_2_control->Append( _("100 uS"));
01332 this->m_sec_per_div_2_control->Append( _("500 uS"));
01333 this->m_sec_per_div_2_control->Append( _(" 1 mS"));
01334 this->m_sec_per_div_2_control->Append( _(" 5 mS"));
01335
01336 this->m_sec_per_div_2_control->SetSelection( 0);
01337
01338 this->m_sec_per_div_3_control->Append( _("100 nS"));
01339 this->m_sec_per_div_3_control->Append( _("500 nS"));
01340 this->m_sec_per_div_3_control->Append( _(" 1 uS"));
01341 this->m_sec_per_div_3_control->Append( _(" 5 uS"));
01342 this->m_sec_per_div_3_control->Append( _(" 10 uS"));
01343 this->m_sec_per_div_3_control->Append( _(" 50 uS"));
01344 this->m_sec_per_div_3_control->Append( _("100 uS"));
01345 this->m_sec_per_div_3_control->Append( _("500 uS"));
01346 this->m_sec_per_div_3_control->Append( _(" 1 mS"));
01347 this->m_sec_per_div_3_control->Append( _(" 5 mS"));
01348
01349 this->m_sec_per_div_3_control->SetSelection( 0);
01350
01351 this->m_sec_per_div_4_control->Append( _("100 nS"));
01352 this->m_sec_per_div_4_control->Append( _("500 nS"));
01353 this->m_sec_per_div_4_control->Append( _(" 1 uS"));
01354 this->m_sec_per_div_4_control->Append( _(" 5 uS"));
01355 this->m_sec_per_div_4_control->Append( _(" 10 uS"));
01356 this->m_sec_per_div_4_control->Append( _(" 50 uS"));
01357 this->m_sec_per_div_4_control->Append( _("100 uS"));
01358 this->m_sec_per_div_4_control->Append( _("500 uS"));
01359 this->m_sec_per_div_4_control->Append( _(" 1 mS"));
01360 this->m_sec_per_div_4_control->Append( _(" 5 mS"));
01361
01362 this->m_sec_per_div_4_control->SetSelection( 0);
01363
01364
01365
01366 this->m_trigger_edge_control->Append( _("NO TRIG"));
01367 this->m_trigger_edge_control->Append( _("RAISING"));
01368 this->m_trigger_edge_control->Append( _("FALLING"));
01369
01370 }
01371
01376 bool MainFrame::ShowToolTips()
01377 {
01378 return true;
01379 }
01380
01385 wxBitmap MainFrame::GetBitmapResource( const wxString& name )
01386 {
01387
01389 wxUnusedVar(name);
01390 if (name == _T("exit_34.png"))
01391 {
01392 wxBitmap bitmap(_T("exit_34.png"), wxBITMAP_TYPE_PNG);
01393 return bitmap;
01394 }
01395 else if (name == _T("view_left_34.PNG"))
01396 {
01397 wxBitmap bitmap(_T("view_left_34.PNG"), wxBITMAP_TYPE_PNG);
01398 return bitmap;
01399 }
01400 else if (name == _T("view_bottom_34.PNG"))
01401 {
01402 wxBitmap bitmap(_T("view_bottom_34.PNG"), wxBITMAP_TYPE_PNG);
01403 return bitmap;
01404 }
01405 else if (name == _T("scope_lt.png"))
01406 {
01407 wxBitmap bitmap(_T("scope_lt.png"), wxBITMAP_TYPE_PNG);
01408 return bitmap;
01409 }
01410 else if (name == _T("scope_rt.png"))
01411 {
01412 wxBitmap bitmap(_T("scope_rt.png"), wxBITMAP_TYPE_PNG);
01413 return bitmap;
01414 }
01415 else if (name == _T("scope_lb.png"))
01416 {
01417 wxBitmap bitmap(_T("scope_lb.png"), wxBITMAP_TYPE_PNG);
01418 return bitmap;
01419 }
01420 else if (name == _T("scope_rb.png"))
01421 {
01422 wxBitmap bitmap(_T("scope_rb.png"), wxBITMAP_TYPE_PNG);
01423 return bitmap;
01424 }
01425 else if (name == _T("about_34.png"))
01426 {
01427 wxBitmap bitmap(_T("about_34.png"), wxBITMAP_TYPE_PNG);
01428 return bitmap;
01429 }
01430 return wxNullBitmap;
01432 }
01433
01438 wxIcon MainFrame::GetIconResource( const wxString& )
01439 {
01440
01441 #include "scope2.xpm"
01442 wxIcon icon( scope2_xpm);
01443 return icon;
01444
01445
01446
01447
01448
01449
01450
01451
01452 }
01457 void MainFrame::OnExitToolClick( wxCommandEvent& )
01458 {
01459 this->Close();
01460 }
01461
01462
01467 void MainFrame::OnLeftWindowSashDragged( wxSashEvent& event )
01468 {
01469 if (event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE)
01470 return;
01471
01472 this->m_left_pane->SetDefaultSize(wxSize(event.GetDragRect().width, 1000));
01473 #if wxUSE_MDI_ARCHITECTURE
01474 wxLayoutAlgorithm layout;
01475 layout.LayoutFrame(this);
01476 #endif // wxUSE_MDI_ARCHITECTURE
01477 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
01478 {
01479 this->ScopeRefresh( i, false);
01480 }
01481 }
01482
01487 void MainFrame::OnSize( wxSizeEvent& )
01488 {
01489 #if wxUSE_MDI_ARCHITECTURE
01490 wxLayoutAlgorithm layout;
01491 layout.LayoutFrame(this);
01492 #endif // wxUSE_MDI_ARCHITECTURE
01493 this->CheckScopeSplitters();
01494 if( this->m_main_toolbar)
01495 this->m_main_toolbar->Refresh( true);
01496 }
01497
01498
01503 void MainFrame::OnBottomWindowSashDragged( wxSashEvent& event )
01504 {
01505 if (event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE)
01506 return;
01507
01508 this->m_bottom_pane->SetDefaultSize( wxSize( 1000, event.GetDragRect().height));
01509 #if wxUSE_MDI_ARCHITECTURE
01510 wxLayoutAlgorithm layout;
01511 layout.LayoutFrame(this);
01512 #endif // wxUSE_MDI_ARCHITECTURE
01513 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
01514 {
01515 this->ScopeRefresh( i, false);
01516 }
01517 }
01518
01519
01524 void MainFrame::OnCloseWindow( wxCloseEvent& event )
01525 {
01526 if( this->m_app_settings)
01527 {
01528 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
01529 {
01530 ::wxMutexGuiLeave();
01531 (( GenericBoard*)this->m_app_settings->m_board_array[i])->DoStopRunning();
01532 }
01533 {
01534 wxMutexLocker lock( this->m_app_settings->m_mutex);
01535 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
01536 {
01537 this->m_scope_panel_array[i]->Freeze();
01538 }
01539 this->m_app_settings->Save();
01540 }
01541 delete this->m_app_settings;
01542 this->m_app_settings= NULL;
01543 }
01544 event.Skip();
01545 }
01546
01547
01551 #include "virtual_board_channel.h"
01552 void MainFrame::OnCommonRunTogglebuttonClick( wxCommandEvent& )
01553 {
01554 this->DoStartStopRunning();
01555 }
01556
01557 void MainFrame::DoStartStopRunning( void)
01558 {
01559 this->m_common_run_control->SetLabel( this->m_common_run_control->GetValue()? _("Stop"): _("Run"));
01560 MainFrame::SetStsBarText( this->m_common_run_control->GetValue() ? _("RUN"): _(""), STS_BAR_PANE_RUN);
01561 this->m_common_TTL_control->Enable( !this->m_common_run_control->GetValue());
01562
01563 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
01564 {
01565 ((GenericBoard*) this->m_app_settings->m_board_array[i])->WriteTriggerMode( this->m_common_run_control->GetValue()!= 0);
01566 if( this->m_common_run_control->GetValue()!= 0)
01567 {
01568 ((GenericBoard*) this->m_app_settings->m_board_array[i])->DoStartRunning();
01569 }
01570 else
01571 {
01572 ::wxMutexGuiLeave();
01573 ((GenericBoard*) this->m_app_settings->m_board_array[i])->DoStopRunning();
01574 }
01575 }
01576 }
01577
01578
01583 void MainFrame::OnTriggerForceButtonClick( wxCommandEvent& )
01584 {
01585 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
01586 {
01587 ((GenericBoard*) this->m_app_settings->m_board_array[i])->WriteSoftwareTrigger();
01588 }
01589 }
01590
01591
01596 void MainFrame::OnTriggerAutoTogglebuttonClick( wxCommandEvent& )
01597 {
01598 wxMutexLocker lock( this->m_app_settings->m_mutex);
01599 int msk= this->m_app_settings->m_trigger_msk;
01600 if( this->m_trigger_auto_control->GetValue())
01601 msk|= (int)AppSettings::SW_AUTO_TRIGGER_MSK;
01602 else
01603 msk&= ~(int)AppSettings::SW_AUTO_TRIGGER_MSK;
01604 this->m_app_settings->m_trigger_msk= (AppSettings::TRIGGER_MSK)msk;
01605 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
01606 {
01607 this->ScopeRefresh( i, false);
01608 }
01609 MainFrame::SetStsBarText( this->m_trigger_auto_control->GetValue() ? _("AUTO TRIG"): _(""), STS_BAR_PANE_AUTO_TRIG);
01610 }
01611
01612
01617 void MainFrame::OnTriggerExtTogglebuttonClick( wxCommandEvent& )
01618 {
01619 wxMutexLocker lock( this->m_app_settings->m_mutex);
01620 int msk= this->m_app_settings->m_trigger_msk;
01621 if( this->m_trigger_ext_control->GetValue())
01622 msk|= (int)AppSettings::EXT_TRIGGER_MSK;
01623 else
01624 msk&= ~(int)AppSettings::EXT_TRIGGER_MSK;
01625 this->m_app_settings->m_trigger_msk= (AppSettings::TRIGGER_MSK)msk;
01626 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
01627 {
01628 ((GenericBoard*) this->m_app_settings->m_board_array[i])->WriteTriggerMode( this->m_common_run_control->GetValue()!= 0);
01629 }
01630 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
01631 {
01632 this->ScopeRefresh( i, false);
01633 }
01634 MainFrame::SetStsBarText( this->m_trigger_ext_control->GetValue() ? _("EXT TRIG"): _(""), STS_BAR_PANE_EXT_TRIG);
01635
01636 }
01637
01642 void MainFrame::OnTriggerPostSpinctrlUpdated( wxSpinEvent& event )
01643 {
01644 this->UpdateTriggerPost( event.GetPosition());
01645 }
01646
01647
01652 void MainFrame::OnViewLeftToolClick( wxCommandEvent& )
01653 {
01654 this->DoShowHideLeftPane();
01655 }
01656
01657 void MainFrame::DoShowHideLeftPane( )
01658 {
01659 this->m_left_pane->Show( !this->m_left_pane->IsShown( ));
01660 this->m_app_settings->m_show_left_pane= this->m_left_pane->IsShown( );
01661 #if wxUSE_MDI_ARCHITECTURE
01662 wxLayoutAlgorithm layout;
01663 layout.LayoutFrame(this);
01664 #endif // wxUSE_MDI_ARCHITECTURE
01665 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
01666 {
01667 this->ScopeRefresh( i, false);
01668 }
01669 }
01670
01675 void MainFrame::OnViewBottomToolClick( wxCommandEvent& )
01676 {
01677 this->DoShowHideBottomPane( );
01678 }
01679
01680 void MainFrame::DoShowHideBottomPane( )
01681 {
01682 this->m_bottom_pane->Show( !this->m_bottom_pane->IsShown( ));
01683 this->m_app_settings->m_show_bottom_pane= this->m_bottom_pane->IsShown( );
01684 #if wxUSE_MDI_ARCHITECTURE
01685 wxLayoutAlgorithm layout;
01686 layout.LayoutFrame(this);
01687 #endif // wxUSE_MDI_ARCHITECTURE
01688 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
01689 {
01690 this->ScopeRefresh( i, false);
01691 }
01692 }
01693
01698 void MainFrame::OnGridChooseColor1ButtonClick( wxCommandEvent& )
01699 {
01700 this->DoGridChooseColor( 0, this->m_grid_color_1_control);
01701 }
01702 void MainFrame::DoGridChooseColor( int scope_index, wxPanel *grid_color_control)
01703 {
01704 wxColourData colour_data;
01705 colour_data.SetColour( this->m_app_settings->m_grid_line_color[ scope_index]);
01706 wxColourDialog *dlg= new wxColourDialog( this, &colour_data);
01707 dlg->Centre();
01708 if( dlg->ShowModal()== wxID_OK)
01709 {
01710 wxMutexLocker lock( this->m_app_settings->m_mutex);
01711 this->m_app_settings->m_grid_line_color[ scope_index]= dlg->GetColourData().GetColour();
01712 grid_color_control->SetBackgroundColour( this->m_app_settings->m_grid_line_color[ scope_index]);
01713 grid_color_control->Refresh();
01714 this->UpdateGrid( scope_index);
01715 }
01716 delete dlg;
01717 }
01718
01719 bool MainFrame::UpdateControls( void)
01720 {
01721 wxMutexLocker lock( this->m_app_settings->m_mutex);
01722
01723
01724 this->m_back_color_1_control->SetBackgroundColour( this->m_app_settings->m_background_color[ 0]);
01725 this->m_back_color_1_control->Refresh();
01726 wxBrush back_1_brush= wxBrush( this->m_app_settings->m_background_color[ 0]);
01727 this->m_app_settings->SetBackBrush( 0, &back_1_brush);
01728
01729 this->m_back_color_2_control->SetBackgroundColour( this->m_app_settings->m_background_color[ 1]);
01730 this->m_back_color_2_control->Refresh();
01731 wxBrush back_2_brush= wxBrush( this->m_app_settings->m_background_color[ 1]);
01732 this->m_app_settings->SetBackBrush( 1, &back_2_brush);
01733
01734 this->m_back_color_3_control->SetBackgroundColour( this->m_app_settings->m_background_color[ 2]);
01735 this->m_back_color_3_control->Refresh();
01736 wxBrush back_3_brush= wxBrush( this->m_app_settings->m_background_color[ 2]);
01737 this->m_app_settings->SetBackBrush( 2, &back_3_brush);
01738
01739 this->m_back_color_4_control->SetBackgroundColour( this->m_app_settings->m_background_color[ 3]);
01740 this->m_back_color_4_control->Refresh();
01741 wxBrush back_4_brush= wxBrush( this->m_app_settings->m_background_color[ 3]);
01742 this->m_app_settings->SetBackBrush( 3, &back_4_brush);
01743
01744
01745 this->m_grid_line_type_1_control->SetSelection( (int)this->m_app_settings->m_grid_line_type[ 0]);
01746 this->m_grid_line_width_1_control->SetValue( (int)this->m_app_settings->m_grid_line_width[ 0]);
01747 this->m_grid_color_1_control->SetBackgroundColour( this->m_app_settings->m_grid_line_color[ 0]);
01748 this->m_grid_color_1_control->Refresh();
01749 this->UpdateGrid( 0);
01750
01751 this->m_grid_line_type_2_control->SetSelection( (int)this->m_app_settings->m_grid_line_type[ 1]);
01752 this->m_grid_line_width_2_control->SetValue( (int)this->m_app_settings->m_grid_line_width[ 1]);
01753 this->m_grid_color_2_control->SetBackgroundColour( this->m_app_settings->m_grid_line_color[ 1]);
01754 this->m_grid_color_2_control->Refresh();
01755 this->UpdateGrid( 1);
01756
01757 this->m_grid_line_type_3_control->SetSelection( (int)this->m_app_settings->m_grid_line_type[ 2]);
01758 this->m_grid_line_width_3_control->SetValue( (int)this->m_app_settings->m_grid_line_width[ 2]);
01759 this->m_grid_color_3_control->SetBackgroundColour( this->m_app_settings->m_grid_line_color[ 2]);
01760 this->m_grid_color_3_control->Refresh();
01761 this->UpdateGrid( 2);
01762
01763 this->m_grid_line_type_4_control->SetSelection( (int)this->m_app_settings->m_grid_line_type[ 3]);
01764 this->m_grid_line_width_4_control->SetValue( (int)this->m_app_settings->m_grid_line_width[ 3]);
01765 this->m_grid_color_4_control->SetBackgroundColour( this->m_app_settings->m_grid_line_color[ 3]);
01766 this->m_grid_color_4_control->Refresh();
01767 this->UpdateGrid( 3);
01768
01769
01770 this->m_trigger_ext_control->SetValue( (this->m_app_settings->m_trigger_msk& AppSettings::EXT_TRIGGER_MSK)!= 0);
01771 this->m_trigger_auto_control->SetValue( (this->m_app_settings->m_trigger_msk& AppSettings::SW_AUTO_TRIGGER_MSK)!= 0);
01772 this->m_trigger_post_control->SetValue( this->m_app_settings->m_post_trigger);
01773 this->m_trigger_edge_control->SetSelection( this->m_app_settings->m_trigger_edge_type);
01774 this->UpdateTriggerEdge();
01775
01776
01777 this->m_record_dir_control->SetValue( this->m_app_settings->m_record_folder);
01778 this->UpdateRecordFolder();
01779
01780
01781 this->m_size_X_control->SetSelection( this->m_app_settings->m_sample_block_size);
01782
01783
01784 const int num_sels= sizeof( SEC_PER_DIV_TABLE)/sizeof( SEC_PER_DIV_TABLE[0]);
01785 double sec_per_div_1= 1/ this->m_app_settings->m_sec_2_div[ 0];
01786 for( int i= 1; i< num_sels; i++)
01787 {
01788 if( ( SEC_PER_DIV_TABLE[i-1]<= sec_per_div_1)&&
01789 ( SEC_PER_DIV_TABLE[i]>= sec_per_div_1))
01790 {
01791 if(( sec_per_div_1- SEC_PER_DIV_TABLE[i-1])< ( SEC_PER_DIV_TABLE[i]- sec_per_div_1))
01792 {
01793 this->m_sec_per_div_1_control->SetSelection( i- 1);
01794 }
01795 else
01796 {
01797 this->m_sec_per_div_1_control->SetSelection( i);
01798 }
01799 break;
01800 }
01801 }
01802 double sec_per_div_2= 1/ this->m_app_settings->m_sec_2_div[ 1];
01803 for( int i= 1; i< num_sels; i++)
01804 {
01805 if( ( SEC_PER_DIV_TABLE[i-1]<= sec_per_div_2)&&
01806 ( SEC_PER_DIV_TABLE[i]>= sec_per_div_2))
01807 {
01808 if(( sec_per_div_2- SEC_PER_DIV_TABLE[i-1])< ( SEC_PER_DIV_TABLE[i]- sec_per_div_2))
01809 {
01810 this->m_sec_per_div_2_control->SetSelection( i- 1);
01811 }
01812 else
01813 {
01814 this->m_sec_per_div_2_control->SetSelection( i);
01815 }
01816 break;
01817 }
01818 }
01819 double sec_per_div_3= 1/ this->m_app_settings->m_sec_2_div[ 2];
01820 for( int i= 1; i< num_sels; i++)
01821 {
01822 if( ( SEC_PER_DIV_TABLE[i-1]<= sec_per_div_3)&&
01823 ( SEC_PER_DIV_TABLE[i]>= sec_per_div_3))
01824 {
01825 if(( sec_per_div_3- SEC_PER_DIV_TABLE[i-1])< ( SEC_PER_DIV_TABLE[i]- sec_per_div_3))
01826 {
01827 this->m_sec_per_div_3_control->SetSelection( i- 1);
01828 }
01829 else
01830 {
01831 this->m_sec_per_div_3_control->SetSelection( i);
01832 }
01833 break;
01834 }
01835 }
01836 double sec_per_div_4= 1/ this->m_app_settings->m_sec_2_div[ 3];
01837 for( int i= 1; i< num_sels; i++)
01838 {
01839 if( ( SEC_PER_DIV_TABLE[i-1]<= sec_per_div_4)&&
01840 ( SEC_PER_DIV_TABLE[i]>= sec_per_div_4))
01841 {
01842 if(( sec_per_div_4- SEC_PER_DIV_TABLE[i-1])< ( SEC_PER_DIV_TABLE[i]- sec_per_div_4))
01843 {
01844 this->m_sec_per_div_4_control->SetSelection( i- 1);
01845 }
01846 else
01847 {
01848 this->m_sec_per_div_4_control->SetSelection( i);
01849 }
01850 break;
01851 }
01852 }
01853
01854
01855 this->m_app_settings->m_max_log_X= ( (int)pow( 2, this->m_app_settings->m_sample_block_size))<< 9;
01856 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
01857 {
01858 (( GenericBoard*)this->m_app_settings->m_board_array[i])->WriteSampleBufferSize();
01859 }
01860
01861 this->m_offset_sec_1_control->SetValue( (int)(double)( this->m_app_settings->m_offset_sec[ 0]* 1000000.0));
01862 this->m_offset_sec_2_control->SetValue( (int)(double)( this->m_app_settings->m_offset_sec[ 1]* 1000000.0));
01863 this->m_offset_sec_3_control->SetValue( (int)(double)( this->m_app_settings->m_offset_sec[ 2]* 1000000.0));
01864 this->m_offset_sec_4_control->SetValue( (int)(double)( this->m_app_settings->m_offset_sec[ 3]* 1000000.0));
01865
01866 this->m_use_ext_clock_control->SetValue( this->m_app_settings->m_use_ext_clock);
01867 this->m_ext_clock_control->SetValue( this->m_app_settings->m_ext_rate_MHz);
01868
01869 this->AdjustTriggerPost();
01870 this->m_trigger_position_keep_control->SetValue( this->m_app_settings->m_trigger_position_keep);
01871
01872 this->m_common_TTL_control->SetValue( this->m_app_settings->m_use_TTL);
01873 this->UpdateUseTTL();
01874
01875 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
01876 {
01877 this->ScopeRefresh( i, true);
01878 }
01879
01880
01881 MainFrame::SetStsBarText( this->m_app_settings->m_use_ext_clock? _("EXT CLK"): _(""), STS_BAR_PANE_EXT_CLOCK);
01882 MainFrame::SetStsBarText( this->m_trigger_ext_control->GetValue() ? _("EXT TRIG"): _(""), STS_BAR_PANE_EXT_TRIG);
01883 MainFrame::SetStsBarText( this->m_trigger_auto_control->GetValue() ? _("AUTO TRIG"): _(""), STS_BAR_PANE_AUTO_TRIG);
01884
01885 return true;
01886 }
01887 bool MainFrame::UpdateGrid( int scope_index)
01888 {
01889 wxMutexLocker lock( this->m_app_settings->m_mutex);
01890 int wx_pen_style= wxSOLID;
01891 switch( this->m_app_settings->m_grid_line_type[ scope_index])
01892 {
01893 case AppSettings::NO_LINE:
01894 if( !this->m_app_settings->SetGridPen( scope_index, NULL))
01895 return false;
01896 this->ScopeRefresh( scope_index, true);
01897 return true;
01898 case AppSettings::DASHED:
01899 wx_pen_style= wxSHORT_DASH;
01900 break;
01901 case AppSettings::DOTTED:
01902 wx_pen_style= wxDOT;
01903 break;
01904 case AppSettings::DASH_DOT:
01905 wx_pen_style= wxDOT_DASH;
01906 break;
01907 case AppSettings::SOLID:
01908 default:
01909 wx_pen_style= wxSOLID;
01910 break;
01911 }
01912 wxPen grid_pen= wxPen( this->m_app_settings->m_grid_line_color[ scope_index], this->m_app_settings->m_grid_line_width[ scope_index], wx_pen_style);
01913
01914
01915 wxPen mid_grid_pen= wxPen( this->m_app_settings->m_grid_line_color[ scope_index], this->m_app_settings->m_grid_line_width[ scope_index]+ 1, wx_pen_style);
01916 if( !this->m_app_settings->SetGridPen( scope_index, &grid_pen, &mid_grid_pen))
01917 return false;
01918 this->ScopeRefresh( scope_index, true);
01919
01920 return true;
01921 }
01922
01927 void MainFrame::OnGridLineWidth1SpinctrlUpdated( wxSpinEvent& event )
01928 {
01929 this->UpdateGridLineWidth( 0, event.GetPosition());
01930 }
01931
01932
01937 void MainFrame::OnGridLineType1ChoiceSelected( wxCommandEvent& )
01938 {
01939 wxMutexLocker lock( this->m_app_settings->m_mutex);
01940 this->m_app_settings->m_grid_line_type[ 0]= ( AppSettings::GRID_LINE_TYPE)this->m_grid_line_type_1_control->GetSelection();
01941 this->UpdateGrid( 0);
01942 }
01943
01944
01949 void MainFrame::OnBackChooseColor1ButtonClick( wxCommandEvent& )
01950 {
01951 this->DoChooseColor( 0, this->m_back_color_1_control);
01952 }
01953 void MainFrame::DoChooseColor( int scope_index, wxPanel *back_color_control)
01954 {
01955 wxColourData colour_data;
01956 colour_data.SetColour( this->m_app_settings->m_background_color[ scope_index]);
01957 wxColourDialog *dlg= new wxColourDialog( this, &colour_data);
01958 dlg->Centre();
01959 if( dlg->ShowModal()== wxID_OK)
01960 {
01961 wxMutexLocker lock( this->m_app_settings->m_mutex);
01962 this->m_app_settings->m_background_color[ scope_index]= dlg->GetColourData().GetColour();
01963 back_color_control->SetBackgroundColour( this->m_app_settings->m_background_color[ scope_index]);
01964 back_color_control->Refresh();
01965 wxBrush back_brush= wxBrush( this->m_app_settings->m_background_color[ scope_index]);
01966 this->m_app_settings->SetBackBrush( scope_index, &back_brush);
01967 this->ScopeRefresh( scope_index, true);
01968 }
01969 delete dlg;
01970 }
01971
01972
01973 void MainFrame:: ScopeRefresh( int scope_index, bool erase_background)
01974 {
01975 if( MainFrame::g_scope_panel_array[ scope_index]== NULL)
01976 return;
01977 if( !MainFrame::g_scope_panel_array[ scope_index]->IsShown())
01978 return;
01979 if( erase_background)
01980 {
01981 MainFrame::g_scope_panel_array[ scope_index]->RefreshBackBitmap();
01982 MainFrame::g_scope_panel_array[ scope_index]->RefreshLeftBackBitmap();
01983 }
01984 #ifndef __WXMSW__
01985 if( !::wxIsMainThread())
01986 ::wxMutexGuiEnter();
01987 #endif
01988 MainFrame::g_scope_panel_array[ scope_index]->Refresh();
01989 #ifndef __WXMSW__
01990 if( !::wxIsMainThread())
01991 ::wxMutexGuiLeave();
01992 #endif
01993 }
01994
01995
02000 void MainFrame::OnSizeXChoiceSelected( wxCommandEvent& )
02001 {
02002 this->m_app_settings->m_sample_block_size= this->m_size_X_control->GetSelection();
02003 this->m_app_settings->m_max_log_X= ( (int)pow( 2, this->m_app_settings->m_sample_block_size))<< 9;
02004
02005 this->AdjustTriggerPost();
02006
02007 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
02008 {
02009 (( GenericBoard*)this->m_app_settings->m_board_array[i])->WriteSampleBufferSize();
02010 }
02011
02012 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
02013 {
02014 this->ScopeRefresh( i, true);
02015 }
02016 }
02017
02018
02023 void MainFrame::OnGridLineWidth1SpinctrlTextUpdated( wxCommandEvent& )
02024 {
02025 int value= atoi( this->m_grid_line_width_1_control->GetLabel());
02026 this->UpdateGridLineWidth( 0, value);
02027 }
02028
02029 void MainFrame::UpdateGridLineWidth( int scope_index, int value)
02030 {
02031 wxMutexLocker lock( this->m_app_settings->m_mutex);
02032 this->m_app_settings->m_grid_line_width[ scope_index]= value;
02033 this->UpdateGrid( scope_index);
02034 }
02035
02036
02041 void MainFrame::OnTriggerPostSpinctrlTextUpdated( wxCommandEvent& )
02042 {
02043 int value= atoi( this->m_trigger_post_control->GetLabel());
02044 this->UpdateTriggerPost( value);
02045 }
02046
02047 void MainFrame::UpdateTriggerPost( int value)
02048 {
02049 wxMutexLocker lock( this->m_app_settings->m_mutex);
02050 this->m_app_settings->m_post_trigger= value;
02051 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
02052 {
02053 ((GenericBoard*) this->m_app_settings->m_board_array[i])->WriteTriggerMode( this->m_common_run_control->GetValue()!= 0);
02054 }
02055 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
02056 {
02057 this->ScopeRefresh( i, true);
02058 }
02059 }
02060
02065 void MainFrame::OnSecPerDiv1ChoiceSelected( wxCommandEvent& )
02066 {
02067 int selection= this->m_sec_per_div_1_control->GetSelection();
02068 this->UpdateSecPerDiv( 0, selection, this->m_offset_sec_1_control);
02069 }
02070 void MainFrame::UpdateSecPerDiv( int scope_index, int selection, wxSpinCtrl* offset_sec_control)
02071 {
02072 if( selection>= sizeof( SEC_PER_DIV_TABLE)/sizeof( SEC_PER_DIV_TABLE[0]))
02073 return;
02074 if( this->m_app_settings->m_trigger_position_keep)
02075 {
02076 double sec_2_div_old= this->m_app_settings->m_sec_2_div[ scope_index];
02077 double sample_2_sec_old= this->m_app_settings->m_sample_2_sec;
02078 this->m_app_settings->SetSec2Div( scope_index, 1.0/ SEC_PER_DIV_TABLE[ selection]);
02079
02080 double fix_old= sec_2_div_old*( this->m_app_settings->m_offset_sec[ scope_index]+ sample_2_sec_old*( this->m_app_settings->m_max_log_X- this->m_app_settings->m_post_trigger));
02081 this->m_app_settings->m_offset_sec[ scope_index]= fix_old/ this->m_app_settings->m_sec_2_div[ scope_index]- this->m_app_settings->m_sample_2_sec*( this->m_app_settings->m_max_log_X- this->m_app_settings->m_post_trigger);
02082 offset_sec_control->SetValue( (int)(double)( this->m_app_settings->m_offset_sec[ scope_index]* 1000000.0));
02083 }
02084 else
02085 {
02086 this->m_app_settings->SetSec2Div( scope_index, 1.0/ SEC_PER_DIV_TABLE[ selection]);
02087 }
02088 this->ScopeRefresh( scope_index, true);
02089 }
02090
02091
02096 void MainFrame::OnOffsetSec1SpinctrlUpdated( wxSpinEvent& event )
02097 {
02098 this->UpdateOffsetSec( 0, event.GetPosition());
02099 }
02100
02105 void MainFrame::OnOffsetSec1SpinctrlTextUpdated( wxCommandEvent& )
02106 {
02107 int value= atoi( this->m_offset_sec_1_control->GetLabel());
02108 this->UpdateOffsetSec( 0, value);
02109 }
02110
02111 void MainFrame::UpdateOffsetSec( int scope_index, int value)
02112 {
02113 wxMutexLocker lock( this->m_app_settings->m_mutex);
02114 this->m_app_settings->m_offset_sec[ scope_index]= (double)value/ 1000000.0;
02115
02116 this->ScopeRefresh( scope_index, true);
02117 }
02118
02119 bool MainFrame::UpdateRecordFolder( void)
02120 {
02121 if( !wxDir::Exists( this->m_record_dir_control->GetValue()))
02122 return false;
02123 this->m_app_settings->m_record_folder= this->m_record_dir_control->GetValue();
02124 this->m_record_dir_control->SetBackgroundColour(wxColour(255, 255, 255));
02125 this->m_record_dir_control->SetToolTip( this->m_record_dir_control->GetValue());
02126 this->m_record_dir_control->Refresh( true);
02127 return true;
02128 }
02129
02134 void MainFrame::OnRecordtogglebuttonClick( wxCommandEvent& )
02135 {
02136 wxString path= this->m_record_dir_control->GetValue();
02137 wxString file_name= _("caen_scope_");
02138 wxString date= wxDateTime::Now().FormatISODate();
02139 date.Replace( "-", "_");
02140 wxString time= wxDateTime::Now().FormatISOTime();
02141 time.Replace( ":", "_");
02142 wxString timestamp( wxString::Format( "%s_%s", date.c_str(), time.c_str()));
02143 bool start= this->m_record_start_stop_control->GetValue();
02144 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
02145 {
02146 (( GenericBoard *)this->m_app_settings->m_board_array[i])->ToggleRecordStatus( path, file_name, timestamp, start);
02147 }
02148 this->m_record_dir_browse_button->Enable( !start);
02149 this->m_record_dir_control->Enable( !start);
02150 this->m_record_start_stop_control->SetLabel( this->m_record_start_stop_control->GetValue( )? _("Stop"): _("Start"));
02151 MainFrame::SetStsBarText( this->m_record_start_stop_control->GetValue( ) ? _("REC"): _(""), STS_BAR_PANE_REC);
02152
02153 }
02154
02155
02160 void MainFrame::OnRecorddirbuttonClick( wxCommandEvent& )
02161 {
02162
02163 wxFileName org_dir( this->m_record_dir_control->GetValue());
02164 org_dir.Normalize();
02165 wxDirDialog dlg( this, "Choose a directory for recording", org_dir.GetFullPath());
02166 if( dlg.ShowModal()!= wxID_OK )
02167 return;
02168 this->m_record_dir_control->SetValue( dlg.GetPath());
02169
02170 this->UpdateRecordFolder();
02171 }
02172
02173
02178 void MainFrame::OnRecorddirtextctrlUpdated( wxCommandEvent& )
02179 {
02180 this->m_record_dir_control->SetBackgroundColour(wxColour(255, 128, 128));
02181 this->m_record_dir_control->Refresh( true);
02182 }
02183
02188 void MainFrame::OnRecorddirtextctrlEnter( wxCommandEvent& )
02189 {
02190 this->UpdateRecordFolder();
02191 }
02192
02196 void MainFrame::OnExtClockSpinctrlUpdated( wxSpinEvent& event )
02197 {
02198 this->UpdateClock( event.GetPosition());
02199 }
02200
02205 void MainFrame::OnExtClockSpinctrlTextUpdated( wxCommandEvent& )
02206 {
02207 int value= atoi( this->m_ext_clock_control->GetLabel());
02208 this->UpdateClock( value);
02209 }
02210
02215 void MainFrame::OnExtClockCheckboxClick( wxCommandEvent& )
02216 {
02217 int value= atoi( this->m_ext_clock_control->GetLabel());
02218 this->UpdateClock( value);
02219 }
02220
02221 void MainFrame::UpdateClock( int value)
02222 {
02223 this->m_ext_clock_control->Enable( this->m_use_ext_clock_control->IsChecked());
02224
02225
02226 this->m_app_settings->SetClock( this->m_use_ext_clock_control->IsChecked(), value);
02227 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
02228 {
02229 this->ScopeRefresh( i, true);
02230 }
02231 MainFrame::SetStsBarText( this->m_app_settings->m_use_ext_clock? _("EXT CLK"): _(""), STS_BAR_PANE_EXT_CLOCK);
02232 }
02233
02234
02239 void MainFrame::OnHelpToolClick( wxCommandEvent& )
02240 {
02241 InfoDialog dlg( this);
02242 dlg.ShowModal();
02243 }
02244
02245 bool MainFrame::SetStsBarText( const wxString& text, int pane_index)
02246 {
02247 if(( pane_index>= STS_BAR_NUM_PANES)|| ( MainFrame::g_main_statusbar== NULL))
02248 return false;
02249
02250 MainFrame::g_main_statusbar->SetStatusText( text, pane_index);
02251
02252 return true;
02253 }
02254
02259 void MainFrame::OnTriggerEdgeChoiceSelected( wxCommandEvent& )
02260 {
02261 this->UpdateTriggerEdge();
02262 }
02263 void MainFrame::UpdateTriggerEdge( void)
02264 {
02265 wxMutexLocker lock( this->m_app_settings->m_mutex);
02266 this->m_app_settings->m_trigger_edge_type= ( AppSettings::TRIGGER_EDGE_TYPE)this->m_trigger_edge_control->GetSelection();
02267 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
02268 {
02269 ((GenericBoard*) this->m_app_settings->m_board_array[i])->WriteTriggerMode( this->m_common_run_control->GetValue()!= 0);
02270 }
02271 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
02272 {
02273 this->ScopeRefresh( i, true);
02274 }
02275
02276 wxString sts_msg= _("");
02277 switch( this->m_app_settings->m_trigger_edge_type)
02278 {
02279 case AppSettings::FALLING_EDGE:
02280 sts_msg= _("FALLING EDGE");
02281 break;
02282 case AppSettings::RAISING_EDGE:
02283 sts_msg= _("RAISING EDGE");
02284 break;
02285 }
02286 MainFrame::SetStsBarText( sts_msg, STS_BAR_PANE_TRIG_EDGE);
02287 }
02288
02289
02294 void MainFrame::OnFrontPanelNimTogglebuttonClick( wxCommandEvent& )
02295 {
02296 this->UpdateUseTTL();
02297 }
02298
02299 void MainFrame::UpdateUseTTL( void)
02300 {
02301 wxMutexLocker lock( this->m_app_settings->m_mutex);
02302 this->m_app_settings->m_use_TTL= this->m_common_TTL_control->GetValue();
02303 for( size_t i= 0; i< this->m_app_settings->m_board_array.GetCount(); i++)
02304 {
02305 ((GenericBoard*) this->m_app_settings->m_board_array[i])->SetFrontPanelIO( this->m_app_settings->m_use_TTL!= 0);
02306 }
02307 this->m_common_TTL_control->SetLabel( this->m_app_settings->m_use_TTL? _("NIM"): _("TTL"));
02308 MainFrame::SetStsBarText( !this->m_app_settings->m_use_TTL? _("NIM"): _("TTL"), STS_BAR_PANE_NIM);
02309 }
02310
02311 void MainFrame::AdjustTriggerPost( void)
02312 {
02313 int post_trigger= this->m_trigger_post_control->GetValue();
02314 if( post_trigger>= this->m_app_settings->m_max_log_X)
02315 this->m_trigger_post_control->SetValue( this->m_app_settings->m_max_log_X- 1);
02316 this->m_trigger_post_control->SetRange( 0, this->m_app_settings->m_max_log_X- 1);
02317
02318 }
02323 void MainFrame::OnTriggerPositionKeepCheckboxClick( wxCommandEvent& )
02324 {
02325 this->m_app_settings->m_trigger_position_keep= this->m_trigger_position_keep_control->GetValue();
02326 }
02331 void MainFrame::OnViewScopeLeftTopToolClick( wxCommandEvent& )
02332 {
02333 this->DoShowHideScopeLeftTopPane( true);
02334 }
02335
02340 void MainFrame::OnViewScopeRightTopToolClick( wxCommandEvent& )
02341 {
02342 this->DoShowHideScopeRightTopPane( true);
02343 }
02344
02349 void MainFrame::OnViewScopeLeftBottomToolClick( wxCommandEvent& )
02350 {
02351 this->DoShowHideScopeLeftBottomPane( true);
02352 }
02353
02358 void MainFrame::OnViewScopeRightBottomToolClick( wxCommandEvent& )
02359 {
02360 this->DoShowHideScopeRightBottomPane( true);
02361 }
02362
02363 void MainFrame::DoShowHideScopeLeftTopPane( bool do_check)
02364 {
02365 this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT]->Show( !this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT]->IsShown( ));
02366 this->m_app_settings->m_show_scope_left_top_pane= this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT]->IsShown( );
02367 if( do_check)
02368 this->CheckScopeSplitters();
02369 }
02370
02371 void MainFrame::DoShowHideScopeRightTopPane( bool do_check)
02372 {
02373 this->m_scope_panel_array[ SCOPE_POS_TOP_RIGHT]->Show( !this->m_scope_panel_array[ SCOPE_POS_TOP_RIGHT]->IsShown( ));
02374 this->m_app_settings->m_show_scope_right_top_pane= this->m_scope_panel_array[ SCOPE_POS_TOP_RIGHT]->IsShown( );
02375 if( do_check)
02376 this->CheckScopeSplitters();
02377 }
02378
02379 void MainFrame::DoShowHideScopeLeftBottomPane( bool do_check)
02380 {
02381 this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT]->Show( !this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT]->IsShown( ));
02382 this->m_app_settings->m_show_scope_left_bottom_pane= this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT]->IsShown( );
02383 if( do_check)
02384 this->CheckScopeSplitters();
02385 }
02386 void MainFrame::DoShowHideScopeRightBottomPane( bool do_check)
02387 {
02388 this->m_scope_panel_array[ SCOPE_POS_BOTTOM_RIGHT]->Show( !this->m_scope_panel_array[ SCOPE_POS_BOTTOM_RIGHT]->IsShown( ));
02389 this->m_app_settings->m_show_scope_right_bottom_pane= this->m_scope_panel_array[ SCOPE_POS_BOTTOM_RIGHT]->IsShown( );
02390 if( do_check)
02391 this->CheckScopeSplitters();
02392 }
02393 void MainFrame::CheckScopeSplitters()
02394 {
02395 if( this->m_scope_panel_array[0]== NULL)
02396 return;
02397
02398
02399 if( !this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT]->IsShown( )&& !this->m_scope_panel_array[ SCOPE_POS_TOP_RIGHT]->IsShown( ))
02400 {
02401
02402 this->m_scope_vert_splitter_top->Show( false);
02403 if( this->m_scope_vert_splitter_top->IsSplit())
02404 this->m_scope_vert_splitter_top->Unsplit( );
02405 }
02406 else
02407 {
02408 this->m_scope_vert_splitter_top->Show( true);
02409
02410 if( this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT]->IsShown( )&& this->m_scope_panel_array[ SCOPE_POS_TOP_RIGHT]->IsShown( ))
02411 {
02412
02413 if( this->m_scope_vert_splitter_top->IsSplit())
02414 this->m_scope_vert_splitter_top->Unsplit( );
02415 this->m_scope_vert_splitter_top->SplitVertically( this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT], this->m_scope_panel_array[ SCOPE_POS_TOP_RIGHT]);
02416 int width, height;
02417 this->m_scope_vert_splitter_top->GetClientSize( &width, &height);
02418 this->m_scope_vert_splitter_top->SetSashPosition( width/2, true);
02419 }
02420 else if( this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT]->IsShown( ))
02421 {
02422 if( this->m_scope_vert_splitter_top->IsSplit())
02423 this->m_scope_vert_splitter_top->Unsplit( this->m_scope_panel_array[ SCOPE_POS_TOP_RIGHT]);
02424 else
02425 {
02426 if( this->m_scope_vert_splitter_top->GetWindow1())
02427 this->m_scope_vert_splitter_top->ReplaceWindow( this->m_scope_vert_splitter_top->GetWindow1(), this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT]);
02428 else
02429 this->m_scope_vert_splitter_top->Initialize( this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT]);
02430 }
02431 }
02432 else
02433 {
02434 if( this->m_scope_vert_splitter_top->IsSplit())
02435 this->m_scope_vert_splitter_top->Unsplit( this->m_scope_panel_array[ SCOPE_POS_TOP_LEFT]);
02436 else
02437 {
02438 if( this->m_scope_vert_splitter_top->GetWindow1())
02439 this->m_scope_vert_splitter_top->ReplaceWindow( this->m_scope_vert_splitter_top->GetWindow1(), this->m_scope_panel_array[ SCOPE_POS_TOP_RIGHT]);
02440 else
02441 this->m_scope_vert_splitter_top->Initialize( this->m_scope_panel_array[ SCOPE_POS_TOP_RIGHT]);
02442 }
02443 }
02444 }
02445
02446
02447
02448 if( !this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT]->IsShown( )&& !this->m_scope_panel_array[ SCOPE_POS_BOTTOM_RIGHT]->IsShown( ))
02449 {
02450
02451 this->m_scope_vert_splitter_bottom->Show( false);
02452 if( this->m_scope_vert_splitter_bottom->IsSplit())
02453 this->m_scope_vert_splitter_bottom->Unsplit( );
02454 }
02455 else
02456 {
02457 this->m_scope_vert_splitter_bottom->Show( true);
02458 if( this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT]->IsShown( )&& this->m_scope_panel_array[ SCOPE_POS_BOTTOM_RIGHT]->IsShown( ))
02459 {
02460
02461 if( this->m_scope_vert_splitter_bottom->IsSplit())
02462 this->m_scope_vert_splitter_bottom->Unsplit( );
02463 this->m_scope_vert_splitter_bottom->SplitVertically( this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT], this->m_scope_panel_array[ SCOPE_POS_BOTTOM_RIGHT]);
02464 int width, height;
02465 this->m_scope_vert_splitter_bottom->GetClientSize( &width, &height);
02466 this->m_scope_vert_splitter_bottom->SetSashPosition( width/2, true);
02467 }
02468 else if( this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT]->IsShown( ))
02469 {
02470 if( this->m_scope_vert_splitter_bottom->IsSplit())
02471 this->m_scope_vert_splitter_bottom->Unsplit( this->m_scope_panel_array[ SCOPE_POS_BOTTOM_RIGHT]);
02472 else
02473 {
02474 if( this->m_scope_vert_splitter_bottom->GetWindow1())
02475 this->m_scope_vert_splitter_bottom->ReplaceWindow( this->m_scope_vert_splitter_bottom->GetWindow1(), this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT]);
02476 else
02477 this->m_scope_vert_splitter_bottom->Initialize( this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT]);
02478 }
02479 }
02480 else
02481 {
02482 if( this->m_scope_vert_splitter_bottom->IsSplit())
02483 this->m_scope_vert_splitter_bottom->Unsplit( this->m_scope_panel_array[ SCOPE_POS_BOTTOM_LEFT]);
02484 else
02485 {
02486 if( this->m_scope_vert_splitter_bottom->GetWindow1())
02487 this->m_scope_vert_splitter_bottom->ReplaceWindow( this->m_scope_vert_splitter_bottom->GetWindow1(), this->m_scope_panel_array[ SCOPE_POS_BOTTOM_RIGHT]);
02488 else
02489 this->m_scope_vert_splitter_bottom->Initialize( this->m_scope_panel_array[ SCOPE_POS_BOTTOM_RIGHT]);
02490 }
02491 }
02492 }
02493
02494
02495 if( !this->m_scope_vert_splitter_top->IsShown( )&& !this->m_scope_vert_splitter_bottom->IsShown( ))
02496 {
02497 this->m_scope_horiz_splitter->Show( false);
02498 if( this->m_scope_horiz_splitter->IsSplit())
02499 this->m_scope_horiz_splitter->Unsplit( );
02500 }
02501 else
02502 {
02503 this->m_scope_horiz_splitter->Show( true);
02504
02505 if( this->m_scope_vert_splitter_top->IsShown( )&& this->m_scope_vert_splitter_bottom->IsShown( ))
02506 {
02507
02508 if( this->m_scope_horiz_splitter->IsSplit())
02509 this->m_scope_horiz_splitter->Unsplit( );
02510 this->m_scope_horiz_splitter->SplitHorizontally( this->m_scope_vert_splitter_top, this->m_scope_vert_splitter_bottom);
02511 int width, height;
02512 this->m_scope_horiz_splitter->GetClientSize( &width, &height);
02513 this->m_scope_horiz_splitter->SetSashPosition( height/ 2, true);
02514 }
02515 else if( this->m_scope_vert_splitter_top->IsShown( ))
02516 {
02517 if( this->m_scope_horiz_splitter->IsSplit())
02518 this->m_scope_horiz_splitter->Unsplit( this->m_scope_vert_splitter_bottom);
02519 else
02520 {
02521 if( this->m_scope_horiz_splitter->GetWindow1())
02522 this->m_scope_horiz_splitter->ReplaceWindow( this->m_scope_horiz_splitter->GetWindow1(), this->m_scope_vert_splitter_top);
02523 else
02524 this->m_scope_horiz_splitter->Initialize( this->m_scope_vert_splitter_top);
02525 }
02526 }
02527 else
02528 {
02529 if( this->m_scope_horiz_splitter->IsSplit())
02530 this->m_scope_horiz_splitter->Unsplit( this->m_scope_vert_splitter_top);
02531 else
02532 {
02533 if( this->m_scope_horiz_splitter->GetWindow1())
02534 this->m_scope_horiz_splitter->ReplaceWindow( this->m_scope_horiz_splitter->GetWindow1(), this->m_scope_vert_splitter_bottom);
02535 else
02536 this->m_scope_horiz_splitter->Initialize( this->m_scope_vert_splitter_bottom);
02537 }
02538 }
02539 }
02540 this->m_scope_vert_splitter_top->SetSashGravity( 0.5);
02541 this->m_scope_vert_splitter_bottom->SetSashGravity( 0.5);
02542 this->m_scope_horiz_splitter->SetSashGravity( 0.5);
02543
02544
02545 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
02546 {
02547 this->ScopeRefresh( i, false);
02548 }
02549 }
02550
02551 void MainFrame::OnScopeHorizSplitterwindowSashPosChanged( wxSplitterEvent& )
02552 {
02553 #if wxUSE_MDI_ARCHITECTURE
02554 wxLayoutAlgorithm layout;
02555 layout.LayoutFrame(this);
02556 #endif // wxUSE_MDI_ARCHITECTURE
02557 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
02558 {
02559 this->ScopeRefresh( i, false);
02560 }
02561 }
02562 void MainFrame::OnScopeVertTopSplitterwindowSashPosChanged ( wxSplitterEvent& )
02563 {
02564 #if wxUSE_MDI_ARCHITECTURE
02565 wxLayoutAlgorithm layout;
02566 layout.LayoutFrame(this);
02567 #endif // wxUSE_MDI_ARCHITECTURE
02568 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
02569 {
02570 this->ScopeRefresh( i, false);
02571 }
02572 }
02573 void MainFrame::OnScopeVertBottomSplitterwindowSashPosChanged( wxSplitterEvent& )
02574 {
02575 #if wxUSE_MDI_ARCHITECTURE
02576 wxLayoutAlgorithm layout;
02577 layout.LayoutFrame(this);
02578 #endif // wxUSE_MDI_ARCHITECTURE
02579 for( int i= 0; i< SCOPE_NUM_PANELS; i++)
02580 {
02581 this->ScopeRefresh( i, false);
02582 }
02583 }
02584
02589 void MainFrame::OnBackChooseColor2ButtonClick( wxCommandEvent& )
02590 {
02591 this->DoChooseColor( 1, this->m_back_color_2_control);
02592 }
02593
02598 void MainFrame::OnSecPerDiv2ChoiceSelected( wxCommandEvent& )
02599 {
02600 int selection= this->m_sec_per_div_2_control->GetSelection();
02601 this->UpdateSecPerDiv( 1, selection, this->m_offset_sec_2_control);
02602 }
02603
02608 void MainFrame::OnOffsetSec2SpinctrlUpdated( wxSpinEvent& event )
02609 {
02610 this->UpdateOffsetSec( 1, event.GetPosition());
02611 }
02612
02617 void MainFrame::OnOffsetSec2SpinctrlTextUpdated( wxCommandEvent& )
02618 {
02619 int value= atoi( this->m_offset_sec_2_control->GetLabel());
02620 this->UpdateOffsetSec( 1, value);
02621 }
02622
02627 void MainFrame::OnGridChooseColor2ButtonClick( wxCommandEvent& )
02628 {
02629 this->DoGridChooseColor( 1, this->m_grid_color_2_control);
02630 }
02631
02636 void MainFrame::OnGridLineWidth2SpinctrlUpdated( wxSpinEvent& event )
02637 {
02638 this->UpdateGridLineWidth( 1, event.GetPosition());
02639 }
02640
02645 void MainFrame::OnGridLineWidth2SpinctrlTextUpdated( wxCommandEvent& )
02646 {
02647 int value= atoi( this->m_grid_line_width_2_control->GetLabel());
02648 this->UpdateGridLineWidth( 1, value);
02649 }
02650
02655 void MainFrame::OnGridLineType2ChoiceSelected( wxCommandEvent& )
02656 {
02657 wxMutexLocker lock( this->m_app_settings->m_mutex);
02658 this->m_app_settings->m_grid_line_type[ 1]= ( AppSettings::GRID_LINE_TYPE)this->m_grid_line_type_2_control->GetSelection();
02659 this->UpdateGrid( 1);
02660 }
02661
02666 void MainFrame::OnBackChooseColor3ButtonClick( wxCommandEvent& )
02667 {
02668 this->DoChooseColor( 2, this->m_back_color_3_control);
02669 }
02670
02675 void MainFrame::OnSecPerDiv3ChoiceSelected( wxCommandEvent& )
02676 {
02677 int selection= this->m_sec_per_div_3_control->GetSelection();
02678 this->UpdateSecPerDiv( 2, selection, this->m_offset_sec_3_control);
02679 }
02680
02685 void MainFrame::OnOffsetSec3SpinctrlUpdated( wxSpinEvent& event )
02686 {
02687 this->UpdateOffsetSec( 2, event.GetPosition());
02688 }
02689
02694 void MainFrame::OnOffsetSec3SpinctrlTextUpdated( wxCommandEvent& )
02695 {
02696 int value= atoi( this->m_offset_sec_3_control->GetLabel());
02697 this->UpdateOffsetSec( 2, value);
02698 }
02699
02704 void MainFrame::OnGridChooseColor3ButtonClick( wxCommandEvent& )
02705 {
02706 this->DoGridChooseColor( 2, this->m_grid_color_3_control);
02707 }
02708
02713 void MainFrame::OnGridLineWidth3SpinctrlUpdated( wxSpinEvent& event )
02714 {
02715 this->UpdateGridLineWidth( 2, event.GetPosition());
02716 }
02717
02722 void MainFrame::OnGridLineWidth3SpinctrlTextUpdated( wxCommandEvent& )
02723 {
02724 int value= atoi( this->m_grid_line_width_3_control->GetLabel());
02725 this->UpdateGridLineWidth( 2, value);
02726 }
02727
02732 void MainFrame::OnGridLineType3ChoiceSelected( wxCommandEvent& )
02733 {
02734 wxMutexLocker lock( this->m_app_settings->m_mutex);
02735 this->m_app_settings->m_grid_line_type[ 2]= ( AppSettings::GRID_LINE_TYPE)this->m_grid_line_type_3_control->GetSelection();
02736 this->UpdateGrid( 2);
02737 }
02738
02743 void MainFrame::OnBackChooseColor4ButtonClick( wxCommandEvent& )
02744 {
02745 this->DoChooseColor( 3, this->m_back_color_4_control);
02746 }
02747
02752 void MainFrame::OnSecPerDiv4ChoiceSelected( wxCommandEvent& )
02753 {
02754 int selection= this->m_sec_per_div_4_control->GetSelection();
02755 this->UpdateSecPerDiv( 3, selection, this->m_offset_sec_4_control);
02756 }
02757
02762 void MainFrame::OnOffsetSec4SpinctrlUpdated( wxSpinEvent& event )
02763 {
02764 this->UpdateOffsetSec( 3, event.GetPosition());
02765 }
02766
02771 void MainFrame::OnOffsetSec4SpinctrlTextUpdated( wxCommandEvent& )
02772 {
02773 int value= atoi( this->m_offset_sec_4_control->GetLabel());
02774 this->UpdateOffsetSec( 3, value);
02775 }
02776
02781 void MainFrame::OnGridChooseColor4ButtonClick( wxCommandEvent& )
02782 {
02783 this->DoGridChooseColor( 3, this->m_grid_color_4_control);
02784 }
02785
02790 void MainFrame::OnGridLineWidth4SpinctrlUpdated( wxSpinEvent& event )
02791 {
02792 this->UpdateGridLineWidth( 3, event.GetPosition());
02793 }
02794
02799 void MainFrame::OnGridLineWidth4SpinctrlTextUpdated( wxCommandEvent& )
02800 {
02801 int value= atoi( this->m_grid_line_width_4_control->GetLabel());
02802 this->UpdateGridLineWidth( 3, value);
02803 }
02804
02809 void MainFrame::OnGridLineType4ChoiceSelected( wxCommandEvent& )
02810 {
02811 wxMutexLocker lock( this->m_app_settings->m_mutex);
02812 this->m_app_settings->m_grid_line_type[ 3]= ( AppSettings::GRID_LINE_TYPE)this->m_grid_line_type_4_control->GetSelection();
02813 this->UpdateGrid( 3);
02814 }
02815
02816