00001
00002
00003
00004
00005
00007
00008 #include "object_selection_ui.h"
00009
00011
00012 ObjectSelectionFrameBase::ObjectSelectionFrameBase( 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 bSizer3->SetMinSize( wxSize( 320,240 ) );
00023 panel_ = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 640,480 ), wxTAB_TRAVERSAL );
00024 bSizer3->Add( panel_, 0, wxALL, 5 );
00025
00026 bSizer1->Add( bSizer3, 1, wxEXPAND, 5 );
00027
00028 wxBoxSizer* bSizer41;
00029 bSizer41 = new wxBoxSizer( wxHORIZONTAL );
00030
00031 bottom_label_ = new wxStaticText( this, wxID_ANY, wxT("Select the object you would like to grasp and press 'OK'."), wxDefaultPosition, wxDefaultSize, 0 );
00032 bottom_label_->Wrap( -1 );
00033 bSizer41->Add( bottom_label_, 1, wxALL, 5 );
00034
00035 bSizer1->Add( bSizer41, 0, wxEXPAND, 5 );
00036
00037 wxBoxSizer* bSizer4;
00038 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
00039
00040 accept_button_ = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
00041 bSizer4->Add( accept_button_, 0, wxALL, 5 );
00042
00043 cancel_button_ = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
00044 bSizer4->Add( cancel_button_, 0, wxALL, 5 );
00045
00046
00047 bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
00048
00049 bSizer1->Add( bSizer4, 0, wxEXPAND, 5 );
00050
00051 this->SetSizer( bSizer1 );
00052 this->Layout();
00053
00054
00055 accept_button_->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSelectionFrameBase::acceptButtonClicked ), NULL, this );
00056 cancel_button_->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSelectionFrameBase::cancelButtonClicked ), NULL, this );
00057 }
00058
00059 ObjectSelectionFrameBase::~ObjectSelectionFrameBase()
00060 {
00061
00062 accept_button_->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSelectionFrameBase::acceptButtonClicked ), NULL, this );
00063 cancel_button_->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSelectionFrameBase::cancelButtonClicked ), NULL, this );
00064 }