Example #1
0
MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
	
	wxBoxSizer* MainSizer;
	MainSizer = new wxBoxSizer( wxHORIZONTAL );
	
	SidePanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
	wxBoxSizer* SidePanelSizer;
	SidePanelSizer = new wxBoxSizer( wxVERTICAL );
	
	CalendarCtrl = new wxCalendarCtrl( SidePanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxSize( -1,-1 ), 0|wxSTATIC_BORDER );
	SidePanelSizer->Add( CalendarCtrl, 0, wxEXPAND|wxALL, 10 );
	
	wxBoxSizer* ShowSizer;
	ShowSizer = new wxBoxSizer( wxHORIZONTAL );
	
	ShowLabel = new wxStaticText( SidePanel, wxID_ANY, _("Show:"), wxDefaultPosition, wxDefaultSize, 0 );
	ShowLabel->Wrap( -1 );
	ShowSizer->Add( ShowLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	wxString ShowChoiceChoices[] = { _("All events"), _("Today's events"), _("Upcoming week"), _("Specific period") };
	int ShowChoiceNChoices = sizeof( ShowChoiceChoices ) / sizeof( wxString );
	ShowChoice = new wxChoice( SidePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, ShowChoiceNChoices, ShowChoiceChoices, 0 );
	ShowChoice->SetSelection( 1 );
	ShowSizer->Add( ShowChoice, 1, wxEXPAND|wxLEFT, 8 );
	
	SidePanelSizer->Add( ShowSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
	
	PeriodPanel = new wxPanel( SidePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* PeriodPanelSizer;
	PeriodPanelSizer = new wxBoxSizer( wxVERTICAL );
	
	m_staticline1 = new wxStaticLine( PeriodPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	PeriodPanelSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
	
	wxFlexGridSizer* PeriodSizer;
	PeriodSizer = new wxFlexGridSizer( 2, 2, 10, 5 );
	PeriodSizer->AddGrowableCol( 1 );
	PeriodSizer->SetFlexibleDirection( wxBOTH );
	PeriodSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	FromLabel = new wxStaticText( PeriodPanel, wxID_ANY, _("From:"), wxDefaultPosition, wxDefaultSize, 0 );
	FromLabel->Wrap( -1 );
	PeriodSizer->Add( FromLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	FromDatePicker = new wxDatePickerCtrl( PeriodPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DROPDOWN );
	PeriodSizer->Add( FromDatePicker, 0, wxEXPAND, 5 );
	
	ToLabel = new wxStaticText( PeriodPanel, wxID_ANY, _("To:"), wxDefaultPosition, wxDefaultSize, 0 );
	ToLabel->Wrap( -1 );
	PeriodSizer->Add( ToLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	ToDatePicker = new wxDatePickerCtrl( PeriodPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DROPDOWN );
	PeriodSizer->Add( ToDatePicker, 0, wxEXPAND, 5 );
	
	PeriodPanelSizer->Add( PeriodSizer, 1, wxEXPAND, 5 );
	
	PeriodPanel->SetSizer( PeriodPanelSizer );
	PeriodPanel->Layout();
	PeriodPanelSizer->Fit( PeriodPanel );
	SidePanelSizer->Add( PeriodPanel, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
	
	
	SidePanelSizer->Add( 0, 0, 1, wxEXPAND, 5 );
	
	wxBoxSizer* QueryPanel;
	QueryPanel = new wxBoxSizer( wxVERTICAL );
	
	CategoriesLabel = new wxStaticText( SidePanel, wxID_ANY, _("Categories contain:"), wxDefaultPosition, wxDefaultSize, 0 );
	CategoriesLabel->Wrap( -1 );
	QueryPanel->Add( CategoriesLabel, 0, wxTOP|wxBOTTOM, 5 );
	
	CategoriesText = new wxTextCtrl( SidePanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	QueryPanel->Add( CategoriesText, 0, wxEXPAND, 5 );
	
	SummaryLabel = new wxStaticText( SidePanel, wxID_ANY, _("Summary contains:"), wxDefaultPosition, wxDefaultSize, 0 );
	SummaryLabel->Wrap( -1 );
	QueryPanel->Add( SummaryLabel, 0, wxTOP|wxBOTTOM, 5 );
	
	SearchText = new wxTextCtrl( SidePanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
	QueryPanel->Add( SearchText, 0, wxEXPAND, 10 );
	
	SidePanelSizer->Add( QueryPanel, 0, wxEXPAND|wxALL, 10 );
	
	SidePanel->SetSizer( SidePanelSizer );
	SidePanel->Layout();
	SidePanelSizer->Fit( SidePanel );
	MainSizer->Add( SidePanel, 0, wxEXPAND, 5 );
	
	EventsList = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
	MainSizer->Add( EventsList, 1, wxEXPAND, 5 );
	
	this->SetSizer( MainSizer );
	this->Layout();
	ToolBar = this->CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL|wxTB_HORZ_TEXT, wxID_ANY );
	ToolBar->SetToolBitmapSize( wxSize( 16,16 ) );
	ToolBar->AddTool( wxID_NEW, _("Add"), wxBitmap( wxT("icons/add.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, _("Add Event"), wxEmptyString );
	ToolBar->AddTool( wxID_DELETE, _("Delete"), wxBitmap( wxT("icons/delete.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, _("Delete Event"), wxEmptyString );
	ToolBar->AddTool( wxID_PROPERTIES, _("Edit"), wxBitmap( wxT("icons/edit.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, _("Edit Event"), wxEmptyString );
	ToolBar->AddSeparator();
	ToolBar->AddTool( wxID_EXIT, _("Quit"), wxBitmap( wxT("icons/quit.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, _("Quit program"), wxEmptyString );
	ToolBar->Realize();
	
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrameBase::Closed ) );
	CalendarCtrl->Connect( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler( MainFrameBase::CalendarCtrlChanged ), NULL, this );
	ShowChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainFrameBase::ShowChanged ), NULL, this );
	FromDatePicker->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( MainFrameBase::FromDateChanged ), NULL, this );
	ToDatePicker->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( MainFrameBase::ToDateChanged ), NULL, this );
	CategoriesText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainFrameBase::QueryChanged ), NULL, this );
	SearchText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainFrameBase::QueryChanged ), NULL, this );
	EventsList->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrameBase::ListDClick ), NULL, this );
	EventsList->Connect( wxEVT_COMMAND_LIST_COL_CLICK, wxListEventHandler( MainFrameBase::ColumnClicked ), NULL, this );
	EventsList->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( MainFrameBase::EventsDeselected ), NULL, this );
	EventsList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrameBase::EventsSelected ), NULL, this );
	EventsList->Connect( wxEVT_COMMAND_LIST_KEY_DOWN, wxListEventHandler( MainFrameBase::DeleteKeyDown ), NULL, this );
	this->Connect( wxID_NEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameBase::NewClicked ) );
	this->Connect( wxID_DELETE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameBase::DeleteClicked ) );
	this->Connect( wxID_PROPERTIES, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameBase::EditClicked ) );
	this->Connect( wxID_EXIT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrameBase::QuitClicked ) );
}
Example #2
0
ConfigurationDialogBase::ConfigurationDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxFlexGridSizer* fgSizer4;
	fgSizer4 = new wxFlexGridSizer( 0, 1, 0, 0 );
	fgSizer4->SetFlexibleDirection( wxBOTH );
	fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxStaticBoxSizer* sbSizer41;
	sbSizer41 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("General Setup") ), wxVERTICAL );
	
	wxFlexGridSizer* fgSizer241;
	fgSizer241 = new wxFlexGridSizer( 0, 2, 0, 0 );
	fgSizer241->SetFlexibleDirection( wxBOTH );
	fgSizer241->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_rbAlways = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Enable All Alarms"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer241->Add( m_rbAlways, 0, wxALL, 5 );
	
	m_rbOnce = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Enabled after first time Watchdog Dialog is visible"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer241->Add( m_rbOnce, 0, wxALL, 5 );
	
	m_rbVisible = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Enabled only if Watchdog Dialog is visible"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer241->Add( m_rbVisible, 0, wxALL, 5 );
	
	m_rbNever = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Disable All Alarms"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer241->Add( m_rbNever, 0, wxALL, 5 );
	
	
	sbSizer41->Add( fgSizer241, 1, wxEXPAND, 5 );
	
	
	fgSizer4->Add( sbSizer41, 1, wxEXPAND, 5 );
	
	wxFlexGridSizer* fgSizer43;
	fgSizer43 = new wxFlexGridSizer( 0, 2, 0, 0 );
	fgSizer43->AddGrowableCol( 0 );
	fgSizer43->AddGrowableRow( 0 );
	fgSizer43->SetFlexibleDirection( wxBOTH );
	fgSizer43->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxStaticBoxSizer* sbSizer7;
	sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Alarms") ), wxVERTICAL );
	
	wxFlexGridSizer* fgSizer29;
	fgSizer29 = new wxFlexGridSizer( 0, 2, 0, 0 );
	fgSizer29->AddGrowableCol( 1 );
	fgSizer29->AddGrowableRow( 0 );
	fgSizer29->SetFlexibleDirection( wxBOTH );
	fgSizer29->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxFlexGridSizer* fgSizer31;
	fgSizer31 = new wxFlexGridSizer( 0, 1, 0, 0 );
	fgSizer31->SetFlexibleDirection( wxBOTH );
	fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_bNew = new wxButton( sbSizer7->GetStaticBox(), wxID_ANY, _("New"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer31->Add( m_bNew, 0, wxALL, 5 );
	
	m_bEdit = new wxButton( sbSizer7->GetStaticBox(), wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer31->Add( m_bEdit, 0, wxALL, 5 );
	
	m_bDelete = new wxButton( sbSizer7->GetStaticBox(), wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer31->Add( m_bDelete, 0, wxALL, 5 );
	
	m_bDeleteAll = new wxButton( sbSizer7->GetStaticBox(), wxID_ANY, _("Delete All"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer31->Add( m_bDeleteAll, 0, wxALL, 5 );
	
	
	fgSizer29->Add( fgSizer31, 1, wxEXPAND, 5 );
	
	m_lAlarms = new wxListCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
	fgSizer29->Add( m_lAlarms, 1, wxALL|wxEXPAND, 5 );
	
	
	sbSizer7->Add( fgSizer29, 1, wxEXPAND, 5 );
	
	
	fgSizer43->Add( sbSizer7, 1, wxEXPAND, 5 );
	
	
	fgSizer4->Add( fgSizer43, 1, wxEXPAND, 5 );
	
	wxFlexGridSizer* fgSizer11;
	fgSizer11 = new wxFlexGridSizer( 1, 0, 0, 0 );
	fgSizer11->AddGrowableCol( 1 );
	fgSizer11->SetFlexibleDirection( wxBOTH );
	fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_button7 = new wxButton( this, wxID_ANY, _("About Author"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer11->Add( m_button7, 0, wxALL, 5 );
	
	m_sdbSizer1 = new wxStdDialogButtonSizer();
	m_sdbSizer1OK = new wxButton( this, wxID_OK );
	m_sdbSizer1->AddButton( m_sdbSizer1OK );
	m_sdbSizer1->Realize();
	
	fgSizer11->Add( m_sdbSizer1, 0, wxALIGN_RIGHT|wxBOTTOM|wxEXPAND|wxTOP, 5 );
	
	
	fgSizer4->Add( fgSizer11, 1, wxEXPAND, 5 );
	
	
	this->SetSizer( fgSizer4 );
	this->Layout();
	fgSizer4->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	m_rbAlways->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConfigurationDialogBase::OnEnabled ), NULL, this );
	m_rbOnce->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConfigurationDialogBase::OnEnabled ), NULL, this );
	m_rbVisible->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConfigurationDialogBase::OnEnabled ), NULL, this );
	m_rbNever->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConfigurationDialogBase::OnEnabled ), NULL, this );
	m_bNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigurationDialogBase::OnNewAlarm ), NULL, this );
	m_bEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigurationDialogBase::OnEditAlarm ), NULL, this );
	m_bDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigurationDialogBase::OnDeleteAlarm ), NULL, this );
	m_bDeleteAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigurationDialogBase::OnDeleteAllAlarms ), NULL, this );
	m_lAlarms->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( ConfigurationDialogBase::OnDoubleClick ), NULL, this );
	m_lAlarms->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( ConfigurationDialogBase::AlarmSelected ), NULL, this );
	m_lAlarms->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( ConfigurationDialogBase::AlarmSelected ), NULL, this );
	m_button7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfigurationDialogBase::OnAboutAuthor ), NULL, this );
}
Example #3
0
CompilerMainPageBase::CompilerMainPageBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCAD0CInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer114 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer114);
    
    m_button222 = new wxButton(this, wxID_ANY, _("Add Compilers"), wxDefaultPosition, wxSize(-1,-1), 0);
    #if wxVERSION_NUMBER >= 2904
    m_button222->SetBitmap(wxXmlResource::Get()->LoadBitmap(wxT("arrow-down-16")), wxRIGHT);
    m_button222->SetBitmapMargins(1,1);
    #endif
    
    boxSizer114->Add(m_button222, 0, wxALL|wxALIGN_RIGHT, 5);
    
    wxBoxSizer* boxSizer220 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer114->Add(boxSizer220, 0, wxEXPAND, 5);
    
    wxArrayString m_listBoxCompilersArr;
    m_listBoxCompilers = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_listBoxCompilersArr, wxLB_SORT|wxLB_SINGLE);
    
    boxSizer220->Add(m_listBoxCompilers, 0, wxALL|wxEXPAND, 5);
    
    m_auiBook = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_NB_TOP|wxAUI_NB_WINDOWLIST_BUTTON|wxBK_DEFAULT);
    
    boxSizer220->Add(m_auiBook, 1, wxALL|wxEXPAND, 5);
    
    m_panelTools = new wxPanel(m_auiBook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_auiBook->AddPage(m_panelTools, _("Tools"), true);
    
    wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
    m_panelTools->SetSizer(boxSizer2);
    
    wxArrayString m_pgMgrToolsArr;
    wxUnusedVar(m_pgMgrToolsArr);
    wxArrayInt m_pgMgrToolsIntArr;
    wxUnusedVar(m_pgMgrToolsIntArr);
    m_pgMgrTools = new wxPropertyGridManager(m_panelTools, wxID_ANY, wxDefaultPosition, wxSize(300,300), wxPG_DESCRIPTION|wxPG_HIDE_MARGIN|wxPG_BOLD_MODIFIED);
    
    boxSizer2->Add(m_pgMgrTools, 1, wxALL|wxEXPAND, 5);
    
    m_pgProp94 = m_pgMgrTools->Append(  new wxPropertyCategory( _("Tools") ) );
    m_pgProp94->SetHelpString(wxT(""));
    
    m_pgPropCXX = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("C++ Compiler"), wxPG_LABEL, wxT("")) );
    m_pgPropCXX->SetHelpString(_("The C++ compiler path (plus optional flags). This tool is represented in the Makefile as $(CXX)"));
    m_pgPropCXX->SetEditor( wxT("TextCtrlAndButton") );
    
    m_pgPropCC = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("C Compiler"), wxPG_LABEL, wxT("")) );
    m_pgPropCC->SetHelpString(_("The C++ compiler path (plus optional flags). This tool is represented in the Makefile as $(CC)"));
    m_pgPropCC->SetEditor( wxT("TextCtrlAndButton") );
    
    m_pgPropAS = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("Assembler Name"), wxPG_LABEL, wxT("")) );
    m_pgPropAS->SetHelpString(_("The assembler tool path. This tool is referred in the Makefile as $(AS)"));
    m_pgPropAS->SetEditor( wxT("TextCtrlAndButton") );
    
    m_pgPropLD = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("Linker"), wxPG_LABEL, wxT("")) );
    m_pgPropLD->SetHelpString(_("The linker tool. Usually similar to the 'C++ Compiler' tool path"));
    m_pgPropLD->SetEditor( wxT("TextCtrlAndButton") );
    
    m_pgPropSharedObjectLD = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("Shared Object Linker"), wxPG_LABEL, wxT("")) );
    m_pgPropSharedObjectLD->SetHelpString(_("The tool to create shared objects"));
    m_pgPropSharedObjectLD->SetEditor( wxT("TextCtrlAndButton") );
    
    m_pgPropAR = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("Archive"), wxPG_LABEL, wxT("")) );
    m_pgPropAR->SetHelpString(_("The static archive tool \"ar\". This tool is referred in the Makefile as $(AR)"));
    m_pgPropAR->SetEditor( wxT("TextCtrlAndButton") );
    
    m_pgPropResourceCompiler = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("Resource Compiler"), wxPG_LABEL, wxT("")) );
    m_pgPropResourceCompiler->SetHelpString(_("The resource compiler. (Windows only)"));
    m_pgPropResourceCompiler->SetEditor( wxT("TextCtrlAndButton") );
    
    m_pgPropMAKE = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("Make"), wxPG_LABEL, wxT("")) );
    m_pgPropMAKE->SetHelpString(_("The Make tool. on Windows / MinGW this is usually mingw32-make.exe while on other OSs its simply 'make'"));
    m_pgPropMAKE->SetEditor( wxT("TextCtrlAndButton") );
    
    m_pgPropMkdir = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("mkdir"), wxPG_LABEL, wxT("")) );
    m_pgPropMkdir->SetHelpString(_("Set the 'mkdir' for your OS.\nLeave it empty to use the defualt for your OS"));
    m_pgPropMkdir->SetEditor( wxT("TextCtrlAndButton") );
    
    m_pgPropDebugger = m_pgMgrTools->AppendIn( m_pgProp94,  new wxStringProperty( _("Gdb"), wxPG_LABEL, wxT("")) );
    m_pgPropDebugger->SetHelpString(_("On various platform (e.g. Cygwin) it is recommended to use their own sepcial gdb executable rather than the global one\nYou can specify one here, or leave this empty to use the default"));
    m_pgPropDebugger->SetEditor( wxT("TextCtrlAndButton") );
    m_pgMgrTools->GetGrid()->SetSplitterPosition(150, 0);
    m_panelPatterns = new wxPanel(m_auiBook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_auiBook->AddPage(m_panelPatterns, _("Patterns"), false);
    
    wxBoxSizer* bSizer14 = new wxBoxSizer(wxVERTICAL);
    m_panelPatterns->SetSizer(bSizer14);
    
    wxBoxSizer* bSizerError = new wxBoxSizer(wxVERTICAL);
    
    bSizer14->Add(bSizerError, 1, wxEXPAND, 5);
    
    m_staticText161 = new wxStaticText(m_panelPatterns, wxID_ANY, _("Compiler Errors Patterns:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizerError->Add(m_staticText161, 0, wxALL, 5);
    
    wxBoxSizer* bSizer25 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizerError->Add(bSizer25, 1, wxEXPAND, 5);
    
    m_listErrPatterns = new wxListCtrl(m_panelPatterns, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLC_VRULES|wxLC_HRULES|wxLC_SINGLE_SEL|wxLC_REPORT);
    
    bSizer25->Add(m_listErrPatterns, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer26 = new wxBoxSizer(wxVERTICAL);
    
    bSizer25->Add(bSizer26, 0, 0, 5);
    
    m_btnAddErrPattern = new wxButton(m_panelPatterns, wxID_ANY, _("Add"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_btnAddErrPattern->SetToolTip(_("Add new error pattern"));
    
    bSizer26->Add(m_btnAddErrPattern, 0, wxALL|wxEXPAND, 5);
    
    m_btnDelErrPattern = new wxButton(m_panelPatterns, wxID_ANY, _("Delete"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_btnDelErrPattern->SetToolTip(_("Delete the selected error pattern"));
    
    bSizer26->Add(m_btnDelErrPattern, 0, wxALL|wxEXPAND, 5);
    
    m_btnUpdateErrPattern = new wxButton(m_panelPatterns, wxID_ANY, _("Edit..."), wxDefaultPosition, wxSize(-1, -1), 0);
    m_btnUpdateErrPattern->SetToolTip(_("Edit the selected error pattern"));
    
    bSizer26->Add(m_btnUpdateErrPattern, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizerWarnings = new wxBoxSizer(wxVERTICAL);
    
    bSizer14->Add(bSizerWarnings, 1, wxEXPAND, 5);
    
    m_staticText17 = new wxStaticText(m_panelPatterns, wxID_ANY, _("Compiler Warnings Patterns:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizerWarnings->Add(m_staticText17, 0, wxALL, 5);
    
    wxBoxSizer* bSizer251 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizerWarnings->Add(bSizer251, 1, wxEXPAND, 5);
    
    m_listWarnPatterns = new wxListCtrl(m_panelPatterns, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLC_VRULES|wxLC_HRULES|wxLC_SINGLE_SEL|wxLC_REPORT);
    
    bSizer251->Add(m_listWarnPatterns, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer261 = new wxBoxSizer(wxVERTICAL);
    
    bSizer251->Add(bSizer261, 0, 0, 5);
    
    m_btnAddWarnPattern = new wxButton(m_panelPatterns, wxID_ANY, _("Add"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_btnAddWarnPattern->SetToolTip(_("Add new warning pattern"));
    
    bSizer261->Add(m_btnAddWarnPattern, 0, wxALL|wxEXPAND, 5);
    
    m_btnDelWarnPattern = new wxButton(m_panelPatterns, wxID_ANY, _("Delete"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_btnDelWarnPattern->SetToolTip(_("Delete the selected warning pattern"));
    
    bSizer261->Add(m_btnDelWarnPattern, 0, wxALL|wxEXPAND, 5);
    
    m_btnUpdateWarnPattern = new wxButton(m_panelPatterns, wxID_ANY, _("Edit..."), wxDefaultPosition, wxSize(-1, -1), 0);
    m_btnUpdateWarnPattern->SetToolTip(_("Edit the selected warning pattern"));
    
    bSizer261->Add(m_btnUpdateWarnPattern, 0, wxALL|wxEXPAND, 5);
    
    m_panelComilerOptions = new wxPanel(m_auiBook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_auiBook->AddPage(m_panelComilerOptions, _("Compiler Options"), false);
    
    wxBoxSizer* bSizer101 = new wxBoxSizer(wxVERTICAL);
    m_panelComilerOptions->SetSizer(bSizer101);
    
    m_staticText23_O = new wxStaticText(m_panelComilerOptions, wxID_ANY, _("Double click on an entry to modify it:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer101->Add(m_staticText23_O, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer12_CmpOptions = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer101->Add(bSizer12_CmpOptions, 1, wxEXPAND, 5);
    
    m_listCompilerOptions = new wxListCtrl(m_panelComilerOptions, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLC_VRULES|wxLC_HRULES|wxLC_SINGLE_SEL|wxLC_REPORT);
    
    bSizer12_CmpOptions->Add(m_listCompilerOptions, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer_1 = new wxBoxSizer(wxVERTICAL);
    
    bSizer12_CmpOptions->Add(bSizer_1, 0, wxEXPAND, 5);
    
    m_buttonCompilerOption = new wxButton(m_panelComilerOptions, wxID_ANY, _("New..."), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonCompilerOption->SetDefault();
    
    bSizer_1->Add(m_buttonCompilerOption, 0, wxALL, 5);
    
    m_buttonDeleteCompilerOption = new wxButton(m_panelComilerOptions, wxID_ANY, _("Delete"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer_1->Add(m_buttonDeleteCompilerOption, 0, wxALL, 5);
    
    m_panelLinkerOptions = new wxPanel(m_auiBook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_auiBook->AddPage(m_panelLinkerOptions, _("Linker Options"), false);
    
    wxBoxSizer* bSizer105 = new wxBoxSizer(wxVERTICAL);
    m_panelLinkerOptions->SetSizer(bSizer105);
    
    m_staticText23_L = new wxStaticText(m_panelLinkerOptions, wxID_ANY, _("Double click on an entry to modify it:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer105->Add(m_staticText23_L, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer123 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer105->Add(bSizer123, 1, wxEXPAND, 5);
    
    m_listLinkerOptions = new wxListCtrl(m_panelLinkerOptions, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLC_VRULES|wxLC_HRULES|wxLC_SINGLE_SEL|wxLC_REPORT);
    
    bSizer123->Add(m_listLinkerOptions, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer_2 = new wxBoxSizer(wxVERTICAL);
    
    bSizer123->Add(bSizer_2, 0, wxEXPAND, 5);
    
    m_buttonLinkerOption = new wxButton(m_panelLinkerOptions, wxID_ANY, _("New..."), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonLinkerOption->SetDefault();
    
    bSizer_2->Add(m_buttonLinkerOption, 0, wxALL, 5);
    
    m_buttonDeleteLinkerOption = new wxButton(m_panelLinkerOptions, wxID_ANY, _("Delete"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer_2->Add(m_buttonDeleteLinkerOption, 0, wxALL, 5);
    
    m_panelCompilerSwitches = new wxPanel(m_auiBook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_auiBook->AddPage(m_panelCompilerSwitches, _("Switches"), false);
    
    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
    m_panelCompilerSwitches->SetSizer(mainSizer);
    
    m_staticText8 = new wxStaticText(m_panelCompilerSwitches, wxID_ANY, _("Double click on an entry to modify it:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    mainSizer->Add(m_staticText8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_listSwitches = new wxListCtrl(m_panelCompilerSwitches, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLC_VRULES|wxLC_HRULES|wxLC_SINGLE_SEL|wxLC_REPORT);
    
    mainSizer->Add(m_listSwitches, 1, wxALL|wxEXPAND, 5);
    
    m_panelFileTypes = new wxPanel(m_auiBook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_auiBook->AddPage(m_panelFileTypes, _("File Types"), false);
    
    wxBoxSizer* bSizer10 = new wxBoxSizer(wxVERTICAL);
    m_panelFileTypes->SetSizer(bSizer10);
    
    m_staticText23 = new wxStaticText(m_panelFileTypes, wxID_ANY, _("Double click on an entry to modify it:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer10->Add(m_staticText23, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    wxBoxSizer* bSizer12 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer10->Add(bSizer12, 1, wxALL|wxEXPAND, 5);
    
    m_listCtrlFileTypes = new wxListCtrl(m_panelFileTypes, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLC_VRULES|wxLC_HRULES|wxLC_SINGLE_SEL|wxLC_REPORT);
    
    bSizer12->Add(m_listCtrlFileTypes, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer111 = new wxBoxSizer(wxVERTICAL);
    
    bSizer12->Add(bSizer111, 0, wxEXPAND, 5);
    
    m_buttonNewFileType = new wxButton(m_panelFileTypes, wxID_ANY, _("New..."), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonNewFileType->SetDefault();
    
    bSizer111->Add(m_buttonNewFileType, 0, wxALL, 5);
    
    m_buttonDeleteFileType = new wxButton(m_panelFileTypes, wxID_ANY, _("Delete"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer111->Add(m_buttonDeleteFileType, 0, wxALL, 5);
    
    m_panelAdvanced = new wxPanel(m_auiBook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_auiBook->AddPage(m_panelAdvanced, _("Advanced"), false);
    
    wxBoxSizer* bSizer11 = new wxBoxSizer(wxVERTICAL);
    m_panelAdvanced->SetSizer(bSizer11);
    
    wxBoxSizer* bSizer7 = new wxBoxSizer(wxVERTICAL);
    
    bSizer11->Add(bSizer7, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer3 = new wxFlexGridSizer(0, 3, 0, 0);
    fgSizer3->SetFlexibleDirection( wxBOTH );
    fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer3->AddGrowableCol(1);
    
    bSizer7->Add(fgSizer3, 0, wxEXPAND, 5);
    
    m_staticText18 = new wxStaticText(m_panelAdvanced, wxID_ANY, _("Global Paths"), wxDefaultPosition, wxSize(-1, -1), 0);
    wxFont m_staticText18Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText18Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText18->SetFont(m_staticText18Font);
    
    fgSizer3->Add(m_staticText18, 0, wxALL|wxALIGN_RIGHT, 5);
    
    fgSizer3->Add(0, 0, 0, wxALL, 5);
    
    fgSizer3->Add(0, 0, 1, wxALL, 5);
    
    m_staticText141 = new wxStaticText(m_panelAdvanced, wxID_ANY, _("Include Path:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_staticText141, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlGlobalIncludePath = new wxTextCtrl(m_panelAdvanced, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_textCtrlGlobalIncludePath->SetToolTip(_("Set here an additional include paths. Each path should be separated with a semi-colon\nNote that usually you don't need to modify this field and it should be left empty"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlGlobalIncludePath->SetHint(wxT(""));
    #endif
    
    fgSizer3->Add(m_textCtrlGlobalIncludePath, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_button67 = new wxButton(m_panelAdvanced, wxID_ANY, _("Edit..."), wxDefaultPosition, wxSize(-1,-1), 0);
    
    fgSizer3->Add(m_button67, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText16 = new wxStaticText(m_panelAdvanced, wxID_ANY, _("Libraries Path:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_staticText16, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlGlobalLibPath = new wxTextCtrl(m_panelAdvanced, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_textCtrlGlobalLibPath->SetToolTip(_("Set here an additional library search paths. Each path should be separated with a semi-colon\nNote that usually you don't need to modify this field and it should be left empty"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlGlobalLibPath->SetHint(wxT(""));
    #endif
    
    fgSizer3->Add(m_textCtrlGlobalLibPath, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_button69 = new wxButton(m_panelAdvanced, wxID_ANY, _("Edit..."), wxDefaultPosition, wxSize(-1,-1), 0);
    
    fgSizer3->Add(m_button69, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText19 = new wxStaticText(m_panelAdvanced, wxID_ANY, _("Misc"), wxDefaultPosition, wxSize(-1, -1), 0);
    wxFont m_staticText19Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText19Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText19->SetFont(m_staticText19Font);
    
    fgSizer3->Add(m_staticText19, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    fgSizer3->Add(0, 0, 0, wxALL, 5);
    
    fgSizer3->Add(0, 0, 1, wxALL, 5);
    
    m_staticText3 = new wxStaticText(m_panelAdvanced, wxID_ANY, _("Objects extension:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_staticText3, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textObjectExtension = new wxTextCtrl(m_panelAdvanced, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textObjectExtension->SetHint(wxT(""));
    #endif
    
    fgSizer3->Add(m_textObjectExtension, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    fgSizer3->Add(0, 0, 1, wxALL, 5);
    
    m_staticText24 = new wxStaticText(m_panelAdvanced, wxID_ANY, _("Depends extension:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_staticText24, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textDependExtension = new wxTextCtrl(m_panelAdvanced, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textDependExtension->SetHint(wxT(""));
    #endif
    
    fgSizer3->Add(m_textDependExtension, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    fgSizer3->Add(0, 0, 1, wxALL, 5);
    
    m_staticText25 = new wxStaticText(m_panelAdvanced, wxID_ANY, _("Preprocessed extension:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_staticText25, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textPreprocessExtension = new wxTextCtrl(m_panelAdvanced, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textPreprocessExtension->SetHint(wxT(""));
    #endif
    
    fgSizer3->Add(m_textPreprocessExtension, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    fgSizer3->Add(0, 0, 0, wxALL, 5);
    
    fgSizer3->Add(0, 0, 1, wxALL, 5);
    
    m_checkBoxGenerateDependenciesFiles = new wxCheckBox(m_panelAdvanced, wxID_ANY, _("Generate dependencies files (*.o.d)"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxGenerateDependenciesFiles->SetValue(false);
    
    fgSizer3->Add(m_checkBoxGenerateDependenciesFiles, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    fgSizer3->Add(0, 0, 1, wxALL, 5);
    
    fgSizer3->Add(0, 0, 0, wxALL, 5);
    
    m_checkBoxObjectNameSameAsFileName = new wxCheckBox(m_panelAdvanced, wxID_ANY, _("Object name is same as the file name"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxObjectNameSameAsFileName->SetValue(false);
    m_checkBoxObjectNameSameAsFileName->SetToolTip(_("By default, codelite will prepend the relative directory to the file name to compose an object name (e.g. src/a.cpp will generate object: src_a.o).\nUncheck this option to make the object name exactly as the file name without any prefixes"));
    
    fgSizer3->Add(m_checkBoxObjectNameSameAsFileName, 0, wxALL, 5);
    
    fgSizer3->Add(0, 0, 1, wxALL, 5);
    
    fgSizer3->Add(0, 0, 0, wxALL, 5);
    
    m_checkBoxReadObjectsFromFile = new wxCheckBox(m_panelAdvanced, wxID_ANY, _("Pass object list to the linker via file"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxReadObjectsFromFile->SetValue(false);
    
    fgSizer3->Add(m_checkBoxReadObjectsFromFile, 0, wxALL, 5);
    m_auiBook->SetMinSize(wxSize(500,500));
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_button222->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnAddCompilers), NULL, this);
    m_listBoxCompilers->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(CompilerMainPageBase::OnCompilerSelected), NULL, this);
    m_listBoxCompilers->Connect(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(CompilerMainPageBase::OnContextMenu), NULL, this);
    m_pgMgrTools->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnCustomEditorButtonClicked), NULL, this);
    m_pgMgrTools->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CompilerMainPageBase::OnValueChanged), NULL, this);
    m_listErrPatterns->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnErrItemActivated), NULL, this);
    m_btnAddErrPattern->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnAddErrPattern), NULL, this);
    m_btnDelErrPattern->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnDelErrPattern), NULL, this);
    m_btnDelErrPattern->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CompilerMainPageBase::OnErrorPatternSelectedUI), NULL, this);
    m_btnUpdateErrPattern->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnUpdateErrPattern), NULL, this);
    m_btnUpdateErrPattern->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CompilerMainPageBase::OnErrorPatternSelectedUI), NULL, this);
    m_listWarnPatterns->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnWarnItemActivated), NULL, this);
    m_btnAddWarnPattern->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnAddWarnPattern), NULL, this);
    m_btnDelWarnPattern->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnDelWarnPattern), NULL, this);
    m_btnDelWarnPattern->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CompilerMainPageBase::OnWarningPatternSelectedUI), NULL, this);
    m_btnUpdateWarnPattern->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnUpdateWarnPattern), NULL, this);
    m_btnUpdateWarnPattern->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CompilerMainPageBase::OnWarningPatternSelectedUI), NULL, this);
    m_listCompilerOptions->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnCompilerOptionActivated), NULL, this);
    m_listCompilerOptions->Connect(wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler(CompilerMainPageBase::OnCompilerOptionDeSelected), NULL, this);
    m_listCompilerOptions->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(CompilerMainPageBase::OnCompilerOptionSelected), NULL, this);
    m_buttonCompilerOption->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnNewCompilerOption), NULL, this);
    m_buttonDeleteCompilerOption->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnDeleteCompilerOption), NULL, this);
    m_listLinkerOptions->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnLinkerOptionActivated), NULL, this);
    m_listLinkerOptions->Connect(wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler(CompilerMainPageBase::OnLinkerOptionDeSelected), NULL, this);
    m_listLinkerOptions->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(CompilerMainPageBase::OnLinkerOptionSelected), NULL, this);
    m_buttonLinkerOption->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnNewLinkerOption), NULL, this);
    m_buttonDeleteLinkerOption->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnDeleteLinkerOption), NULL, this);
    m_listSwitches->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnItemActivated), NULL, this);
    m_listSwitches->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(CompilerMainPageBase::OnItemSelected), NULL, this);
    m_listCtrlFileTypes->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnFileTypeActivated), NULL, this);
    m_listCtrlFileTypes->Connect(wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler(CompilerMainPageBase::OnFileTypeDeSelected), NULL, this);
    m_listCtrlFileTypes->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(CompilerMainPageBase::OnFileTypeSelected), NULL, this);
    m_buttonNewFileType->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnNewFileType), NULL, this);
    m_buttonDeleteFileType->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnDeleteFileType), NULL, this);
    m_button67->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnEditIncludePaths), NULL, this);
    m_button69->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnEditLibraryPaths), NULL, this);
    
}
Example #4
0
TrackPropDlg::TrackPropDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
    long wstyle = style;
#ifdef __WXOSX__
    wstyle |= wxSTAY_ON_TOP;
#endif

    SetWindowStyleFlag( wstyle ); 
	this->SetSizeHints( wxSize( 670,440 ), wxDefaultSize );
	
	wxBoxSizer* bSizerMain;
	bSizerMain = new wxBoxSizer( wxVERTICAL );
	
	m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_panelBasic = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizerBasic;
	bSizerBasic = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizerName;
	bSizerName = new wxBoxSizer( wxHORIZONTAL );
	
	m_stName = new wxStaticText( m_panelBasic, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stName->Wrap( -1 );
	bSizerName->Add( m_stName, 0, wxALL, 5 );
	
	m_tName = new wxTextCtrl( m_panelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerName->Add( m_tName, 1, 0, 5 );
	
	
	bSizerBasic->Add( bSizerName, 0, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizerFromTo;
	bSizerFromTo = new wxBoxSizer( wxHORIZONTAL );
	
	m_stFrom = new wxStaticText( m_panelBasic, wxID_ANY, _("From"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stFrom->Wrap( -1 );
	bSizerFromTo->Add( m_stFrom, 0, wxALL, 5 );
	
	m_tFrom = new wxTextCtrl( m_panelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerFromTo->Add( m_tFrom, 1, 0, 5 );
	
	m_stTo = new wxStaticText( m_panelBasic, wxID_ANY, _("To"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stTo->Wrap( -1 );
	bSizerFromTo->Add( m_stTo, 0, wxALL, 5 );
	
	m_tTo = new wxTextCtrl( m_panelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerFromTo->Add( m_tTo, 1, 0, 5 );
	
	
	bSizerBasic->Add( bSizerFromTo, 0, wxALL|wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizerParams;
	sbSizerParams = new wxStaticBoxSizer( new wxStaticBox( m_panelBasic, wxID_ANY, _("Display parameters") ), wxHORIZONTAL );
	
	m_cbShow = new wxCheckBox( m_panelBasic, wxID_ANY, _("Show on chart"), wxDefaultPosition, wxDefaultSize, 0 );
	sbSizerParams->Add( m_cbShow, 0, wxALL, 5 );
	
	m_stColor = new wxStaticText( m_panelBasic, wxID_ANY, _("Color"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stColor->Wrap( -1 );
	sbSizerParams->Add( m_stColor, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
    wxString m_cColorChoices[] = { _("Default color"), _("Black"), _("Dark Red"), _("Dark Green"),
            _("Dark Yellow"), _("Dark Blue"), _("Dark Magenta"), _("Dark Cyan"),
            _("Light Gray"), _("Dark Gray"), _("Red"), _("Green"), _("Yellow"), _("Blue"),
            _("Magenta"), _("Cyan"), _("White") };
    int m_cColorNChoices = sizeof( m_cColorChoices ) / sizeof(wxString);
    m_cColor = new wxChoice( m_panelBasic, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cColorNChoices, m_cColorChoices, 0 );
    m_cColor->SetSelection( 0 );
	sbSizerParams->Add( m_cColor, 1, 0, 5 );
	
	m_stStyle = new wxStaticText( m_panelBasic, wxID_ANY, _("Style"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stStyle->Wrap( -1 );
	sbSizerParams->Add( m_stStyle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
    wxString m_cStyleChoices[] = { _("Default"), _("Solid"), _("Dot"), _("Long dash"), _("Short dash"), _("Dot dash") };
    int m_cStyleNChoices = sizeof( m_cStyleChoices ) / sizeof(wxString);
    m_cStyle = new wxChoice( m_panelBasic, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cStyleNChoices, m_cStyleChoices, 0 );
    m_cStyle->SetSelection( 0 );
    sbSizerParams->Add( m_cStyle, 1, 0, 5 );
	
	m_stWidth = new wxStaticText( m_panelBasic, wxID_ANY, _("Width"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stWidth->Wrap( -1 );
	sbSizerParams->Add( m_stWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
    wxString m_cWidthChoices[] = { _("Default"), _("1 pixel"), _("2 pixels"), _("3 pixels"),
            _("4 pixels"), _("5 pixels"), _("6 pixels"), _("7 pixels"), _("8 pixels"),
            _("9 pixels"), _("10 pixels") };
    int m_cWidthNChoices = sizeof( m_cWidthChoices ) / sizeof(wxString);
    m_cWidth = new wxChoice( m_panelBasic, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cWidthNChoices, m_cWidthChoices, 0 );
    m_cWidth->SetSelection( 0 );
	sbSizerParams->Add( m_cWidth, 1, 0, 5 );
	
	bSizerBasic->Add( sbSizerParams, 0, wxALL|wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizerStats;
	sbSizerStats = new wxStaticBoxSizer( new wxStaticBox( m_panelBasic, wxID_ANY, _("Statistics") ), wxVERTICAL );
	
	wxBoxSizer* bSizerStats;
	bSizerStats = new wxBoxSizer( wxHORIZONTAL );
	
	m_stTotDistance = new wxStaticText( m_panelBasic, wxID_ANY, _("Total distance"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stTotDistance->Wrap( -1 );
	bSizerStats->Add( m_stTotDistance, 0, wxALL, 5 );
	
	m_tTotDistance = new wxTextCtrl( m_panelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	bSizerStats->Add( m_tTotDistance, 1, 0, 5 );
	
	m_stAvgSpeed = new wxStaticText( m_panelBasic, wxID_ANY, _("Avg. speed"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stAvgSpeed->Wrap( -1 );
	bSizerStats->Add( m_stAvgSpeed, 0, wxALL, 5 );
	
	m_tAvgSpeed = new wxTextCtrl( m_panelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	bSizerStats->Add( m_tAvgSpeed, 1, 0, 5 );
	
	m_stTimeEnroute = new wxStaticText( m_panelBasic, wxID_ANY, _("Time enroute"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stTimeEnroute->Wrap( -1 );
	bSizerStats->Add( m_stTimeEnroute, 0, wxALL, 5 );
	
	m_tTimeEnroute = new wxTextCtrl( m_panelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	bSizerStats->Add( m_tTimeEnroute, 2, 0, 5 );
	
	
	sbSizerStats->Add( bSizerStats, 0, wxEXPAND, 5 );
	
	
	bSizerBasic->Add( sbSizerStats, 0, wxALL|wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizerPoints;
	sbSizerPoints = new wxStaticBoxSizer( new wxStaticBox( m_panelBasic, wxID_ANY, _("Recorded points") ), wxVERTICAL );
	
	m_lcPoints = new OCPNTrackListCtrl( m_panelBasic, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_HRULES | wxLC_VRULES | wxLC_EDIT_LABELS | wxLC_VIRTUAL );

    m_lcPoints->InsertColumn( 0, _("Leg"), wxLIST_FORMAT_LEFT, 45 );
    m_lcPoints->InsertColumn( 2, _("Distance"), wxLIST_FORMAT_RIGHT, 70 );
    m_lcPoints->InsertColumn( 3, _("Bearing"), wxLIST_FORMAT_LEFT, 70 );
    m_lcPoints->InsertColumn( 4, _("Latitude"), wxLIST_FORMAT_LEFT, 85 );
    m_lcPoints->InsertColumn( 5, _("Longitude"), wxLIST_FORMAT_LEFT, 90 );
    m_lcPoints->InsertColumn( 6, _("Timestamp"), wxLIST_FORMAT_LEFT, 135 );
    m_lcPoints->InsertColumn( 7, _("Speed"), wxLIST_FORMAT_CENTER, 100 );

	sbSizerPoints->Add( m_lcPoints, 1, wxALL|wxEXPAND, 5 );
	
    bSizerBasic->Add( sbSizerPoints, 1, wxALL|wxEXPAND, 5 );
	
    m_panelBasic->SetSizer( bSizerBasic );
	m_panelBasic->Layout();
	bSizerBasic->Fit( m_panelBasic );
	m_notebook1->AddPage( m_panelBasic, _("Basic"), true );

	m_panelAdvanced = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	
	wxBoxSizer* bSizerAdvanced;
	bSizerAdvanced = new wxBoxSizer( wxVERTICAL );
	
	m_stDescription = new wxStaticText( m_panelAdvanced, wxID_ANY, _("Description"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stDescription->Wrap( -1 );
	bSizerAdvanced->Add( m_stDescription, 0, wxALL, 5 );
	
	m_tDescription = new wxTextCtrl( m_panelAdvanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
	bSizerAdvanced->Add( m_tDescription, 1, wxALL|wxEXPAND, 5 );
	
	sbSizerLinks = new wxStaticBoxSizer( new wxStaticBox( m_panelAdvanced, wxID_ANY, _("Links") ), wxVERTICAL );
	
	m_scrolledWindowLinks = new wxScrolledWindow( m_panelAdvanced, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
	m_scrolledWindowLinks->SetScrollRate( 5, 5 );
	bSizerLinks = new wxBoxSizer( wxVERTICAL );
	
	m_hyperlink1 = new wxHyperlinkCtrl( m_scrolledWindowLinks, wxID_ANY, _("wxFB Website"), wxT("http://www.wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
	m_menuLink = new wxMenu();
	wxMenuItem* m_menuItemEdit;
	m_menuItemEdit = new wxMenuItem( m_menuLink, wxID_ANY, wxString( _("Edit") ) , wxEmptyString, wxITEM_NORMAL );
	m_menuLink->Append( m_menuItemEdit );
	
	wxMenuItem* m_menuItemAdd;
	m_menuItemAdd = new wxMenuItem( m_menuLink, wxID_ANY, wxString( _("Add new") ) , wxEmptyString, wxITEM_NORMAL );
	m_menuLink->Append( m_menuItemAdd );
	
	wxMenuItem* m_menuItemDelete;
	m_menuItemDelete = new wxMenuItem( m_menuLink, wxID_ANY, wxString( _("Delete") ) , wxEmptyString, wxITEM_NORMAL );
	m_menuLink->Append( m_menuItemDelete );
	
	m_hyperlink1->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( TrackPropDlg::m_hyperlink1OnContextMenu ), NULL, this ); 
	
	bSizerLinks->Add( m_hyperlink1, 0, wxALL, 5 );
	
	
	m_scrolledWindowLinks->SetSizer( bSizerLinks );
	m_scrolledWindowLinks->Layout();
	bSizerLinks->Fit( m_scrolledWindowLinks );
	sbSizerLinks->Add( m_scrolledWindowLinks, 1, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer27;
	bSizer27 = new wxBoxSizer( wxHORIZONTAL );
	
	m_buttonAddLink = new wxButton( m_panelAdvanced, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
	bSizer27->Add( m_buttonAddLink, 0, wxALL, 5 );
	
	m_toggleBtnEdit = new wxToggleButton( m_panelAdvanced, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer27->Add( m_toggleBtnEdit, 0, wxALL, 5 );
	
	m_staticTextEditEnabled = new wxStaticText( m_panelAdvanced, wxID_ANY, _("Links are opened in the default browser."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextEditEnabled->Wrap( -1 );
	bSizer27->Add( m_staticTextEditEnabled, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	
	sbSizerLinks->Add( bSizer27, 0, wxEXPAND, 5 );
	
	
	bSizerAdvanced->Add( sbSizerLinks, 1, wxEXPAND, 5 );
	
	
	m_panelAdvanced->SetSizer( bSizerAdvanced );
	m_panelAdvanced->Layout();
	bSizerAdvanced->Fit( m_panelAdvanced );
	m_notebook1->AddPage( m_panelAdvanced, _("Advanced"), false );
	
	bSizerMain->Add( m_notebook1, 1, wxEXPAND | wxALL, 5 );
	
	m_sdbBtmBtnsSizer = new wxStdDialogButtonSizer();
	m_sdbBtmBtnsSizerOK = new wxButton( this, wxID_OK );
	m_sdbBtmBtnsSizer->AddButton( m_sdbBtmBtnsSizerOK );
	m_sdbBtmBtnsSizerCancel = new wxButton( this, wxID_CANCEL );
	m_sdbBtmBtnsSizer->AddButton( m_sdbBtmBtnsSizerCancel );

	m_sdbBtmBtnsSizerPrint = new wxButton( this, wxID_ANY, _("Print"), wxDefaultPosition, wxDefaultSize );
	m_sdbBtmBtnsSizer->Add( m_sdbBtmBtnsSizerPrint );
	m_sdbBtmBtnsSizerSplit = new wxButton( this, wxID_ANY, _("Split"), wxDefaultPosition, wxDefaultSize );
	m_sdbBtmBtnsSizer->Add( m_sdbBtmBtnsSizerSplit );
	m_sdbBtmBtnsSizerExtend = new wxButton( this, wxID_ANY, _("Extend"), wxDefaultPosition, wxDefaultSize );
	m_sdbBtmBtnsSizer->Add( m_sdbBtmBtnsSizerExtend );
	m_sdbBtmBtnsSizerToRoute = new wxButton( this, wxID_ANY, _("To route"), wxDefaultPosition, wxDefaultSize );
	m_sdbBtmBtnsSizer->Add( m_sdbBtmBtnsSizerToRoute );
	m_sdbBtmBtnsSizerExport = new wxButton( this, wxID_ANY, _("Export"), wxDefaultPosition, wxDefaultSize );
	m_sdbBtmBtnsSizer->Add( m_sdbBtmBtnsSizerExport );

	m_sdbBtmBtnsSizer->Realize();

	bSizerMain->Add( m_sdbBtmBtnsSizer, 0, wxALL|wxEXPAND, 5 );
	
	//Make it look nice and add the needed non-standard buttons
	int w1, w2, h;
	((wxWindowBase *)m_stName)->GetSize( &w1, &h );
	((wxWindowBase *)m_stFrom)->GetSize( &w2, &h );
	((wxWindowBase *)m_stName)->SetMinSize( wxSize(wxMax(w1, w2), h) );
	((wxWindowBase *)m_stFrom)->SetMinSize( wxSize(wxMax(w1, w2), h) );
    
	this->SetSizer( bSizerMain );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	m_sdbBtmBtnsSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TrackPropDlg::OnCancelBtnClick ), NULL, this );
	m_sdbBtmBtnsSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TrackPropDlg::OnOKBtnClick ), NULL, this );
	m_sdbBtmBtnsSizerPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TrackPropDlg::OnPrintBtnClick ), NULL, this );
	m_sdbBtmBtnsSizerSplit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TrackPropDlg::OnSplitBtnClick ), NULL, this );
	m_sdbBtmBtnsSizerExtend->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TrackPropDlg::OnExtendBtnClick ), NULL, this );
	m_sdbBtmBtnsSizerToRoute->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TrackPropDlg::OnToRouteBtnClick ), NULL, this );
	m_sdbBtmBtnsSizerExport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TrackPropDlg::OnExportBtnClick ), NULL, this );
	m_lcPoints->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( TrackPropDlg::OnTrackPropListClick ), NULL, this );
	Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler(TrackPropDlg::OnTrackPropRightClick), NULL, this );
    Connect( wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TrackPropDlg::OnTrackPropMenuSelected), NULL, this );
    
    Connect( m_menuItemDelete->GetId(), wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler( TrackPropDlg::OnDeleteLink ) );
    Connect( m_menuItemEdit->GetId(), wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler( TrackPropDlg::OnEditLink ) );
    Connect( m_menuItemAdd->GetId(), wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler( TrackPropDlg::OnAddLink ) );
    m_buttonAddLink->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
            wxCommandEventHandler( TrackPropDlg::OnAddLink ), NULL, this );
    m_toggleBtnEdit->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED,
            wxCommandEventHandler( TrackPropDlg::OnEditLinkToggle ), NULL, this );
        
    m_pLinkProp = new LinkPropImpl( this );
    m_pMyLinkList = NULL;
}
Example #5
0
RSXDebugger::RSXDebugger(wxWindow* parent) 
	: wxFrame(parent, wxID_ANY, "RSX Debugger", wxDefaultPosition, wxSize(700, 450))
	, m_item_count(23)
	, m_addr(0x0)
	, m_cur_texture(0)
	, exit(false)
{
	this->SetBackgroundColour(wxColour(240,240,240)); //This fix the ugly background color under Windows
	wxBoxSizer& s_panel = *new wxBoxSizer(wxHORIZONTAL);

	//Tools
	wxBoxSizer& s_tools = *new wxBoxSizer(wxVERTICAL);

	// Controls
	wxStaticBoxSizer& s_controls = *new wxStaticBoxSizer(wxHORIZONTAL, this, "RSX Debugger Controls");

	// Controls: Address
	wxStaticBoxSizer& s_controls_addr = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Address:");
	t_addr = new wxTextCtrl(this, wxID_ANY, "00000000", wxDefaultPosition, wxSize(60,-1));
	t_addr->SetMaxLength(8);
	s_controls_addr.Add(t_addr);

	// Controls: Go to
	wxStaticBoxSizer& s_controls_goto = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Go to:");
	wxButton* b_goto_get = new wxButton(this, wxID_ANY, "Get", wxDefaultPosition, wxSize(40,-1));
	wxButton* b_goto_put = new wxButton(this, wxID_ANY, "Put", wxDefaultPosition, wxSize(40,-1));
	s_controls_goto.Add(b_goto_get);
	s_controls_goto.Add(b_goto_put);

	// Controls: Breaks
	wxStaticBoxSizer& s_controls_breaks = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Break on:");
	wxButton* b_break_frame = new wxButton(this, wxID_ANY, "Frame",     wxDefaultPosition, wxSize(60,-1));
	wxButton* b_break_text  = new wxButton(this, wxID_ANY, "Texture",   wxDefaultPosition, wxSize(60,-1));
	wxButton* b_break_draw  = new wxButton(this, wxID_ANY, "Draw",      wxDefaultPosition, wxSize(60,-1));
	wxButton* b_break_prim  = new wxButton(this, wxID_ANY, "Primitive", wxDefaultPosition, wxSize(60,-1));
	wxButton* b_break_inst  = new wxButton(this, wxID_ANY, "Command",   wxDefaultPosition, wxSize(60,-1));
	s_controls_breaks.Add(b_break_frame);
	s_controls_breaks.Add(b_break_text);
	s_controls_breaks.Add(b_break_draw);
	s_controls_breaks.Add(b_break_prim);
	s_controls_breaks.Add(b_break_inst);

	// TODO: This feature is not yet implemented
	b_break_frame->Disable();
	b_break_text->Disable();
	b_break_draw->Disable();
	b_break_prim->Disable();
	b_break_inst->Disable();
	
	s_controls.Add(&s_controls_addr);
	s_controls.Add(&s_controls_goto);
	s_controls.Add(&s_controls_breaks);

	//Tabs
	wxNotebook* nb_rsx = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(482,475));
	wxPanel* p_commands  = new wxPanel(nb_rsx, wxID_ANY);
	wxPanel* p_flags     = new wxPanel(nb_rsx, wxID_ANY);
	wxPanel* p_programs  = new wxPanel(nb_rsx, wxID_ANY);
	wxPanel* p_lightning = new wxPanel(nb_rsx, wxID_ANY);
	wxPanel* p_texture   = new wxPanel(nb_rsx, wxID_ANY);
	wxPanel* p_settings  = new wxPanel(nb_rsx, wxID_ANY);

	nb_rsx->AddPage(p_commands,  wxT("RSX Commands"));
	nb_rsx->AddPage(p_flags,     wxT("Flags"));
	nb_rsx->AddPage(p_programs,  wxT("Programs"));
	nb_rsx->AddPage(p_lightning, wxT("Lightning"));
	nb_rsx->AddPage(p_texture,   wxT("Texture"));
	nb_rsx->AddPage(p_settings,  wxT("Settings"));

	//Tabs: Lists
	m_list_commands  = new wxListView(p_commands,  wxID_ANY, wxPoint(1,3), wxSize(470,444));
	m_list_flags     = new wxListView(p_flags,     wxID_ANY, wxPoint(1,3), wxSize(470,444));
	m_list_programs  = new wxListView(p_programs,  wxID_ANY, wxPoint(1,3), wxSize(470,444));
	m_list_lightning = new wxListView(p_lightning, wxID_ANY, wxPoint(1,3), wxSize(470,444));
	m_list_texture   = new wxListView(p_texture,   wxID_ANY, wxPoint(1,3), wxSize(470,444));
	m_list_settings  = new wxListView(p_settings,  wxID_ANY, wxPoint(1,3), wxSize(470,444));
	
	//Tabs: List Style
	m_list_commands ->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
	m_list_flags    ->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
	m_list_programs ->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
	m_list_lightning->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
	m_list_texture  ->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
	m_list_settings ->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));

	//Tabs: List Columns
	m_list_commands->InsertColumn(0, "Address", 0, 80);
	m_list_commands->InsertColumn(1, "Value", 0, 80);
	m_list_commands->InsertColumn(2, "Command", 0, 250);
	m_list_commands->InsertColumn(3, "Count", 0, 40);
	m_list_flags->InsertColumn(0, "Name", 0, 170);
	m_list_flags->InsertColumn(1, "Value", 0, 270);
	m_list_programs->InsertColumn(0, "ID", 0, 70);
	m_list_programs->InsertColumn(1, "VP ID", 0, 70);
	m_list_programs->InsertColumn(2, "FP ID", 0, 70);
	m_list_programs->InsertColumn(3, "VP Length", 0, 110);
	m_list_programs->InsertColumn(4, "FP Length", 0, 110);
	m_list_lightning->InsertColumn(0, "Name", 0, 170);
	m_list_lightning->InsertColumn(1, "Value", 0, 270);

	m_list_texture->InsertColumn(0, "Index");
	m_list_texture->InsertColumn(1, "Address");
	m_list_texture->InsertColumn(2, "Cubemap");
	m_list_texture->InsertColumn(3, "Dimension");
	m_list_texture->InsertColumn(4, "Enabled");
	m_list_texture->InsertColumn(5, "Format");
	m_list_texture->InsertColumn(6, "Mipmap");
	m_list_texture->InsertColumn(7, "Pitch");
	m_list_texture->InsertColumn(8, "Size");

	m_list_settings->InsertColumn(0, "Name", 0, 170);
	m_list_settings->InsertColumn(1, "Value", 0, 270);

	// Fill list
	for(u32 i=0; i<m_item_count; i++)
	{
		m_list_commands->InsertItem(m_list_commands->GetItemCount(), wxEmptyString);
	}

	//Tools: Tools = Controls + Notebook Tabs
	s_tools.AddSpacer(10);
	s_tools.Add(&s_controls);
	s_tools.AddSpacer(10);
	s_tools.Add(nb_rsx);
	s_tools.AddSpacer(10);

	//Buffers
	wxBoxSizer& s_buffers1 = *new wxBoxSizer(wxVERTICAL);
	wxBoxSizer& s_buffers2 = *new wxBoxSizer(wxVERTICAL);
	wxStaticBoxSizer& s_buffers_colorA  = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Color Buffer A");
	wxStaticBoxSizer& s_buffers_colorB  = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Color Buffer B");
	wxStaticBoxSizer& s_buffers_colorC  = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Color Buffer C");
	wxStaticBoxSizer& s_buffers_colorD  = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Color Buffer D");
	wxStaticBoxSizer& s_buffers_depth   = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Depth Buffer");
	wxStaticBoxSizer& s_buffers_stencil = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Stencil Buffer");
	wxStaticBoxSizer& s_buffers_text    = *new wxStaticBoxSizer(wxHORIZONTAL, this, "Texture");

	//Buffers and textures
	CellVideoOutResolution res  = ResolutionTable[ResolutionIdToNum(Ini.GSResolution.GetValue())];
	m_panel_width = (res.width*108)/res.height;
	m_panel_height = 108;
	m_text_width = 108;
	m_text_height = 108;

	//Panels for displaying the buffers
	p_buffer_colorA  = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(m_panel_width, m_panel_height));
	p_buffer_colorB  = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(m_panel_width, m_panel_height));
	p_buffer_colorC  = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(m_panel_width, m_panel_height));
	p_buffer_colorD  = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(m_panel_width, m_panel_height));
	p_buffer_depth   = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(m_panel_width, m_panel_height));
	p_buffer_stencil = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(m_panel_width, m_panel_height));
	p_buffer_tex     = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(m_text_width, m_text_height));
	s_buffers_colorA.Add(p_buffer_colorA); 
	s_buffers_colorB.Add(p_buffer_colorB); 
	s_buffers_colorC.Add(p_buffer_colorC); 
	s_buffers_colorD.Add(p_buffer_colorD); 
	s_buffers_depth.Add(p_buffer_depth);
	s_buffers_stencil.Add(p_buffer_stencil);
	s_buffers_text.Add(p_buffer_tex);
	
	//Merge and display everything
	s_buffers1.AddSpacer(10);
	s_buffers1.Add(&s_buffers_colorA);
	s_buffers1.AddSpacer(10);
	s_buffers1.Add(&s_buffers_colorC);
	s_buffers1.AddSpacer(10);
	s_buffers1.Add(&s_buffers_depth);
	s_buffers1.AddSpacer(10);
	s_buffers1.Add(&s_buffers_text);
	s_buffers1.AddSpacer(10);

	s_buffers2.AddSpacer(10);
	s_buffers2.Add(&s_buffers_colorB);
	s_buffers2.AddSpacer(10);
	s_buffers2.Add(&s_buffers_colorD);
	s_buffers2.AddSpacer(10);
	s_buffers2.Add(&s_buffers_stencil);
	s_buffers2.AddSpacer(10);

	s_panel.AddSpacer(10);
	s_panel.Add(&s_tools);
	s_panel.AddSpacer(10);
	s_panel.Add(&s_buffers1);
	s_panel.AddSpacer(10);
	s_panel.Add(&s_buffers2);
	s_panel.AddSpacer(10);
	SetSizerAndFit(&s_panel);

	//Events
	m_app_connector.Connect(wxID_ANY, wxEVT_KEY_DOWN, wxKeyEventHandler(RSXDebugger::OnKeyDown), nullptr, this);
	Connect(t_addr->GetId(),   wxEVT_COMMAND_TEXT_ENTER,       wxCommandEventHandler(RSXDebugger::OnChangeToolsAddr));

	Connect(b_goto_get->GetId(),  wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RSXDebugger::GoToGet));
	Connect(b_goto_put->GetId(),  wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RSXDebugger::GoToPut));

	p_buffer_colorA->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), nullptr, this);
	p_buffer_colorB->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), nullptr, this);
	p_buffer_colorC->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), nullptr, this);
	p_buffer_colorD->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), nullptr, this);
	//Connect(p_buffer_depth->GetId(),   wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RSXDebugger::OnClickBuffer));
	//Connect(p_buffer_stencil->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RSXDebugger::OnClickBuffer));
	p_buffer_tex->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), nullptr, this);

	m_list_commands->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(RSXDebugger::OnScrollMemory), nullptr, this);
	m_list_flags->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(RSXDebugger::SetFlags), nullptr, this);
	m_list_programs->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(RSXDebugger::SetPrograms), nullptr, this);

	m_list_texture->Connect(wxID_ANY, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(RSXDebugger::OnSelectTexture), nullptr, this);
	
	//Fill the frame
	UpdateInformation();
};
Example #6
0
void SelectWeightsDlg::InitNormal()
{
	panel = new wxPanel(this);
	panel->SetBackgroundColour(*wxWHITE);
	SetBackgroundColour(*wxWHITE);
	
	ok_btn = new wxButton(panel, XRCID("wxID_OK"), "OK",
						  wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
	cancel_btn = new wxButton(panel, XRCID("wxID_CANCEL"), "Cancel",
							  wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
	
	Connect(XRCID("wxID_OK"), wxEVT_BUTTON,
			wxCommandEventHandler(SelectWeightsDlg::OnOkClick));
	Connect(XRCID("wxID_CANCEL"), wxEVT_BUTTON,
			wxCommandEventHandler(SelectWeightsDlg::OnCancelClick));
	
	w_list = new wxListCtrl(panel, XRCID("ID_W_LIST"), wxDefaultPosition,
							wxSize(-1, 100), wxLC_REPORT);
	// Note: search for "ungrouped_list" for examples of wxListCtrl usage.
	w_list->AppendColumn("Weights Name");
	w_list->SetColumnWidth(TITLE_COL, 300);
	InitWeightsList();
	
	Connect(XRCID("ID_W_LIST"), wxEVT_LIST_ITEM_ACTIVATED,
			wxListEventHandler(SelectWeightsDlg::OnWListItemDblClick));
	Connect(XRCID("ID_W_LIST"), wxEVT_LIST_ITEM_SELECTED,
			wxListEventHandler(SelectWeightsDlg::OnWListItemSelect));
	Connect(XRCID("ID_W_LIST"), wxEVT_LIST_ITEM_DESELECTED,
			wxListEventHandler(SelectWeightsDlg::OnWListItemDeselect));
	
	details_win = wxWebView::New(panel, wxID_ANY, wxWebViewDefaultURLStr,
								 wxDefaultPosition,
								 wxSize(-1, 200));
	
	// Arrange above widgets in panel using sizers.
	// Top level panel sizer will be panel_h_szr
	// Below that will be panel_v_szr
	// panel_v_szr will directly receive widgets
	
	wxBoxSizer* btns_row1_h_szr = new wxBoxSizer(wxHORIZONTAL);
	btns_row1_h_szr->Add(ok_btn, 0, wxALIGN_CENTER_VERTICAL);
	btns_row1_h_szr->AddSpacer(10);
	btns_row1_h_szr->Add(cancel_btn, 0, wxALIGN_CENTER_VERTICAL);
	
	wxBoxSizer* wghts_list_h_szr = new wxBoxSizer(wxHORIZONTAL);
	wghts_list_h_szr->Add(w_list);
	
	wxBoxSizer* panel_v_szr = new wxBoxSizer(wxVERTICAL);
	panel_v_szr->Add(wghts_list_h_szr, 0,
					 wxALIGN_CENTER_HORIZONTAL);
	
	panel_v_szr->Add(details_win, 1, wxEXPAND);
	
	panel_v_szr->Add(btns_row1_h_szr, 0,
					 wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
	
	wxBoxSizer* panel_h_szr = new wxBoxSizer(wxHORIZONTAL);
	panel_h_szr->Add(panel_v_szr, 1, wxEXPAND);
	
	panel->SetSizer(panel_h_szr);
	
	boost::uuids::uuid default_id = w_man_int->GetDefault();
	SelectId(default_id);
	UpdateButtons();
	
	// Top Sizer
	wxBoxSizer* top_h_sizer = new wxBoxSizer(wxHORIZONTAL);
	top_h_sizer->Add(panel, 1, wxEXPAND|wxALL, 8);
	
	SetSizerAndFit(top_h_sizer);
	w_list->SetFocus();
}
Example #7
0
AISTargetListDialog::AISTargetListDialog( wxWindow *parent, wxAuiManager *auimgr,
        AIS_Decoder *pdecoder ) :
        wxPanel( parent, wxID_ANY, wxDefaultPosition, wxSize( 780, 250 ), wxBORDER_NONE )
{
    m_pparent = parent;
    m_pAuiManager = auimgr;
    m_pdecoder = pdecoder;

    SetMinSize( wxSize(400,240));

    s_p_sort_decoder = pdecoder;
    m_pMMSI_array = new ArrayOfMMSI( ArrayItemCompareMMSI );

    wxBoxSizer* topSizer = new wxBoxSizer( wxHORIZONTAL );
    SetSizer( topSizer );

    //  Parse the global column width string as read from config file
    wxStringTokenizer tkz( g_AisTargetList_column_spec, _T(";") );
    wxString s_width = tkz.GetNextToken();
    int width;
    long lwidth;

    m_pListCtrlAISTargets = new OCPNListCtrl( this, ID_AIS_TARGET_LIST, wxDefaultPosition,
            wxDefaultSize,
            wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_HRULES | wxLC_VRULES | wxBORDER_SUNKEN
                    | wxLC_VIRTUAL );
    wxImageList *imglist = new wxImageList( 16, 16, true, 2 );

    ocpnStyle::Style* style = g_StyleManager->GetCurrentStyle();
    imglist->Add( style->GetIcon( _T("sort_asc") ) );
    imglist->Add( style->GetIcon( _T("sort_desc") ) );

    m_pListCtrlAISTargets->AssignImageList( imglist, wxIMAGE_LIST_SMALL );
    m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED,
            wxListEventHandler( AISTargetListDialog::OnTargetSelected ), NULL, this );
    m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED,
            wxListEventHandler( AISTargetListDialog::OnTargetSelected ), NULL, this );
    m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
            wxListEventHandler( AISTargetListDialog::OnTargetDefaultAction ), NULL, this );
    m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_COL_CLICK,
            wxListEventHandler( AISTargetListDialog::OnTargetListColumnClicked ), NULL, this );

    width = 105;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlNAME, _("Name"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();

    width = 55;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlCALL, _("Call"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();

    width = 80;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlMMSI, _("MMSI"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();

    width = 55;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlCLASS, _("Class"), wxLIST_FORMAT_CENTER, width );
    s_width = tkz.GetNextToken();

    width = 80;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlTYPE, _("Type"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();

    width = 90;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlNAVSTATUS, _("Nav Status"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();

    width = 45;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlBRG, _("Brg"), wxLIST_FORMAT_RIGHT, width );
    s_width = tkz.GetNextToken();

    width = 62;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlRNG, _("Range"), wxLIST_FORMAT_RIGHT, width );
    s_width = tkz.GetNextToken();

    width = 50;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlCOG, _("CoG"), wxLIST_FORMAT_RIGHT, width );
    s_width = tkz.GetNextToken();

    width = 50;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlSOG, _("SoG"), wxLIST_FORMAT_RIGHT, width );

    width = 55;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlCPA, _("CPA"), wxLIST_FORMAT_RIGHT, width );

    width = 65;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(20, lwidth);
        width = wxMin(width, 250);
    }
    m_pListCtrlAISTargets->InsertColumn( tlTCPA, _("TCPA"), wxLIST_FORMAT_RIGHT, width );
    wxListItem item;
    item.SetMask( wxLIST_MASK_IMAGE );
    item.SetImage( g_bAisTargetList_sortReverse ? 1 : 0 );
    g_AisTargetList_sortColumn = wxMax(g_AisTargetList_sortColumn, 0);
    m_pListCtrlAISTargets->SetColumn( g_AisTargetList_sortColumn, item );

    topSizer->Add( m_pListCtrlAISTargets, 1, wxEXPAND | wxALL, 0 );

    wxBoxSizer* boxSizer02 = new wxBoxSizer( wxVERTICAL );
    boxSizer02->AddSpacer( 22 );

    m_pButtonInfo = new wxButton( this, wxID_ANY, _("Target info"), wxDefaultPosition,
            wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
            wxCommandEventHandler( AISTargetListDialog::OnTargetQuery ), NULL, this );
    boxSizer02->Add( m_pButtonInfo, 0, wxALL, 0 );
    boxSizer02->AddSpacer( 5 );

    m_pButtonJumpTo = new wxButton( this, wxID_ANY, _("Center View"), wxDefaultPosition,
            wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonJumpTo->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
            wxCommandEventHandler( AISTargetListDialog::OnTargetScrollTo ), NULL, this );
    boxSizer02->Add( m_pButtonJumpTo, 0, wxALL, 0 );

    m_pButtonCreateWpt = new wxButton( this, wxID_ANY, _("Create WPT"), wxDefaultPosition,
            wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonCreateWpt->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
            wxCommandEventHandler( AISTargetListDialog::OnTargetCreateWpt ), NULL, this );
    boxSizer02->Add( m_pButtonCreateWpt, 0, wxALL, 0 );
    boxSizer02->AddSpacer( 10 );

    m_pStaticTextRange = new wxStaticText( this, wxID_ANY, _("Limit range: NM"), wxDefaultPosition,
            wxDefaultSize, 0 );
    boxSizer02->Add( m_pStaticTextRange, 0, wxALL, 0 );
    boxSizer02->AddSpacer( 2 );
    m_pSpinCtrlRange = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition,
            wxSize( 50, -1 ), wxSP_ARROW_KEYS, 1, 20000, g_AisTargetList_range );
    m_pSpinCtrlRange->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED,
            wxCommandEventHandler( AISTargetListDialog::OnLimitRange ), NULL, this );
    m_pSpinCtrlRange->Connect( wxEVT_COMMAND_TEXT_UPDATED,
            wxCommandEventHandler( AISTargetListDialog::OnLimitRange ), NULL, this );
    boxSizer02->Add( m_pSpinCtrlRange, 0, wxEXPAND | wxALL, 0 );
    topSizer->Add( boxSizer02, 0, wxEXPAND | wxALL, 2 );

    boxSizer02->AddSpacer( 10 );
    m_pStaticTextCount = new wxStaticText( this, wxID_ANY, _("Target Count"), wxDefaultPosition,
            wxDefaultSize, 0 );
    boxSizer02->Add( m_pStaticTextCount, 0, wxALL, 0 );

    boxSizer02->AddSpacer( 2 );
    m_pTextTargetCount = new wxTextCtrl( this, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize,
            wxTE_READONLY );
    boxSizer02->Add( m_pTextTargetCount, 0, wxALL, 0 );

    topSizer->Layout();

    //    This is silly, but seems to be required for __WXMSW__ build
    //    If not done, the SECOND invocation of AISTargetList fails to expand the list to the full wxSizer size....
    SetSize( GetSize().x, GetSize().y - 1 );

    SetColorScheme();
    UpdateButtons();

    if( m_pAuiManager ) {
        wxAuiPaneInfo pane =
                wxAuiPaneInfo().Name( _T("AISTargetList") ).CaptionVisible( true ).
                        DestroyOnClose( true ).Float().FloatingPosition( 50, 200 ).TopDockable( false ).
                        BottomDockable( true ).LeftDockable( false ).RightDockable( false ).Show( true );
        m_pAuiManager->LoadPaneInfo( g_AisTargetList_perspective, pane );

        bool b_reset_pos = false;

#ifdef __WXMSW__
        //  Support MultiMonitor setups which an allow negative window positions.
        //  If the requested window title bar does not intersect any installed monitor,
        //  then default to simple primary monitor positioning.
        RECT frame_title_rect;
        frame_title_rect.left = pane.floating_pos.x;
        frame_title_rect.top = pane.floating_pos.y;
        frame_title_rect.right = pane.floating_pos.x + pane.floating_size.x;
        frame_title_rect.bottom = pane.floating_pos.y + 30;

        if( NULL == MonitorFromRect( &frame_title_rect, MONITOR_DEFAULTTONULL ) ) b_reset_pos =
                true;
#else

        //    Make sure drag bar (title bar) of window intersects wxClient Area of screen, with a little slop...
        wxRect window_title_rect;// conservative estimate
        window_title_rect.x = pane.floating_pos.x;
        window_title_rect.y = pane.floating_pos.y;
        window_title_rect.width = pane.floating_size.x;
        window_title_rect.height = 30;

        wxRect ClientRect = wxGetClientDisplayRect();
        ClientRect.Deflate(60, 60);// Prevent the new window from being too close to the edge
        if(!ClientRect.Intersects(window_title_rect))
        b_reset_pos = true;

#endif

        if( b_reset_pos ) pane.FloatingPosition( 50, 200 );

        //    If the list got accidentally dropped on top of the chart bar, move it away....
        if( pane.IsDocked() && ( pane.dock_row == 0 ) ) {
            pane.Float();
            pane.Row( 1 );
            pane.Position( 0 );

            g_AisTargetList_perspective = m_pAuiManager->SavePaneInfo( pane );
            pConfig->UpdateSettings();
        }

        pane.Caption( wxGetTranslation( _("AIS target list") ) );
        m_pAuiManager->AddPane( this, pane );
        m_pAuiManager->Update();

        m_pAuiManager->Connect( wxEVT_AUI_PANE_CLOSE,
                wxAuiManagerEventHandler( AISTargetListDialog::OnPaneClose ), NULL, this );
    }
}
DlgDef::DlgDef( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( -1,-1 ), wxSize( -1,-1 ) );
	
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxVERTICAL );
	
	m_Overview = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer45;
	bSizer45 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer41;
	bSizer41 = new wxBoxSizer( wxHORIZONTAL );
	
	m_result = new wxTextCtrl( m_Overview, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 420,40 ), wxTE_PROCESS_ENTER );
	m_result->SetMaxLength( 0 ); 
	m_result->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
	m_result->SetMinSize( wxSize( 200,40 ) );
	m_result->SetMaxSize( wxSize( -1,40 ) );
	
	bSizer41->Add( m_result, 8, wxALL|wxEXPAND, 5 );
	
	Calculate = new wxButton( m_Overview, wxID_ANY, _("Calculate"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
	Calculate->SetMinSize( wxSize( 80,30 ) );
	Calculate->SetMaxSize( wxSize( 80,40 ) );
	
	bSizer41->Add( Calculate, 0, wxALL|wxEXPAND, 5 );
	
	m_Function = new wxButton( m_Overview, wxID_ANY, _("Function"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer41->Add( m_Function, 0, wxALL|wxEXPAND, 5 );
	
	m_Help = new wxCheckBox( m_Overview, wxID_ANY, _("History"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer41->Add( m_Help, 0, wxALL|wxEXPAND, 5 );
	
	m_HelpButton = new wxButton( m_Overview, wxID_ANY, _("Help"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer41->Add( m_HelpButton, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer45->Add( bSizer41, 0, wxEXPAND, 5 );
	
	wxBoxSizer* HelpPanel;
	HelpPanel = new wxBoxSizer( wxVERTICAL );
	
	wxArrayString m_HistoryPulldownChoices;
	m_HistoryPulldown = new wxChoice( m_Overview, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_HistoryPulldownChoices, 0 );
	m_HistoryPulldown->SetSelection( 0 );
	m_HistoryPulldown->Hide();
	
	HelpPanel->Add( m_HistoryPulldown, 1, wxALL|wxEXPAND, 5 );
	
	m_listCtrl = new wxListCtrl( m_Overview, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_AUTOARRANGE|wxLC_LIST );
	m_listCtrl->Hide();
	
	HelpPanel->Add( m_listCtrl, 3, wxALL|wxEXPAND, 5 );
	
	
	bSizer45->Add( HelpPanel, 1, wxEXPAND, 5 );
	
	
	m_Overview->SetSizer( bSizer45 );
	m_Overview->Layout();
	bSizer45->Fit( m_Overview );
	bSizer7->Add( m_Overview, 1, wxEXPAND | wxALL, 5 );
	
	
	this->SetSizer( bSizer7 );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	m_result->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DlgDef::key_shortcut ), NULL, this );
	m_result->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DlgDef::OnCalculate ), NULL, this );
	Calculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DlgDef::OnCalculate ), NULL, this );
	m_Function->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DlgDef::OnFunction ), NULL, this );
	m_Help->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DlgDef::OnToggle ), NULL, this );
	m_HelpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DlgDef::OnHelp ), NULL, this );
	m_HistoryPulldown->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DlgDef::OnHistoryPulldown ), NULL, this );
	m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DlgDef::OnItem ), NULL, this );
}
Example #9
0
MainFrame_base::MainFrame_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	this->SetForegroundColour( wxColour( 238, 238, 242 ) );
	this->SetBackgroundColour( wxColour( 238, 238, 242 ) );
	m_mgr.SetManagedWindow(this);
	m_mgr.SetFlags(wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING|wxAUI_MGR_HINT_FADE|wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_NO_VENETIAN_BLINDS_FADE|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_TRANSPARENT_HINT);
	
	m_statusbar = this->CreateStatusBar( 4, wxST_SIZEGRIP, wxID_ANY );
	m_statusbar->SetForegroundColour( wxColour( 238, 238, 242 ) );
	m_statusbar->SetBackgroundColour( wxColour( 238, 238, 242 ) );
	
	m_menubar = new wxMenuBar( 0 );
	m_file_menu = new wxMenu();
	wxMenuItem* m_menu_exit;
	m_menu_exit = new wxMenuItem( m_file_menu, ID_MENU_EXIT, wxString( wxT("E&xit") ) + wxT('\t') + wxT("Alt+F4"), wxT("Exit the application"), wxITEM_NORMAL );
	m_file_menu->Append( m_menu_exit );
	
	m_menubar->Append( m_file_menu, wxT("&File") ); 
	
	m_process_menu = new wxMenu();
	wxMenuItem* m_menu_reconstruct;
	m_menu_reconstruct = new wxMenuItem( m_process_menu, ID_RECONSTRUCT, wxString( wxT("&Reconstruct") ) + wxT('\t') + wxT("Alt+r"), wxT("Compute 3d geometry from images"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_reconstruct->SetBitmaps( wxIcon("start_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_reconstruct->SetBitmap( wxICON( start_icon ) );
	#endif
	m_process_menu->Append( m_menu_reconstruct );
	
	m_menubar->Append( m_process_menu, wxT("&Process") ); 
	
	m_view_menu = new wxMenu();
	wxMenuItem* m_menu_view_image_browser;
	m_menu_view_image_browser = new wxMenuItem( m_view_menu, ID_VIEW_IMAGE_BROWSER, wxString( wxT("&Image browser") ) + wxT('\t') + wxT("Alt+i"), wxT("Show image browser window"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_view_image_browser->SetBitmaps( wxIcon("image_browser_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_view_image_browser->SetBitmap( wxICON( image_browser_icon ) );
	#endif
	m_view_menu->Append( m_menu_view_image_browser );
	
	wxMenuItem* m_menu_view_image_preview;
	m_menu_view_image_preview = new wxMenuItem( m_view_menu, ID_VIEW_IMAGE_PREVIEW, wxString( wxT("Image &preview") ) + wxT('\t') + wxT("Alt+p"), wxT("Show image preview window"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_view_image_preview->SetBitmaps( wxIcon("image_preview_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_view_image_preview->SetBitmap( wxICON( image_preview_icon ) );
	#endif
	m_view_menu->Append( m_menu_view_image_preview );
	
	wxMenuItem* m_menu_view_options;
	m_menu_view_options = new wxMenuItem( m_view_menu, ID_VIEW_OPTIONS, wxString( wxT("&Options") ) + wxT('\t') + wxT("Alt+o"), wxT("Show options window"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_view_options->SetBitmaps( wxIcon("options_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_view_options->SetBitmap( wxICON( options_icon ) );
	#endif
	m_view_menu->Append( m_menu_view_options );
	
	wxMenuItem* m_menu_view_log;
	m_menu_view_log = new wxMenuItem( m_view_menu, ID_VIEW_LOG, wxString( wxT("&Log") ) + wxT('\t') + wxT("Alt+l"), wxT("Show log window"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_view_log->SetBitmaps( wxIcon("log_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_view_log->SetBitmap( wxICON( log_icon ) );
	#endif
	m_view_menu->Append( m_menu_view_log );
	
	m_view_menu->AppendSeparator();
	
	wxMenuItem* m_menu_reset_3d_viewport;
	m_menu_reset_3d_viewport = new wxMenuItem( m_view_menu, ID_RESET_3D_VIEWPORT, wxString( wxT("Reset 3d viewport") ) + wxT('\t') + wxT("Alt+h"), wxT("Reset the 3d viewport"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_reset_3d_viewport->SetBitmaps( wxIcon("home_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_reset_3d_viewport->SetBitmap( wxICON( home_icon ) );
	#endif
	m_view_menu->Append( m_menu_reset_3d_viewport );
	
	wxMenuItem* m_menu_toggle_turntable_animation;
	m_menu_toggle_turntable_animation = new wxMenuItem( m_view_menu, ID_TOGGLE_TURNTABLE_ANIMATION, wxString( wxT("Tur&ntable") ) + wxT('\t') + wxT("Alt+n"), wxT("Toggle turntable animation"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_toggle_turntable_animation->SetBitmaps( wxIcon("turntable_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_toggle_turntable_animation->SetBitmap( wxICON( turntable_icon ) );
	#endif
	m_view_menu->Append( m_menu_toggle_turntable_animation );
	
	m_view_menu->AppendSeparator();
	
	wxMenuItem* m_menu_toggle_trackball_visibility;
	m_menu_toggle_trackball_visibility = new wxMenuItem( m_view_menu, ID_TOGGLE_TRACKBALL_VISIBILITY, wxString( wxT("Trackball") ) + wxT('\t') + wxT("Alt+v"), wxT("Toggle trackball visibility"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_toggle_trackball_visibility->SetBitmaps( wxIcon("trackball_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_toggle_trackball_visibility->SetBitmap( wxICON( trackball_icon ) );
	#endif
	m_view_menu->Append( m_menu_toggle_trackball_visibility );
	
	wxMenuItem* m_menu_toggle_grid_visibility;
	m_menu_toggle_grid_visibility = new wxMenuItem( m_view_menu, ID_TOGGLE_GRID_VISIBILITY, wxString( wxT("&Grid") ) + wxT('\t') + wxT("Alt+g"), wxT("Toggle grid visibility"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_toggle_grid_visibility->SetBitmaps( wxIcon("grid_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_toggle_grid_visibility->SetBitmap( wxICON( grid_icon ) );
	#endif
	m_view_menu->Append( m_menu_toggle_grid_visibility );
	
	wxMenuItem* m_menu_toggle_points_visibility;
	m_menu_toggle_points_visibility = new wxMenuItem( m_view_menu, ID_TOGGLE_POINTS_VISIBILITY, wxString( wxT("Points") ) , wxT("Toggle points visibility"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_toggle_points_visibility->SetBitmaps( wxIcon("points_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_toggle_points_visibility->SetBitmap( wxICON( points_icon ) );
	#endif
	m_view_menu->Append( m_menu_toggle_points_visibility );
	
	wxMenuItem* m_menu_toggle_cameras_visibility;
	m_menu_toggle_cameras_visibility = new wxMenuItem( m_view_menu, ID_TOGGLE_CAMERAS_VISIBILITY, wxString( wxT("Cameras") ) , wxT("Toggle cameras visibility"), wxITEM_NORMAL );
	#ifdef __WXMSW__
	m_menu_toggle_cameras_visibility->SetBitmaps( wxIcon("camera_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22) );
	#elif defined( __WXGTK__ )
	m_menu_toggle_cameras_visibility->SetBitmap( wxICON( camera_icon ) );
	#endif
	m_view_menu->Append( m_menu_toggle_cameras_visibility );
	
	m_menubar->Append( m_view_menu, wxT("&View") ); 
	
	m_export_menu = new wxMenu();
	wxMenuItem* m_menu_export_tracks;
	m_menu_export_tracks = new wxMenuItem( m_export_menu, ID_EXPORT_TRACKS, wxString( wxT("Tracks") ) , wxT("Export tracks to textfile"), wxITEM_NORMAL );
	m_export_menu->Append( m_menu_export_tracks );
	
	wxMenuItem* m_menu_export_matches;
	m_menu_export_matches = new wxMenuItem( m_export_menu, ID_EXPORT_MATCHES, wxString( wxT("Matches") ) , wxT("Export matches to textfile"), wxITEM_NORMAL );
	m_export_menu->Append( m_menu_export_matches );
	
	m_export_menu->AppendSeparator();
	
	wxMenuItem* m_menu_export_cmvs;
	m_menu_export_cmvs = new wxMenuItem( m_export_menu, ID_EXPORT_CMVS, wxString( wxT("CMVS") ) , wxT("Export to CMVS"), wxITEM_NORMAL );
	m_export_menu->Append( m_menu_export_cmvs );
	
	wxMenuItem* m_menu_export_bundle_file;
	m_menu_export_bundle_file = new wxMenuItem( m_export_menu, ID_EXPORT_BUNDLE_FILE, wxString( wxT("Bundle file") ) , wxT("Export to bundle.rd.out"), wxITEM_NORMAL );
	m_export_menu->Append( m_menu_export_bundle_file );
	
	wxMenuItem* m_menu_export_ply_file;
	m_menu_export_ply_file = new wxMenuItem( m_export_menu, ID_EXPORT_PLY_FILE, wxString( wxT("Ply file") ) , wxT("Export reconstruction as .ply file"), wxITEM_NORMAL );
	m_export_menu->Append( m_menu_export_ply_file );
	
	wxMenuItem* m_menu_export_meshlab_file;
	m_menu_export_meshlab_file = new wxMenuItem( m_export_menu, ID_EXPORT_MESHLAB_FILE, wxString( wxT("Meshlab file") ) , wxT("Export reconstruction as .mlp file"), wxITEM_NORMAL );
	m_export_menu->Append( m_menu_export_meshlab_file );
	
	wxMenuItem* m_menu_export_maya;
	m_menu_export_maya = new wxMenuItem( m_export_menu, ID_EXPORT_MAYA_FILE, wxString( wxT("Maya file") ) , wxT("Export reconstruction as .ma file"), wxITEM_NORMAL );
	m_export_menu->Append( m_menu_export_maya );
	
	m_menubar->Append( m_export_menu, wxT("&Export") ); 
	
	m_help_menu = new wxMenu();
	wxMenuItem* m_menu_about;
	m_menu_about = new wxMenuItem( m_help_menu, ID_VIEW_ABOUT, wxString( wxT("About RoboStruct...") ) + wxT('\t') + wxT("F1"), wxT("Show info about this application"), wxITEM_NORMAL );
	m_help_menu->Append( m_menu_about );
	
	m_menubar->Append( m_help_menu, wxT("&Help") ); 
	
	this->SetMenuBar( m_menubar );
	
	m_toolbar = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT|wxNO_BORDER ); 
	m_toolbar->AddTool(ID_RECONSTRUCT,        "Reconstruct", wxIcon("start_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22),         wxNullBitmap, wxITEM_NORMAL, "Compute 3d geometry from images", "Compute 3d geometry from images", NULL);
	m_toolbar->AddSeparator(); 
	m_toolbar->AddTool(ID_VIEW_IMAGE_BROWSER, "Browser",     wxIcon("image_browser_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Show image browser window",       "Show image browser window", NULL);
	m_toolbar->AddTool(ID_VIEW_IMAGE_PREVIEW, "Preview",     wxIcon("image_preview_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Show image preview window",       "Show image preview window", NULL);
	m_toolbar->AddTool(ID_VIEW_OPTIONS,       "Options",     wxIcon("options_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22),       wxNullBitmap, wxITEM_NORMAL, "Show options window",             "Show options window", NULL);
	m_toolbar->AddTool(ID_VIEW_LOG,           "Log",         wxIcon("log_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22),           wxNullBitmap, wxITEM_NORMAL, "Show log window",                 "Show log window", NULL);
	
	m_toolbar->Realize();
	m_mgr.AddPane( m_toolbar, wxAuiPaneInfo().Top().CaptionVisible( false ).CloseButton( false ).PaneBorder( false ).Movable( false ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).BottomDockable( false ).TopDockable( false ).LeftDockable( false ).RightDockable( false ).Floatable( false ).Layer( 10 ) );
	
	m_window_viewport = new wxAuiMyNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TAB_EXTERNAL_MOVE|wxAUI_NB_TAB_SPLIT|wxAUI_NB_BOTTOM|wxNO_BORDER);
	m_mgr.AddPane(m_window_viewport, wxAuiPaneInfo().CentrePane().Name("Viewport").Caption("Viewport").CaptionVisible(true).MaximizeButton(true).MinimizeButton(false).PinButton(false).CloseButton(false));
	
	m_panel8 = new wxPanel( m_window_viewport, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer8;
	bSizer8 = new wxBoxSizer( wxHORIZONTAL );
	
	int GLCanvasAttributes[] = {WX_GL_RGBA, 1, WX_GL_DOUBLEBUFFER, 1, WX_GL_SAMPLES, 8, 0};
	m_gl_canvas = new wxGLCanvas(m_panel8, -1, GLCanvasAttributes);
	m_gl_canvas->SetBackgroundColour( wxColour( 238, 238, 242 ) );
	
	bSizer8->Add( m_gl_canvas, 1, wxEXPAND, 5 );

    
    m_toolbar_viewport = new wxAuiToolBar( m_panel8, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_VERTICAL ); 
	m_toolbar_viewport->AddTool(ID_RESET_3D_VIEWPORT,           "Reset 3d viewport", wxIcon("home_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22),      wxNullBitmap, wxITEM_NORMAL, "Reset the 3d viewport",       "Reset the 3d viewport", NULL);
	m_toolbar_viewport->AddTool(ID_TOGGLE_TURNTABLE_ANIMATION,  "Turntable",         wxIcon("turntable_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Toggle turntable animation",  "Toggle turntable animation", NULL);
	m_toolbar_viewport->AddTool(ID_TOGGLE_GRID_VISIBILITY,      "Grid",              wxIcon("grid_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22),      wxNullBitmap, wxITEM_NORMAL, "Toggle grid visibility",      "Toggle grid visibility", NULL);
	m_toolbar_viewport->AddTool(ID_TOGGLE_TRACKBALL_VISIBILITY, "Trackball",         wxIcon("trackball_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Toggle trackball visibility", "Toggle trackball visibility", NULL);
	m_toolbar_viewport->AddTool(ID_TOGGLE_POINTS_VISIBILITY,    "Points",            wxIcon("points_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22),    wxNullBitmap, wxITEM_NORMAL, "Toggle points visibility",    "Toggle points visibility", NULL);
	m_toolbar_viewport->AddTool(ID_TOGGLE_CAMERAS_VISIBILITY,   "Cameras",           wxIcon("camera_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22),    wxNullBitmap, wxITEM_NORMAL, "Toggle cameras visibility",   "Toggle cameras visibility", NULL);
	
	m_toolbar_viewport->Realize(); 
	
	bSizer8->Add( m_toolbar_viewport, 0, wxEXPAND, 5 );
	

    m_panel8->SetSizer( bSizer8 );
	m_panel8->Layout();
	bSizer8->Fit( m_panel8 );
	m_window_viewport->AddPage( m_panel8, wxT("3d view"), true, wxNullBitmap );
	m_pane_matches = new wxPanel( m_window_viewport, ID_PANE_MATCHES, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxVERTICAL );
	
	m_pane_matches_view = new wxPanel( m_pane_matches, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
	m_pane_matches_view->Enable( false );
	
	bSizer5->Add( m_pane_matches_view, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer6;
	bSizer6 = new wxBoxSizer( wxHORIZONTAL );
	
	m_cb_matches_left = new wxComboBox( m_pane_matches, wxID_ANY, wxT("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); 
	bSizer6->Add( m_cb_matches_left, 1, wxEXPAND|wxALL, 5 );
	
	m_cb_matches_right = new wxComboBox( m_pane_matches, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); 
	bSizer6->Add( m_cb_matches_right, 1, wxALL|wxEXPAND, 5 );
	
	
	bSizer5->Add( bSizer6, 0, wxEXPAND, 5 );
	
	
	m_pane_matches->SetSizer( bSizer5 );
	m_pane_matches->Layout();
	bSizer5->Fit( m_pane_matches );
	m_window_viewport->AddPage( m_pane_matches, wxT("Matches"), false, wxNullBitmap );
	
	m_window_image_browser = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 370,200 ), wxTAB_TRAVERSAL );
	m_window_image_browser->SetMinSize( wxSize( 370,200 ) );
	
	m_mgr.AddPane( m_window_image_browser, wxAuiPaneInfo() .Name( wxT("Image browser") ).Left() .Caption( wxT("Image browser") ).MaximizeButton( true ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxSize( 386,234 ) ).DockFixed( false ).Layer( 1 ) );
	
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
	
	m_dir_picker = new wxDirPickerCtrl( m_window_image_browser, wxID_ANY, wxT("D:\\Reconstruct\\TestData\\"), wxT("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE|wxNO_BORDER );
	m_dir_picker->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
	m_dir_picker->SetBackgroundColour( wxColour( 238, 238, 242 ) );
	
	bSizer1->Add( m_dir_picker, 0, wxEXPAND|wxALL, 5 );
	
	m_img_ctrl = new wxListCtrl( m_window_image_browser, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxNO_BORDER );
	m_img_ctrl->SetBackgroundColour( wxColour( 238, 238, 242 ) );
	
	bSizer1->Add( m_img_ctrl, 1, wxEXPAND, 5 );
	
	
	m_window_image_browser->SetSizer( bSizer1 );
	m_window_image_browser->Layout();
	m_window_image_preview = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 370,200 ), wxNO_BORDER|wxTAB_TRAVERSAL );
	m_window_image_preview->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
	m_window_image_preview->SetBackgroundColour( wxColour( 238, 238, 242 ) );
	m_window_image_preview->SetMinSize( wxSize( 370,200 ) );
	
	m_mgr.AddPane( m_window_image_preview, wxAuiPaneInfo() .Name( wxT("Image preview") ).Left() .Caption( wxT("Image preview") ).MaximizeButton( true ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxSize( 386,234 ) ).DockFixed( false ).Layer( 1 ) );
	
	m_window_options = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 370,200 ), wxNO_BORDER|wxTAB_TRAVERSAL );
	m_window_options->SetBackgroundColour( wxColour( 238, 238, 242 ) );
	m_window_options->SetMinSize( wxSize( 370,200 ) );
	
	m_mgr.AddPane( m_window_options, wxAuiPaneInfo() .Name( wxT("Options") ).Left() .Caption( wxT("Options") ).MaximizeButton( true ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxSize( 439,316 ) ).DockFixed( false ).Layer( 1 ) );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxVERTICAL );
	
	m_toolbar_options = new wxAuiToolBar( m_window_options, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT|wxNO_BORDER );
	m_toolbar_options->SetToolBitmapSize( wxSize( 22,22 ) );
	m_toolbar_options->SetToolPacking( 2 );
	m_toolbar_options->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
	
	m_toolbar_options->AddTool(ID_RESET_OPTIONS, wxT("Reset options"), wxIcon("reset_icon",  wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Reset options", "Reset options", NULL); 
	m_toolbar_options->AddTool(ID_SAVE_OPTIONS,  wxT("Save options"),  wxIcon("floppy_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Save options",  "Save options",  NULL); 
	
	m_toolbar_options->Realize(); 
	
	bSizer2->Add( m_toolbar_options, 0, wxEXPAND, 5 );
	
	m_pg_options = new wxPropertyGrid(m_window_options, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_BOLD_MODIFIED | wxPG_DEFAULT_STYLE | wxNO_BORDER);
	
	m_pg_options->SetBackgroundColour( wxColour( 238, 238, 242 ) );
	
	bSizer2->Add( m_pg_options, 1, wxEXPAND, 5 );
	
	
	m_window_options->SetSizer( bSizer2 );
	m_window_options->Layout();
	m_window_log = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 150,150 ), wxTAB_TRAVERSAL );
	m_window_log->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
	m_window_log->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
	m_window_log->SetMinSize( wxSize( 150,150 ) );
	
	m_mgr.AddPane( m_window_log, wxAuiPaneInfo() .Name( wxT("Log") ).Bottom() .Caption( wxT("Log") ).MaximizeButton( true ).PaneBorder( false ).Dock().Resizable().FloatingSize( wxSize( 596,244 ) ).DockFixed( false ).Row( 0 ).Layer( 0 ) );
	
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxHORIZONTAL );
	
	m_tc_log = new wxTextCtrl( m_window_log, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxNO_BORDER );
	m_tc_log->SetMaxLength( 0 ); 
	m_tc_log->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ) );
	m_tc_log->SetBackgroundColour( wxColour( 245, 245, 245 ) );
	
	bSizer3->Add( m_tc_log, 1, wxEXPAND, 5 );
	
	m_toolbar_log = new wxAuiToolBar( m_window_log, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_VERTICAL|wxNO_BORDER );
	m_toolbar_log->SetToolBitmapSize( wxSize( 22,22 ) );
	m_toolbar_log->SetToolPacking( 2 );
	m_toolbar_log->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
	
	m_toolbar_log->AddTool(ID_SAVE_LOG,	 "Save Log",  wxIcon("floppy_icon",    wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Save the log to a .txt file", "Save the log to a .txt file", NULL);
	m_toolbar_log->AddTool(ID_CLEAR_LOG, "Clear log", wxIcon("clear_log_icon", wxBITMAP_TYPE_ICO_RESOURCE, 22, 22), wxNullBitmap, wxITEM_NORMAL, "Clear the log window", "Clear the log window", NULL);
	
	m_toolbar_log->Realize(); 
	
	bSizer3->Add( m_toolbar_log, 0, wxEXPAND, 5 );
	
	
	m_window_log->SetSizer( bSizer3 );
	m_window_log->Layout();
	m_window_about = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
	m_mgr.AddPane( m_window_about, wxAuiPaneInfo() .Name( wxT("About") ).Left() .Caption( wxT("About RoboStruct") ).Hide().Float().FloatingPosition( wxPoint( 643,334 ) ).Resizable().FloatingSize( wxSize( 300,300 ) ).DockFixed( false ).BottomDockable( false ).TopDockable( false ).LeftDockable( false ).RightDockable( false ).Floatable( false ) );
	
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxVERTICAL );
	
	m_tc_about = new wxTextCtrl( m_window_about, wxID_ANY, wxT("This is awesome!\nLicense(s)\nIcons (Tango, Crystal project...)\nGLocyte"), wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE|wxTE_NO_VSCROLL|wxTE_READONLY|wxNO_BORDER );
	m_tc_about->SetMaxLength( 0 ); 
	bSizer7->Add( m_tc_about, 1, wxEXPAND, 5 );
	
	
	m_window_about->SetSizer( bSizer7 );
	m_window_about->Layout();
	bSizer7->Fit( m_window_about );
	
	m_mgr.Update();
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrame_base::OnUpdateUI ) );
	this->Connect( m_menu_exit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnMenuExit ) );
	this->Connect( m_menu_reconstruct->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnReconstruct ) );
	this->Connect( m_menu_view_image_browser->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Connect( m_menu_view_image_preview->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Connect( m_menu_view_options->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Connect( m_menu_view_log->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Connect( m_menu_reset_3d_viewport->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnReset3dViewport ) );
	this->Connect( m_menu_toggle_turntable_animation->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleTurntableAnimation ) );
	this->Connect( m_menu_toggle_trackball_visibility->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Connect( m_menu_toggle_grid_visibility->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Connect( m_menu_toggle_points_visibility->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Connect( m_menu_toggle_cameras_visibility->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Connect( m_menu_export_tracks->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Connect( m_menu_export_matches->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Connect( m_menu_export_cmvs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Connect( m_menu_export_bundle_file->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Connect( m_menu_export_ply_file->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Connect( m_menu_export_meshlab_file->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Connect( m_menu_export_maya->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Connect( m_menu_about->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Connect( ID_RECONSTRUCT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnReconstruct ) );
	this->Connect( ID_VIEW_IMAGE_BROWSER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Connect( ID_VIEW_IMAGE_PREVIEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Connect( ID_VIEW_OPTIONS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Connect( ID_VIEW_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Connect( ID_RESET_3D_VIEWPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnReset3dViewport ) );
	this->Connect( ID_TOGGLE_TURNTABLE_ANIMATION, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleTurntableAnimation ) );
	this->Connect( ID_TOGGLE_GRID_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Connect( ID_TOGGLE_TRACKBALL_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Connect( ID_TOGGLE_POINTS_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Connect( ID_TOGGLE_CAMERAS_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	m_gl_canvas->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( MainFrame_base::OnGLCanvasEraseBackground ), NULL, this );
	m_gl_canvas->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_MOTION, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Connect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnGLCanvasPaint ), NULL, this );
	m_gl_canvas->Connect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnGLCanvasSize ), NULL, this );
	m_pane_matches_view->Connect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnMatchesViewPaint ), NULL, this );
	m_pane_matches_view->Connect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnMatchesViewResize ), NULL, this );
	m_cb_matches_left->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrame_base::OnSelectMatchImage ), NULL, this );
	m_cb_matches_right->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrame_base::OnSelectMatchImage ), NULL, this );
	m_dir_picker->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainFrame_base::OnSelectDirectory ), NULL, this );
	m_img_ctrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame_base::OnSelectPreviewImage ), NULL, this );
	m_window_image_preview->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_MOTION, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Connect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnImagePreviewPaint ), NULL, this );
	m_window_image_preview->Connect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnImagePreviewResize ), NULL, this );
	this->Connect( ID_RESET_OPTIONS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnResetOptions ) );
	this->Connect( ID_SAVE_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnSaveLog ) );
	this->Connect( ID_CLEAR_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnClearLog ) );
}
Example #10
0
ModPlaygroundMainPanelBase::ModPlaygroundMainPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	mainHeadlineLabel = new wxStaticText( this, wxID_ANY, _("PG - Playground"), wxDefaultPosition, wxDefaultSize, 0 );
	mainHeadlineLabel->Wrap( -1 );
	mainHeadlineLabel->SetFont( wxFont( 16, 70, 90, 90, false, wxEmptyString ) );
	
	mainSizer->Add( mainHeadlineLabel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	pgNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	pgPage = new wxPanel( pgNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* pgPageSizer;
	pgPageSizer = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* startSizer;
	startSizer = new wxStaticBoxSizer( new wxStaticBox( pgPage, -1, _("New Playground") ), wxVERTICAL );
	
	applicationLabel = new wxStaticText( pgPage, wxID_ANY, _("Application:"), wxDefaultPosition, wxDefaultSize, 0 );
	applicationLabel->Wrap( -1 );
	startSizer->Add( applicationLabel, 0, wxALL, 5 );
	
	applicationComboBox = new wxComboBox( pgPage, PG_APP_COMBOBOX, wxEmptyString, wxDefaultPosition, wxSize( 350,-1 ), 0, NULL, wxTE_PROCESS_ENTER ); 
	startSizer->Add( applicationComboBox, 0, wxALL, 5 );
	
	xwrapperCheckbox = new wxCheckBox( pgPage, PG_XWRAPPER_CHECKBOX, _("Start program in an isolated X session"), wxDefaultPosition, wxDefaultSize, 0 );
	xwrapperCheckbox->SetValue(true);
	
	xwrapperCheckbox->SetToolTip( _("If checked the program is started in an isolated X session disconnecting it from other DBUS sessions and the main X display. This box should normally be checked. Uncheck it only if your program is not an X11 client or if you really want to run an X window program in insecure mode.") );
	
	startSizer->Add( xwrapperCheckbox, 0, wxALL, 5 );
	
	applicationStartButton = new wxButton( pgPage, PG_APP_STARTBUTTON, _("Start Playground"), wxDefaultPosition, wxDefaultSize, 0 );
	applicationStartButton->Enable( false );
	
	startSizer->Add( applicationStartButton, 0, wxALL, 5 );
	
	pgPageSizer->Add( startSizer, 0, wxALL|wxEXPAND, 5 );
	
	wxStaticBoxSizer* pgOverviewListSizer;
	pgOverviewListSizer = new wxStaticBoxSizer( new wxStaticBox( pgPage, -1, _("Playground Overview:") ), wxVERTICAL );
	
	pgList = new AnListCtrl( pgPage, PG_VIEW_LIST, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VIRTUAL );
	pgOverviewListSizer->Add( pgList, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* pgButtonSizer;
	pgButtonSizer = new wxBoxSizer( wxHORIZONTAL );
	
	pgRefreshButton = new wxButton( pgPage, PG_VIEW_REFRESHBUTTON, _("Refresh View"), wxDefaultPosition, wxDefaultSize, 0 );
	pgRefreshButton->Enable( false );
	
	pgButtonSizer->Add( pgRefreshButton, 0, wxALIGN_LEFT|wxALIGN_TOP|wxALL, 5 );
	
	
	pgButtonSizer->Add( 0, 0, 1, wxEXPAND, 5 );
	
	pgCommitButton = new wxButton( pgPage, PG_VIEW_COMMITBUTTON, _("Commit Files..."), wxDefaultPosition, wxDefaultSize, 0 );
	pgCommitButton->Enable( false );
	
	pgButtonSizer->Add( pgCommitButton, 0, wxALL, 5 );
	
	pgDeleteButton = new wxButton( pgPage, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	pgDeleteButton->Enable( false );
	
	pgButtonSizer->Add( pgDeleteButton, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT|wxALL, 5 );
	
	pgOverviewListSizer->Add( pgButtonSizer, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT|wxEXPAND, 5 );
	
	pgPageSizer->Add( pgOverviewListSizer, 1, wxALL|wxEXPAND, 5 );
	
	pgPage->SetSizer( pgPageSizer );
	pgPage->Layout();
	pgPageSizer->Fit( pgPage );
	pgNotebook->AddPage( pgPage, _("Playground"), false );
	
	mainSizer->Add( pgNotebook, 1, wxEXPAND | wxALL, 5 );
	
	this->SetSizer( mainSizer );
	this->Layout();
	
	// Connect Events
	pgNotebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( ModPlaygroundMainPanelBase::onPgNotebookChanging ), NULL, this );
	applicationComboBox->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ModPlaygroundMainPanelBase::onAppPathEntered ), NULL, this );
	applicationComboBox->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( ModPlaygroundMainPanelBase::onAppStartEnter ), NULL, this );
	applicationStartButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModPlaygroundMainPanelBase::onAppStart ), NULL, this );
	pgList->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( ModPlaygroundMainPanelBase::onPgListItemActivate ), NULL, this );
	pgList->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( ModPlaygroundMainPanelBase::onPgListItemDeselect ), NULL, this );
	pgList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( ModPlaygroundMainPanelBase::onPgListItemSelect ), NULL, this );
	pgRefreshButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModPlaygroundMainPanelBase::onPgListRefreshClicked ), NULL, this );
	pgCommitButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModPlaygroundMainPanelBase::onCommitFiles ), NULL, this );
	pgDeleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModPlaygroundMainPanelBase::onDeleteFiles ), NULL, this );
}
Example #11
0
AboxDlgGen::AboxDlgGen( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	m_FindBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Find") ), wxHORIZONTAL );
	
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxHORIZONTAL );
	
	m_bmpFind = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer7->Add( m_bmpFind, 0, wxALL, 5 );
	
	m_Find = new wxButton( this, wxID_ANY, wxT("Find"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer7->Add( m_Find, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_FindBox->Add( bSizer7, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	wxBoxSizer* bSizer31;
	bSizer31 = new wxBoxSizer( wxVERTICAL );
	
	m_FindInText = new wxCheckBox( this, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 );
	m_FindInText->SetValue(true); 
	bSizer31->Add( m_FindInText, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_FindInCategory = new wxCheckBox( this, wxID_ANY, wxT("Category"), wxDefaultPosition, wxDefaultSize, 0 );
	m_FindInCategory->SetValue(true); 
	bSizer31->Add( m_FindInCategory, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_FindInFilename = new wxCheckBox( this, wxID_ANY, wxT("Filename"), wxDefaultPosition, wxDefaultSize, 0 );
	m_FindInFilename->SetValue(true); 
	bSizer31->Add( m_FindInFilename, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_FindInDate = new wxCheckBox( this, wxID_ANY, wxT("Date"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer31->Add( m_FindInDate, 0, wxRIGHT|wxLEFT, 5 );
	
	m_FindBox->Add( bSizer31, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
	
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxVERTICAL );
	
	m_FindText = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxTE_PROCESS_ENTER ); 
	bSizer4->Add( m_FindText, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
	
	wxFlexGridSizer* fgSizer41;
	fgSizer41 = new wxFlexGridSizer( 0, 4, 0, 0 );
	fgSizer41->AddGrowableCol( 1 );
	fgSizer41->AddGrowableCol( 3 );
	fgSizer41->SetFlexibleDirection( wxBOTH );
	fgSizer41->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_labFromDate = new wxStaticText( this, wxID_ANY, wxT("From"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labFromDate->Wrap( -1 );
	fgSizer41->Add( m_labFromDate, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_FromDate = new wxDatePickerCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_SHOWCENTURY );
	fgSizer41->Add( m_FromDate, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
	
	m_labToDate = new wxStaticText( this, wxID_ANY, wxT("To"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labToDate->Wrap( -1 );
	fgSizer41->Add( m_labToDate, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_ToDate = new wxDatePickerCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_SHOWCENTURY );
	fgSizer41->Add( m_ToDate, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
	
	bSizer4->Add( fgSizer41, 0, wxEXPAND, 5 );
	
	m_FindBox->Add( bSizer4, 1, wxALIGN_CENTER_VERTICAL, 5 );
	
	bSizer3->Add( m_FindBox, 0, wxEXPAND|wxALL, 5 );
	
	m_UploadBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Upload") ), wxVERTICAL );
	
	wxFlexGridSizer* fgSizer2;
	fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
	fgSizer2->AddGrowableCol( 1 );
	fgSizer2->SetFlexibleDirection( wxBOTH );
	fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_labCategory = new wxStaticText( this, wxID_ANY, wxT("Category"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labCategory->Wrap( -1 );
	fgSizer2->Add( m_labCategory, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
	
	m_Category = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	fgSizer2->Add( m_Category, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	m_labText = new wxStaticText( this, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labText->Wrap( -1 );
	fgSizer2->Add( m_labText, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_Text = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer2->Add( m_Text, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_labFile = new wxStaticText( this, wxID_ANY, wxT("File"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labFile->Wrap( -1 );
	fgSizer2->Add( m_labFile, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	wxFlexGridSizer* fgSizer3;
	fgSizer3 = new wxFlexGridSizer( 0, 3, 0, 0 );
	fgSizer3->AddGrowableCol( 0 );
	fgSizer3->SetFlexibleDirection( wxBOTH );
	fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_Filename = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer3->Add( m_Filename, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_SelectFile = new wxButton( this, wxID_ANY, wxT("..."), wxDefaultPosition, wxSize( 50,-1 ), 0 );
	fgSizer3->Add( m_SelectFile, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_Link = new wxCheckBox( this, wxID_ANY, wxT("Link"), wxDefaultPosition, wxDefaultSize, 0 );
	m_Link->SetValue(true); 
	fgSizer3->Add( m_Link, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	fgSizer2->Add( fgSizer3, 0, wxEXPAND, 5 );
	
	m_UploadBox->Add( fgSizer2, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer6;
	bSizer6 = new wxBoxSizer( wxHORIZONTAL );
	
	m_bmpUpload = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer6->Add( m_bmpUpload, 0, wxALL, 5 );
	
	m_Add = new wxButton( this, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer6->Add( m_Add, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_labUploadState = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_labUploadState->Wrap( -1 );
	bSizer6->Add( m_labUploadState, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_UploadBox->Add( bSizer6, 0, wxEXPAND, 5 );
	
	bSizer3->Add( m_UploadBox, 0, wxEXPAND|wxALL, 5 );
	
	m_ResultBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Result") ), wxVERTICAL );
	
	m_Stubs = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL );
	m_Stubs->SetMinSize( wxSize( 600,200 ) );
	
	m_ResultBox->Add( m_Stubs, 1, wxEXPAND, 5 );
	
	m_ShowPath = new wxCheckBox( this, wxID_ANY, wxT("Show path"), wxDefaultPosition, wxDefaultSize, 0 );
	m_ResultBox->Add( m_ShowPath, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_PreviewSizer = new wxBoxSizer( wxHORIZONTAL );
	
	wxFlexGridSizer* fgSizer4;
	fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer4->AddGrowableCol( 1 );
	fgSizer4->AddGrowableRow( 1 );
	fgSizer4->SetFlexibleDirection( wxBOTH );
	fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_labResultText = new wxStaticText( this, wxID_ANY, wxT("Text"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labResultText->Wrap( -1 );
	fgSizer4->Add( m_labResultText, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
	
	m_ResultText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer4->Add( m_ResultText, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
	
	m_labResultNote = new wxStaticText( this, wxID_ANY, wxT("Note"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labResultNote->Wrap( -1 );
	fgSizer4->Add( m_labResultNote, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
	
	m_ResultNote = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
	m_ResultNote->SetMinSize( wxSize( -1,50 ) );
	
	fgSizer4->Add( m_ResultNote, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_PreviewSizer->Add( fgSizer4, 1, wxEXPAND, 5 );
	
	m_Preview = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
	m_Preview->SetMinSize( wxSize( -1,100 ) );
	
	m_PreviewSizer->Add( m_Preview, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_ResultBox->Add( m_PreviewSizer, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxHORIZONTAL );
	
	m_bmpOpen = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_bmpOpen, 0, wxALL, 5 );
	
	m_Open = new wxButton( this, wxID_ANY, wxT("Open"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_Open, 0, wxALL, 5 );
	
	m_Modify = new wxButton( this, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_Modify, 0, wxALL, 5 );
	
	m_Delete = new wxButton( this, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_Delete, 0, wxALL, 5 );
	
	m_labDownloadState = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_labDownloadState->Wrap( -1 );
	bSizer2->Add( m_labDownloadState, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_ResultBox->Add( bSizer2, 0, wxEXPAND, 5 );
	
	bSizer3->Add( m_ResultBox, 1, wxEXPAND|wxALL, 5 );
	
	m_StdButtons = new wxStdDialogButtonSizer();
	m_StdButtonsOK = new wxButton( this, wxID_OK );
	m_StdButtons->AddButton( m_StdButtonsOK );
	m_StdButtonsHelp = new wxButton( this, wxID_HELP );
	m_StdButtons->AddButton( m_StdButtonsHelp );
	m_StdButtons->Realize();
	bSizer3->Add( m_StdButtons, 0, wxEXPAND|wxALL|wxALIGN_RIGHT, 5 );
	
	this->SetSizer( bSizer3 );
	this->Layout();
	bSizer3->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( AboxDlgGen::onClose ) );
	m_bmpFind->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( AboxDlgGen::onBmpFind ), NULL, this );
	m_Find->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboxDlgGen::onFind ), NULL, this );
	m_FindText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( AboxDlgGen::onFindTextEnter ), NULL, this );
	m_FromDate->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( AboxDlgGen::onFromDate ), NULL, this );
	m_ToDate->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( AboxDlgGen::onToDate ), NULL, this );
	m_SelectFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboxDlgGen::onSelectFile ), NULL, this );
	m_bmpUpload->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( AboxDlgGen::onBmpAdd ), NULL, this );
	m_Add->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboxDlgGen::onAdd ), NULL, this );
	m_Stubs->Connect( wxEVT_COMMAND_LIST_COL_CLICK, wxListEventHandler( AboxDlgGen::onStubCol ), NULL, this );
	m_Stubs->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( AboxDlgGen::onStubActivated ), NULL, this );
	m_Stubs->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( AboxDlgGen::onStubSelected ), NULL, this );
	m_ShowPath->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AboxDlgGen::onShowPath ), NULL, this );
	m_Preview->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( AboxDlgGen::onOpenPreview ), NULL, this );
	m_bmpOpen->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( AboxDlgGen::onBmpOpen ), NULL, this );
	m_Open->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboxDlgGen::onOpen ), NULL, this );
	m_Modify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboxDlgGen::onModify ), NULL, this );
	m_Delete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboxDlgGen::onDelete ), NULL, this );
	m_StdButtonsHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboxDlgGen::onHelp ), NULL, this );
	m_StdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboxDlgGen::onOK ), NULL, this );
}
Example #12
0
DlgPlaygroundCommitFileListBase::DlgPlaygroundCommitFileListBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	descriptionText = new wxStaticText( this, wxID_ANY, _("This is a list of files that have been used or created within the current playground. All selected files will be committed to the file system. Existing files won't be replaced without further permission."), wxDefaultPosition, wxDefaultSize, 0 );
	descriptionText->Wrap( 600 );
	mainSizer->Add( descriptionText, 0, wxALL|wxEXPAND, 10 );
	
	wxBoxSizer* listSizer;
	listSizer = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* listHeaderSizer;
	listHeaderSizer = new wxBoxSizer( wxHORIZONTAL );
	
	listTitleText = new wxStaticText( this, wxID_ANY, _("Playground files:"), wxDefaultPosition, wxDefaultSize, 0 );
	listTitleText->Wrap( -1 );
	listHeaderSizer->Add( listTitleText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	listHeaderSizer->Add( 0, 0, 3, wxEXPAND, 5 );
	
	m_staticText13 = new wxStaticText( this, wxID_ANY, _("Search:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText13->Wrap( -1 );
	listHeaderSizer->Add( m_staticText13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	listSearchEntry = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_NO_VSCROLL|wxTE_PROCESS_ENTER );
	listHeaderSizer->Add( listSearchEntry, 20, wxALL, 5 );
	
	
	listHeaderSizer->Add( 0, 0, 1, wxEXPAND, 5 );
	
	columnButton = new wxButton( this, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
	listHeaderSizer->Add( columnButton, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
	
	listSizer->Add( listHeaderSizer, 0, wxEXPAND, 5 );
	
	fileList = new AnListCtrl( this, PG_COMMIT_LIST, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES );
	listSizer->Add( fileList, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* listFooterSizer;
	listFooterSizer = new wxBoxSizer( wxVERTICAL );
	
	progressText = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	progressText->Wrap( -1 );
	listFooterSizer->Add( progressText, 0, wxALL, 5 );
	
	listSizer->Add( listFooterSizer, 0, wxEXPAND, 5 );
	
	wxBoxSizer* footerSizer;
	footerSizer = new wxBoxSizer( wxHORIZONTAL );
	
	commitButton = new wxButton( this, PG_FILE_COMMITBUTTON, _("Commit"), wxDefaultPosition, wxDefaultSize, 0 );
	commitButton->SetToolTip( _("Commit selected Files to the production system.") );
	
	footerSizer->Add( commitButton, 0, wxALL, 5 );
	
	delButton = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	delButton->SetToolTip( _("Delete selected playground Files.") );
	
	footerSizer->Add( delButton, 0, wxALL, 5 );
	
	
	footerSizer->Add( 0, 0, 1, wxEXPAND, 5 );
	
	closeButton = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
	closeButton->SetDefault(); 
	closeButton->SetToolTip( _("Close this Window") );
	
	footerSizer->Add( closeButton, 0, wxALL, 5 );
	
	listSizer->Add( footerSizer, 0, wxEXPAND, 5 );
	
	mainSizer->Add( listSizer, 1, wxEXPAND|wxALL, 5 );
	
	this->SetSizer( mainSizer );
	this->Layout();
	
	// Connect Events
	listSearchEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DlgPlaygroundCommitFileListBase::onCommitSearchKillFocus ), NULL, this );
	listSearchEntry->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DlgPlaygroundCommitFileListBase::onCommitSearchEnter ), NULL, this );
	columnButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DlgPlaygroundCommitFileListBase::onColumnButtonClick ), NULL, this );
	fileList->Connect( wxEVT_COMMAND_LIST_COL_CLICK, wxListEventHandler( DlgPlaygroundCommitFileListBase::onCommitListColClick ), NULL, this );
	commitButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DlgPlaygroundCommitFileListBase::onCommitClicked ), NULL, this );
	delButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DlgPlaygroundCommitFileListBase::onDeleteClicked ), NULL, this );
	closeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DlgPlaygroundCommitFileListBase::onCloseClicked ), NULL, this );
}
Example #13
0
ExternalToolBaseDlg::ExternalToolBaseDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC403FInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer6 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer6);
    
    wxBoxSizer* bSizer8 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer6->Add(bSizer8, 1, wxEXPAND, 5);
    
    m_listCtrlTools = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLC_VRULES|wxLC_HRULES|wxLC_SINGLE_SEL|wxLC_REPORT);
    m_listCtrlTools->SetFocus();
    
    bSizer8->Add(m_listCtrlTools, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer9 = new wxBoxSizer(wxVERTICAL);
    
    bSizer8->Add(bSizer9, 0, 0, 5);
    
    m_buttonNewTool = new wxButton(this, wxID_ANY, _("New..."), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer9->Add(m_buttonNewTool, 0, wxALL, 5);
    
    m_buttonEdit = new wxButton(this, wxID_ANY, _("Edit..."), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer9->Add(m_buttonEdit, 0, wxALL, 5);
    
    m_buttonDelete = new wxButton(this, wxID_ANY, _("Delete..."), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer9->Add(m_buttonDelete, 0, wxALL, 5);
    
    m_stdBtnSizer2 = new wxStdDialogButtonSizer();
    
    bSizer6->Add(m_stdBtnSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button4 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button4->SetDefault();
    m_stdBtnSizer2->AddButton(m_button4);
    
    m_button6 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer2->AddButton(m_button6);
    m_stdBtnSizer2->Realize();
    
    SetName(wxT("ExternalToolBaseDlg"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_listCtrlTools->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(ExternalToolBaseDlg::OnItemActivated), NULL, this);
    m_listCtrlTools->Connect(wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler(ExternalToolBaseDlg::OnItemDeSelected), NULL, this);
    m_listCtrlTools->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(ExternalToolBaseDlg::OnItemSelected), NULL, this);
    m_buttonNewTool->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExternalToolBaseDlg::OnButtonNew), NULL, this);
    m_buttonNewTool->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(ExternalToolBaseDlg::OnButtonNewUI), NULL, this);
    m_buttonEdit->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExternalToolBaseDlg::OnButtonEdit), NULL, this);
    m_buttonEdit->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(ExternalToolBaseDlg::OnButtonEditUI), NULL, this);
    m_buttonDelete->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExternalToolBaseDlg::OnButtonDelete), NULL, this);
    m_buttonDelete->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(ExternalToolBaseDlg::OnButtonDeleteUI), NULL, this);
    
}
Example #14
0
EventFrameBase::EventFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( -1,-1 ), wxSize( -1,-1 ) );
	
	wxBoxSizer* MainSizer;
	MainSizer = new wxBoxSizer( wxVERTICAL );
	
	MainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* MainPanelSizer;
	MainPanelSizer = new wxBoxSizer( wxVERTICAL );
	
	Notebook = new wxNotebook( MainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	GeneralPanel = new wxPanel( Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* GeneralPanelSizer;
	GeneralPanelSizer = new wxBoxSizer( wxVERTICAL );
	
	wxFlexGridSizer* GeneralSizer;
	GeneralSizer = new wxFlexGridSizer( 6, 2, 8, 8 );
	GeneralSizer->AddGrowableCol( 1 );
	GeneralSizer->AddGrowableRow( 5 );
	GeneralSizer->SetFlexibleDirection( wxBOTH );
	GeneralSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	SummaryLabel = new wxStaticText( GeneralPanel, wxID_ANY, _("Summary:"), wxDefaultPosition, wxDefaultSize, 0 );
	SummaryLabel->Wrap( -1 );
	GeneralSizer->Add( SummaryLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	SummaryText = new wxTextCtrl( GeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	GeneralSizer->Add( SummaryText, 1, wxEXPAND, 5 );
	
	CategoriesLabel = new wxStaticText( GeneralPanel, wxID_ANY, _("Categories:"), wxDefaultPosition, wxDefaultSize, 0 );
	CategoriesLabel->Wrap( -1 );
	GeneralSizer->Add( CategoriesLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	CategoriesText = new wxTextCtrl( GeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	GeneralSizer->Add( CategoriesText, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
	
	StartLabel = new wxStaticText( GeneralPanel, wxID_ANY, _("Start:"), wxDefaultPosition, wxDefaultSize, 0 );
	StartLabel->Wrap( -1 );
	GeneralSizer->Add( StartLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	wxBoxSizer* StartSizer;
	StartSizer = new wxBoxSizer( wxHORIZONTAL );
	
	StartDatePicker = new wxDatePickerCtrl( GeneralPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxSize( 130,-1 ), wxDP_DROPDOWN );
	StartSizer->Add( StartDatePicker, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	StartHourSpinCtrl = new wxSpinCtrl( GeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 45,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 23, 0 );
	StartHourSpinCtrl->Enable( false );
	
	StartSizer->Add( StartHourSpinCtrl, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 8 );
	
	StartMinuteSpinCtrl = new wxSpinCtrl( GeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 45,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 59, 0 );
	StartMinuteSpinCtrl->Enable( false );
	
	StartSizer->Add( StartMinuteSpinCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	
	StartSizer->Add( 0, 0, 1, wxEXPAND, 5 );
	
	SpecificTimeCheckBox = new wxCheckBox( GeneralPanel, wxID_ANY, _("Specific time"), wxDefaultPosition, wxDefaultSize, 0 );
	
	StartSizer->Add( SpecificTimeCheckBox, 0, wxALIGN_CENTER_VERTICAL, 8 );
	
	GeneralSizer->Add( StartSizer, 1, wxEXPAND, 5 );
	
	EndDateCheckBox = new wxCheckBox( GeneralPanel, wxID_ANY, _("End:"), wxDefaultPosition, wxDefaultSize, 0 );
	
	GeneralSizer->Add( EndDateCheckBox, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	wxBoxSizer* EndSizer;
	EndSizer = new wxBoxSizer( wxHORIZONTAL );
	
	EndDatePicker = new wxDatePickerCtrl( GeneralPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxSize( 130,-1 ), wxDP_DROPDOWN );
	EndDatePicker->Enable( false );
	
	EndSizer->Add( EndDatePicker, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	EndHourSpinCtrl = new wxSpinCtrl( GeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 45,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 23, 0 );
	EndHourSpinCtrl->Enable( false );
	
	EndSizer->Add( EndHourSpinCtrl, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 8 );
	
	EndMinuteSpinCtrl = new wxSpinCtrl( GeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 45,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 59, 0 );
	EndMinuteSpinCtrl->Enable( false );
	
	EndSizer->Add( EndMinuteSpinCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	GeneralSizer->Add( EndSizer, 1, wxEXPAND, 5 );
	
	RecurrenceLabel = new wxStaticText( GeneralPanel, wxID_ANY, _("Recurrence:"), wxDefaultPosition, wxDefaultSize, 0 );
	RecurrenceLabel->Wrap( -1 );
	GeneralSizer->Add( RecurrenceLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	wxBoxSizer* RecurrenceSizer;
	RecurrenceSizer = new wxBoxSizer( wxHORIZONTAL );
	
	RepeatCheckBox = new wxCheckBox( GeneralPanel, wxID_ANY, _("Repeat every"), wxDefaultPosition, wxDefaultSize, 0 );
	
	RecurrenceSizer->Add( RepeatCheckBox, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
	
	IntervalSpinCtrl = new wxSpinCtrl( GeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 45,-1 ), wxSP_ARROW_KEYS, 0, 999, 1 );
	IntervalSpinCtrl->Enable( false );
	
	RecurrenceSizer->Add( IntervalSpinCtrl, 0, wxALIGN_CENTER_VERTICAL, 8 );
	
	wxString FrequencyChoiceChoices[] = { _("year(s)"), _("month(s)"), _("week(s)"), _("day(s)"), _("hour(s)"), _("minute(s)") };
	int FrequencyChoiceNChoices = sizeof( FrequencyChoiceChoices ) / sizeof( wxString );
	FrequencyChoice = new wxChoice( GeneralPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, FrequencyChoiceNChoices, FrequencyChoiceChoices, 0 );
	FrequencyChoice->SetSelection( 0 );
	FrequencyChoice->Enable( false );
	
	RecurrenceSizer->Add( FrequencyChoice, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 8 );
	
	
	RecurrenceSizer->Add( 0, 0, 1, wxEXPAND, 5 );
	
	UntilCheckBox = new wxCheckBox( GeneralPanel, wxID_ANY, _("Until"), wxDefaultPosition, wxDefaultSize, 0 );
	
	UntilCheckBox->Enable( false );
	
	RecurrenceSizer->Add( UntilCheckBox, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	UntilDatePicker = new wxDatePickerCtrl( GeneralPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxSize( 130,-1 ), wxDP_DROPDOWN );
	UntilDatePicker->Enable( false );
	
	RecurrenceSizer->Add( UntilDatePicker, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
	
	GeneralSizer->Add( RecurrenceSizer, 1, wxEXPAND, 5 );
	
	DesciptionLabel = new wxStaticText( GeneralPanel, wxID_ANY, _("Description:"), wxDefaultPosition, wxDefaultSize, 0 );
	DesciptionLabel->Wrap( -1 );
	GeneralSizer->Add( DesciptionLabel, 0, 0, 5 );
	
	DescriptionText = new wxTextCtrl( GeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
	GeneralSizer->Add( DescriptionText, 1, wxEXPAND, 5 );
	
	GeneralPanelSizer->Add( GeneralSizer, 1, wxALL|wxEXPAND, 12 );
	
	GeneralPanel->SetSizer( GeneralPanelSizer );
	GeneralPanel->Layout();
	GeneralPanelSizer->Fit( GeneralPanel );
	Notebook->AddPage( GeneralPanel, _("General"), true );
	AlarmsPanel = new wxPanel( Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* GeneralAlarmsSizer;
	GeneralAlarmsSizer = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* AlarmsListSizer;
	AlarmsListSizer = new wxBoxSizer( wxVERTICAL );
	
	AlarmsList = new wxListCtrl( AlarmsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
	AlarmsListSizer->Add( AlarmsList, 1, wxBOTTOM|wxEXPAND, 8 );
	
	wxBoxSizer* AlarmsButtonsSizer;
	AlarmsButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
	
	AddAlarmButton = new wxButton( AlarmsPanel, wxID_ANY, _("&Add"), wxDefaultPosition, wxDefaultSize, 0 );
	AlarmsButtonsSizer->Add( AddAlarmButton, 0, 0, 5 );
	
	DeleteAlaramButton = new wxButton( AlarmsPanel, wxID_ANY, _("&Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	DeleteAlaramButton->Enable( false );
	
	AlarmsButtonsSizer->Add( DeleteAlaramButton, 0, wxLEFT, 5 );
	
	AlarmsListSizer->Add( AlarmsButtonsSizer, 0, wxEXPAND, 5 );
	
	GeneralAlarmsSizer->Add( AlarmsListSizer, 0, wxALL|wxEXPAND, 12 );
	
	AlarmPropertiesPanel = new wxPanel( AlarmsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* AlarmPropertiesSizer;
	AlarmPropertiesSizer = new wxBoxSizer( wxVERTICAL );
	
	wxFlexGridSizer* AlarmPropertiesSubSizer;
	AlarmPropertiesSubSizer = new wxFlexGridSizer( 2, 2, 8, 8 );
	AlarmPropertiesSubSizer->AddGrowableCol( 1 );
	AlarmPropertiesSubSizer->SetFlexibleDirection( wxBOTH );
	AlarmPropertiesSubSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	AlarmTypeLabel = new wxStaticText( AlarmPropertiesPanel, wxID_ANY, _("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
	AlarmTypeLabel->Wrap( -1 );
	AlarmPropertiesSubSizer->Add( AlarmTypeLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	wxString AlarmTypeChoiceChoices[] = { _("Pop-up window"), _("Taskbar icon"), _("Sound") };
	int AlarmTypeChoiceNChoices = sizeof( AlarmTypeChoiceChoices ) / sizeof( wxString );
	AlarmTypeChoice = new wxChoice( AlarmPropertiesPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, AlarmTypeChoiceNChoices, AlarmTypeChoiceChoices, 0 );
	AlarmTypeChoice->SetSelection( 0 );
	AlarmPropertiesSubSizer->Add( AlarmTypeChoice, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	AlarmTriggerLabel = new wxStaticText( AlarmPropertiesPanel, wxID_ANY, _("Trigger:"), wxDefaultPosition, wxDefaultSize, 0 );
	AlarmTriggerLabel->Wrap( -1 );
	AlarmPropertiesSubSizer->Add( AlarmTriggerLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	wxBoxSizer* AlarmTriggerSizer;
	AlarmTriggerSizer = new wxBoxSizer( wxHORIZONTAL );
	
	AlarmTriggerSpinCtrl = new wxSpinCtrl( AlarmPropertiesPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 50,-1 ), wxSP_ARROW_KEYS, 0, 999, 0 );
	AlarmTriggerSizer->Add( AlarmTriggerSpinCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	wxString AlarmTriggerUnitChoiceChoices[] = { _("minute(s)"), _("hour(s)"), _("day(s)"), _("week(s)") };
	int AlarmTriggerUnitChoiceNChoices = sizeof( AlarmTriggerUnitChoiceChoices ) / sizeof( wxString );
	AlarmTriggerUnitChoice = new wxChoice( AlarmPropertiesPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, AlarmTriggerUnitChoiceNChoices, AlarmTriggerUnitChoiceChoices, 0 );
	AlarmTriggerUnitChoice->SetSelection( 0 );
	AlarmTriggerSizer->Add( AlarmTriggerUnitChoice, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 8 );
	
	wxString AlarmBeforeAfterChoiceChoices[] = { _("before"), _("after") };
	int AlarmBeforeAfterChoiceNChoices = sizeof( AlarmBeforeAfterChoiceChoices ) / sizeof( wxString );
	AlarmBeforeAfterChoice = new wxChoice( AlarmPropertiesPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, AlarmBeforeAfterChoiceNChoices, AlarmBeforeAfterChoiceChoices, 0 );
	AlarmBeforeAfterChoice->SetSelection( 0 );
	AlarmTriggerSizer->Add( AlarmBeforeAfterChoice, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 8 );
	
	AlarmTriggerLabel2 = new wxStaticText( AlarmPropertiesPanel, wxID_ANY, _("the start"), wxDefaultPosition, wxDefaultSize, 0 );
	AlarmTriggerLabel2->Wrap( -1 );
	AlarmTriggerSizer->Add( AlarmTriggerLabel2, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	AlarmPropertiesSubSizer->Add( AlarmTriggerSizer, 0, wxEXPAND, 5 );
	
	AlarmPropertiesSizer->Add( AlarmPropertiesSubSizer, 0, wxEXPAND|wxBOTTOM, 12 );
	
	AlarmDescriptionLabel = new wxStaticText( AlarmPropertiesPanel, wxID_ANY, _("Additional alarm description:"), wxDefaultPosition, wxDefaultSize, 0 );
	AlarmDescriptionLabel->Wrap( -1 );
	AlarmPropertiesSizer->Add( AlarmDescriptionLabel, 0, wxBOTTOM, 5 );
	
	AlarmDescriptionText = new wxTextCtrl( AlarmPropertiesPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
	AlarmPropertiesSizer->Add( AlarmDescriptionText, 1, wxEXPAND, 12 );
	
	AlarmPropertiesPanel->SetSizer( AlarmPropertiesSizer );
	AlarmPropertiesPanel->Layout();
	AlarmPropertiesSizer->Fit( AlarmPropertiesPanel );
	GeneralAlarmsSizer->Add( AlarmPropertiesPanel, 1, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 12 );
	
	AlarmsPanel->SetSizer( GeneralAlarmsSizer );
	AlarmsPanel->Layout();
	GeneralAlarmsSizer->Fit( AlarmsPanel );
	Notebook->AddPage( AlarmsPanel, _("Alarms"), false );
	
	MainPanelSizer->Add( Notebook, 1, wxALL|wxEXPAND, 8 );
	
	ButtonsSizer = new wxStdDialogButtonSizer();
	ButtonsSizerOK = new wxButton( MainPanel, wxID_OK );
	ButtonsSizer->AddButton( ButtonsSizerOK );
	ButtonsSizerCancel = new wxButton( MainPanel, wxID_CANCEL );
	ButtonsSizer->AddButton( ButtonsSizerCancel );
	ButtonsSizer->Realize();
	MainPanelSizer->Add( ButtonsSizer, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 8 );
	
	MainPanel->SetSizer( MainPanelSizer );
	MainPanel->Layout();
	MainPanelSizer->Fit( MainPanel );
	MainSizer->Add( MainPanel, 1, wxEXPAND, 5 );
	
	this->SetSizer( MainSizer );
	this->Layout();
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( EventFrameBase::Closed ) );
	SpecificTimeCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( EventFrameBase::SpecificTimeCheckBoxClicked ), NULL, this );
	EndDateCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( EventFrameBase::EndDateCheckBoxClicked ), NULL, this );
	RepeatCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( EventFrameBase::RepeatCheckBoxClicked ), NULL, this );
	UntilCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( EventFrameBase::UntilCheckBoxClicked ), NULL, this );
	AlarmsList->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( EventFrameBase::AlarmDeselected ), NULL, this );
	AlarmsList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( EventFrameBase::AlarmSelected ), NULL, this );
	AddAlarmButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EventFrameBase::AddAlarmClicked ), NULL, this );
	DeleteAlaramButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EventFrameBase::DeleteAlarmClicked ), NULL, this );
	AlarmTypeChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( EventFrameBase::AlarmTypeChanged ), NULL, this );
	AlarmTriggerSpinCtrl->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( EventFrameBase::AlarmTriggerChanged ), NULL, this );
	AlarmTriggerUnitChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( EventFrameBase::AlarmTriggerUnitChanged ), NULL, this );
	AlarmBeforeAfterChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( EventFrameBase::AlarmBeforeAfterChanged ), NULL, this );
	ButtonsSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EventFrameBase::CancelClicked ), NULL, this );
	ButtonsSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EventFrameBase::OKClicked ), NULL, this );
}
Example #15
0
CompilerPatternsBase::CompilerPatternsBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
	wxBoxSizer* bSizer14;
	bSizer14 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizerError;
	bSizerError = new wxBoxSizer( wxVERTICAL );
	
	wxStaticText* m_staticText161;
	m_staticText161 = new wxStaticText( this, wxID_ANY, _("Compiler Errors Patterns:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText161->Wrap( -1 );
	m_staticText161->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizerError->Add( m_staticText161, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer25;
	bSizer25 = new wxBoxSizer( wxHORIZONTAL );
	
	m_listErrPatterns = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES );
	bSizer25->Add( m_listErrPatterns, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer26;
	bSizer26 = new wxBoxSizer( wxVERTICAL );
	
	m_btnAddErrPattern = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
	m_btnAddErrPattern->SetToolTip( _("Add new error pattern") );
	
	bSizer26->Add( m_btnAddErrPattern, 0, wxALL|wxEXPAND, 5 );
	
	m_btnDelErrPattern = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	m_btnDelErrPattern->SetToolTip( _("Delete the selected error pattern") );
	
	bSizer26->Add( m_btnDelErrPattern, 0, wxALL|wxEXPAND, 5 );
	
	m_btnUpdateErrPattern = new wxButton( this, wxID_ANY, _("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
	m_btnUpdateErrPattern->SetToolTip( _("Edit the selected error pattern") );
	
	bSizer26->Add( m_btnUpdateErrPattern, 0, wxALL|wxEXPAND, 5 );
	
	bSizer25->Add( bSizer26, 0, 0, 5 );
	
	bSizerError->Add( bSizer25, 1, wxEXPAND, 5 );
	
	wxStaticLine* m_staticline5;
	m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizerError->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
	
	bSizer14->Add( bSizerError, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizerWarnings;
	bSizerWarnings = new wxBoxSizer( wxVERTICAL );
	
	wxStaticText* m_staticText17;
	m_staticText17 = new wxStaticText( this, wxID_ANY, _("Compiler Warnings Patterns:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText17->Wrap( -1 );
	m_staticText17->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizerWarnings->Add( m_staticText17, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer251;
	bSizer251 = new wxBoxSizer( wxHORIZONTAL );
	
	m_listWarnPatterns = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES );
	bSizer251->Add( m_listWarnPatterns, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer261;
	bSizer261 = new wxBoxSizer( wxVERTICAL );
	
	m_btnAddWarnPattern = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
	m_btnAddWarnPattern->SetToolTip( _("Add new warning pattern") );
	
	bSizer261->Add( m_btnAddWarnPattern, 0, wxALL|wxEXPAND, 5 );
	
	m_btnDelWarnPattern = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	m_btnDelWarnPattern->SetToolTip( _("Delete the selected warning pattern") );
	
	bSizer261->Add( m_btnDelWarnPattern, 0, wxALL|wxEXPAND, 5 );
	
	m_btnUpdateWarnPattern = new wxButton( this, wxID_ANY, _("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
	m_btnUpdateWarnPattern->SetToolTip( _("Edit the selected warning pattern") );
	
	bSizer261->Add( m_btnUpdateWarnPattern, 0, wxALL|wxEXPAND, 5 );
	
	bSizer251->Add( bSizer261, 0, 0, 5 );
	
	bSizerWarnings->Add( bSizer251, 1, wxEXPAND, 5 );
	
	bSizer14->Add( bSizerWarnings, 1, wxEXPAND, 5 );
	
	this->SetSizer( bSizer14 );
	this->Layout();
	
	// Connect Events
	m_listErrPatterns->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CompilerPatternsBase::OnErrItemActivated ), NULL, this );
	m_btnAddErrPattern->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompilerPatternsBase::OnBtnAddErrPattern ), NULL, this );
	m_btnDelErrPattern->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompilerPatternsBase::OnBtnDelErrPattern ), NULL, this );
	m_btnDelErrPattern->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CompilerPatternsBase::OnErrorPatternSelectedUI ), NULL, this );
	m_btnUpdateErrPattern->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompilerPatternsBase::OnBtnUpdateErrPattern ), NULL, this );
	m_btnUpdateErrPattern->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CompilerPatternsBase::OnErrorPatternSelectedUI ), NULL, this );
	m_listWarnPatterns->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CompilerPatternsBase::OnWarnItemActivated ), NULL, this );
	m_btnAddWarnPattern->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompilerPatternsBase::OnBtnAddWarnPattern ), NULL, this );
	m_btnDelWarnPattern->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompilerPatternsBase::OnBtnDelWarnPattern ), NULL, this );
	m_btnDelWarnPattern->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CompilerPatternsBase::OnWarningPatternSelectedUI ), NULL, this );
	m_btnUpdateWarnPattern->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CompilerPatternsBase::OnBtnUpdateWarnPattern ), NULL, this );
	m_btnUpdateWarnPattern->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CompilerPatternsBase::OnWarningPatternSelectedUI ), NULL, this );
}
Example #16
0
MainFrame_base::~MainFrame_base()
{
	// Disconnect Events
	this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( MainFrame_base::OnUpdateUI ) );
	this->Disconnect( ID_MENU_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnMenuExit ) );
	this->Disconnect( ID_RECONSTRUCT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnReconstruct ) );
	this->Disconnect( ID_VIEW_IMAGE_BROWSER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Disconnect( ID_VIEW_IMAGE_PREVIEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Disconnect( ID_VIEW_OPTIONS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Disconnect( ID_VIEW_LOG, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Disconnect( ID_RESET_3D_VIEWPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnReset3dViewport ) );
	this->Disconnect( ID_TOGGLE_TURNTABLE_ANIMATION, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleTurntableAnimation ) );
	this->Disconnect( ID_TOGGLE_TRACKBALL_VISIBILITY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Disconnect( ID_TOGGLE_GRID_VISIBILITY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Disconnect( ID_TOGGLE_POINTS_VISIBILITY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Disconnect( ID_TOGGLE_CAMERAS_VISIBILITY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Disconnect( ID_EXPORT_TRACKS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Disconnect( ID_EXPORT_MATCHES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Disconnect( ID_EXPORT_CMVS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Disconnect( ID_EXPORT_BUNDLE_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Disconnect( ID_EXPORT_PLY_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Disconnect( ID_EXPORT_MESHLAB_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Disconnect( ID_EXPORT_MAYA_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnExport ) );
	this->Disconnect( ID_VIEW_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Disconnect( ID_RECONSTRUCT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnReconstruct ) );
	this->Disconnect( ID_VIEW_IMAGE_BROWSER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Disconnect( ID_VIEW_IMAGE_PREVIEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Disconnect( ID_VIEW_OPTIONS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Disconnect( ID_VIEW_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnViewWindows ) );
	this->Disconnect( ID_RESET_3D_VIEWPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnReset3dViewport ) );
	this->Disconnect( ID_TOGGLE_TURNTABLE_ANIMATION, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleTurntableAnimation ) );
	this->Disconnect( ID_TOGGLE_GRID_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Disconnect( ID_TOGGLE_TRACKBALL_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Disconnect( ID_TOGGLE_POINTS_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	this->Disconnect( ID_TOGGLE_CAMERAS_VISIBILITY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnToggleVisibility ) );
	m_gl_canvas->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( MainFrame_base::OnGLCanvasEraseBackground ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_MIDDLE_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_MOTION, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MainFrame_base::OnGLCanvasMouse ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnGLCanvasPaint ), NULL, this );
	m_gl_canvas->Disconnect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnGLCanvasSize ), NULL, this );
	m_pane_matches_view->Disconnect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnMatchesViewPaint ), NULL, this );
	m_pane_matches_view->Disconnect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnMatchesViewResize ), NULL, this );
	m_cb_matches_left->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrame_base::OnSelectMatchImage ), NULL, this );
	m_cb_matches_right->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrame_base::OnSelectMatchImage ), NULL, this );
	m_dir_picker->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MainFrame_base::OnSelectDirectory ), NULL, this );
	m_img_ctrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame_base::OnSelectPreviewImage ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_MIDDLE_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_MOTION, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_MIDDLE_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_RIGHT_DCLICK, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( MainFrame_base::OnImagePreviewMouse ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_PAINT, wxPaintEventHandler( MainFrame_base::OnImagePreviewPaint ), NULL, this );
	m_window_image_preview->Disconnect( wxEVT_SIZE, wxSizeEventHandler( MainFrame_base::OnImagePreviewResize ), NULL, this );
	this->Disconnect( ID_RESET_OPTIONS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnResetOptions ) );
	this->Disconnect( ID_SAVE_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnSaveLog ) );
	this->Disconnect( ID_CLEAR_LOG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MainFrame_base::OnClearLog ) );
	
	m_mgr.UnInit();
	
}
DebuggerSettingsBaseDlg::DebuggerSettingsBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
	
	m_notebook2 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_panel1 = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	m_book = new wxNotebook( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_LEFT );
	
	bSizer3->Add( m_book, 1, wxEXPAND | wxALL, 5 );
	
	m_panel1->SetSizer( bSizer3 );
	m_panel1->Layout();
	bSizer3->Fit( m_panel1 );
	m_notebook2->AddPage( m_panel1, wxT("Loaded Debuggers"), true );
	m_panel2 = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxHORIZONTAL );
	
	m_listCtrl1 = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES );
	bSizer5->Add( m_listCtrl1, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer6;
	bSizer6 = new wxBoxSizer( wxVERTICAL );
	
	m_buttonNewType = new wxButton( m_panel2, wxID_ANY, wxT("&New..."), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer6->Add( m_buttonNewType, 0, wxALL|wxEXPAND, 5 );
	
	m_buttonEdit = new wxButton( m_panel2, wxID_ANY, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer6->Add( m_buttonEdit, 0, wxALL|wxEXPAND, 5 );
	
	m_buttonDelete = new wxButton( m_panel2, wxID_ANY, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer6->Add( m_buttonDelete, 0, wxALL|wxEXPAND, 5 );
	
	bSizer5->Add( bSizer6, 0, wxEXPAND, 5 );
	
	bSizer4->Add( bSizer5, 1, wxEXPAND, 5 );
	
	m_panel2->SetSizer( bSizer4 );
	m_panel2->Layout();
	bSizer4->Fit( m_panel2 );
	m_notebook2->AddPage( m_panel2, wxT("PreDefined Types"), false );
	
	bSizer1->Add( m_notebook2, 1, wxEXPAND | wxALL, 5 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxHORIZONTAL );
	
	m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_buttonOK, 0, wxALL, 5 );
	
	m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_buttonCancel, 0, wxALL, 5 );
	
	bSizer1->Add( bSizer2, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	this->SetSizer( bSizer1 );
	this->Layout();
	
	// Connect Events
	m_listCtrl1->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DebuggerSettingsBaseDlg::OnItemActivated ), NULL, this );
	m_listCtrl1->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DebuggerSettingsBaseDlg::OnItemDeselected ), NULL, this );
	m_listCtrl1->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DebuggerSettingsBaseDlg::OnItemSelected ), NULL, this );
	m_buttonNewType->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DebuggerSettingsBaseDlg::OnNewShortcut ), NULL, this );
	m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DebuggerSettingsBaseDlg::OnEditShortcut ), NULL, this );
	m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DebuggerSettingsBaseDlg::OnDeleteShortcut ), NULL, this );
	m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DebuggerSettingsBaseDlg::OnButtonCancel ), NULL, this );
}
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizerFieldsSetup;
	bSizerFieldsSetup = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizerFiledsList;
	bSizerFiledsList = new wxBoxSizer( wxVERTICAL );
	
	fieldListCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES );
	fieldListCtrl->SetMinSize( wxSize( 220,-1 ) );
	
	bSizerFiledsList->Add( fieldListCtrl, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
	
	addFieldButton = new wxButton( this, wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 );
	addFieldButton->SetToolTip( _("Add a new custom field") );
	
	bSizerFiledsList->Add( addFieldButton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
	
	deleteFieldButton = new wxButton( this, wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 );
	deleteFieldButton->SetToolTip( _("Delete one of the optional fields") );
	
	bSizerFiledsList->Add( deleteFieldButton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
	
	moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
	moveUpButton->SetToolTip( _("Move the selected optional fields up one position") );
	
	bSizerFiledsList->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizerFieldsSetup->Add( bSizerFiledsList, 3, wxEXPAND, 5 );
	
	wxBoxSizer* fieldEditBoxSizer;
	fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizerJustify;
	bSizerJustify = new wxBoxSizer( wxHORIZONTAL );
	
	wxString m_FieldHJustifyCtrlChoices[] = { _("Left"), _("Center"), _("Right") };
	int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString );
	m_FieldHJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Horiz. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
	m_FieldHJustifyCtrl->SetSelection( 1 );
	m_FieldHJustifyCtrl->SetToolTip( _("Select if the component is to be rotated when drawn") );
	
	bSizerJustify->Add( m_FieldHJustifyCtrl, 1, wxEXPAND|wxALL, 5 );
	
	wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") };
	int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
	m_FieldVJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Vert. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
	m_FieldVJustifyCtrl->SetSelection( 0 );
	m_FieldVJustifyCtrl->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );
	
	bSizerJustify->Add( m_FieldVJustifyCtrl, 1, wxEXPAND|wxALL, 5 );
	
	
	fieldEditBoxSizer->Add( bSizerJustify, 1, wxEXPAND|wxBOTTOM, 5 );
	
	wxBoxSizer* bSizerAspect;
	bSizerAspect = new wxBoxSizer( wxHORIZONTAL );
	
	wxStaticBoxSizer* visibilitySizer;
	visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxVERTICAL );
	
	showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 );
	showCheckBox->SetToolTip( _("Check if you want this field visible") );
	
	visibilitySizer->Add( showCheckBox, 0, wxALL, 5 );
	
	rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
	rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") );
	
	visibilitySizer->Add( rotateCheckBox, 0, wxALL, 5 );
	
	
	bSizerAspect->Add( visibilitySizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
	int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString );
	m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
	m_StyleRadioBox->SetSelection( 0 );
	bSizerAspect->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
	
	
	fieldEditBoxSizer->Add( bSizerAspect, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
	
	wxBoxSizer* fieldNameBoxSizer;
	fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );
	
	fieldNameLabel = new wxStaticText( this, wxID_ANY, _("Field Name"), wxDefaultPosition, wxDefaultSize, 0 );
	fieldNameLabel->Wrap( -1 );
	fieldNameBoxSizer->Add( fieldNameLabel, 0, 0, 5 );
	
	fieldNameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fieldNameTextCtrl->SetMaxLength( 0 ); 
	fieldNameTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
	
	fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 );
	
	fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
	fieldValueLabel->Wrap( -1 );
	fieldNameBoxSizer->Add( fieldValueLabel, 0, wxTOP, 5 );
	
	fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fieldValueTextCtrl->SetMaxLength( 0 ); 
	fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
	
	fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 );
	
	m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show in Browser"), wxDefaultPosition, wxDefaultSize, 0 );
	m_show_datasheet_button->SetToolTip( _("If your datasheet is given as an http:// link, then pressing this button should bring it up in your webbrowser.") );
	
	fieldNameBoxSizer->Add( m_show_datasheet_button, 0, wxBOTTOM|wxEXPAND, 5 );
	
	
	fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 );
	
	wxFlexGridSizer* fgSizerPosSize;
	fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 );
	fgSizerPosSize->AddGrowableCol( 1 );
	fgSizerPosSize->SetFlexibleDirection( wxBOTH );
	fgSizerPosSize->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size"), wxDefaultPosition, wxDefaultSize, 0 );
	textSizeLabel->Wrap( -1 );
	fgSizerPosSize->Add( textSizeLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	textSizeTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	textSizeTextCtrl->SetMaxLength( 0 ); 
	textSizeTextCtrl->SetToolTip( _("The vertical height of the currently selected field's text in the schematic") );
	
	fgSizerPosSize->Add( textSizeTextCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
	
	m_staticTextUnitSize = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextUnitSize->Wrap( -1 );
	fgSizerPosSize->Add( m_staticTextUnitSize, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	posXLabel = new wxStaticText( this, wxID_ANY, _("PosX"), wxDefaultPosition, wxDefaultSize, 0 );
	posXLabel->Wrap( -1 );
	fgSizerPosSize->Add( posXLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	posXTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	posXTextCtrl->SetMaxLength( 0 ); 
	fgSizerPosSize->Add( posXTextCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
	
	m_staticTextUnitPosX = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextUnitPosX->Wrap( -1 );
	fgSizerPosSize->Add( m_staticTextUnitPosX, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	posYLabel = new wxStaticText( this, wxID_ANY, _("PosY"), wxDefaultPosition, wxDefaultSize, 0 );
	posYLabel->Wrap( -1 );
	fgSizerPosSize->Add( posYLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	posYTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	posYTextCtrl->SetMaxLength( 0 ); 
	posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") );
	
	fgSizerPosSize->Add( posYTextCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticTextUnitPosY = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextUnitPosY->Wrap( -1 );
	fgSizerPosSize->Add( m_staticTextUnitPosY, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	fieldEditBoxSizer->Add( fgSizerPosSize, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
	
	
	bSizerFieldsSetup->Add( fieldEditBoxSizer, 2, wxEXPAND, 5 );
	
	
	mainSizer->Add( bSizerFieldsSetup, 1, wxEXPAND, 5 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	mainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
	
	stdDialogButtonSizer = new wxStdDialogButtonSizer();
	stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
	stdDialogButtonSizer->AddButton( stdDialogButtonSizerOK );
	stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
	stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel );
	stdDialogButtonSizer->Realize();
	
	mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 );
	
	
	this->SetSizer( mainSizer );
	this->Layout();
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCloseDialog ) );
	this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnInitDialog ) );
	fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemDeselected ), NULL, this );
	fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnListItemSelected ), NULL, this );
	addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::addFieldButtonHandler ), NULL, this );
	deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::deleteFieldButtonHandler ), NULL, this );
	moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::moveUpButtonHandler ), NULL, this );
	m_show_datasheet_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::showButtonHandler ), NULL, this );
	stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCancelButtonClick ), NULL, this );
	stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnOKButtonClick ), NULL, this );
}
Example #19
0
void PathProp::CreateControls()
{

    wxBoxSizer* itemBoxSizer1 = new wxBoxSizer( wxVERTICAL );
    SetSizer( itemBoxSizer1 );

    itemDialog1 = new wxScrolledWindow( this, wxID_ANY,
                                      wxDefaultPosition, wxDefaultSize, wxHSCROLL | wxVSCROLL);
    itemDialog1->SetScrollRate(5, 5);

    itemBoxSizer1->Add( itemDialog1, 1, wxEXPAND | wxALL, 0 );

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxVERTICAL );
    itemDialog1->SetSizer( itemBoxSizer2 );

    wxStaticBox* itemStaticBoxSizer3Static = new wxStaticBox( itemDialog1, wxID_ANY,
            _("Properties") );
    wxStaticBoxSizer* itemStaticBoxSizer3 = new wxStaticBoxSizer( itemStaticBoxSizer3Static,
            wxVERTICAL );
    itemBoxSizer2->Add( itemStaticBoxSizer3, 0, wxEXPAND | wxALL, 5 );

    wxStaticText* itemStaticText4 = new wxStaticText( itemDialog1, wxID_STATIC, _("Name"),
            wxDefaultPosition, wxDefaultSize, 0 );
    itemStaticBoxSizer3->Add( itemStaticText4, 0,
            wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );

    m_PathNameCtl = new wxTextCtrl( itemDialog1, ID_PATHPROP_TEXTCTRL, _T(""), wxDefaultPosition,
            wxSize( 710, -1 ), 0 );
    itemStaticBoxSizer3->Add( m_PathNameCtl, 0,
            wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, 5 );

//    wxFlexGridSizer* itemFlexGridSizer6 = new wxFlexGridSizer( 2, 2, 0, 0 );
//    itemStaticBoxSizer3->Add( itemFlexGridSizer6, 1, wxALIGN_LEFT | wxALL, 5 );

    wxStaticText* itemStaticText7 = new wxStaticText( itemDialog1, wxID_STATIC, _("Description"),
            wxDefaultPosition, wxDefaultSize, 0 );
    itemStaticBoxSizer3->Add( itemStaticText7, 0,
            wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5 );

    m_textDescription = new wxTextCtrl( itemDialog1, wxID_ANY , wxEmptyString,
            wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
    m_textDescription->SetMinSize( wxSize( -1, 60 ) );
    itemStaticBoxSizer3->Add( m_textDescription, 1, wxALL | wxEXPAND, 5 );
    
    wxStaticText* itemStaticText8 = new wxStaticText( itemDialog1, wxID_STATIC,
            _("Total Length"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStaticBoxSizer3->Add( itemStaticText8, 0,
            wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
            5 );
            
    m_TotalDistCtl = new wxTextCtrl( itemDialog1, ID_PATHPROP_TEXTCTRL3, _T(""), wxDefaultPosition,
            wxDefaultSize, wxTE_READONLY );
    itemStaticBoxSizer3->Add( m_TotalDistCtl, 0,
            wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
            
    m_pPathActive = new wxCheckBox( itemDialog1, ID_PATHPROP_ACTIVE, _("Active") );
    itemStaticBoxSizer3->Add( m_pPathActive, 0 );

    //wxFlexGridSizer* itemFlexGridSizer6a = new wxFlexGridSizer( 2, 4, 0, 0 );
    //itemStaticBoxSizer3->Add( itemFlexGridSizer6a, 1, wxALIGN_LEFT | wxALL, 5 );

    wxBoxSizer* bSizer2;
    bSizer2 = new wxBoxSizer( wxHORIZONTAL );

    m_staticText1 = new wxStaticText( itemDialog1, wxID_ANY, _("Line Colour:"), wxDefaultPosition, wxDefaultSize,
            0 );
    m_staticText1->Wrap( -1 );
    bSizer2->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );

    wxString m_chColorChoices[] = { _("Default color"), _("Black"), _("Dark Red"), _("Dark Green"),
            _("Dark Yellow"), _("Dark Blue"), _("Dark Magenta"), _("Dark Cyan"),
            _("Light Gray"), _("Dark Gray"), _("Red"), _("Green"), _("Yellow"), _("Blue"),
            _("Magenta"), _("Cyan"), _("White") };
    int m_chColorNChoices = sizeof( m_chColorChoices ) / sizeof(wxString);
    m_chColor = new wxChoice( itemDialog1, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_chColorNChoices,
            m_chColorChoices, 0 );
    m_chColor->SetSelection( 0 );
    bSizer2->Add( m_chColor, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );

    m_staticText2 = new wxStaticText( itemDialog1, wxID_ANY, _("Fill Colour:"), wxDefaultPosition, wxDefaultSize,
            0 );
    m_staticText2->Wrap( -1 );
    bSizer2->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
    
    m_chLineColor = new wxChoice( itemDialog1, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_chColorNChoices,
            m_chColorChoices, 0 );
    m_chLineColor->SetSelection( 0 );
    bSizer2->Add( m_chLineColor, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );

    m_staticText3 = new wxStaticText( itemDialog1, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize,
            0 );
    m_staticText3->Wrap( -1 );
    bSizer2->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );

    wxString m_chStyleChoices[] = { _("Default"), _("Solid"), _("Dot"), _("Long dash"),
            _("Short dash"), _("Dot dash") };
    int m_chStyleNChoices = sizeof( m_chStyleChoices ) / sizeof(wxString);
    m_chStyle = new wxChoice( itemDialog1, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_chStyleNChoices,
            m_chStyleChoices, 0 );
    m_chStyle->SetSelection( 0 );
    bSizer2->Add( m_chStyle, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );

    m_staticText4 = new wxStaticText( itemDialog1, wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize,
            0 );
    m_staticText4->Wrap( -1 );
    bSizer2->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );

    wxString m_chWidthChoices[] = { _("Default"), _("1 pixel"), _("2 pixels"), _("3 pixels"),
            _("4 pixels"), _("5 pixels"), _("6 pixels"), _("7 pixels"), _("8 pixels"),
            _("9 pixels"), _("10 pixels") };
    int m_chWidthNChoices = sizeof( m_chWidthChoices ) / sizeof(wxString);
    m_chWidth = new wxChoice( itemDialog1, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_chWidthNChoices,
            m_chWidthChoices, 0 );
    m_chWidth->SetSelection( 0 );
    bSizer2->Add( m_chWidth, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );

    itemStaticBoxSizer3->Add( bSizer2, 1, wxEXPAND, 0 );

    wxStaticBox* itemStaticBoxSizer14Static = new wxStaticBox( itemDialog1, wxID_ANY,
            _("ODPoints") );
    m_pListSizer = new wxStaticBoxSizer( itemStaticBoxSizer14Static, wxVERTICAL );
    itemBoxSizer2->Add( m_pListSizer, 1, wxEXPAND | wxALL, 5 );

    wxBoxSizer* itemBoxSizerBottom = new wxBoxSizer( wxHORIZONTAL );
    itemBoxSizer1->Add( itemBoxSizerBottom, 0, wxALIGN_LEFT | wxALL | wxEXPAND, 5 );
    
    wxBoxSizer* itemBoxSizerAux = new wxBoxSizer( wxHORIZONTAL );
    itemBoxSizerBottom->Add( itemBoxSizerAux, 1, wxALIGN_LEFT | wxALL, 5 );

    wxBoxSizer* itemBoxSizer16 = new wxBoxSizer( wxHORIZONTAL );
    itemBoxSizerBottom->Add( itemBoxSizer16, 0, wxALIGN_RIGHT | wxALL, 5 );

    m_CancelButton = new wxButton( this, ID_PATHPROP_CANCEL, _("Cancel"), wxDefaultPosition,
            wxDefaultSize, 0 );
    itemBoxSizer16->Add( m_CancelButton, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, 5 );

    m_OKButton = new wxButton( this, ID_PATHPROP_OK, _("OK"), wxDefaultPosition,
            wxDefaultSize, 0 );
    itemBoxSizer16->Add( m_OKButton, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL | wxALL, 5 );
    m_OKButton->SetDefault();

    //      To correct a bug in MSW commctl32, we need to catch column width drag events, and do a Refresh()
    //      Otherwise, the column heading disappear.....
    //      Does no harm for GTK builds, so no need for conditional
    Connect( wxEVT_COMMAND_LIST_COL_END_DRAG,
            (wxObjectEventFunction) (wxEventFunction) &PathProp::OnEvtColDragEnd );


    //      Create the list control
    m_opList = new wxListCtrl( itemDialog1, ID_PATHPROP_LISTCTRL, wxDefaultPosition, wxSize( 800, 200 ),
            wxLC_REPORT | wxLC_HRULES | wxLC_VRULES | wxLC_EDIT_LABELS );

    int char_size = GetCharWidth();

    m_opList->InsertColumn( 0, _("Leg"), wxLIST_FORMAT_LEFT, char_size * 6 );
    m_opList->InsertColumn( 1, _("To Point"), wxLIST_FORMAT_LEFT, char_size * 14 );
    m_opList->InsertColumn( 2, _("Distance"), wxLIST_FORMAT_RIGHT, char_size * 9 );

    if(g_bShowMag)
        m_opList->InsertColumn( 3, _("Bearing (M)"), wxLIST_FORMAT_LEFT, char_size * 10 );
    else
        m_opList->InsertColumn( 3, _("Bearing"), wxLIST_FORMAT_LEFT, char_size * 10 );

    m_opList->InsertColumn( 4, _("Latitude"), wxLIST_FORMAT_LEFT, char_size * 11 );
    m_opList->InsertColumn( 5, _("Longitude"), wxLIST_FORMAT_LEFT, char_size * 11 );
    m_opList->InsertColumn( 6, _("Next tide event"), wxLIST_FORMAT_LEFT, char_size * 11 );
    if(g_bShowMag)
        m_opList->InsertColumn( 7, _("Course (M)"), wxLIST_FORMAT_LEFT, char_size * 10 );
    else
        m_opList->InsertColumn( 7, _("Course"), wxLIST_FORMAT_LEFT, char_size * 10 );
    m_opList->InsertColumn( 8, _("Description"), wxLIST_FORMAT_LEFT, char_size * 11 );
    //    m_opList->Hide();

    m_pListSizer->Add( m_opList, 2, wxEXPAND | wxALL, 5 );

    //Set the maximum size of the entire  dialog
    int width, height;
    ::wxDisplaySize( &width, &height );
    SetSizeHints( -1, -1, width-100, height-100 );
    
    Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,
            wxListEventHandler(PathProp::OnPathPropRightClick), NULL, this );
    Connect( wxEVT_COMMAND_MENU_SELECTED,
            wxCommandEventHandler(PathProp::OnPathPropMenuSelected), NULL, this );
    Connect( wxEVT_LIST_ITEM_ACTIVATED,
             wxListEventHandler(PathProp::OnPathPropDoubleClick), NULL, this );
    
    //  Fetch any config file values

/*    if( g_StartTimeTZ == 0 )
        m_prb_tzUTC->SetValue( true);
    else if( g_StartTimeTZ == 1 )
        m_prb_tzLocal->SetValue( true);
    else if( g_StartTimeTZ == 2 )
        m_prb_tzLMT->SetValue( true);
*/    

    SetColorScheme( (ColorScheme) 0 );

    
}
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );

	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );

	wxBoxSizer* upperSizer;
	upperSizer = new wxBoxSizer( wxHORIZONTAL );

	wxStaticBoxSizer* optionsSizer;
	optionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Component") ), wxVERTICAL );

	m_staticTextUnit = new wxStaticText( optionsSizer->GetStaticBox(), wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextUnit->Wrap( -1 );
	optionsSizer->Add( m_staticTextUnit, 0, wxTOP|wxRIGHT|wxLEFT, 5 );

	wxArrayString unitChoiceChoices;
	unitChoice = new wxChoice( optionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, unitChoiceChoices, 0 );
	unitChoice->SetSelection( 0 );
	optionsSizer->Add( unitChoice, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );

	wxBoxSizer* bSizerUnitsInterchangeable;
	bSizerUnitsInterchangeable = new wxBoxSizer( wxHORIZONTAL );

	unitsInterchageableText = new wxStaticText( optionsSizer->GetStaticBox(), wxID_ANY, _("Units are interchangeable:"), wxDefaultPosition, wxDefaultSize, 0 );
	unitsInterchageableText->Wrap( -1 );
	bSizerUnitsInterchangeable->Add( unitsInterchageableText, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );

	unitsInterchageableLabel = new wxStaticText( optionsSizer->GetStaticBox(), wxID_ANY, _("Yes"), wxDefaultPosition, wxDefaultSize, 0 );
	unitsInterchageableLabel->Wrap( -1 );
	bSizerUnitsInterchangeable->Add( unitsInterchageableLabel, 0, wxALL, 5 );


	optionsSizer->Add( bSizerUnitsInterchangeable, 0, wxEXPAND, 5 );

	wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") };
	int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString );
	orientationRadioBox = new wxRadioBox( optionsSizer->GetStaticBox(), wxID_ANY, _("Orientation (Degrees)"), wxDefaultPosition, wxDefaultSize, orientationRadioBoxNChoices, orientationRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
	orientationRadioBox->SetSelection( 0 );
	orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") );

	optionsSizer->Add( orientationRadioBox, 0, wxEXPAND|wxALL, 5 );

	wxString mirrorRadioBoxChoices[] = { _("Normal"), _("Mirror ---"), _("Mirror |") };
	int mirrorRadioBoxNChoices = sizeof( mirrorRadioBoxChoices ) / sizeof( wxString );
	mirrorRadioBox = new wxRadioBox( optionsSizer->GetStaticBox(), wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, mirrorRadioBoxNChoices, mirrorRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
	mirrorRadioBox->SetSelection( 0 );
	mirrorRadioBox->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );

	optionsSizer->Add( mirrorRadioBox, 0, wxALL|wxEXPAND, 5 );

	convertCheckBox = new wxCheckBox( optionsSizer->GetStaticBox(), wxID_ANY, _("Converted Shape"), wxDefaultPosition, wxDefaultSize, 0 );
	convertCheckBox->SetToolTip( _("Use the alternate shape of this component.\nFor gates, this is the \"De Morgan\" conversion") );

	optionsSizer->Add( convertCheckBox, 0, wxALL, 5 );

	wxStaticBoxSizer* sbSizerChipName;
	sbSizerChipName = new wxStaticBoxSizer( new wxStaticBox( optionsSizer->GetStaticBox(), wxID_ANY, _("Chip Name") ), wxVERTICAL );

	chipnameTextCtrl = new wxTextCtrl( sbSizerChipName->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	chipnameTextCtrl->SetToolTip( _("The name of the symbol in the library from which this component came") );

	sbSizerChipName->Add( chipnameTextCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );

	wxBoxSizer* bSizerChpinameButt;
	bSizerChpinameButt = new wxBoxSizer( wxHORIZONTAL );

	m_buttonTestChipName = new wxButton( sbSizerChipName->GetStaticBox(), wxID_ANY, _("Test"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerChpinameButt->Add( m_buttonTestChipName, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );

	m_buttonSelectChipName = new wxButton( sbSizerChipName->GetStaticBox(), wxID_ANY, _("Select"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerChpinameButt->Add( m_buttonSelectChipName, 0, wxTOP|wxBOTTOM, 5 );


	sbSizerChipName->Add( bSizerChpinameButt, 1, wxEXPAND, 5 );


	optionsSizer->Add( sbSizerChipName, 0, wxEXPAND|wxALL, 5 );

	m_staticTextTimeStamp = new wxStaticText( optionsSizer->GetStaticBox(), wxID_ANY, _("Timestamp"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextTimeStamp->Wrap( -1 );
	optionsSizer->Add( m_staticTextTimeStamp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );

	m_textCtrlTimeStamp = new wxTextCtrl( optionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	m_textCtrlTimeStamp->SetToolTip( _("An unique ID (a time stamp) to identify the component.\nThis is an alternate identifier to the reference.") );

	optionsSizer->Add( m_textCtrlTimeStamp, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );

	m_staticline1 = new wxStaticLine( optionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	optionsSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
	spiceFieldsButton = new wxButton( optionsSizer->GetStaticBox(), wxID_ANY, _("Edit Spice model"), wxDefaultPosition, wxDefaultSize, 0 );
	optionsSizer->Add( spiceFieldsButton, 0, wxALL|wxEXPAND, 5 );

	defaultsButton = new wxButton( optionsSizer->GetStaticBox(), wxID_ANY, _("Reset to Library Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
	defaultsButton->SetToolTip( _("Set position and style of fields and component orientation  to default lib value.\nFields texts are not modified.") );

	optionsSizer->Add( defaultsButton, 0, wxALL|wxEXPAND, 5 );


	upperSizer->Add( optionsSizer, 0, wxEXPAND|wxALL, 5 );

	wxStaticBoxSizer* fieldsSizer;
	fieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxHORIZONTAL );

	wxStaticBoxSizer* gridStaticBoxSizer;
	gridStaticBoxSizer = new wxStaticBoxSizer( new wxStaticBox( fieldsSizer->GetStaticBox(), wxID_ANY, wxEmptyString ), wxVERTICAL );

	fieldListCtrl = new wxListCtrl( gridStaticBoxSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES );
	fieldListCtrl->SetMinSize( wxSize( 220,-1 ) );

	gridStaticBoxSizer->Add( fieldListCtrl, 1, wxALL|wxEXPAND, 8 );

	addFieldButton = new wxButton( gridStaticBoxSizer->GetStaticBox(), wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 );
	addFieldButton->SetToolTip( _("Add a new custom field") );

	gridStaticBoxSizer->Add( addFieldButton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );

	deleteFieldButton = new wxButton( gridStaticBoxSizer->GetStaticBox(), wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 );
	deleteFieldButton->SetToolTip( _("Delete one of the optional fields") );

	gridStaticBoxSizer->Add( deleteFieldButton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );

	moveUpButton = new wxButton( gridStaticBoxSizer->GetStaticBox(), wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
	moveUpButton->SetToolTip( _("Move the selected optional fields up one position") );

	gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 );


	fieldsSizer->Add( gridStaticBoxSizer, 3, wxEXPAND|wxRIGHT|wxLEFT, 8 );

	wxBoxSizer* fieldEditBoxSizer;
	fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );

	wxBoxSizer* bSizerJustification;
	bSizerJustification = new wxBoxSizer( wxHORIZONTAL );

	wxString m_FieldHJustifyCtrlChoices[] = { _("Left"), _("Center"), _("Right") };
	int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString );
	m_FieldHJustifyCtrl = new wxRadioBox( fieldsSizer->GetStaticBox(), wxID_ANY, _("Horiz. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
	m_FieldHJustifyCtrl->SetSelection( 2 );
	bSizerJustification->Add( m_FieldHJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );

	wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") };
	int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
	m_FieldVJustifyCtrl = new wxRadioBox( fieldsSizer->GetStaticBox(), wxID_ANY, _("Vert. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
	m_FieldVJustifyCtrl->SetSelection( 2 );
	bSizerJustification->Add( m_FieldVJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );


	fieldEditBoxSizer->Add( bSizerJustification, 1, wxEXPAND|wxBOTTOM, 5 );

	wxBoxSizer* bSizerStyle;
	bSizerStyle = new wxBoxSizer( wxHORIZONTAL );

	wxStaticBoxSizer* visibilitySizer;
	visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( fieldsSizer->GetStaticBox(), wxID_ANY, _("Visibility") ), wxVERTICAL );

	showCheckBox = new wxCheckBox( visibilitySizer->GetStaticBox(), wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 );
	showCheckBox->SetToolTip( _("Check if you want this field visible") );

	visibilitySizer->Add( showCheckBox, 0, wxALL, 5 );

	rotateCheckBox = new wxCheckBox( visibilitySizer->GetStaticBox(), wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
	rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") );

	visibilitySizer->Add( rotateCheckBox, 0, wxALL, 5 );


	bSizerStyle->Add( visibilitySizer, 1, wxEXPAND|wxALL, 5 );

	wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
	int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString );
	m_StyleRadioBox = new wxRadioBox( fieldsSizer->GetStaticBox(), wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
	m_StyleRadioBox->SetSelection( 3 );
	m_StyleRadioBox->SetToolTip( _("The style of the currently selected field's text in the schematic") );

	bSizerStyle->Add( m_StyleRadioBox, 1, wxEXPAND|wxALL, 5 );


	fieldEditBoxSizer->Add( bSizerStyle, 1, wxEXPAND|wxBOTTOM, 5 );

	wxBoxSizer* fieldNameBoxSizer;
	fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );

	fieldNameLabel = new wxStaticText( fieldsSizer->GetStaticBox(), wxID_ANY, _("Field Name"), wxDefaultPosition, wxDefaultSize, 0 );
	fieldNameLabel->Wrap( -1 );
	fieldNameBoxSizer->Add( fieldNameLabel, 0, wxTOP, 5 );

	fieldNameTextCtrl = new wxTextCtrl( fieldsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fieldNameTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );

	fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 );

	fieldValueLabel = new wxStaticText( fieldsSizer->GetStaticBox(), wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
	fieldValueLabel->Wrap( -1 );
	fieldNameBoxSizer->Add( fieldValueLabel, 0, wxALIGN_TOP|wxTOP, 5 );

	fieldValueTextCtrl = new wxTextCtrl( fieldsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fieldValueTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );

	fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND|wxBOTTOM, 5 );

	m_show_datasheet_button = new wxButton( fieldsSizer->GetStaticBox(), wxID_ANY, _("Show in Browser"), wxDefaultPosition, wxDefaultSize, 0 );
	m_show_datasheet_button->SetToolTip( _("If your datasheet is an http:// link or a complete file path, then it may show in your browser by pressing this button.") );

	fieldNameBoxSizer->Add( m_show_datasheet_button, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );


	fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxBOTTOM|wxEXPAND, 5 );

	wxFlexGridSizer* fgSizerPosSize;
	fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 );
	fgSizerPosSize->AddGrowableCol( 1 );
	fgSizerPosSize->SetFlexibleDirection( wxBOTH );
	fgSizerPosSize->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );

	textSizeLabel = new wxStaticText( fieldsSizer->GetStaticBox(), wxID_ANY, _("Size"), wxDefaultPosition, wxDefaultSize, 0 );
	textSizeLabel->Wrap( -1 );
	fgSizerPosSize->Add( textSizeLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );

	textSizeTextCtrl = new wxTextCtrl( fieldsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	textSizeTextCtrl->SetToolTip( _("The size of the currently selected field's text in the schematic") );

	fgSizerPosSize->Add( textSizeTextCtrl, 0, wxEXPAND|wxBOTTOM, 5 );

	m_staticTextUnitSize = new wxStaticText( fieldsSizer->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextUnitSize->Wrap( -1 );
	fgSizerPosSize->Add( m_staticTextUnitSize, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );

	posXLabel = new wxStaticText( fieldsSizer->GetStaticBox(), wxID_ANY, _("PosX"), wxDefaultPosition, wxDefaultSize, 0 );
	posXLabel->Wrap( -1 );
	fgSizerPosSize->Add( posXLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );

	posXTextCtrl = new wxTextCtrl( fieldsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	posXTextCtrl->SetToolTip( _("The X coordinate of the text relative to the component") );

	fgSizerPosSize->Add( posXTextCtrl, 0, wxEXPAND|wxTOP, 5 );

	m_staticTextUnitPosX = new wxStaticText( fieldsSizer->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextUnitPosX->Wrap( -1 );
	fgSizerPosSize->Add( m_staticTextUnitPosX, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );

	posYLabel = new wxStaticText( fieldsSizer->GetStaticBox(), wxID_ANY, _("PosY"), wxDefaultPosition, wxDefaultSize, 0 );
	posYLabel->Wrap( -1 );
	fgSizerPosSize->Add( posYLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );

	posYTextCtrl = new wxTextCtrl( fieldsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") );

	fgSizerPosSize->Add( posYTextCtrl, 0, wxEXPAND, 5 );

	m_staticTextUnitPosY = new wxStaticText( fieldsSizer->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextUnitPosY->Wrap( -1 );
	fgSizerPosSize->Add( m_staticTextUnitPosY, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );


	fieldEditBoxSizer->Add( fgSizerPosSize, 1, wxEXPAND|wxTOP, 5 );


	fieldsSizer->Add( fieldEditBoxSizer, 2, wxEXPAND, 5 );


	upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 );


	mainSizer->Add( upperSizer, 1, wxEXPAND, 5 );

	stdDialogButtonSizer = new wxStdDialogButtonSizer();
	stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
	stdDialogButtonSizer->AddButton( stdDialogButtonSizerOK );
	stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
	stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel );
	stdDialogButtonSizer->Realize();

	mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 5 );


	this->SetSizer( mainSizer );
	this->Layout();

	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCloseDialog ) );
	this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnInitDlg ) );
	m_buttonTestChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnTestChipName ), NULL, this );
	m_buttonSelectChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnSelectChipName ), NULL, this );
	spiceFieldsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::EditSpiceModel ), NULL, this );
	defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
	fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemDeselected ), NULL, this );
	fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemSelected ), NULL, this );
	addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this );
	deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this );
	moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this );
	m_show_datasheet_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::showButtonHandler ), NULL, this );
	stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this );
	stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this );
}
Example #21
0
CommonPanel::CommonPanel( wxWindow* parent, int id, wxPoint pos, wxSize size, int style ) : wxPanel( parent, id, pos, size, style )
{
	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer1->SetFlexibleDirection( wxBOTH );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
	
	m_button1 = new wxButton( this, ID_BUTTON, wxT("MyButton"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_button1, 0, wxALL, 5 );
	
	m_bpButton1 = new wxBitmapButton( this, ID_BITMAP_BUTTON, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	fgSizer1->Add( m_bpButton1, 0, wxALL, 5 );
	
	m_textCtrl1 = new wxTextCtrl( this, ID_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_textCtrl1, 0, wxALL, 5 );
	
	m_comboBox1 = new wxComboBox( this, ID_COMBOBOX, wxT("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	fgSizer1->Add( m_comboBox1, 0, wxALL, 5 );
	
	wxArrayString m_choice1Choices;
	m_choice1 = new wxChoice( this, ID_CHOICE, wxDefaultPosition, wxDefaultSize, m_choice1Choices, 0 );
	fgSizer1->Add( m_choice1, 0, wxALL, 5 );
	
	m_listBox1 = new wxListBox( this, ID_LISTBOX, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	fgSizer1->Add( m_listBox1, 0, wxALL, 5 );
	
	m_listCtrl1 = new wxListCtrl( this, ID_LIST_CTRL, wxDefaultPosition, wxDefaultSize, wxLC_ICON );
	fgSizer1->Add( m_listCtrl1, 0, wxALL, 5 );
	
	m_checkBox1 = new wxCheckBox( this, ID_CHECKBOX, wxT("Check Me!"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer1->Add( m_checkBox1, 0, wxALL, 5 );
	
	wxString m_radioBox1Choices[] = { wxT("Radio Button") };
	int m_radioBox1NChoices = sizeof( m_radioBox1Choices ) / sizeof( wxString );
	m_radioBox1 = new wxRadioBox( this, ID_RADIOBOX, wxT("wxRadioBox"), wxDefaultPosition, wxDefaultSize, m_radioBox1NChoices, m_radioBox1Choices, 1, wxRA_SPECIFY_COLS );
	m_radioBox1->SetSelection( 0 );
	fgSizer1->Add( m_radioBox1, 0, wxALL, 5 );
	
	m_slider1 = new wxSlider( this, ID_SLIDER, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL );
	fgSizer1->Add( m_slider1, 0, wxALL, 5 );
	
	m_grid1 = new wxGrid( this, ID_GRID, wxDefaultPosition, wxDefaultSize, 0 );
	
	// Grid
	m_grid1->CreateGrid( 2, 2 );
	m_grid1->EnableEditing( true );
	m_grid1->EnableGridLines( true );
	m_grid1->EnableDragGridSize( false );
	m_grid1->SetMargins( 0, 0 );
	
	// Columns
	m_grid1->EnableDragColMove( false );
	m_grid1->EnableDragColSize( true );
	m_grid1->SetColLabelSize( 30 );
	m_grid1->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
	
	// Rows
	m_grid1->EnableDragRowSize( true );
	m_grid1->SetRowLabelSize( 80 );
	m_grid1->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
	
	// Label Appearance
	
	// Cell Defaults
	m_grid1->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
	fgSizer1->Add( m_grid1, 0, wxALL, 5 );
	
	this->SetSizer( fgSizer1 );
	this->Layout();
	
	// Connect Events
	m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CommonPanel::OnClick ), NULL, this );
	m_bpButton1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CommonPanel::OnClickBitmap ), NULL, this );
	m_textCtrl1->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CommonPanel::OnText ), NULL, this );
	m_textCtrl1->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( CommonPanel::OnTextEnter ), NULL, this );
	m_textCtrl1->Connect( wxEVT_COMMAND_TEXT_MAXLEN, wxCommandEventHandler( CommonPanel::OnTextMaxLen ), NULL, this );
	m_textCtrl1->Connect( wxEVT_COMMAND_TEXT_URL, wxTextUrlEventHandler( CommonPanel::OnTextURL ), NULL, this );
	m_comboBox1->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( CommonPanel::OnCombobox ), NULL, this );
	m_comboBox1->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( CommonPanel::OnComboText ), NULL, this );
	m_comboBox1->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( CommonPanel::OnComboTextEnter ), NULL, this );
	m_choice1->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( CommonPanel::OnChoice ), NULL, this );
	m_listBox1->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( CommonPanel::OnListBox ), NULL, this );
	m_listBox1->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( CommonPanel::OnListBoxDClick ), NULL, this );
	m_listCtrl1->Connect( wxEVT_COMMAND_LIST_COL_CLICK, wxListEventHandler( CommonPanel::OnListColClick ), NULL, this );
	m_listCtrl1->Connect( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, wxListEventHandler( CommonPanel::OnListDeleteAllItems ), NULL, this );
	m_checkBox1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CommonPanel::OnCheckBox ), NULL, this );
	m_radioBox1->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( CommonPanel::OnRadioBox ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( CommonPanel::OnCommandScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( CommonPanel::OnCommandScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( CommonPanel::OnCommandScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( CommonPanel::OnCommandScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( CommonPanel::OnCommandScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( CommonPanel::OnCommandScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( CommonPanel::OnCommandScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( CommonPanel::OnCommandScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( CommonPanel::OnCommandScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( CommonPanel::OnCommandScrollBottom ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( CommonPanel::OnCommandScrollChanged ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( CommonPanel::OnScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( CommonPanel::OnScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( CommonPanel::OnScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( CommonPanel::OnScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( CommonPanel::OnScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( CommonPanel::OnScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( CommonPanel::OnScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( CommonPanel::OnScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( CommonPanel::OnScroll ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( CommonPanel::OnScrollChanged ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( CommonPanel::OnGridCellClick ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( CommonPanel::OnGridCellDClick ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( CommonPanel::OnGridCellChanged ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( CommonPanel::OnGridCellRightClick ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_CELL_RIGHT_DCLICK, wxGridEventHandler( CommonPanel::OnGridCellRightDClick ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_EDITOR_CREATED, wxGridEditorCreatedEventHandler( CommonPanel::OnGridEditorCreated ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_EDITOR_HIDDEN, wxGridEventHandler( CommonPanel::OnGridEditorHidden ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( CommonPanel::OnGridLabelRightClick ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_LABEL_RIGHT_DCLICK, wxGridEventHandler( CommonPanel::OnGridLabelRightDClick ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_ROW_SIZE, wxGridSizeEventHandler( CommonPanel::OnGridRowSize ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_COL_SIZE, wxGridSizeEventHandler( CommonPanel::OnGridColSize ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( CommonPanel::OnGridEditorShown ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( CommonPanel::OnGridLabelClick ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_LABEL_LEFT_DCLICK, wxGridEventHandler( CommonPanel::OnGridLabelDClick ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( CommonPanel::OnGridRangeSelect ), NULL, this );
	m_grid1->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( CommonPanel::OnGridCellSelected ), NULL, this );
}
Example #22
0
ConnectorSourceDlg::ConnectorSourceDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer17;
	bSizer17 = new wxBoxSizer( wxHORIZONTAL );
	
	m_lcSources = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
	bSizer17->Add( m_lcSources, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer18;
	bSizer18 = new wxBoxSizer( wxVERTICAL );
	
	m_buttonAdd = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer18->Add( m_buttonAdd, 0, wxALL, 5 );
	
	m_buttonRemove = new wxButton( this, wxID_ANY, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonRemove->Enable( false );
	
	bSizer18->Add( m_buttonRemove, 0, wxALL, 5 );
	
	
	bSizer17->Add( bSizer18, 0, wxEXPAND, 5 );
	
	
	bSizer5->Add( bSizer17, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxHORIZONTAL );
	
	sbSizerConnectionProps = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Properties") ), wxVERTICAL );
	
	wxBoxSizer* bSizer15;
	bSizer15 = new wxBoxSizer( wxHORIZONTAL );
	
	m_rbTypeSerial = new wxRadioButton( this, wxID_ANY, _("Serial"), wxDefaultPosition, wxDefaultSize, 0 );
	m_rbTypeSerial->SetValue( true ); 
	bSizer15->Add( m_rbTypeSerial, 0, wxALL, 5 );
	
	m_rbTypeNet = new wxRadioButton( this, wxID_ANY, _("Network"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer15->Add( m_rbTypeNet, 0, wxALL, 5 );
	
	
	sbSizerConnectionProps->Add( bSizer15, 0, wxEXPAND, 0 );
	
	gSizerNetProps = new wxGridSizer( 0, 2, 0, 0 );
	
	m_stNetProto = new wxStaticText( this, wxID_ANY, _("Protocol"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stNetProto->Wrap( -1 );
	gSizerNetProps->Add( m_stNetProto, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer16;
	bSizer16 = new wxBoxSizer( wxHORIZONTAL );
	
	m_rbNetProtoTCP = new wxRadioButton( this, wxID_ANY, _("TCP"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
	bSizer16->Add( m_rbNetProtoTCP, 0, wxALL, 5 );
	
	m_rbNetProtoUDP = new wxRadioButton( this, wxID_ANY, _("UDP"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer16->Add( m_rbNetProtoUDP, 0, wxALL, 5 );
	
	m_rbNetProtoGPSD = new wxRadioButton( this, wxID_ANY, _("GPSD"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer16->Add( m_rbNetProtoGPSD, 0, wxALL, 5 );
	
	
	gSizerNetProps->Add( bSizer16, 1, wxEXPAND, 5 );
	
	m_stNetAddr = new wxStaticText( this, wxID_ANY, _("Address"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stNetAddr->Wrap( -1 );
	gSizerNetProps->Add( m_stNetAddr, 0, wxALL, 5 );
	
	m_tNetAddress = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	gSizerNetProps->Add( m_tNetAddress, 0, wxEXPAND|wxTOP, 5 );
	
	m_stNetPort = new wxStaticText( this, wxID_ANY, _("Port"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stNetPort->Wrap( -1 );
	gSizerNetProps->Add( m_stNetPort, 0, wxALL, 5 );
	
	m_tNetPort = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	gSizerNetProps->Add( m_tNetPort, 1, wxEXPAND|wxTOP, 5 );
	
	
	sbSizerConnectionProps->Add( gSizerNetProps, 0, wxEXPAND, 5 );
	
	gSizerSerProps = new wxGridSizer( 0, 4, 0, 0 );
	
	m_stSerPort = new wxStaticText( this, wxID_ANY, _("Port"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stSerPort->Wrap( -1 );
	gSizerSerProps->Add( m_stSerPort, 0, wxALL, 5 );
	
	m_comboPort = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	gSizerSerProps->Add( m_comboPort, 0, wxEXPAND|wxTOP, 5 );
	
	m_stSerBaudrate = new wxStaticText( this, wxID_ANY, _("Baudrate"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stSerBaudrate->Wrap( -1 );
	gSizerSerProps->Add( m_stSerBaudrate, 0, wxALL, 5 );
	
	wxString m_choiceBaudRateChoices[] = { _("150"), _("300"), _("600"), _("1200"), _("2400"), _("4800"), _("9600"), _("19200"), _("38400"), _("57600"), _("115200"), _("230400"), _("460800"), _("921600") };
	int m_choiceBaudRateNChoices = sizeof( m_choiceBaudRateChoices ) / sizeof( wxString );
	m_choiceBaudRate = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceBaudRateNChoices, m_choiceBaudRateChoices, 0 );
	m_choiceBaudRate->SetSelection( 0 );
	gSizerSerProps->Add( m_choiceBaudRate, 1, wxEXPAND|wxTOP, 5 );
	
	m_stSerDatabits = new wxStaticText( this, wxID_ANY, _("Data bits"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stSerDatabits->Wrap( -1 );
	gSizerSerProps->Add( m_stSerDatabits, 0, wxALL, 5 );
	
	wxString m_choiceDataBitsChoices[] = { _("8"), _("7"), _("6"), _("5") };
	int m_choiceDataBitsNChoices = sizeof( m_choiceDataBitsChoices ) / sizeof( wxString );
	m_choiceDataBits = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDataBitsNChoices, m_choiceDataBitsChoices, 0 );
	m_choiceDataBits->SetSelection( 0 );
	gSizerSerProps->Add( m_choiceDataBits, 0, wxEXPAND|wxTOP, 5 );
	
	m_stSerParity = new wxStaticText( this, wxID_ANY, _("Parity"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stSerParity->Wrap( -1 );
	gSizerSerProps->Add( m_stSerParity, 0, wxALL, 5 );
	
	wxString m_choiceParityChoices[] = { _("None"), _("Odd"), _("Even"), _("Mark"), _("Space") };
	int m_choiceParityNChoices = sizeof( m_choiceParityChoices ) / sizeof( wxString );
	m_choiceParity = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceParityNChoices, m_choiceParityChoices, 0 );
	m_choiceParity->SetSelection( 0 );
	gSizerSerProps->Add( m_choiceParity, 0, wxEXPAND|wxTOP, 5 );
	
	m_stSerStopbits = new wxStaticText( this, wxID_ANY, _("Stop bits"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stSerStopbits->Wrap( -1 );
	gSizerSerProps->Add( m_stSerStopbits, 0, wxALL, 5 );
	
	wxString m_choiceStopBitsChoices[] = { _("1"), _("2") };
	int m_choiceStopBitsNChoices = sizeof( m_choiceStopBitsChoices ) / sizeof( wxString );
	m_choiceStopBits = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceStopBitsNChoices, m_choiceStopBitsChoices, 0 );
	m_choiceStopBits->SetSelection( 0 );
	gSizerSerProps->Add( m_choiceStopBits, 0, wxEXPAND|wxTOP, 5 );
	
	m_cbRtsCts = new wxCheckBox( this, wxID_ANY, _("RTS/CTS"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizerSerProps->Add( m_cbRtsCts, 0, wxALL, 5 );
	
	m_cbXonXoff = new wxCheckBox( this, wxID_ANY, _("Xon/Xoff"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizerSerProps->Add( m_cbXonXoff, 0, wxALL, 5 );
	
	m_stSerEos = new wxStaticText( this, wxID_ANY, _("EOS is"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stSerEos->Wrap( -1 );
	gSizerSerProps->Add( m_stSerEos, 0, wxALL, 5 );
	
	wxString m_choiceEOSChoices[] = { _("<CR><LF>"), _("<LF>"), _("<CR>"), _("<LF><CR>"), _("None") };
	int m_choiceEOSNChoices = sizeof( m_choiceEOSChoices ) / sizeof( wxString );
	m_choiceEOS = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceEOSNChoices, m_choiceEOSChoices, 0 );
	m_choiceEOS->SetSelection( 0 );
	gSizerSerProps->Add( m_choiceEOS, 0, wxEXPAND|wxTOP, 5 );
	
	m_stSerProtocol = new wxStaticText( this, wxID_ANY, _("Protocol"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stSerProtocol->Wrap( -1 );
	gSizerSerProps->Add( m_stSerProtocol, 0, wxALL, 5 );
	
	wxString m_choiceSerialProtocolChoices[] = { _("NMEA 0183"), _("NMEA 2000"), _("Seatalk") };
	int m_choiceSerialProtocolNChoices = sizeof( m_choiceSerialProtocolChoices ) / sizeof( wxString );
	m_choiceSerialProtocol = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceSerialProtocolNChoices, m_choiceSerialProtocolChoices, 0 );
	m_choiceSerialProtocol->SetSelection( 0 );
	m_choiceSerialProtocol->Enable( false );
	
	gSizerSerProps->Add( m_choiceSerialProtocol, 1, wxEXPAND|wxTOP, 5 );
	
	m_cbCheckCRC = new wxCheckBox( this, wxID_ANY, _("Control checksum"), wxDefaultPosition, wxDefaultSize, 0 );
	m_cbCheckCRC->SetValue(true); 
	m_cbCheckCRC->SetToolTip( _("If checked, only the sentences with a valid checksum are passed through") );
	
	gSizerSerProps->Add( m_cbCheckCRC, 0, wxALL, 5 );
	
	m_staticText12 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
	gSizerSerProps->Add( m_staticText12, 0, wxALL, 5 );
	
	m_stPriority = new wxStaticText( this, wxID_ANY, _("Priority"), wxDefaultPosition, wxDefaultSize, 0 );
	m_stPriority->Wrap( -1 );
	gSizerSerProps->Add( m_stPriority, 0, wxALL, 5 );
	
	wxString m_choicePriorityChoices[] = { _("0"), _("1"), _("2"), _("3"), _("4"), _("5"), _("6"), _("7"), _("8"), _("9") };
	int m_choicePriorityNChoices = sizeof( m_choicePriorityChoices ) / sizeof( wxString );
	m_choicePriority = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePriorityNChoices, m_choicePriorityChoices, 0 );
	m_choicePriority->SetSelection( 0 );
	gSizerSerProps->Add( m_choicePriority, 0, wxEXPAND|wxTOP, 5 );
	
	
	sbSizerConnectionProps->Add( gSizerSerProps, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer9;
	bSizer9 = new wxBoxSizer( wxHORIZONTAL );
	
	m_rbIAccept = new wxRadioButton( this, wxID_ANY, _("Accept sentences"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
	bSizer9->Add( m_rbIAccept, 0, wxALL, 5 );
	
	m_rbIIgnore = new wxRadioButton( this, wxID_ANY, _("Ignore sentences"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer9->Add( m_rbIIgnore, 0, wxALL, 5 );
	
	
	sbSizerConnectionProps->Add( bSizer9, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer11;
	bSizer11 = new wxBoxSizer( wxHORIZONTAL );
	
	m_tcInputStc = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	bSizer11->Add( m_tcInputStc, 1, wxALL|wxEXPAND, 5 );
	
	m_btnInputStcList = new wxButton( this, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
	bSizer11->Add( m_btnInputStcList, 0, wxALL, 5 );
	
	
	sbSizerConnectionProps->Add( bSizer11, 0, wxEXPAND, 5 );
	
	m_cbOutput = new wxCheckBox( this, wxID_ANY, _("Output on this port"), wxDefaultPosition, wxDefaultSize, 0 );
	sbSizerConnectionProps->Add( m_cbOutput, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxHORIZONTAL );
	
	m_rbOAccept = new wxRadioButton( this, wxID_ANY, _("Output sentences"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
	bSizer10->Add( m_rbOAccept, 0, wxALL, 5 );
	
	m_rbOIgnore = new wxRadioButton( this, wxID_ANY, _("Ignore sentences"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer10->Add( m_rbOIgnore, 0, wxALL, 5 );
	
	
	sbSizerConnectionProps->Add( bSizer10, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer12;
	bSizer12 = new wxBoxSizer( wxHORIZONTAL );
	
	m_tcOutputStc = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	bSizer12->Add( m_tcOutputStc, 1, wxALL|wxEXPAND, 5 );
	
	m_btnOutputStcList = new wxButton( this, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
	bSizer12->Add( m_btnOutputStcList, 0, wxALL, 5 );
	
	
	sbSizerConnectionProps->Add( bSizer12, 0, wxEXPAND, 5 );
	
	
	bSizer7->Add( sbSizerConnectionProps, 1, wxALL|wxEXPAND, 5 );
	
	
	bSizer5->Add( bSizer7, 1, wxEXPAND, 5 );
	
	
	bSizer4->Add( bSizer5, 1, wxEXPAND, 5 );
	
	m_sdbSizerDlgButtons = new wxStdDialogButtonSizer();
	m_sdbSizerDlgButtonsOK = new wxButton( this, wxID_OK );
	m_sdbSizerDlgButtons->AddButton( m_sdbSizerDlgButtonsOK );
	m_sdbSizerDlgButtonsApply = new wxButton( this, wxID_APPLY );
	m_sdbSizerDlgButtons->AddButton( m_sdbSizerDlgButtonsApply );
	m_sdbSizerDlgButtonsCancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizerDlgButtons->AddButton( m_sdbSizerDlgButtonsCancel );
	m_sdbSizerDlgButtons->Realize();
	
	bSizer4->Add( m_sdbSizerDlgButtons, 0, wxALL|wxEXPAND, 5 );
	
	
	this->SetSizer( bSizer4 );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	m_lcSources->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( ConnectorSourceDlg::OnSelectDatasource ), NULL, this );
	m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConnectorSourceDlg::OnAddClick ), NULL, this );
	m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConnectorSourceDlg::OnRemoveClick ), NULL, this );
	m_rbTypeSerial->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnTypeSerialSelected ), NULL, this );
	m_rbTypeNet->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnTypeNetSelected ), NULL, this );
	m_rbNetProtoTCP->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnNetProtocolSelected ), NULL, this );
	m_rbNetProtoUDP->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnNetProtocolSelected ), NULL, this );
	m_rbNetProtoGPSD->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnNetProtocolSelected ), NULL, this );
	m_choiceBaudRate->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnBaudrateChoice ), NULL, this );
	m_choiceSerialProtocol->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnProtocolChoice ), NULL, this );
	m_cbCheckCRC->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConnectorSourceDlg::OnCrcCheck ), NULL, this );
	m_rbIAccept->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnRbInput ), NULL, this );
	m_rbIIgnore->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnRbInput ), NULL, this );
	m_btnInputStcList->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConnectorSourceDlg::OnBtnIStcs ), NULL, this );
	m_cbOutput->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ConnectorSourceDlg::OnCbOutput ), NULL, this );
	m_rbOAccept->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( ConnectorSourceDlg::OnRbOutput ), NULL, this );
	m_btnOutputStcList->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConnectorSourceDlg::OnBtnOStcs ), NULL, this );
	m_sdbSizerDlgButtonsApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConnectorSourceDlg::OnApplyClick ), NULL, this );
	m_sdbSizerDlgButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConnectorSourceDlg::OnCancelClick ), NULL, this );
	m_sdbSizerDlgButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConnectorSourceDlg::OnOkClick ), NULL, this );
}
AFTrackSelectorDlg::AFTrackSelectorDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxVERTICAL );
	
	m_pwxpnlLogo = new wxPanel( this, ID_LOGO_PANEL, wxDefaultPosition, wxSize( -1,54 ), wxTAB_TRAVERSAL );
	bSizer10->Add( m_pwxpnlLogo, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
	
	m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer10->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
	
	m_panel9 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer22;
	bSizer22 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText12 = new wxStaticText( m_panel9, wxID_ANY, wxT("Step 1: Select Tracks"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
	bSizer22->Add( m_staticText12, 0, wxALL, 5 );
	
	m_panel9->SetSizer( bSizer22 );
	m_panel9->Layout();
	bSizer22->Fit( m_panel9 );
	bSizer10->Add( m_panel9, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer10->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 );
	
	m_panel10 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer12;
	bSizer12 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText8 = new wxStaticText( m_panel10, wxID_ANY, wxT("Selected tracks:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText8->Wrap( -1 );
	bSizer12->Add( m_staticText8, 0, wxALL, 5 );
	
	mAvailableList = new wxListCtrl( m_panel10, ID_AVAIL_TRACKS_LIST, wxDefaultPosition, wxDefaultSize, wxLC_LIST|wxRAISED_BORDER );
	mAvailableList->SetMinSize( wxSize( -1,150 ) );
	
	bSizer12->Add( mAvailableList, 0, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer13;
	bSizer13 = new wxBoxSizer( wxHORIZONTAL );
	
	m_button6 = new wxButton( m_panel10, ID_TO_AUDIO_DATA_BTN, wxT("To Audio Data"), wxDefaultPosition, wxSize( 130,-1 ), 0 );
	m_button6->SetToolTip( wxT("Move selected track(s) to Audio Data list.") );
	
	bSizer13->Add( m_button6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_button5 = new wxButton( m_panel10, ID_TO_IRs_BTN, wxT("To Filters"), wxDefaultPosition, wxSize( 130,-1 ), 0 );
	m_button5->SetToolTip( wxT("Move selected track(s) to Filters list.") );
	
	bSizer13->Add( m_button5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	bSizer12->Add( bSizer13, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_panel10->SetSizer( bSizer12 );
	m_panel10->Layout();
	bSizer12->Fit( m_panel10 );
	bSizer10->Add( m_panel10, 1, wxEXPAND | wxALL, 5 );
	
	m_panel4 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer11;
	bSizer11 = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer16;
	bSizer16 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText11 = new wxStaticText( m_panel4, wxID_ANY, wxT("Audio Datas:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText11->Wrap( -1 );
	bSizer16->Add( m_staticText11, 0, wxALL, 5 );
	
	mAudioDataList = new wxListCtrl( m_panel4, ID_AUDIO_DATA_LIST, wxDefaultPosition, wxDefaultSize, wxLC_LIST|wxRAISED_BORDER );
	mAudioDataList->SetMinSize( wxSize( 120,150 ) );
	
	bSizer16->Add( mAudioDataList, 0, wxALL, 5 );
	
	bSizer11->Add( bSizer16, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer15;
	bSizer15 = new wxBoxSizer( wxVERTICAL );
	
	m_bpButton1 = new wxBitmapButton( m_panel4, ID_MOVE_UP_BTN, wxBitmap( up_xpm ), wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
	m_bpButton1->SetToolTip( wxT("Move selected track up in the list.") );
	
	m_bpButton1->SetToolTip( wxT("Move selected track up in the list.") );
	
	bSizer15->Add( m_bpButton1, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
	
	wxBoxSizer* bSizer191;
	bSizer191 = new wxBoxSizer( wxHORIZONTAL );
	
	m_bpButton2 = new wxBitmapButton( m_panel4, ID_TO_LEFT_BTN, wxBitmap( left_xpm ), wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
	m_bpButton2->SetToolTip( wxT("Move selected track(s) from Filters to Audio Datas list.") );
	
	m_bpButton2->SetToolTip( wxT("Move selected track(s) from Filters to Audio Datas list.") );
	
	bSizer191->Add( m_bpButton2, 0, wxLEFT, 5 );
	
	
	bSizer191->Add( 30, 0, 0, 0, 5 );
	
	m_bpButton3 = new wxBitmapButton( m_panel4, ID_TO_RIGHT_BTN, wxBitmap( right_xpm ), wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
	m_bpButton3->SetToolTip( wxT("Move selected track(s) from Audio Datas to Filters list.") );
	
	m_bpButton3->SetToolTip( wxT("Move selected track(s) from Audio Datas to Filters list.") );
	
	bSizer191->Add( m_bpButton3, 0, wxRIGHT, 5 );
	
	bSizer15->Add( bSizer191, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_bpButton4 = new wxBitmapButton( m_panel4, ID_MOVE_DOWN_BTN, wxBitmap( down_xpm ), wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
	m_bpButton4->SetToolTip( wxT("Move selected track down in the list.") );
	
	m_bpButton4->SetToolTip( wxT("Move selected track down in the list.") );
	
	bSizer15->Add( m_bpButton4, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	
	bSizer15->Add( 0, 10, 0, 0, 5 );
	
	m_button9 = new wxButton( m_panel4, ID_REMOVE_BTN, wxT("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
	m_button9->SetToolTip( wxT("Remove selected track(s) from list.") );
	
	bSizer15->Add( m_button9, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	bSizer11->Add( bSizer15, 0, wxALIGN_BOTTOM, 5 );
	
	wxBoxSizer* bSizer14;
	bSizer14 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText9 = new wxStaticText( m_panel4, wxID_ANY, wxT("Filters (IRs):"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText9->Wrap( -1 );
	bSizer14->Add( m_staticText9, 0, wxALL, 5 );
	
	mFilterList = new wxListCtrl( m_panel4, ID_IR_LIST, wxDefaultPosition, wxDefaultSize, wxLC_LIST|wxRAISED_BORDER );
	mFilterList->SetMinSize( wxSize( 120,150 ) );
	
	bSizer14->Add( mFilterList, 0, wxALL, 5 );
	
	bSizer11->Add( bSizer14, 1, wxEXPAND, 5 );
	
	m_panel4->SetSizer( bSizer11 );
	m_panel4->Layout();
	bSizer11->Fit( m_panel4 );
	bSizer10->Add( m_panel4, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_panel11 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer19;
	bSizer19 = new wxBoxSizer( wxHORIZONTAL );
	
	mMatrixModeCheck = new wxCheckBox( m_panel11, ID_MATRIX_MODE_CHECK, wxT("Force Matrix Mode"), wxDefaultPosition, wxDefaultSize, 0 );
	
	mMatrixModeCheck->Enable( false );
	mMatrixModeCheck->SetToolTip( wxT("When there are M audio data vectors and N filters, with M != N, the matrix convolution product is automatically selected. \nOtherwise, when M = N, a \"row to row\" convolution product is performed, with N output tracks. If this control is checked, then the matrix convolution product is forced. Pay attention: filters tracks must be in \"matrix\" form, so they will be splitted in M \"columns\".") );
	
	bSizer19->Add( mMatrixModeCheck, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	
	bSizer19->Add( 0, 0, 1, wxEXPAND, 5 );
	
	mOneForAllCheck = new wxCheckBox( m_panel11, ID_ONE_FOR_ALL_CHECK, wxT("One for All"), wxDefaultPosition, wxDefaultSize, 0 );
	
	mOneForAllCheck->SetToolTip( wxT("It uses the first filter of the list for each audio data vector (only raw to raw mode).") );
	
	bSizer19->Add( mOneForAllCheck, 0, wxALL, 5 );
	
	m_panel11->SetSizer( bSizer19 );
	m_panel11->Layout();
	bSizer19->Fit( m_panel11 );
	bSizer10->Add( m_panel11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer10->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
	
	m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer18;
	bSizer18 = new wxBoxSizer( wxVERTICAL );
	
	m_panel6 = new wxPanel( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer17;
	bSizer17 = new wxBoxSizer( wxHORIZONTAL );
	
	mHelpBtn = new wxButton( m_panel6, wxID_HELP, wxT("Help"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer17->Add( mHelpBtn, 0, wxALL, 5 );
	
	
	bSizer17->Add( 0, 0, 1, 0, 5 );
	
	mCancelBtn = new wxButton( m_panel6, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer17->Add( mCancelBtn, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	mOkBtn = new wxButton( m_panel6, wxID_OK, wxT("Continue"), wxDefaultPosition, wxDefaultSize, 0 );
	mOkBtn->SetDefault(); 
	mOkBtn->SetToolTip( wxT("Continue to convolution setup dialog.") );
	
	bSizer17->Add( mOkBtn, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_panel6->SetSizer( bSizer17 );
	m_panel6->Layout();
	bSizer17->Fit( m_panel6 );
	bSizer18->Add( m_panel6, 0, wxALL|wxALIGN_RIGHT|wxEXPAND, 5 );
	
	m_panel5->SetSizer( bSizer18 );
	m_panel5->Layout();
	bSizer18->Fit( m_panel5 );
	bSizer10->Add( m_panel5, 0, wxALIGN_RIGHT|wxEXPAND, 5 );
	
	this->SetSizer( bSizer10 );
	this->Layout();
	bSizer10->Fit( this );
	
	// Connect Events
	mAvailableList->Connect( wxEVT_COMMAND_LIST_BEGIN_DRAG, wxListEventHandler( AFTrackSelectorDlg::OnAvailableDragInit ), NULL, this );
	m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::ToAudioDataBtn ), NULL, this );
	m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnToIRsBtn ), NULL, this );
	mAudioDataList->Connect( wxEVT_COMMAND_LIST_BEGIN_DRAG, wxListEventHandler( AFTrackSelectorDlg::OnAudioDataDragInit ), NULL, this );
	m_bpButton1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnMoveUpBtn ), NULL, this );
	m_bpButton2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnToLeftBtn ), NULL, this );
	m_bpButton3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnToRightBtn ), NULL, this );
	m_bpButton4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnMoveDownBtn ), NULL, this );
	m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnRemoveBtn ), NULL, this );
	mFilterList->Connect( wxEVT_COMMAND_LIST_BEGIN_DRAG, wxListEventHandler( AFTrackSelectorDlg::OnFilterDragInit ), NULL, this );
	mMatrixModeCheck->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnMatrixModeCheck ), NULL, this );
	mOneForAllCheck->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnOneForAllCheck ), NULL, this );
	mHelpBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnHelp ), NULL, this );
	mCancelBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnCancel ), NULL, this );
	mOkBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AFTrackSelectorDlg::OnOK ), NULL, this );
}
Example #24
0
destination::destination( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer23;
	bSizer23 = new wxBoxSizer( wxVERTICAL );
	
	bSizer23->SetMinSize( wxSize( 469,555 ) ); 
	wxBoxSizer* bSizer24;
	bSizer24 = new wxBoxSizer( wxHORIZONTAL );
	
	m_destinationList = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
	m_destinationList->SetMinSize( wxSize( 5,5 ) );
	
	bSizer24->Add( m_destinationList, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer30;
	bSizer30 = new wxBoxSizer( wxVERTICAL );
	
	m_add = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer30->Add( m_add, 0, wxALL, 5 );
	
	m_delete = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer30->Add( m_delete, 0, wxALL, 5 );
	
	m_echo = new wxButton( this, wxID_ANY, _("Echo"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer30->Add( m_echo, 0, wxALL, 5 );
	
	
	bSizer24->Add( bSizer30, 0, wxEXPAND, 5 );
	
	
	bSizer23->Add( bSizer24, 1, wxEXPAND, 5 );
	
	
	bSizer23->Add( 0, 5, 0, wxEXPAND, 5 );
	
	wxFlexGridSizer* fgSizer2;
	fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
	fgSizer2->AddGrowableCol( 1 );
	fgSizer2->SetFlexibleDirection( wxVERTICAL );
	fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText3 = new wxStaticText( this, wxID_ANY, _("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText3->Wrap( -1 );
	fgSizer2->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	wxBoxSizer* bSizer31;
	bSizer31 = new wxBoxSizer( wxHORIZONTAL );
	
	m_name = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer31->Add( m_name, 1, wxALL, 5 );
	
	
	fgSizer2->Add( bSizer31, 1, wxEXPAND, 5 );
	
	m_staticText4 = new wxStaticText( this, wxID_ANY, _("Destination Host:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText4->Wrap( -1 );
	fgSizer2->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	wxBoxSizer* bSizer32;
	bSizer32 = new wxBoxSizer( wxHORIZONTAL );
	
	m_destinationHost = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer32->Add( m_destinationHost, 1, wxALL, 5 );
	
	
	fgSizer2->Add( bSizer32, 1, wxEXPAND, 5 );
	
	m_staticText5 = new wxStaticText( this, wxID_ANY, _("Destination Port:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5->Wrap( -1 );
	fgSizer2->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	wxBoxSizer* bSizer29;
	bSizer29 = new wxBoxSizer( wxHORIZONTAL );
	
	m_destinationPort = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer29->Add( m_destinationPort, 1, wxALL, 5 );
	
	
	fgSizer2->Add( bSizer29, 1, wxEXPAND, 5 );
	
	m_staticText6 = new wxStaticText( this, wxID_ANY, _("Destination AE Title:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText6->Wrap( -1 );
	fgSizer2->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	wxBoxSizer* bSizer33;
	bSizer33 = new wxBoxSizer( wxHORIZONTAL );
	
	m_destinationAETitle = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer33->Add( m_destinationAETitle, 1, wxALL, 5 );
	
	
	fgSizer2->Add( bSizer33, 1, wxEXPAND, 5 );
	
	m_staticText7 = new wxStaticText( this, wxID_ANY, _("Our AE Title:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText7->Wrap( -1 );
	fgSizer2->Add( m_staticText7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	wxBoxSizer* bSizer25;
	bSizer25 = new wxBoxSizer( wxHORIZONTAL );
	
	m_ourAETitle = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	bSizer25->Add( m_ourAETitle, 1, wxALL, 5 );
	
	
	fgSizer2->Add( bSizer25, 1, wxEXPAND, 5 );
	
	
	bSizer23->Add( fgSizer2, 0, wxEXPAND, 5 );
	
	
	bSizer23->Add( 0, 5, 0, wxEXPAND, 5 );
	
	m_sdbSizer2 = new wxStdDialogButtonSizer();
	m_sdbSizer2OK = new wxButton( this, wxID_OK );
	m_sdbSizer2->AddButton( m_sdbSizer2OK );
	m_sdbSizer2Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer2->AddButton( m_sdbSizer2Cancel );
	m_sdbSizer2->Realize();
	
	bSizer23->Add( m_sdbSizer2, 0, wxALIGN_LEFT|wxALIGN_TOP|wxBOTTOM|wxEXPAND, 5 );
	
	
	this->SetSizer( bSizer23 );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( destination::OnInitDialog ) );
	m_destinationList->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( destination::OnDeselected ), NULL, this );
	m_destinationList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( destination::OnSelect ), NULL, this );
	m_add->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( destination::OnAdd ), NULL, this );
	m_delete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( destination::OnDelete ), NULL, this );
	m_echo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( destination::OnEcho ), NULL, this );
	m_name->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( destination::OnNameText ), NULL, this );
	m_destinationHost->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( destination::OnDestinationHostText ), NULL, this );
	m_destinationPort->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( destination::OnDestinationPortText ), NULL, this );
	m_destinationAETitle->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( destination::OnDestinationAETitleText ), NULL, this );
	m_ourAETitle->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( destination::OnOurAETitleText ), NULL, this );
	m_sdbSizer2OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( destination::OnOK ), NULL, this );
}
Example #25
0
MacrosBaseDlg::~MacrosBaseDlg()
{
	// Disconnect Events
	m_listCtrlMacros->Disconnect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( MacrosBaseDlg::OnItemRightClick ), NULL, this );
	
}
Example #26
0
mainFrame::mainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
	this->SetExtraStyle( wxWS_EX_VALIDATE_RECURSIVELY );
	this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
	
	wxBoxSizer* bSizer14;
	bSizer14 = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer16;
	bSizer16 = new wxBoxSizer( wxVERTICAL );
	
	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 2, 3, 0, 0 );
	fgSizer1->AddGrowableCol( 1 );
	fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
	
	m_staticText1 = new wxStaticText( this, wxID_ANY, _("Directory:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );
	fgSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	m_directory = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_directory, 1, wxALL|wxEXPAND, 5 );
	
	m_button5 = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_button5, 0, wxALL, 5 );
	
	m_staticText2 = new wxStaticText( this, wxID_ANY, _("Destination:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText2->Wrap( -1 );
	fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	m_destination = new wxComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxCB_READONLY ); 
	fgSizer1->Add( m_destination, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
	
	m_button6 = new wxButton( this, wxID_ANY, _("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_button6, 0, wxALL, 5 );
	
	
	bSizer16->Add( fgSizer1, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer13;
	bSizer13 = new wxBoxSizer( wxHORIZONTAL );
	
	bSizer13->SetMinSize( wxSize( 100,100 ) ); 
	m_patients = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
	m_patients->SetMinSize( wxSize( 200,150 ) );
	
	bSizer13->Add( m_patients, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer15;
	bSizer15 = new wxBoxSizer( wxVERTICAL );
	
	m_studies = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
	m_studies->SetMinSize( wxSize( -1,150 ) );
	
	bSizer15->Add( m_studies, 1, wxALL|wxEXPAND, 5 );
	
	m_series = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
	m_series->SetMinSize( wxSize( -1,150 ) );
	
	bSizer15->Add( m_series, 1, wxALL|wxEXPAND, 5 );
	
	
	bSizer13->Add( bSizer15, 2, wxEXPAND, 5 );
	
	
	bSizer16->Add( bSizer13, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer141;
	bSizer141 = new wxBoxSizer( wxHORIZONTAL );
	
	bSizer141->SetMinSize( wxSize( 100,100 ) ); 
	wxBoxSizer* bSizer30;
	bSizer30 = new wxBoxSizer( wxVERTICAL );
	
	m_preview = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	m_preview->SetMinSize( wxSize( 200,-1 ) );
	
	bSizer30->Add( m_preview, 1, wxALL|wxEXPAND, 5 );
	
	
	bSizer141->Add( bSizer30, 1, wxEXPAND, 5 );
	
	m_instances = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
	m_instances->SetMinSize( wxSize( -1,200 ) );
	
	bSizer141->Add( m_instances, 2, wxALL|wxEXPAND, 5 );
	
	
	bSizer16->Add( bSizer141, 2, wxEXPAND, 5 );
	
	
	bSizer14->Add( bSizer16, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
	
	wxBoxSizer* bSizer17;
	bSizer17 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer161;
	bSizer161 = new wxBoxSizer( wxVERTICAL );
	
	m_update = new wxButton( this, wxID_ANY, _("Update"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer161->Add( m_update, 0, wxALL, 5 );
	
	m_send = new wxButton( this, wxID_ANY, _("Send"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer161->Add( m_send, 0, wxALL, 5 );
	
	
	bSizer17->Add( bSizer161, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer191;
	bSizer191 = new wxBoxSizer( wxVERTICAL );
	
	m_panel3 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	bSizer191->Add( m_panel3, 1, wxEXPAND | wxALL, 5 );
	
	
	bSizer17->Add( bSizer191, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer181;
	bSizer181 = new wxBoxSizer( wxVERTICAL );
	
	m_about = new wxButton( this, wxID_ANY, _("About"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer181->Add( m_about, 0, wxALL, 5 );
	
	m_exit = new wxButton( this, wxID_ANY, _("Exit"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer181->Add( m_exit, 0, wxALL|wxBOTTOM, 5 );
	
	
	bSizer17->Add( bSizer181, 0, wxEXPAND, 5 );
	
	
	bSizer14->Add( bSizer17, 0, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 5 );
	
	
	this->SetSizer( bSizer14 );
	this->Layout();
	bSizer14->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( mainFrame::OnBrowse ), NULL, this );
	m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( mainFrame::OnDestinationEdit ), NULL, this );
	m_patients->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( mainFrame::OnPatientsSelected ), NULL, this );
	m_studies->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( mainFrame::OnStudiesSelected ), NULL, this );
	m_series->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( mainFrame::OnSeriesSelected ), NULL, this );
	m_preview->Connect( wxEVT_PAINT, wxPaintEventHandler( mainFrame::OnPaintPreview ), NULL, this );
	m_instances->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( mainFrame::OnInstancesSelected ), NULL, this );
	m_update->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( mainFrame::OnUpdate ), NULL, this );
	m_send->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( mainFrame::OnSend ), NULL, this );
	m_about->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( mainFrame::OnAbout ), NULL, this );
	m_exit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( mainFrame::OnExit ), NULL, this );
}
Example #27
0
InterpreterDisAsmFrame::InterpreterDisAsmFrame(wxWindow* parent)
	: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(500, 700), wxTAB_TRAVERSAL)
	, PC(0)
	, CPU(nullptr)
	, m_item_count(30)
	, decoder(nullptr)
	, disasm(nullptr)
{
	wxBoxSizer& s_p_main = *new wxBoxSizer(wxVERTICAL);
	wxBoxSizer& s_b_main = *new wxBoxSizer(wxHORIZONTAL);

	m_list = new wxListView(this);
	m_choice_units = new wxChoice(this, wxID_ANY);

	wxButton& b_go_to_addr = *new wxButton(this, wxID_ANY, "Go To Address");
	wxButton& b_go_to_pc = *new wxButton(this, wxID_ANY, "Go To PC");

	m_btn_step  = new wxButton(this, wxID_ANY, "Step");
	m_btn_run   = new wxButton(this, wxID_ANY, "Run");
	m_btn_pause = new wxButton(this, wxID_ANY, "Pause");

	s_b_main.Add(&b_go_to_addr,  wxSizerFlags().Border(wxALL, 5));
	s_b_main.Add(&b_go_to_pc,    wxSizerFlags().Border(wxALL, 5));
	s_b_main.Add(m_btn_step,     wxSizerFlags().Border(wxALL, 5));
	s_b_main.Add(m_btn_run,      wxSizerFlags().Border(wxALL, 5));
	s_b_main.Add(m_btn_pause,    wxSizerFlags().Border(wxALL, 5));
	s_b_main.Add(m_choice_units, wxSizerFlags().Border(wxALL, 5));

	//Registers
	m_regs = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
		wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_DONTWRAP|wxNO_BORDER|wxTE_RICH2);
	m_regs->SetEditable(false);

	//Call Stack
	m_calls = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
		wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_DONTWRAP|wxNO_BORDER|wxTE_RICH2);
	m_calls->SetEditable(false);

	m_list ->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
	m_regs ->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
	m_calls->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));

	wxBoxSizer& s_w_list = *new wxBoxSizer(wxHORIZONTAL);
	s_w_list.Add(m_list, 2, wxEXPAND | wxLEFT | wxDOWN, 5);
	s_w_list.Add(m_regs, 1, wxEXPAND | wxRIGHT | wxDOWN, 5);
	s_w_list.Add(m_calls,1, wxEXPAND | wxRIGHT | wxDOWN, 5);

	s_p_main.Add(&s_b_main, 0, wxEXPAND | wxLEFT | wxRIGHT, 5);
	s_p_main.Add(&s_w_list, 1, wxEXPAND | wxDOWN, 5);

	SetSizer(&s_p_main);
	Layout();

	m_list->InsertColumn(0, "ASM");
	for(uint i=0; i<m_item_count; ++i)
	{
		m_list->InsertItem(m_list->GetItemCount(), wxEmptyString);
	}

	Connect(m_regs->GetId(),         wxEVT_COMMAND_TEXT_UPDATED,    wxCommandEventHandler(InterpreterDisAsmFrame::OnUpdate));
	Connect(b_go_to_addr.GetId(),    wxEVT_COMMAND_BUTTON_CLICKED,  wxCommandEventHandler(InterpreterDisAsmFrame::Show_Val));
	Connect(b_go_to_pc.GetId(),      wxEVT_COMMAND_BUTTON_CLICKED,  wxCommandEventHandler(InterpreterDisAsmFrame::Show_PC));
	Connect(m_btn_step->GetId(),     wxEVT_COMMAND_BUTTON_CLICKED,  wxCommandEventHandler(InterpreterDisAsmFrame::DoStep));
	Connect(m_btn_run->GetId(),      wxEVT_COMMAND_BUTTON_CLICKED,  wxCommandEventHandler(InterpreterDisAsmFrame::DoRun));
	Connect(m_btn_pause->GetId(),    wxEVT_COMMAND_BUTTON_CLICKED,  wxCommandEventHandler(InterpreterDisAsmFrame::DoPause));
	Connect(m_list->GetId(),         wxEVT_COMMAND_LIST_KEY_DOWN,   wxListEventHandler(InterpreterDisAsmFrame::InstrKey));
	Connect(m_list->GetId(),         wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(InterpreterDisAsmFrame::DClick));
	Connect(m_choice_units->GetId(), wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(InterpreterDisAsmFrame::OnSelectUnit));
	Connect(wxEVT_SIZE, wxSizeEventHandler(InterpreterDisAsmFrame::OnResize));
	m_app_connector.Connect(m_list->GetId(), wxEVT_MOUSEWHEEL, wxMouseEventHandler(InterpreterDisAsmFrame::MouseWheel), (wxObject*)0, this);
	m_app_connector.Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(InterpreterDisAsmFrame::OnKeyDown), (wxObject*)0, this);
	m_app_connector.Connect(wxEVT_DBG_COMMAND, wxCommandEventHandler(InterpreterDisAsmFrame::HandleCommand), (wxObject*)0, this);

	ShowAddr(CentrePc(PC));
	UpdateUnitList();
}
Example #28
0
void AISTargetListDialog::CreateControls()
{
    wxBoxSizer* topSizer = new wxBoxSizer( wxHORIZONTAL );
    SetSizer( topSizer );
#ifdef __OCPN__ANDROID__
    this->GetHandle()->setStyleSheet( getQtStyleSheet());
#endif    
    
    
    //  Parse the global column width string as read from config file
    wxStringTokenizer tkz( g_AisTargetList_column_spec, _T(";") );
    wxString s_width = tkz.GetNextToken();
    int width;
    long lwidth;
    
    long flags = wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_HRULES | wxLC_VRULES | wxBORDER_SUNKEN;
    #ifndef __WXQT__
    flags |=  wxLC_VIRTUAL;
    #endif
    
    m_pListCtrlAISTargets = new OCPNListCtrl( this, ID_AIS_TARGET_LIST, wxDefaultPosition, wxDefaultSize, flags);
    
    wxImageList *imglist = new wxImageList( 16, 16, true, 2 );
    
    ocpnStyle::Style* style = g_StyleManager->GetCurrentStyle();
    imglist->Add( style->GetIcon( _T("sort_asc") ) );
    imglist->Add( style->GetIcon( _T("sort_desc") ) );
    
    m_pListCtrlAISTargets->AssignImageList( imglist, wxIMAGE_LIST_SMALL );
    m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED,
                                    wxListEventHandler( AISTargetListDialog::OnTargetSelected ), NULL, this );
    m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED,
                                    wxListEventHandler( AISTargetListDialog::OnTargetSelected ), NULL, this );
    m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
                                    wxListEventHandler( AISTargetListDialog::OnTargetDefaultAction ), NULL, this );
    m_pListCtrlAISTargets->Connect( wxEVT_COMMAND_LIST_COL_CLICK,
                                    wxListEventHandler( AISTargetListDialog::OnTargetListColumnClicked ), NULL, this );
    
    int dx = GetCharWidth();
    
    width = dx * 4; 
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlTRK, _("Trk"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 12;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlNAME, _("Name"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 7;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlCALL, _("Call"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 10;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlMMSI, _("MMSI"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 7;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlCLASS, _("Class"), wxLIST_FORMAT_CENTER, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 10;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlTYPE, _("Type"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 12;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlNAVSTATUS, _("Nav Status"), wxLIST_FORMAT_LEFT, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 6;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlBRG, _("Brg"), wxLIST_FORMAT_RIGHT, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 8;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlRNG, _("Range"), wxLIST_FORMAT_RIGHT, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 6;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlCOG, _("CoG"), wxLIST_FORMAT_RIGHT, width );
    s_width = tkz.GetNextToken();
    
    width = dx * 6;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlSOG, _("SoG"), wxLIST_FORMAT_RIGHT, width );
    
    width = dx * 7;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlCPA, _("CPA"), wxLIST_FORMAT_RIGHT, width );
    
    width = dx * 8;
    if( s_width.ToLong( &lwidth ) ) {
        width = wxMax(dx * 2, lwidth);
        width = wxMin(width, dx * 30);
    }
    m_pListCtrlAISTargets->InsertColumn( tlTCPA, _("TCPA"), wxLIST_FORMAT_RIGHT, width );
    wxListItem item;
    item.SetMask( wxLIST_MASK_IMAGE );
    item.SetImage( g_bAisTargetList_sortReverse ? 1 : 0 );
    g_AisTargetList_sortColumn = wxMax(g_AisTargetList_sortColumn, 0);
    m_pListCtrlAISTargets->SetColumn( g_AisTargetList_sortColumn, item );
    
    topSizer->Add( m_pListCtrlAISTargets, 1, wxEXPAND | wxALL, 0 );
    
    wxBoxSizer* boxSizer02 = new wxBoxSizer( wxVERTICAL );
    boxSizer02->AddSpacer( 22 );
    topSizer->Add( boxSizer02, 0, wxEXPAND | wxALL, 2 );
    
    wxScrolledWindow *winr = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
                                                   wxNO_BORDER | wxTAB_TRAVERSAL | wxVSCROLL);
    winr->SetScrollRate(0,5);
    
    boxSizer02->Add( winr, 1, wxALL | wxEXPAND, 3 );
    
    wxBoxSizer *bsRouteButtonsInner = new wxBoxSizer( wxVERTICAL );
    winr->SetSizer(bsRouteButtonsInner);
    
    m_pButtonInfo = new wxButton( winr, wxID_ANY, _("Target info"), wxDefaultPosition,
                                  wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonInfo->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
                            wxCommandEventHandler( AISTargetListDialog::OnTargetQuery ), NULL, this );
    bsRouteButtonsInner->Add( m_pButtonInfo, 0, wxEXPAND | wxALL, 0 );
    bsRouteButtonsInner->AddSpacer( 5 );
    
    m_pButtonJumpTo = new wxButton( winr, wxID_ANY, _("Center View"), wxDefaultPosition,
                                    wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonJumpTo->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
                              wxCommandEventHandler( AISTargetListDialog::OnTargetScrollTo ), NULL, this );
    bsRouteButtonsInner->Add( m_pButtonJumpTo, 0, wxEXPAND | wxALL, 0 );
    
    m_pButtonCreateWpt = new wxButton( winr, wxID_ANY, _("Create WPT"), wxDefaultPosition,
                                       wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonCreateWpt->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
                                 wxCommandEventHandler( AISTargetListDialog::OnTargetCreateWpt ), NULL, this );
    bsRouteButtonsInner->Add( m_pButtonCreateWpt, 0, wxEXPAND | wxALL, 0 );
    
    m_pButtonHideAllTracks = new wxButton( winr, wxID_ANY, _("Hide All Tracks"), wxDefaultPosition,
                                           wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonHideAllTracks->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
                                     wxCommandEventHandler( AISTargetListDialog::OnHideAllTracks ), NULL, this );
    bsRouteButtonsInner->Add( m_pButtonHideAllTracks, 0, wxEXPAND | wxALL, 0 );
    
    m_pButtonShowAllTracks = new wxButton( winr, wxID_ANY, _("Show All Tracks"), wxDefaultPosition,
                                           wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonShowAllTracks->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
                                     wxCommandEventHandler( AISTargetListDialog::OnShowAllTracks ), NULL, this );
    bsRouteButtonsInner->Add( m_pButtonShowAllTracks, 0, wxEXPAND | wxALL, 0 );
    
    m_pButtonToggleTrack = new wxButton( winr, wxID_ANY, _("Toggle track"), wxDefaultPosition,
                                         wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonToggleTrack->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
                                   wxCommandEventHandler( AISTargetListDialog::OnToggleTrack ), NULL, this );
    bsRouteButtonsInner->Add( m_pButtonToggleTrack, 0, wxEXPAND | wxALL, 0 );
    
    m_pCBAutosort = new wxCheckBox( winr, wxID_ANY, _("AutoSort"), wxDefaultPosition,
                                    wxDefaultSize, wxBU_AUTODRAW );
    m_pCBAutosort->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED,
                            wxCommandEventHandler( AISTargetListDialog::OnAutosortCB ), NULL, this );
    bsRouteButtonsInner->Add( m_pCBAutosort, 0, wxEXPAND | wxALL, 0 );
    g_bAisTargetList_autosort = true;
    m_pCBAutosort->SetValue(g_bAisTargetList_autosort);
    
    bsRouteButtonsInner->AddSpacer( 10 );
    
    m_pStaticTextRange = new wxStaticText( winr, wxID_ANY, _("Limit range: NM"), wxDefaultPosition,
                                           wxDefaultSize, 0 );
    bsRouteButtonsInner->Add( m_pStaticTextRange, 0, wxALL, 0 );
    bsRouteButtonsInner->AddSpacer( 2 );
    m_pSpinCtrlRange = new wxSpinCtrl( winr, wxID_ANY, wxEmptyString, wxDefaultPosition,
                                       wxSize( 50, -1 ), wxSP_ARROW_KEYS, 1, 20000, g_AisTargetList_range );
    m_pSpinCtrlRange->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED,
                               wxCommandEventHandler( AISTargetListDialog::OnLimitRange ), NULL, this );
    m_pSpinCtrlRange->Connect( wxEVT_COMMAND_TEXT_UPDATED,
                               wxCommandEventHandler( AISTargetListDialog::OnLimitRange ), NULL, this );
    bsRouteButtonsInner->Add( m_pSpinCtrlRange, 0, wxEXPAND | wxALL, 0 );
    
    bsRouteButtonsInner->AddSpacer( 10 );
    m_pStaticTextCount = new wxStaticText( winr, wxID_ANY, _("Target Count"), wxDefaultPosition,
                                           wxDefaultSize, 0 );
    bsRouteButtonsInner->Add( m_pStaticTextCount, 0, wxALL, 0 );
    
    bsRouteButtonsInner->AddSpacer( 2 );
    m_pTextTargetCount = new wxTextCtrl( winr, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize,
                                         wxTE_READONLY );
    bsRouteButtonsInner->Add( m_pTextTargetCount, 0, wxALL, 0 );
    
    bsRouteButtonsInner->AddSpacer( 10 );
    m_pButtonOK = new wxButton( winr, wxID_ANY, _("Close"), wxDefaultPosition,
                                wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
                          wxCommandEventHandler( AISTargetListDialog::OnCloseButton ), NULL, this );
    bsRouteButtonsInner->Add( m_pButtonOK, 0, wxEXPAND | wxALL, 0 );
    
    topSizer->Layout();
    
    //    This is silly, but seems to be required for __WXMSW__ build
    //    If not done, the SECOND invocation of AISTargetList fails to expand the list to the full wxSizer size....
    SetSize( GetSize().x, GetSize().y - 1 );
    
}
Example #29
0
CompilerMainPageBase::~CompilerMainPageBase()
{
    m_button222->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnAddCompilers), NULL, this);
    m_listBoxCompilers->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(CompilerMainPageBase::OnCompilerSelected), NULL, this);
    m_listBoxCompilers->Disconnect(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(CompilerMainPageBase::OnContextMenu), NULL, this);
    m_pgMgrTools->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnCustomEditorButtonClicked), NULL, this);
    m_pgMgrTools->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CompilerMainPageBase::OnValueChanged), NULL, this);
    m_listErrPatterns->Disconnect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnErrItemActivated), NULL, this);
    m_btnAddErrPattern->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnAddErrPattern), NULL, this);
    m_btnDelErrPattern->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnDelErrPattern), NULL, this);
    m_btnDelErrPattern->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CompilerMainPageBase::OnErrorPatternSelectedUI), NULL, this);
    m_btnUpdateErrPattern->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnUpdateErrPattern), NULL, this);
    m_btnUpdateErrPattern->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CompilerMainPageBase::OnErrorPatternSelectedUI), NULL, this);
    m_listWarnPatterns->Disconnect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnWarnItemActivated), NULL, this);
    m_btnAddWarnPattern->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnAddWarnPattern), NULL, this);
    m_btnDelWarnPattern->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnDelWarnPattern), NULL, this);
    m_btnDelWarnPattern->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CompilerMainPageBase::OnWarningPatternSelectedUI), NULL, this);
    m_btnUpdateWarnPattern->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnBtnUpdateWarnPattern), NULL, this);
    m_btnUpdateWarnPattern->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CompilerMainPageBase::OnWarningPatternSelectedUI), NULL, this);
    m_listCompilerOptions->Disconnect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnCompilerOptionActivated), NULL, this);
    m_listCompilerOptions->Disconnect(wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler(CompilerMainPageBase::OnCompilerOptionDeSelected), NULL, this);
    m_listCompilerOptions->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(CompilerMainPageBase::OnCompilerOptionSelected), NULL, this);
    m_buttonCompilerOption->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnNewCompilerOption), NULL, this);
    m_buttonDeleteCompilerOption->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnDeleteCompilerOption), NULL, this);
    m_listLinkerOptions->Disconnect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnLinkerOptionActivated), NULL, this);
    m_listLinkerOptions->Disconnect(wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler(CompilerMainPageBase::OnLinkerOptionDeSelected), NULL, this);
    m_listLinkerOptions->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(CompilerMainPageBase::OnLinkerOptionSelected), NULL, this);
    m_buttonLinkerOption->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnNewLinkerOption), NULL, this);
    m_buttonDeleteLinkerOption->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnDeleteLinkerOption), NULL, this);
    m_listSwitches->Disconnect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnItemActivated), NULL, this);
    m_listSwitches->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(CompilerMainPageBase::OnItemSelected), NULL, this);
    m_listCtrlFileTypes->Disconnect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(CompilerMainPageBase::OnFileTypeActivated), NULL, this);
    m_listCtrlFileTypes->Disconnect(wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler(CompilerMainPageBase::OnFileTypeDeSelected), NULL, this);
    m_listCtrlFileTypes->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(CompilerMainPageBase::OnFileTypeSelected), NULL, this);
    m_buttonNewFileType->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnNewFileType), NULL, this);
    m_buttonDeleteFileType->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnDeleteFileType), NULL, this);
    m_button67->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnEditIncludePaths), NULL, this);
    m_button69->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CompilerMainPageBase::OnEditLibraryPaths), NULL, this);
    
}
ThreadListBasePanel::~ThreadListBasePanel()
{
	// Disconnect Events
	m_list->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( ThreadListBasePanel::OnItemActivated ), NULL, this );
	
}