creaContours_lib
interfSpreadPanel Class Reference

#include <interfToolsPanels.h>

Inheritance diagram for interfSpreadPanel:
Collaboration diagram for interfSpreadPanel:

Public Member Functions

 interfSpreadPanel (wxWindow *parent)
 
 ~interfSpreadPanel ()
 
void appendStringSpread (std::string val)
 
void setStringSpread (std::string stringtemp)
 

Private Member Functions

void onSpreadReset (wxCommandEvent &event)
 
void onSpreadAdd (wxCommandEvent &event)
 
void onSpreadAddAll (wxCommandEvent &event)
 
void onSpreadGo (wxCommandEvent &event)
 

Private Attributes

wxRadioBox * _spreadMethodRadiobox
 
wxStaticText * _staticTextSpread
 
wxTextCtrl * _wxtextctrlSpread
 

Detailed Description

Definition at line 59 of file interfToolsPanels.h.

Constructor & Destructor Documentation

interfSpreadPanel::interfSpreadPanel ( wxWindow *  parent)

Begin of the spread panel

Definition at line 120 of file interfToolsPanels.cxx.

References _spreadMethodRadiobox, _staticTextSpread, _wxtextctrlSpread, onSpreadAdd(), onSpreadAddAll(), onSpreadGo(), and onSpreadReset().

