virtual_channel_def_dialog.cpp

Go to the documentation of this file.
00001 
00002 // Name:        virtual_channel_def_dialog.cpp
00003 // Purpose:     
00004 // Author:      NDA
00005 // Modified by: 
00006 // Created:     10/01/2007 12:50:38
00007 // RCS-ID:      
00008 // Copyright:   CAEN S.p.A All rights reserved.
00009 // Licence:     
00011 
00012 // Generated by DialogBlocks (unregistered), 10/01/2007 12:50:38
00013 
00014 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
00015 #pragma implementation "virtual_channel_def_dialog.h"
00016 #endif
00017 
00018 // For compilers that support precompilation, includes "wx/wx.h".
00019 #include "wx/wxprec.h"
00020 
00021 #ifdef __BORLANDC__
00022 #pragma hdrstop
00023 #endif
00024 
00025 #ifndef WX_PRECOMP
00026 #include "wx/wx.h"
00027 #endif
00028 #include <wx/tokenzr.h>
00029 
00032 
00033 #include "virtual_channel_def_dialog.h"
00034 #include "virtual_board_channel.h"
00035 #include "generic_board.h"
00036 #include "rpn_handler.h"
00037 
00040 
00045 IMPLEMENT_DYNAMIC_CLASS( VirtualChannelDefDialog, wxDialog )
00046 
00047 
00051 BEGIN_EVENT_TABLE( VirtualChannelDefDialog, wxDialog )
00052 
00054     EVT_BUTTON( ID_VCH_DEF_ADD_CHANNEL_BUTTON, VirtualChannelDefDialog::OnVchDefAddChannelButtonClick )
00055 
00056     EVT_BUTTON( ID_VCH_DEF_ADD_CONSTANT_BUTTON, VirtualChannelDefDialog::OnVchDefAddConstantButtonClick )
00057 
00058     EVT_BUTTON( ID_VCH_DEF_ADD_OPERATOR_BUTTON, VirtualChannelDefDialog::OnVchDefAddOperatorButtonClick )
00059 
00060     EVT_BUTTON( ID_VCH_DEF_REMOVE_BUTTON, VirtualChannelDefDialog::OnVchDefRemoveButtonClick )
00061 
00062     EVT_BUTTON( ID_VCH_MOVE_UP_BUTTON, VirtualChannelDefDialog::OnVchMoveUpButtonClick )
00063 
00064     EVT_BUTTON( ID_VCH_MOVE_DW_BUTTON, VirtualChannelDefDialog::OnVchMoveDwButtonClick )
00065 
00066     EVT_BUTTON( ID_VCH_DEF_OK_BUTTON, VirtualChannelDefDialog::OnVchDefOkButtonClick )
00067 
00068     EVT_BUTTON( ID_VCH_DEF_CANCEL_BUTTON, VirtualChannelDefDialog::OnVchDefCancelButtonClick )
00069 
00070     EVT_BUTTON( ID_VCH_DEF_TEST_BUTTON, VirtualChannelDefDialog::OnVchDefTestButtonClick )
00071 
00073 
00074 END_EVENT_TABLE()
00075 
00080 VirtualChannelDefDialog::VirtualChannelDefDialog( )
00081 {
00082         this->m_p_board_channel= NULL;
00083 }
00084 
00085 VirtualChannelDefDialog::VirtualChannelDefDialog( VirtualBoardChannel* board_channel, wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
00086 {
00087         this->m_p_board_channel= board_channel;
00088 
00089     Create(parent, id, caption, pos, size, style);
00090 
00091         wxStringTokenizer tokenizer( this->m_p_board_channel->GetExpressionDef(), _(","));
00092         while ( tokenizer.HasMoreTokens() )
00093         {
00094                 wxString token = tokenizer.GetNextToken();
00095                 this->m_definition_ctrl->Append( token);
00096         }
00097 }
00098 
00103 bool VirtualChannelDefDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
00104 {
00106     m_left_panel = NULL;
00107     m_left_sizer = NULL;
00108     m_channel_ctrl = NULL;
00109     m_constant_ctrl = NULL;
00110     m_operator_ctrl = NULL;
00111     m_definition_ctrl = NULL;
00113 
00115     SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
00116     wxDialog::Create( parent, id, caption, pos, size, style );
00117 
00118     CreateControls();
00119     if (GetSizer())
00120     {
00121         GetSizer()->SetSizeHints(this);
00122     }
00123     Centre();
00125 
00126         // Fill channel combo list
00127         for( int i= 0; i< ( int)this->m_p_board_channel->GetParent()->m_channel_array.GetCount(); i++)
00128         {
00129                 this->m_channel_ctrl->Append( wxString::Format( "CH%d", i));
00130         }
00131         if( this->m_channel_ctrl->GetCount())
00132                 this->m_channel_ctrl->SetSelection( 0);
00133         // Fill operator combo list
00134         this->m_operator_ctrl->Append( _( "ADD"));
00135         this->m_operator_ctrl->Append( _( "SUB"));
00136         this->m_operator_ctrl->Append( _( "MUL"));
00137         this->m_operator_ctrl->Append( _( "DIV"));
00138 
00139         this->m_operator_ctrl->SetSelection( 0);
00140 
00141     return true;
00142 }
00143 
00148 void VirtualChannelDefDialog::CreateControls()
00149 {    
00151     // Generated by DialogBlocks, 16/01/2007 17:41:36 (unregistered)
00152 
00153     VirtualChannelDefDialog* itemDialog1 = this;
00154 
00155     wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
00156     itemDialog1->SetSizer(itemBoxSizer2);
00157 
00158     m_left_panel = new wxPanel( itemDialog1, ID_VCH_DEF_LEFT_PANEL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
00159     m_left_panel->SetBackgroundColour(wxColour(255, 255, 255));
00160     itemBoxSizer2->Add(m_left_panel, 1, wxGROW|wxALL, 5);
00161 
00162     wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
00163     m_left_panel->SetSizer(itemBoxSizer4);
00164 
00165     m_left_sizer = new wxBoxSizer(wxVERTICAL);
00166     itemBoxSizer4->Add(m_left_sizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
00167 
00168     wxStaticBox* itemStaticBoxSizer6Static = new wxStaticBox(m_left_panel, wxID_ANY, _("Channel operand selection"));
00169     wxStaticBoxSizer* itemStaticBoxSizer6 = new wxStaticBoxSizer(itemStaticBoxSizer6Static, wxHORIZONTAL);
00170     m_left_sizer->Add(itemStaticBoxSizer6, 0, wxGROW|wxALL, 5);
00171 
00172     wxString* m_channel_ctrlStrings = NULL;
00173     m_channel_ctrl = new wxChoice( m_left_panel, ID_VCH_DEF_CHANNEL_CHOICE, wxDefaultPosition, wxSize(100, -1), 0, m_channel_ctrlStrings, 0 );
00174     m_channel_ctrl->SetHelpText(_("Select a channel to add"));
00175     if (ShowToolTips())
00176         m_channel_ctrl->SetToolTip(_("Select a channel to add"));
00177     itemStaticBoxSizer6->Add(m_channel_ctrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
00178 
00179     wxButton* itemButton8 = new wxButton( m_left_panel, ID_VCH_DEF_ADD_CHANNEL_BUTTON, _(">"), wxDefaultPosition, wxSize(40, 20), 0 );
00180     itemButton8->SetHelpText(_("Add the selected channel"));
00181     if (ShowToolTips())
00182         itemButton8->SetToolTip(_("Add the selected channel"));
00183     itemButton8->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00184     itemStaticBoxSizer6->Add(itemButton8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
00185 
00186     wxStaticBox* itemStaticBoxSizer9Static = new wxStaticBox(m_left_panel, wxID_ANY, _("Constant operand"));
00187     wxStaticBoxSizer* itemStaticBoxSizer9 = new wxStaticBoxSizer(itemStaticBoxSizer9Static, wxHORIZONTAL);
00188     m_left_sizer->Add(itemStaticBoxSizer9, 0, wxGROW|wxALL, 5);
00189 
00190     m_constant_ctrl = new wxSpinCtrl( m_left_panel, ID_VCH_DEF_CONSTANT_SPINCTRL, _T("0"), wxDefaultPosition, wxSize(100, -1), wxSP_ARROW_KEYS, -9999999, 9999999, 0 );
00191     m_constant_ctrl->SetHelpText(_("Set a constant value (Bits)"));
00192     if (ShowToolTips())
00193         m_constant_ctrl->SetToolTip(_("Set a constant value (Bits)"));
00194     itemStaticBoxSizer9->Add(m_constant_ctrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
00195 
00196     wxButton* itemButton11 = new wxButton( m_left_panel, ID_VCH_DEF_ADD_CONSTANT_BUTTON, _(">"), wxDefaultPosition, wxSize(40, 20), 0 );
00197     itemButton11->SetHelpText(_("Add constant value"));
00198     if (ShowToolTips())
00199         itemButton11->SetToolTip(_("Add constant value"));
00200     itemButton11->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00201     itemStaticBoxSizer9->Add(itemButton11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
00202 
00203     wxStaticBox* itemStaticBoxSizer12Static = new wxStaticBox(m_left_panel, wxID_ANY, _("Operator selection"));
00204     wxStaticBoxSizer* itemStaticBoxSizer12 = new wxStaticBoxSizer(itemStaticBoxSizer12Static, wxHORIZONTAL);
00205     m_left_sizer->Add(itemStaticBoxSizer12, 0, wxGROW|wxALL, 5);
00206 
00207     wxString* m_operator_ctrlStrings = NULL;
00208     m_operator_ctrl = new wxChoice( m_left_panel, ID_VCH_DEF_OPERATOR_CHOICE, wxDefaultPosition, wxSize(100, -1), 0, m_operator_ctrlStrings, 0 );
00209     m_operator_ctrl->SetHelpText(_("Select a channel to add"));
00210     if (ShowToolTips())
00211         m_operator_ctrl->SetToolTip(_("Select a channel to add"));
00212     itemStaticBoxSizer12->Add(m_operator_ctrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
00213 
00214     wxButton* itemButton14 = new wxButton( m_left_panel, ID_VCH_DEF_ADD_OPERATOR_BUTTON, _(">"), wxDefaultPosition, wxSize(40, 20), 0 );
00215     itemButton14->SetHelpText(_("Add the selected operator"));
00216     if (ShowToolTips())
00217         itemButton14->SetToolTip(_("Add the selected operator"));
00218     itemButton14->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00219     itemStaticBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
00220 
00221     wxStaticBox* itemStaticBoxSizer15Static = new wxStaticBox(m_left_panel, wxID_ANY, _("Virtual channel's definition (RPN syntax)"));
00222     wxStaticBoxSizer* itemStaticBoxSizer15 = new wxStaticBoxSizer(itemStaticBoxSizer15Static, wxHORIZONTAL);
00223     itemBoxSizer4->Add(itemStaticBoxSizer15, 1, wxGROW|wxALL, 5);
00224 
00225     wxButton* itemButton16 = new wxButton( m_left_panel, ID_VCH_DEF_REMOVE_BUTTON, _("<"), wxDefaultPosition, wxSize(40, 20), 0 );
00226     itemButton16->SetHelpText(_("Remove selected item"));
00227     if (ShowToolTips())
00228         itemButton16->SetToolTip(_("Remove selected item"));
00229     itemButton16->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00230     itemStaticBoxSizer15->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
00231 
00232     wxString* m_definition_ctrlStrings = NULL;
00233     m_definition_ctrl = new wxListBox( m_left_panel, ID_VCH_DEF_DEFINTION_LISTBOX, wxDefaultPosition, wxDefaultSize, 0, m_definition_ctrlStrings, wxLB_SINGLE );
00234     m_definition_ctrl->SetHelpText(_("The virtual channel's definition "));
00235     if (ShowToolTips())
00236         m_definition_ctrl->SetToolTip(_("The virtual channel's definition "));
00237     itemStaticBoxSizer15->Add(m_definition_ctrl, 1, wxGROW|wxALL, 5);
00238 
00239     wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxVERTICAL);
00240     itemStaticBoxSizer15->Add(itemBoxSizer18, 0, wxGROW|wxALL, 0);
00241 
00242     wxButton* itemButton19 = new wxButton( m_left_panel, ID_VCH_MOVE_UP_BUTTON, _("UP"), wxDefaultPosition, wxSize(30, 50), 0 );
00243     itemButton19->SetHelpText(_("Move selected item up"));
00244     if (ShowToolTips())
00245         itemButton19->SetToolTip(_("Move selected item up"));
00246     itemButton19->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00247     itemBoxSizer18->Add(itemButton19, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5);
00248 
00249     itemBoxSizer18->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00250 
00251     wxButton* itemButton21 = new wxButton( m_left_panel, ID_VCH_MOVE_DW_BUTTON, _("DW"), wxDefaultPosition, wxSize(30, 50), 0 );
00252     itemButton21->SetHelpText(_("Move selected item down"));
00253     if (ShowToolTips())
00254         itemButton21->SetToolTip(_("Move selected item down"));
00255     itemButton21->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00256     itemBoxSizer18->Add(itemButton21, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5);
00257 
00258     wxPanel* itemPanel22 = new wxPanel( itemDialog1, ID_VCH_DEF_RIGHT_PANEL, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
00259     itemPanel22->SetBackgroundColour(wxColour(192, 192, 192));
00260     itemBoxSizer2->Add(itemPanel22, 0, wxGROW|wxALL, 5);
00261 
00262     wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL);
00263     itemPanel22->SetSizer(itemBoxSizer23);
00264 
00265     wxButton* itemButton24 = new wxButton( itemPanel22, ID_VCH_DEF_OK_BUTTON, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
00266     itemButton24->SetDefault();
00267     itemButton24->SetHelpText(_("Close this windows and save changes"));
00268     if (ShowToolTips())
00269         itemButton24->SetToolTip(_("Close this windows and save changes"));
00270     itemButton24->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00271     itemBoxSizer23->Add(itemButton24, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00272 
00273     wxButton* itemButton25 = new wxButton( itemPanel22, ID_VCH_DEF_CANCEL_BUTTON, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
00274     itemButton25->SetDefault();
00275     itemButton25->SetHelpText(_("Close this windows and discard changes"));
00276     if (ShowToolTips())
00277         itemButton25->SetToolTip(_("Close this windows and discard changes"));
00278     itemButton25->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00279     itemBoxSizer23->Add(itemButton25, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00280 
00281     itemBoxSizer23->Add(5, 5, 1, wxGROW|wxALL, 5);
00282 
00283     wxButton* itemButton27 = new wxButton( itemPanel22, ID_VCH_DEF_TEST_BUTTON, _("Test"), wxDefaultPosition, wxDefaultSize, 0 );
00284     itemButton27->SetDefault();
00285     itemButton27->SetHelpText(_("Test the channel definition"));
00286     if (ShowToolTips())
00287         itemButton27->SetToolTip(_("Test the channel definition"));
00288     itemButton27->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, _T("Tahoma")));
00289     itemBoxSizer23->Add(itemButton27, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
00290 
00292 }
00293 
00298 void VirtualChannelDefDialog::OnVchDefAddConstantButtonClick( wxCommandEvent& /*event */)
00299 {
00300         wxString value= wxString::Format( "%d", this->m_constant_ctrl->GetValue());
00301         int target_sel_item= this->m_definition_ctrl->GetSelection();
00302         if( target_sel_item== wxNOT_FOUND )
00303         {
00304                 this->m_definition_ctrl->Append( value);
00305                 this->m_definition_ctrl->SetSelection( this->m_definition_ctrl->GetCount()- 1);
00306         }
00307         else
00308         {
00309                 this->m_definition_ctrl->Insert( value, target_sel_item+ 1);
00310                 this->m_definition_ctrl->SetSelection( target_sel_item+ 1);
00311         }
00312 }
00313 
00318 void VirtualChannelDefDialog::OnVchDefAddOperatorButtonClick( wxCommandEvent& /*event */)
00319 {
00320         int sel_item= 0;
00321         if( ( sel_item= this->m_operator_ctrl->GetSelection())== wxNOT_FOUND )
00322                 return;
00323         int target_sel_item= this->m_definition_ctrl->GetSelection();
00324         if( target_sel_item== wxNOT_FOUND )
00325         {
00326                 this->m_definition_ctrl->Append( this->m_operator_ctrl->GetString( sel_item));
00327                 this->m_definition_ctrl->SetSelection( this->m_definition_ctrl->GetCount()- 1);
00328         }
00329         else
00330         {
00331                 this->m_definition_ctrl->Insert( this->m_operator_ctrl->GetString( sel_item), target_sel_item+ 1);
00332                 this->m_definition_ctrl->SetSelection( target_sel_item+ 1);
00333         }
00334 }
00335 
00340 void VirtualChannelDefDialog::OnVchDefRemoveButtonClick( wxCommandEvent& /*event*/ )
00341 {
00342         int sel_item= 0;
00343         if( ( sel_item= this->m_definition_ctrl->GetSelection())== wxNOT_FOUND )
00344                 return;
00345         this->m_definition_ctrl->Delete( sel_item);     
00346         if( this->m_definition_ctrl->GetCount())
00347         {
00348                 this->m_definition_ctrl->SetSelection( sel_item >= this->m_definition_ctrl->GetCount()? this->m_definition_ctrl->GetCount()- 1: sel_item);
00349         }
00350 }
00351 
00356 void VirtualChannelDefDialog::OnVchDefOkButtonClick( wxCommandEvent& /*event */)
00357 {
00358         RpnHandler* rpn_handler= new RpnHandler( NULL, this->MakeExpressionDef().c_str());
00359         if( !rpn_handler->Test())
00360         {
00361                 // Prompt User
00362                 if( wxMessageBox( wxT("RPN syntax has some errors!\nDo you want to save anyway ?"), wxT("Expression test"), wxOK| wxCANCEL | wxCENTRE | wxICON_ERROR  )!= wxOK)
00363                 {
00364                         delete rpn_handler;
00365                         return;
00366                 }
00367         }
00368 
00369         this->m_p_board_channel->SetExpressionDef( rpn_handler->Format());
00370         delete rpn_handler;
00371 
00372         this->Close();
00373         this->SetReturnCode( wxOK);
00374 }
00375 
00380 void VirtualChannelDefDialog::OnVchDefCancelButtonClick( wxCommandEvent& /*event */)
00381 {
00382         this->Close();
00383         this->SetReturnCode( wxCANCEL);
00384 }
00385 
00390 void VirtualChannelDefDialog::OnVchDefTestButtonClick( wxCommandEvent& /*event*/ )
00391 {
00392         // TODO : do test configuration here
00393         RpnHandler* rpn_handler= new RpnHandler( NULL, this->MakeExpressionDef().c_str());
00394         if( !rpn_handler->Test())
00395         {
00396                 wxMessageBox( wxT("RPN syntax has some errors!"), wxT("Expression test"), wxOK | wxCENTRE | wxICON_ERROR  );
00397         }
00398         else
00399         {
00400                 wxMessageBox( wxT("RPN syntax is Ok."), wxT("Expression test"), wxOK | wxCENTRE | wxICON_INFORMATION  );
00401         }
00402         delete rpn_handler;
00403 }
00404 
00409 bool VirtualChannelDefDialog::ShowToolTips()
00410 {
00411     return true;
00412 }
00413 
00418 wxBitmap VirtualChannelDefDialog::GetBitmapResource( const wxString& name )
00419 {
00420     // Bitmap retrieval
00422     wxUnusedVar(name);
00423     return wxNullBitmap;
00425 }
00426 
00431 wxIcon VirtualChannelDefDialog::GetIconResource( const wxString& name )
00432 {
00433     // Icon retrieval
00435     wxUnusedVar(name);
00436     return wxNullIcon;
00438 }
00443 void VirtualChannelDefDialog::OnVchDefAddChannelButtonClick( wxCommandEvent& /*event */)
00444 {
00445         int sel_item= 0;
00446         if( ( sel_item= this->m_channel_ctrl->GetSelection())== wxNOT_FOUND )
00447                 return;
00448         int target_sel_item= this->m_definition_ctrl->GetSelection();
00449         if( target_sel_item== wxNOT_FOUND )
00450         {
00451                 this->m_definition_ctrl->Append( this->m_channel_ctrl->GetString( sel_item));
00452                 this->m_definition_ctrl->SetSelection( this->m_definition_ctrl->GetCount()- 1);
00453         }
00454         else
00455         {
00456                 this->m_definition_ctrl->Insert( this->m_channel_ctrl->GetString( sel_item), target_sel_item+ 1);
00457                 this->m_definition_ctrl->SetSelection( target_sel_item+ 1);
00458         }
00459 }
00460 
00461 
00466 void VirtualChannelDefDialog::OnVchMoveUpButtonClick( wxCommandEvent& /*event */)
00467 {
00468         int sel_item= 0;
00469         if( ( sel_item= this->m_definition_ctrl->GetSelection())== wxNOT_FOUND )
00470                 return;
00471         if( sel_item== 0)
00472                 return;
00473         wxString item= this->m_definition_ctrl->GetString( sel_item);
00474         this->m_definition_ctrl->Delete( sel_item);     
00475         this->m_definition_ctrl->Insert( item, sel_item- 1);
00476         this->m_definition_ctrl->SetSelection( sel_item- 1);
00477 }
00478 
00483 void VirtualChannelDefDialog::OnVchMoveDwButtonClick( wxCommandEvent& /*event */)
00484 {
00485         int sel_item= 0;
00486         if( ( sel_item= this->m_definition_ctrl->GetSelection())== wxNOT_FOUND )
00487                 return;
00488         if( sel_item== this->m_definition_ctrl->GetCount()- 1)
00489                 return;
00490         wxString item= this->m_definition_ctrl->GetString( sel_item);
00491         this->m_definition_ctrl->Delete( sel_item);     
00492         this->m_definition_ctrl->Insert( item, sel_item+ 1);
00493         this->m_definition_ctrl->SetSelection( sel_item+ 1);
00494 }
00495 
00496 wxString VirtualChannelDefDialog::MakeExpressionDef( void)
00497 {
00498         wxString expression_def;
00499         for( int i= 0; i< this->m_definition_ctrl->GetCount(); i++)
00500         {
00501                 expression_def.Append( this->m_definition_ctrl->GetString( i).c_str());
00502                 if( i!= this->m_definition_ctrl->GetCount()- 1)
00503                         expression_def.Append( ",");
00504         }
00505         return expression_def;
00506 }

Generated on Mon Mar 19 17:14:08 2007 for CAENScope by  doxygen 1.4.6-NO