wxContour_ButtonsBar Class Reference

#include <wxContour_ButtonsBar.h>

List of all members.

Public Member Functions

 wxContour_ButtonsBar (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTB_HORIZONTAL|wxNO_BORDER, const wxString &name=wxPanelNameStr)
 ~wxContour_ButtonsBar ()
void onActionButtonPressed (wxCommandEvent &event)
void sendEnvent (WXTYPE theEventType)
void setWxEventHandler (wxEvtHandler *theEventHandler)

Private Attributes

wxEvtHandler * _eventHandler
wxButton * _createContour_Button
wxButton * _delete_Button
wxButton * _hideContour_Button
wxButton * _show_Button
wxButton * _copy_Button
wxButton * _paste_Button
wxButton * _change_Button
wxButton * _spread_Button
wxButton * _select_Button
wxButton * _edit_Button
wxButton * _undo_Button
wxButton * _redo_Button
wxButton * _save_Button
wxButton * _open_Button
wxButton * _automatiqueSegmentation_Button
wxButton * _informationContour_Button
wxButton * _interfaceConfiguration_Button
wxButton * _interfaceTest_Button


Detailed Description

file wxContour_ButtonsBar.h

Definition at line 37 of file wxContour_ButtonsBar.h.


Constructor & Destructor Documentation

wxContour_ButtonsBar::wxContour_ButtonsBar ( wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTB_HORIZONTAL | wxNO_BORDER,
const wxString &  name = wxPanelNameStr 
)

Definition at line 34 of file wxContour_ButtonsBar.cxx.

References _automatiqueSegmentation_Button, _change_Button, _copy_Button, _createContour_Button, _delete_Button, _informationContour_Button, _interfaceConfiguration_Button, _interfaceTest_Button, _open_Button, _paste_Button, _save_Button, _spread_Button, wxContour_ActionCommandsID::AUTOMATIQUESEGMENTATION_TOOL, wxContour_ActionCommandsID::CHANGE_TOOL, wxContour_ActionCommandsID::COPY_TOOL, wxContour_ActionCommandsID::CREATE_TOOL, wxContour_ActionCommandsID::DELETE_TOOL, wxContour_ActionCommandsID::INFORMATIONCONTOUR_TOOL, wxContour_ActionCommandsID::INTERFACECONFIGURATION_TOOL, onActionButtonPressed(), wxContour_ActionCommandsID::OPEN_TOOL, wxContour_ActionCommandsID::PASTE_TOOL, wxContour_ActionCommandsID::SAVE_TOOL, wxContour_ActionCommandsID::SPREAD_TOOL, and wxContour_ActionCommandsID::TEST_TOOL.