121 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
122 {
123 
124  //wxPanel *panel = new wxPanel(parent,-1);
125 
126  //_contourPropagation = new ContourPropagation();
127 
128  //wxPanel *panel = new wxPanel(parent,-1,wxDefaultPosition, wxDefaultSize,wxNO_BORDER, wxString("",wxConvUTF8));
129 
130  wxButton *spreadResetBtn = new wxButton(this,-1,_T("Reset"),wxDefaultPosition, wxDefaultSize );
131  wxButton *spreadAddBtn = new wxButton(this,-1,_T("Add key contour "),wxDefaultPosition, wxDefaultSize);
132  wxButton *spreadAddAllBtn = new wxButton(this,-1,_T("Add All to key contour"),wxDefaultPosition, wxDefaultSize);
133 
134  wxString lstOptions[3];
135  lstOptions[0]=_T("A");
136  lstOptions[1]=_T("B");
137  lstOptions[2]=_T("C");
138  _spreadMethodRadiobox = new wxRadioBox(this, -1, _T("Method (find ctrl. Points)"), wxDefaultPosition, wxDefaultSize, 3 , lstOptions, 3, wxRA_SPECIFY_COLS);
139  _spreadMethodRadiobox->SetSelection(2);
140 
141  wxButton *spreadGoBtn = new wxButton(this,-1,_T("Go"),wxDefaultPosition, wxDefaultSize);
142  _staticTextSpread = new wxStaticText(this,-1,_T(" "));
143 
144  _wxtextctrlSpread = new wxTextCtrl(this,-1, _T(""),wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
145  _wxtextctrlSpread->SetEditable(false);
146 
147  Connect( spreadResetBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadReset );
148  Connect( spreadAddBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadAdd );
149  Connect( spreadAddAllBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadAddAll );
150  Connect( spreadGoBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadGo );
151 
152  wxFlexGridSizer * sizer = new wxFlexGridSizer(1);
153  sizer -> Add( spreadResetBtn , 1, wxGROW );
154  sizer -> Add( spreadAddBtn , 1, wxGROW );
155  sizer -> Add( spreadAddAllBtn , 1, wxGROW );
156  sizer -> Add( _spreadMethodRadiobox , 1, wxGROW );
157  sizer -> Add( spreadGoBtn , 1, wxGROW );
158  sizer -> Add( _staticTextSpread , 1, wxGROW );
159  sizer -> Add( _wxtextctrlSpread , 1, wxGROW );
160 
161 
162  this->SetSizer( sizer );
163  //this->SetSize( wxDefaultSize );
164  this->SetAutoLayout( true );
165  this->Layout();
166  //return panel;
167 }

Here is the call graph for this function:

interfSpreadPanel::~interfSpreadPanel ( )

Definition at line 169 of file interfToolsPanels.cxx.

169  {
170 }

Member Function Documentation

void interfSpreadPanel::appendStringSpread ( std::string  val)

Definition at line 194 of file interfToolsPanels.cxx.

References _wxtextctrlSpread.

Referenced by interfMainPanel::appendStringSpread().

194  {
195  /* // if */
196  wxString newstring;
197  //newstring.Printf("%s %d -",_wxtextctrlSpread->GetValue(), actualSlice );
198  newstring.append(wxString(_wxtextctrlSpread->GetValue(),wxConvUTF8));
199  newstring.append(wxString(" ",wxConvUTF8));
200  newstring.append(wxString(val.c_str(),wxConvUTF8));
201  _wxtextctrlSpread->SetValue(newstring);
202 }

Here is the caller graph for this function:

void interfSpreadPanel::onSpreadAdd ( wxCommandEvent &  event)
private

Definition at line 178 of file interfToolsPanels.cxx.

References interfMainPanel::getInstance(), and interfMainPanel::onSpreadAdd().

Referenced by interfSpreadPanel().

178  {
180 }

Here is the call graph for this function:

Here is the caller graph for this function:

void interfSpreadPanel::onSpreadAddAll ( wxCommandEvent &  event)
private

Definition at line 182 of file interfToolsPanels.cxx.

References interfMainPanel::getInstance(), and interfMainPanel::onSpreadAddAll().

Referenced by interfSpreadPanel().

182  {
184 }

Here is the call graph for this function:

Here is the caller graph for this function:

void interfSpreadPanel::onSpreadGo ( wxCommandEvent &  event)
private

Definition at line 186 of file interfToolsPanels.cxx.

References _spreadMethodRadiobox, interfMainPanel::getInstance(), interfMainPanel::onSpreadGo(), and setStringSpread().

Referenced by interfSpreadPanel().

186  {
187  setStringSpread(" ");
188  int typeMethodFindCtrlPoints=_spreadMethodRadiobox->GetSelection();
189 printf("EED interfSpreadPanel::onSpreadGo %d\n",typeMethodFindCtrlPoints);
190  interfMainPanel::getInstance()->onSpreadGo(typeMethodFindCtrlPoints);
191 
192 }

Here is the call graph for this function:

Here is the caller graph for this function:

void interfSpreadPanel::onSpreadReset ( wxCommandEvent &  event)
private

Definition at line 172 of file interfToolsPanels.cxx.

References _wxtextctrlSpread, interfMainPanel::getInstance(), interfMainPanel::resetAppend(), and setStringSpread().

Referenced by interfSpreadPanel().

172  {
173  setStringSpread(" ");
174  _wxtextctrlSpread->SetValue(wxString("",wxConvUTF8));
176 }

Here is the call graph for this function:

Here is the caller graph for this function:

void interfSpreadPanel::setStringSpread ( std::string  stringtemp)

Definition at line 204 of file interfToolsPanels.cxx.

References _staticTextSpread.

Referenced by onSpreadGo(), onSpreadReset(), and interfMainPanel::setStringSpread().

204  {
205 
206  wxString newstring(stringtemp.c_str(),wxConvUTF8);
207  //_wxtextctrlSpread->SetEditable(true);
208  _staticTextSpread->SetLabel(newstring);
209  //_wxtextctrlSpread->SetEditable(false);
210 }

Here is the caller graph for this function:

Member Data Documentation

wxRadioBox* interfSpreadPanel::_spreadMethodRadiobox
private

Definition at line 70 of file interfToolsPanels.h.

Referenced by interfSpreadPanel(), and onSpreadGo().

wxStaticText* interfSpreadPanel::_staticTextSpread
private

Definition at line 71 of file interfToolsPanels.h.

Referenced by interfSpreadPanel(), and setStringSpread().

wxTextCtrl* interfSpreadPanel::_wxtextctrlSpread
private

Definition at line 72 of file interfToolsPanels.h.

Referenced by appendStringSpread(), interfSpreadPanel(), and onSpreadReset().


The documentation for this class was generated from the following files: