00001
00002
00003
00004
00005
00007
00008 #include "gripper_click_ui.h"
00009
00011
00012 GripperClickFrameBase::GripperClickFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxFrame( parent, id, title, pos, size, style, name )
00013 {
00014 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
00015
00016 wxBoxSizer* bSizer1;
00017 bSizer1 = new wxBoxSizer( wxVERTICAL );
00018
00019 wxBoxSizer* bSizer3;
00020 bSizer3 = new wxBoxSizer( wxVERTICAL );
00021
00022 panel_ = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 640,480 ), wxTAB_TRAVERSAL );
00023 bSizer3->Add( panel_, 0, wxALL, 5 );
00024
00025 bSizer1->Add( bSizer3, 0, wxEXPAND, 5 );
00026
00027 wxBoxSizer* bSizer41;
00028 bSizer41 = new wxBoxSizer( wxHORIZONTAL );
00029
00030 bottom_label_ = new wxStaticText( this, wxID_ANY, wxT("Choose an appropiate grasp pose and click OK.\n\nThe red regions in the image indicate where 3D information is missing."), wxDefaultPosition, wxDefaultSize, 0 );
00031 bottom_label_->Wrap( -1 );
00032 bSizer41->Add( bottom_label_, 0, wxALL, 5 );
00033
00034 bSizer1->Add( bSizer41, 1, wxEXPAND, 5 );
00035
00036 wxBoxSizer* bSizer4;
00037 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
00038
00039 accept_button_ = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
00040 bSizer4->Add( accept_button_, 0, wxALL, 5 );
00041
00042 cancel_button_ = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
00043 bSizer4->Add( cancel_button_, 0, wxALL, 5 );
00044
00045
00046 bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
00047
00048 m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Input method:"), wxDefaultPosition, wxDefaultSize, 0 );
00049 m_staticText2->Wrap( -1 );
00050 bSizer4->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0 );
00051
00052 wxArrayString plugin_choice_Choices;
00053 plugin_choice_ = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxSize( 200,-1 ), plugin_choice_Choices, 0 );
00054 plugin_choice_->SetSelection( 0 );
00055 bSizer4->Add( plugin_choice_, 0, wxALL, 5 );
00056
00057 bSizer1->Add( bSizer4, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
00058
00059 this->SetSizer( bSizer1 );
00060 this->Layout();
00061
00062
00063 accept_button_->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GripperClickFrameBase::acceptButtonClicked ), NULL, this );
00064 cancel_button_->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GripperClickFrameBase::cancelButtonClicked ), NULL, this );
00065 plugin_choice_->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GripperClickFrameBase::onPluginChoice ), NULL, this );
00066 }
00067
00068 GripperClickFrameBase::~GripperClickFrameBase()
00069 {
00070
00071 accept_button_->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GripperClickFrameBase::acceptButtonClicked ), NULL, this );
00072 cancel_button_->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GripperClickFrameBase::cancelButtonClicked ), NULL, this );
00073 plugin_choice_->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GripperClickFrameBase::onPluginChoice ), NULL, this );
00074 }