00035           :wxToolBar(parent, id, pos, size, style, name)
00036         :wxPanel( parent, id)//, pos, size, style, name)
00037         {
00038                 //SetToolBitmapSize(wxSize(16,16));
00039         std::string as = (char)wxContour_ActionCommandsID::CREATE_TOOL +"";
00040         _createContour_Button = new wxButton( this, -1, _T("+ New Contour"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxString(as.c_str(),wxConvUTF8));
00041 //              _createContour_Button->SetToolTip(_T("CTRL-N"));
00042                 Connect( _createContour_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00043 
00044                 as = (char)wxContour_ActionCommandsID::DELETE_TOOL +"";
00045                 _delete_Button = new wxButton( this, -1, _T("+ Delete"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00046                 _delete_Button->SetToolTip(_T("BACK SPACE or DELETE key"));
00047                 Connect( _delete_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00048 
00049 /*              
00050                 _hideContour_Button = new wxButton( this, -1, "Hide Contour", wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::HIDE_TOOL );
00051                 Connect( _hideContour_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00052 
00053                 _show_Button = new wxButton( this, -1, _T("Show"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::SHOW_TOOL );
00054                 Connect( _show_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00055 */
00056                 as = (char)wxContour_ActionCommandsID::COPY_TOOL +"";
00057                 _copy_Button = new wxButton( this, -1, _T("Copy"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00058                 _copy_Button->SetToolTip(_T("CTRL-C"));
00059                 Connect( _copy_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00060 
00061                 as = (char)wxContour_ActionCommandsID::PASTE_TOOL +"";
00062                 _paste_Button = new wxButton( this, -1, _T("Paste"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00063                 _paste_Button->SetToolTip(_T("CTRL-V"));
00064                 Connect( _paste_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00065 
00066                 as = (char)wxContour_ActionCommandsID::CHANGE_TOOL +"";
00067                 _change_Button = new wxButton( this, -1, _T("    <-->  "), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00068                 _change_Button->SetToolTip(_T("CTRL-K"));
00069                 Connect( _change_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00070 
00071                 as = (char)wxContour_ActionCommandsID::SAVE_TOOL +"";
00072                 _save_Button = new wxButton( this, -1, _T("Save"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00073                 _save_Button->SetToolTip(_T("CTRL-S"));
00074                 Connect( _save_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00075 
00076                 as = (char)wxContour_ActionCommandsID::OPEN_TOOL +"";
00077                 _open_Button = new wxButton( this, -1, _T("Open"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00078                 _open_Button->SetToolTip(_T("CTRL-O"));
00079                 Connect( _open_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00080 
00081                 as = (char)wxContour_ActionCommandsID::SPREAD_TOOL +"";
00082                 _spread_Button = new wxButton( this, -1, _T("+ Spread"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00083 //              _spread_Button->SetToolTip(_T("CTRL-XXXXXXX"));
00084                 Connect( _spread_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00085 
00086                 as = (char)wxContour_ActionCommandsID::AUTOMATIQUESEGMENTATION_TOOL +"";
00087                 _automatiqueSegmentation_Button = new wxButton( this, -1, _T("+ Segmentation"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00088 //              _automatiqueSegmentation_Button->SetToolTip(_T("CTRL-XXXXXXX"));
00089                 Connect( _automatiqueSegmentation_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00090 
00091                 as = (char)wxContour_ActionCommandsID::INFORMATIONCONTOUR_TOOL +"";
00092                 _informationContour_Button = new wxButton( this, -1, _T("+ Information"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00093 //              _informationContour_Button->SetToolTip(_T("CTRL-XXXXXXX"));
00094                 Connect( _informationContour_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00095 
00096                 as = (char)wxContour_ActionCommandsID::INTERFACECONFIGURATION_TOOL +"";
00097                 _interfaceConfiguration_Button = new wxButton( this, -1, _T("+ Configuration"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00098 //              _informationContour_Button->SetToolTip(_T("CTRL-XXXXXXX"));
00099                 Connect( _interfaceConfiguration_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00100 
00101 
00102 //Test button Methods A-B-C in  Juan Carlos Prieto 22-09-08
00103                 as = (char)wxContour_ActionCommandsID::TEST_TOOL +"";
00104                 _interfaceTest_Button = new wxButton( this, -1, _T("+ Test"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator,  wxString(as.c_str(),wxConvUTF8));
00105 //              _informationContour_Button->SetToolTip(_T("CTRL-XXXXXXX"));
00106                 Connect( _interfaceTest_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00107 
00108 
00109 /*
00110                 _spread_Button = new wxButton( this, -1, _T("Spread"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::SPREAD_TOOL );
00111                 Connect( _spread_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00112                 _select_Button = new wxButton( this, -1, _T("Select"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::SELECT_TOOL );
00113                 Connect( _select_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00114 
00115                 _edit_Button = new wxButton( this, -1, _T("Edit"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::EDIT_TOOL );
00116                 Connect( _edit_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00117 
00118                 _undo_Button = new wxButton( this, -1, _T("Undo"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::UNDO_TOOL );
00119                 Connect( _undo_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00120 
00121                 _redo_Button = new wxButton( this, -1, _T("Redo"), wxDefaultPosition, wxDefaultSize, 0,wxDefaultValidator, wxContour_ActionCommandsID::REDO_TOOL );
00122                 Connect( _redo_Button->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxContour_ButtonsBar:: onActionButtonPressed ); 
00123 */
00124                 wxFlexGridSizer * panelSizer = new wxFlexGridSizer(9);
00125                 panelSizer -> Add( _createContour_Button, 1, wxGROW );
00126 /*
00127                 panelSizer -> Add( _hideContour_Button, 1, wxGROW );
00128                 panelSizer -> Add( _show_Button, 1, wxGROW );
00129 */
00130                 panelSizer -> Add( _change_Button       , 1, wxGROW );
00131                 panelSizer -> Add( _copy_Button         , 1, wxGROW );
00132                 panelSizer -> Add( _paste_Button        , 1, wxGROW );
00133                 panelSizer -> Add( _delete_Button       , 1, wxGROW );
00134                 panelSizer -> Add( _save_Button         , 1, wxGROW );
00135                 panelSizer -> Add( _open_Button         , 1, wxGROW );
00136                 panelSizer -> Add( _spread_Button       , 1, wxGROW );
00137                 panelSizer -> Add( _automatiqueSegmentation_Button      , 1, wxGROW );
00138                 panelSizer -> Add( _informationContour_Button           , 1, wxGROW );
00139                 panelSizer -> Add( _interfaceConfiguration_Button       , 1, wxGROW );
00140                 panelSizer -> Add( _interfaceTest_Button        , 1, wxGROW );
00141                 
00142 /*
00143                 panelSizer -> Add( _select_Button, 1, wxGROW );
00144                 panelSizer -> Add( _edit_Button, 1, wxGROW );
00145                 panelSizer -> Add( _undo_Button, 1, wxGROW );
00146                 panelSizer -> Add( _redo_Button, 1, wxGROW );
00147 */
00148                 
00149                 SetSizer( panelSizer );
00150 /*
00151                 this->AddControl( _createContour_Button );
00152                 AddSeparator();
00153                 this->AddControl( _hideContour_Button );
00154 */
00155                 SetSize( wxSize( 1500, 80));
00156                 this->SetAutoLayout( true );
00157                 this->Layout();         
00158         }

Here is the call graph for this function:

wxContour_ButtonsBar::~wxContour_ButtonsBar (  ) 

Definition at line 160 of file wxContour_ButtonsBar.cxx.

References _eventHandler.

00161         {
00162                 _eventHandler = NULL;
00163                 /*delete        _createContour_Button;
00164                 delete  _delete_Button;
00165                 delete  _hideContour_Button;
00166                 delete  _show_Button;
00167                 delete  _copy_Button;
00168                 delete  _paste_Button;
00169                 delete  _spread_Button;
00170                 delete  _select_Button;
00171                 delete  _edit_Button;
00172                 delete  _undo_Button;
00173                 delete  _redo_Button;*/         
00174         }


Member Function Documentation

void wxContour_ButtonsBar::onActionButtonPressed ( wxCommandEvent &  event  ) 

Definition at line 178 of file wxContour_ButtonsBar.cxx.

References _eventHandler.

Referenced by wxContour_ButtonsBar().

00179         {
00180                 if(_eventHandler!=NULL)
00181                 {
00182                         std::string theStr = std::string( ((wxButton *)event.GetEventObject())->GetName().ToAscii());
00183                         const char * toolCommand = theStr.c_str();
00184                         event.SetId( GetId() );
00185                         event.SetEventObject( this );
00186                         event.SetClientData( (void *) toolCommand);
00187                         _eventHandler->ProcessEvent( event );
00188                 }
00189         }               

Here is the caller graph for this function:

void wxContour_ButtonsBar::sendEnvent ( WXTYPE  theEventType  ) 

Definition at line 194 of file wxContour_ButtonsBar.cxx.

References _eventHandler.

00195         {
00196                 wxCommandEvent cevent( theEventType, GetId() );
00197                 cevent.SetEventObject( this );
00198                 _eventHandler->ProcessEvent( cevent );
00199         }

void wxContour_ButtonsBar::setWxEventHandler ( wxEvtHandler *  theEventHandler  ) 

Definition at line 219 of file wxContour_ButtonsBar.cxx.

References _eventHandler.

00220         {
00221                 _eventHandler = theEventHandler;
00222         }


Member Data Documentation

Definition at line 98 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 90 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 88 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 84 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 85 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 93 of file wxContour_ButtonsBar.h.

wxEvtHandler* wxContour_ButtonsBar::_eventHandler [private]

Definition at line 86 of file wxContour_ButtonsBar.h.

Definition at line 99 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 100 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 101 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 97 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 89 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 95 of file wxContour_ButtonsBar.h.

Definition at line 96 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 92 of file wxContour_ButtonsBar.h.

Definition at line 87 of file wxContour_ButtonsBar.h.

Definition at line 91 of file wxContour_ButtonsBar.h.

Referenced by wxContour_ButtonsBar().

Definition at line 94 of file wxContour_ButtonsBar.h.


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

Generated on Wed Jun 27 23:28:34 2012 for creaContours_lib by  doxygen 1.5.7.1