Пример #1
0
	MvcBookImpl(wxWindow* p,int id,WndManager& app_):wxAuiNotebook(p,id),wm(app_)
	{
		this->Connect(id,wxEVT_AUINOTEBOOK_PAGE_CHANGING,wxAuiNotebookEventHandler(MvcBookImpl::OnCanvasChanging));
		this->Connect(id,wxEVT_AUINOTEBOOK_PAGE_CHANGED,wxAuiNotebookEventHandler(MvcBookImpl::OnCanvasChanged));
		this->Connect(id,wxEVT_AUINOTEBOOK_PAGE_CLOSE,wxAuiNotebookEventHandler(MvcBookImpl::OnCanvasClosing));
		this->Connect(id,wxEVT_AUINOTEBOOK_PAGE_CLOSED,wxAuiNotebookEventHandler(MvcBookImpl::OnCanvasClosed));
		this->Connect(wxID_ANY,wxEVT_CHILD_FOCUS,wxChildFocusEventHandler(MvcBookImpl::OnFocus));
	}
Пример #2
0
EditorManager::EditorManager(wxAuiNotebook* notebook)
: mEditorNotebook(notebook), mActiveEditor(NULL)
{
	registerEvents();

	if(mEditorNotebook != NULL)
	{
		Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(EditorManager::OnPageChanged));
		Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(EditorManager::OnPageClosed));

		mEditorNotebook->PushEventHandler(this);
	}
}
Пример #3
0
MainFrameBaseClass::~MainFrameBaseClass()
{
    this->Disconnect(m_menuItemFileOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnFileOpen), NULL, this);
    this->Disconnect(m_menuItemLoadProfile->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnFileLoadProfile), NULL, this);
    this->Disconnect(m_menuItemExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnExit), NULL, this);
    this->Disconnect(m_menuItemViewMsgPane->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnViewMsgPane), NULL, this);
    this->Disconnect(m_menuItemViewShowProfile->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnViewShowProfile), NULL, this);
    this->Disconnect(m_menuItemViewShowFrameType->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnViewShowFrameType), NULL, this);
    this->Disconnect(m_menuItemVideoFrameProcessor->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnVideoFrameProcessor), NULL, this);
    this->Disconnect(m_menuItemVideoExtractFrame->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnVideoExtractFrames), NULL, this);
    this->Disconnect(m_menuItemVideoFGPixels->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnVideoFGPixels), NULL, this);
    this->Disconnect(m_menuItemBgKDE->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnBackgroundKDE), NULL, this);
    this->Disconnect(m_menuItemProfileGaussianSmooth->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnProfileGaussianSmooth), NULL, this);
    this->Disconnect(m_menuItemProfileClassification->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnProfileClassification), NULL, this);
    this->Disconnect(m_menuItemProfileCentroid->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnProfileCentroid), NULL, this);
    this->Disconnect(m_menuItemTrainData->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnTrainData), NULL, this);
    this->Disconnect(m_menuItemTestResult->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnShowTestResult), NULL, this);
    this->Disconnect(m_menuItemPredictedResult->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnShowPredictedResult), NULL, this);
    this->Disconnect(m_menuItem9->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnAbout), NULL, this);
    this->Disconnect(wxID_OPEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnFileOpen), NULL, this);
    this->Disconnect(wxID_SHOW_PROFILE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnViewShowProfile), NULL, this);
    this->Disconnect(wxID_FRAME_PROCESSOR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnVideoFrameProcessor), NULL, this);
    this->Disconnect(wxID_STOP, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnVideoStop), NULL, this);
    this->Disconnect(wxID_PAUSE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnVideoPause), NULL, this);
    this->Disconnect(wxID_EXTRACT_FRAME, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnVideoExtractFrames), NULL, this);
    m_auiBook->Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(MainFrameBaseClass::OnBookPageChanged), NULL, this);
    m_buttonBrowse->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnBrowseDataPath), NULL, this);
    m_textCtrlFrameNo->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrameBaseClass::OnTextFrameNoEnter), NULL, this);
    m_textCtrlMMSS->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrameBaseClass::OnTextMMSSEnter), NULL, this);
    m_checkBoxSceneChangeBreak->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnSceneChangeBreak), NULL, this);
    
    m_auimgr21->UnInit();
    delete m_auimgr21;

}
Пример #4
0
void EditorManager::setEditorNotebook(wxAuiNotebook* notebook)
{
	if(mEditorNotebook != NULL)
	{
		Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(EditorManager::OnPageChanged));
		Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(EditorManager::OnPageClosed));

		mEditorNotebook->RemoveEventHandler(this);
	}

	mEditorNotebook = notebook;

	if(mEditorNotebook != NULL)
	{
		Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(EditorManager::OnPageChanged));
		Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(EditorManager::OnPageClosed));

		mEditorNotebook->PushEventHandler(this);
	}
}
//! MetadataItemPropertiesFrame class
MetadataItemPropertiesFrame::MetadataItemPropertiesFrame(wxWindow* parent,
        MetadataItem* object)
    : BaseFrame(parent, wxID_ANY, wxEmptyString)
{
    // we need to store this right now, since we might lose the object later
    setStorageName(object);

    wxStatusBar* sb = CreateStatusBar();

    DatabasePtr db = object->getDatabase();
    if (db)  // server property page doesn't have a database, so don't crash
        sb->SetStatusText(db->getConnectionInfoString());
    else
        sb->SetStatusText(object->getName_());

    if (db && config().get("linksOpenInTabs", true))
    {
        SetIcon(wxArtProvider::GetIcon(ART_DatabaseConnected,
                                       wxART_FRAME_ICON));
        databaseNameM = db->getName_();
    }
    else  // when linksOpenInTabs, only the server node
    {
        SetIcon(getMetadataItemIcon(object->getType()));
    }

    notebookM = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition,
                                  wxDefaultSize, wxAUI_NB_DEFAULT_STYLE | wxAUI_NB_WINDOWLIST_BUTTON
                                  | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER);

    auiManagerM.SetManagedWindow(this);
    auiManagerM.AddPane(notebookM,
                        wxAuiPaneInfo().CenterPane().PaneBorder(false));
    auiManagerM.Update();

    Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(
                MetadataItemPropertiesFrame::OnNotebookPageClose), NULL, this);
    Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(
                MetadataItemPropertiesFrame::OnNotebookPageChanged), NULL, this);
}
SIM_PLOT_FRAME_BASE::~SIM_PLOT_FRAME_BASE()
{
	// Disconnect Events
	this->Disconnect( wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuNewPlot ) );
	this->Disconnect( wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuOpenWorkbook ) );
	this->Disconnect( wxID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveWorkbook ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveImage ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveCsv ) );
	this->Disconnect( wxID_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuExit ) );
	this->Disconnect( wxID_ZOOM_IN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomIn ) );
	this->Disconnect( wxID_ZOOM_OUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomOut ) );
	this->Disconnect( wxID_ZOOM_FIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomFit ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowGrid ) );
	this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowGridUpdate ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegend ) );
	this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegendUpdate ) );
	m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotChanged ), NULL, this );
	m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotClose ), NULL, this );
	m_signals->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
	m_signals->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this );
	
}
Пример #7
0
bool CContextControl::CloseTab(int tab)
{
	if (!m_tabs)
		return false;
	if (tab < 0)
		return false;

	size_t i = 0;
	for (i = 0; i < m_context_controls.size(); i++)
	{
		if (m_context_controls[i].tab_index == tab)
			break;
	}
	if (i == m_context_controls.size())
		return false;

	CState* pState = m_context_controls[i].pState;

	if (!pState->m_pCommandQueue->Idle())
	{
		if (wxMessageBoxEx(_("Cannot close tab while busy.\nCancel current operation and close tab?"), _T("FileZilla"), wxYES_NO | wxICON_QUESTION) != wxYES)
			return false;
	}

#ifndef __WXMAC__
	// Some reparenting is being done when closing tabs. Reparenting of frozen windows isn't working
	// on OS X.
	wxWindowUpdateLocker lock(this);
#endif

	pState->m_pCommandQueue->Cancel();
	pState->GetRecursiveOperationHandler()->StopRecursiveOperation();

	pState->GetComparisonManager()->SetListings(0, 0);

	if (m_tabs->GetPageCount() == 2)
	{
		// Get rid again of tab bar
		m_tabs->Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(CContextControl::OnTabChanged), 0, this);

		int keep = tab ? 0 : 1;
		m_tabs->RemovePage(keep);

		size_t j;
		for (j = 0; j < m_context_controls.size(); j++)
		{
			if (m_context_controls[j].tab_index != keep)
				continue;

			break;
		}

		m_context_controls[j].pViewSplitter->Reparent(this);
		ReplaceWindow(m_tabs, m_context_controls[j].pViewSplitter);
		m_context_controls[j].pViewSplitter->Show();
		m_context_controls[j].tab_index = 0;

		wxAuiNotebookEx *tabs = m_tabs;
		m_tabs = 0;

		m_context_controls[i].tab_index = -1;
		m_context_controls[i].site_bookmarks.reset();

		CContextManager::Get()->SetCurrentContext(m_context_controls[j].pState);

		tabs->Destroy();
	}
	else
	{
		if (pState == CContextManager::Get()->GetCurrentContext())
		{
			int newsel = tab + 1;
			if (newsel >= (int)m_tabs->GetPageCount())
				newsel = m_tabs->GetPageCount() - 2;

			for (size_t j = 0; j < m_context_controls.size(); j++)
			{
				if (m_context_controls[j].tab_index != newsel)
					continue;
				m_tabs->SetSelection(newsel);
				CContextManager::Get()->SetCurrentContext(m_context_controls[j].pState);
			}
		}
		for (size_t j = 0; j < m_context_controls.size(); j++)
		{
			if (m_context_controls[j].tab_index > tab)
				m_context_controls[j].tab_index--;
		}
		m_context_controls[i].tab_index = -1;
		m_context_controls[i].site_bookmarks.reset();
		m_tabs->DeletePage(tab);
	}

	pState->Disconnect();

	return true;
}
Пример #8
0
void CContextControl::CreateContextControls(CState* pState)
{
	wxGetApp().AddStartupProfileRecord(_T("CContextControl::CreateContextControls"));
	wxWindow* parent = this;

#ifdef __WXGTK__
	// This prevents some ugly flickering on tab creation.
	const wxPoint initial_position(1000000, 1000000);
#else
	const wxPoint initial_position(wxDefaultPosition);
#endif

	if (!m_context_controls.empty()) {
		if (!m_tabs) {
			m_tabs = new wxAuiNotebookEx();

			wxSize splitter_size = m_context_controls[m_current_context_controls].pViewSplitter->GetSize();
			m_tabs->Create(this, wxID_ANY, initial_position, splitter_size, wxNO_BORDER | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_WINDOWLIST_BUTTON | wxAUI_NB_CLOSE_ON_ALL_TABS);
			m_tabs->SetExArtProvider();
			m_tabs->SetSelectedFont(*wxNORMAL_FONT);
			m_tabs->SetMeasuringFont(*wxNORMAL_FONT);

			m_context_controls[m_current_context_controls].pViewSplitter->Reparent(m_tabs);

			m_tabs->AddPage(m_context_controls[m_current_context_controls].pViewSplitter, m_context_controls[m_current_context_controls].pState->GetTitle());
			ReplaceWindow(m_context_controls[m_current_context_controls].pViewSplitter, m_tabs);

			m_tabs->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(CContextControl::OnTabChanged), 0, this);
			m_tabs->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(CContextControl::OnTabClosing), 0, this);
			m_tabs->Connect(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEventHandler(CContextControl::OnTabBgDoubleclick), 0, this);
			m_tabs->Connect(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEventHandler(CContextControl::OnTabClosing), 0, this);
			m_tabs->Connect(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEventHandler(CContextControl::OnTabRightclick), 0, this);

#ifdef __WXMAC__
			// We need to select the first page as the default selection is -1. Not doing so prevents selecting other pages later on.
			m_tabs->SetSelection(0);
#endif
		}

		m_mainFrame.RememberSplitterPositions();
		m_context_controls[m_current_context_controls].pLocalListView->SaveColumnSettings(OPTION_LOCALFILELIST_COLUMN_WIDTHS, OPTION_LOCALFILELIST_COLUMN_SHOWN, OPTION_LOCALFILELIST_COLUMN_ORDER);
		m_context_controls[m_current_context_controls].pRemoteListView->SaveColumnSettings(OPTION_REMOTEFILELIST_COLUMN_WIDTHS, OPTION_REMOTEFILELIST_COLUMN_SHOWN, OPTION_REMOTEFILELIST_COLUMN_ORDER);

		parent = m_tabs;
	}

	struct CContextControl::_context_controls context_controls;

	context_controls.pState = pState;
	context_controls.pViewSplitter = new CSplitterWindowEx(parent, -1, initial_position, wxDefaultSize, wxSP_NOBORDER  | wxSP_LIVE_UPDATE);
	context_controls.pViewSplitter->SetMinimumPaneSize(50, 100);
	context_controls.pViewSplitter->SetSashGravity(0.5);

	context_controls.pLocalSplitter = new CSplitterWindowEx(context_controls.pViewSplitter, -1, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER  | wxSP_LIVE_UPDATE);
	context_controls.pLocalSplitter->SetMinimumPaneSize(50, 100);

	context_controls.pRemoteSplitter = new CSplitterWindowEx(context_controls.pViewSplitter, -1, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER  | wxSP_LIVE_UPDATE);
	context_controls.pRemoteSplitter->SetMinimumPaneSize(50, 100);

	context_controls.pLocalTreeViewPanel = new CView(context_controls.pLocalSplitter);
	context_controls.pLocalListViewPanel = new CView(context_controls.pLocalSplitter);
	context_controls.pLocalTreeView = new CLocalTreeView(context_controls.pLocalTreeViewPanel, -1, pState, m_mainFrame.GetQueue());
	context_controls.pLocalListView = new CLocalListView(context_controls.pLocalListViewPanel, pState, m_mainFrame.GetQueue());
	context_controls.pLocalTreeViewPanel->SetWindow(context_controls.pLocalTreeView);
	context_controls.pLocalListViewPanel->SetWindow(context_controls.pLocalListView);

	context_controls.pRemoteTreeViewPanel = new CView(context_controls.pRemoteSplitter);
	context_controls.pRemoteListViewPanel = new CView(context_controls.pRemoteSplitter);
	context_controls.pRemoteTreeView = new CRemoteTreeView(context_controls.pRemoteTreeViewPanel, -1, pState, m_mainFrame.GetQueue());
	context_controls.pRemoteListView = new CRemoteListView(context_controls.pRemoteListViewPanel, pState, m_mainFrame.GetQueue());
	context_controls.pRemoteTreeViewPanel->SetWindow(context_controls.pRemoteTreeView);
	context_controls.pRemoteListViewPanel->SetWindow(context_controls.pRemoteListView);

	bool show_filelist_statusbars = COptions::Get()->GetOptionVal(OPTION_FILELIST_STATUSBAR) != 0;

	CFilelistStatusBar* pLocalFilelistStatusBar = new CFilelistStatusBar(context_controls.pLocalListViewPanel);
	if (!show_filelist_statusbars)
		pLocalFilelistStatusBar->Hide();
	context_controls.pLocalListViewPanel->SetStatusBar(pLocalFilelistStatusBar);
	context_controls.pLocalListView->SetFilelistStatusBar(pLocalFilelistStatusBar);
	pLocalFilelistStatusBar->SetConnected(true);

	CFilelistStatusBar* pRemoteFilelistStatusBar = new CFilelistStatusBar(context_controls.pRemoteListViewPanel);
	if (!show_filelist_statusbars)
		pRemoteFilelistStatusBar->Hide();
	context_controls.pRemoteListViewPanel->SetStatusBar(pRemoteFilelistStatusBar);
	context_controls.pRemoteListView->SetFilelistStatusBar(pRemoteFilelistStatusBar);

	auto recursiveStatus = new CRecursiveOperationStatus(context_controls.pRemoteListViewPanel, context_controls.pState);
	context_controls.pRemoteListViewPanel->SetFooter(recursiveStatus);

	const int layout = COptions::Get()->GetOptionVal(OPTION_FILEPANE_LAYOUT);
	const int swap = COptions::Get()->GetOptionVal(OPTION_FILEPANE_SWAP);

	if (layout == 1) {
		if (swap)
			context_controls.pViewSplitter->SplitHorizontally(context_controls.pRemoteSplitter, context_controls.pLocalSplitter);
		else
			context_controls.pViewSplitter->SplitHorizontally(context_controls.pLocalSplitter, context_controls.pRemoteSplitter);
	}
	else {
		if (swap)
			context_controls.pViewSplitter->SplitVertically(context_controls.pRemoteSplitter, context_controls.pLocalSplitter);
		else
			context_controls.pViewSplitter->SplitVertically(context_controls.pLocalSplitter, context_controls.pRemoteSplitter);
	}

	if (COptions::Get()->GetOptionVal(OPTION_SHOW_TREE_LOCAL)) {
		context_controls.pLocalViewHeader = new CLocalViewHeader(context_controls.pLocalTreeViewPanel, pState);
		context_controls.pLocalTreeViewPanel->SetHeader(context_controls.pLocalViewHeader);
		if (layout == 3 && swap)
			context_controls.pLocalSplitter->SplitVertically(context_controls.pLocalListViewPanel, context_controls.pLocalTreeViewPanel);
		else if (layout)
			context_controls.pLocalSplitter->SplitVertically(context_controls.pLocalTreeViewPanel, context_controls.pLocalListViewPanel);
		else
			context_controls.pLocalSplitter->SplitHorizontally(context_controls.pLocalTreeViewPanel, context_controls.pLocalListViewPanel);
	}
	else {
		context_controls.pLocalTreeViewPanel->Hide();
		context_controls.pLocalViewHeader = new CLocalViewHeader(context_controls.pLocalListViewPanel, pState);
		context_controls.pLocalListViewPanel->SetHeader(context_controls.pLocalViewHeader);
		context_controls.pLocalSplitter->Initialize(context_controls.pLocalListViewPanel);
	}

	if (COptions::Get()->GetOptionVal(OPTION_SHOW_TREE_REMOTE)) {
		context_controls.pRemoteViewHeader = new CRemoteViewHeader(context_controls.pRemoteTreeViewPanel, pState);
		context_controls.pRemoteTreeViewPanel->SetHeader(context_controls.pRemoteViewHeader);
		if (layout == 3 && !swap)
			context_controls.pRemoteSplitter->SplitVertically(context_controls.pRemoteListViewPanel, context_controls.pRemoteTreeViewPanel);
		else if (layout)
			context_controls.pRemoteSplitter->SplitVertically(context_controls.pRemoteTreeViewPanel, context_controls.pRemoteListViewPanel);
		else
			context_controls.pRemoteSplitter->SplitHorizontally(context_controls.pRemoteTreeViewPanel, context_controls.pRemoteListViewPanel);
	}
	else {
		context_controls.pRemoteTreeViewPanel->Hide();
		context_controls.pRemoteViewHeader = new CRemoteViewHeader(context_controls.pRemoteListViewPanel, pState);
		context_controls.pRemoteListViewPanel->SetHeader(context_controls.pRemoteViewHeader);
		context_controls.pRemoteSplitter->Initialize(context_controls.pRemoteListViewPanel);
	}

	if (layout == 3) {
		if (!swap)
			context_controls.pRemoteSplitter->SetSashGravity(1.0);
		else
			context_controls.pLocalSplitter->SetSashGravity(1.0);
	}

	m_mainFrame.ConnectNavigationHandler(context_controls.pLocalListView);
	m_mainFrame.ConnectNavigationHandler(context_controls.pRemoteListView);
	m_mainFrame.ConnectNavigationHandler(context_controls.pLocalTreeView);
	m_mainFrame.ConnectNavigationHandler(context_controls.pRemoteTreeView);
	m_mainFrame.ConnectNavigationHandler(context_controls.pLocalViewHeader);
	m_mainFrame.ConnectNavigationHandler(context_controls.pRemoteViewHeader);

	pState->GetComparisonManager()->SetListings(context_controls.pLocalListView, context_controls.pRemoteListView);

	if (m_tabs) {
		context_controls.tab_index = m_tabs->GetPageCount();
		m_tabs->AddPage(context_controls.pViewSplitter, pState->GetTitle());

		// Copy reconnect and bookmark information
		pState->SetLastServer(
			m_context_controls[m_current_context_controls].pState->GetLastServer(),
			m_context_controls[m_current_context_controls].pState->GetLastServerPath());

		context_controls.site_bookmarks = m_context_controls[m_current_context_controls].site_bookmarks;
	}
	else {
		context_controls.tab_index = 0;
		context_controls.site_bookmarks = std::make_shared<CContextControl::_context_controls::_site_bookmarks>();

		context_controls.site_bookmarks->path = COptions::Get()->GetOption(OPTION_LAST_CONNECTED_SITE);
		CSiteManager::GetBookmarks(context_controls.site_bookmarks->path,
			context_controls.site_bookmarks->bookmarks);

		Initialize(context_controls.pViewSplitter);
	}

	m_context_controls.push_back(context_controls);
}
Пример #9
0
MainFrameBaseClass::MainFrameBaseClass(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxFrame(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC9ED9InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    m_menuBar = new wxMenuBar(0);
    this->SetMenuBar(m_menuBar);
    
    m_menuFile = new wxMenu();
    m_menuBar->Append(m_menuFile, _("File"));
    
    m_menuItemFileOpen = new wxMenuItem(m_menuFile, wxID_OPEN, _("Open Video"), wxT(""), wxITEM_NORMAL);
    m_menuFile->Append(m_menuItemFileOpen);
    
    m_menuItemLoadProfile = new wxMenuItem(m_menuFile, wxID_ANY, _("Load Profile"), wxT(""), wxITEM_NORMAL);
    m_menuFile->Append(m_menuItemLoadProfile);
    
    m_menuItemExit = new wxMenuItem(m_menuFile, wxID_EXIT, _("Exit\tAlt-X"), _("Quit"), wxITEM_NORMAL);
    m_menuFile->Append(m_menuItemExit);
    
    m_menuView = new wxMenu();
    m_menuBar->Append(m_menuView, _("View"));
    
    m_menuItemViewMsgPane = new wxMenuItem(m_menuView, wxID_ANY, _("Show Message Pane"), wxT(""), wxITEM_CHECK);
    m_menuView->Append(m_menuItemViewMsgPane);
    m_menuItemViewMsgPane->Check();
    
    m_menuItemViewShowProfile = new wxMenuItem(m_menuView, wxID_SHOW_PROFILE, _("Show Profile"), wxT(""), wxITEM_NORMAL);
    m_menuView->Append(m_menuItemViewShowProfile);
    
    m_menuItemViewShowFrameType = new wxMenuItem(m_menuView, wxID_ANY, _("Show Frame Type"), wxT(""), wxITEM_NORMAL);
    m_menuView->Append(m_menuItemViewShowFrameType);
    
    m_menuVideo = new wxMenu();
    m_menuBar->Append(m_menuVideo, _("Video"));
    
    m_menuItemVideoFrameProcessor = new wxMenuItem(m_menuVideo, wxID_FRAME_PROCESSOR, _("Background subtraction"), _("Background subtraction"), wxITEM_NORMAL);
    m_menuVideo->Append(m_menuItemVideoFrameProcessor);
    
    m_menuItemVideoExtractFrame = new wxMenuItem(m_menuVideo, wxID_EXTRACT_FRAME, _("Extract Frames"), wxT(""), wxITEM_NORMAL);
    m_menuVideo->Append(m_menuItemVideoExtractFrame);
    
    m_menuVideo->AppendSeparator();
    
    m_menuItemVideoFGPixels = new wxMenuItem(m_menuVideo, wxID_ANY, _("1. FG Pixel Profile"), wxT(""), wxITEM_NORMAL);
    m_menuVideo->Append(m_menuItemVideoFGPixels);
    
    m_menuVideo->AppendSeparator();
    
    m_menuBackground = new wxMenu();
    m_menuBar->Append(m_menuBackground, _("Background"));
    
    m_menuItemBgKDE = new wxMenuItem(m_menuBackground, wxID_BGKDE, _("2. KDE"), wxT(""), wxITEM_NORMAL);
    m_menuBackground->Append(m_menuItemBgKDE);
    
    m_menuProfile = new wxMenu();
    m_menuBar->Append(m_menuProfile, _("Profile"));
    
    m_menuItemProfileGaussianSmooth = new wxMenuItem(m_menuProfile, wxID_PROFILE_SMOOTH, _("Gaussian Smooth"), wxT(""), wxITEM_NORMAL);
    m_menuProfile->Append(m_menuItemProfileGaussianSmooth);
    
    m_menuItemProfileClassification = new wxMenuItem(m_menuProfile, wxID_ANY, _("Profile classification"), wxT(""), wxITEM_NORMAL);
    m_menuProfile->Append(m_menuItemProfileClassification);
    
    m_menuProfile->AppendSeparator();
    
    m_menuItemProfileCentroid = new wxMenuItem(m_menuProfile, wxID_ANY, _("Centroid"), wxT(""), wxITEM_NORMAL);
    m_menuProfile->Append(m_menuItemProfileCentroid);
    
    m_menuItemTrainData = new wxMenuItem(m_menuProfile, wxID_ANY, _("Generate TrainData"), wxT(""), wxITEM_NORMAL);
    m_menuProfile->Append(m_menuItemTrainData);
    
    m_menuItemTestResult = new wxMenuItem(m_menuProfile, wxID_ANY, _("Show Test Result"), wxT(""), wxITEM_NORMAL);
    m_menuProfile->Append(m_menuItemTestResult);
    
    m_menuProfile->AppendSeparator();
    
    m_menuItemPredictedResult = new wxMenuItem(m_menuProfile, wxID_ANY, _("Show Predicted Result"), wxT(""), wxITEM_NORMAL);
    m_menuProfile->Append(m_menuItemPredictedResult);
    
    m_nameHelp = new wxMenu();
    m_menuBar->Append(m_nameHelp, _("Help"));
    
    m_menuItem9 = new wxMenuItem(m_nameHelp, wxID_ABOUT, _("About..."), wxT(""), wxITEM_NORMAL);
    m_nameHelp->Append(m_menuItem9);
    
    m_statusBar = new wxStatusBar(this, wxID_ANY, wxSTB_DEFAULT_STYLE);
    m_statusBar->SetFieldsCount(1);
    this->SetStatusBar(m_statusBar);
    
    m_auimgr21 = new wxAuiManager;
    m_auimgr21->SetManagedWindow( this );
    m_auimgr21->SetFlags( wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_TRANSPARENT_HINT|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING);
    m_auimgr21->GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE);
    
    m_auibar23 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_auibar23->SetToolBitmapSize(wxSize(32,32));
    
    m_auimgr21->AddPane(m_auibar23, wxAuiPaneInfo().Direction(wxAUI_DOCK_TOP).Layer(0).Row(0).Position(0).BestSize(42,42).MinSize(42,42).CaptionVisible(true).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false).ToolbarPane());
    
    m_auibar23->AddTool(wxID_OPEN, _("Open"), wxArtProvider::GetBitmap(wxART_FILE_OPEN, wxART_TOOLBAR, wxDefaultSize), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
    
    m_auibar23->AddTool(wxID_SHOW_PROFILE, _("Show Profile"), wxXmlResource::Get()->LoadBitmap(wxT("analytics")), wxNullBitmap, wxITEM_NORMAL, _("Show Profile"), wxT(""), NULL);
    
    m_auibar23->AddSeparator();
    
    m_auibar23->AddTool(wxID_FRAME_PROCESSOR, _("FrameProcessor"), wxXmlResource::Get()->LoadBitmap(wxT("pokeball")), wxNullBitmap, wxITEM_NORMAL, _("FrameProcessor"), wxT(""), NULL);
    
    m_auibar23->AddTool(wxID_BGKDE, _("KDE Bg"), wxXmlResource::Get()->LoadBitmap(wxT("layer")), wxNullBitmap, wxITEM_NORMAL, _("KDE background"), wxT(""), NULL);
    
    m_auibar23->AddTool(wxID_STOP, _("Stop"), wxXmlResource::Get()->LoadBitmap(wxT("error")), wxNullBitmap, wxITEM_NORMAL, _("Stop"), wxT(""), NULL);
    
    m_auibar23->AddTool(wxID_PAUSE, _("Pause"), wxXmlResource::Get()->LoadBitmap(wxT("pause")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
    
    m_auibar23->AddTool(wxID_EXTRACT_FRAME, _("Extract Frames"), wxXmlResource::Get()->LoadBitmap(wxT("download")), wxNullBitmap, wxITEM_NORMAL, _("Extract Frames"), wxT(""), NULL);
    
    m_auibar23->AddTool(wxID_PROFILE_SMOOTH, _("Profile Gaussian Smooth"), wxXmlResource::Get()->LoadBitmap(wxT("smooth")), wxNullBitmap, wxITEM_NORMAL, _("Profile Gaussian Smooth"), wxT(""), NULL);
    m_auibar23->Realize();
    
    m_auiBook = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(250,720)), wxAUI_NB_TAB_FIXED_WIDTH|wxBK_DEFAULT);
    m_auiBook->SetName(wxT("m_auiBook"));
    
    m_auimgr21->AddPane(m_auiBook, wxAuiPaneInfo().Direction(wxAUI_DOCK_CENTER).Layer(0).Row(0).Position(0).BestSize(250,200).MinSize(250,200).MaxSize(250,550).CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
    
    m_panelProfile = new wxPanel(m_auiBook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_auiBook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    m_auiBook->AddPage(m_panelProfile, _("Profile"), true);
    
    wxBoxSizer* boxSizer160 = new wxBoxSizer(wxVERTICAL);
    m_panelProfile->SetSizer(boxSizer160);
    
    wxBoxSizer* boxSizer203 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer160->Add(boxSizer203, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText205 = new wxStaticText(m_panelProfile, wxID_ANY, _("DataFile"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    boxSizer203->Add(m_staticText205, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlDataPath = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(150,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlDataPath->SetHint(wxT(""));
    #endif
    
    boxSizer203->Add(m_textCtrlDataPath, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_buttonBrowse = new wxButton(m_panelProfile, wxID_ANY, _("Browse"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    boxSizer203->Add(m_buttonBrowse, 0, wxALL, WXC_FROM_DIP(5));
    
    wxFlexGridSizer* flexGridSizer163 = new wxFlexGridSizer(3, 4, 0, 0);
    flexGridSizer163->SetFlexibleDirection( wxBOTH );
    flexGridSizer163->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    boxSizer160->Add(flexGridSizer163, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText154 = new wxStaticText(m_panelProfile, wxID_ANY, _("Gaussian kSize"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer163->Add(m_staticText154, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlGausKSize = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("120"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlGausKSize->SetHint(wxT(""));
    #endif
    
    flexGridSizer163->Add(m_textCtrlGausKSize, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText179 = new wxStaticText(m_panelProfile, wxID_ANY, _("Threshold"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer163->Add(m_staticText179, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlProfileTh = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("3"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlProfileTh->SetHint(wxT(""));
    #endif
    
    flexGridSizer163->Add(m_textCtrlProfileTh, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText183 = new wxStaticText(m_panelProfile, wxID_ANY, _("Min. silence"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer163->Add(m_staticText183, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlMinSilence = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("400"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlMinSilence->SetHint(wxT(""));
    #endif
    
    flexGridSizer163->Add(m_textCtrlMinSilence, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText193 = new wxStaticText(m_panelProfile, wxID_ANY, _("Min. Active"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer163->Add(m_staticText193, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlMinActive = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("70"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlMinActive->SetHint(wxT(""));
    #endif
    
    flexGridSizer163->Add(m_textCtrlMinActive, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText211 = new wxStaticText(m_panelProfile, wxID_ANY, _("gnuplot width"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer163->Add(m_staticText211, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlGnuplotW = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("1200"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlGnuplotW->SetHint(wxT(""));
    #endif
    
    flexGridSizer163->Add(m_textCtrlGnuplotW, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText215 = new wxStaticText(m_panelProfile, wxID_ANY, _("height"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer163->Add(m_staticText215, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlGnuplotH = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("300"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlGnuplotH->SetHint(wxT(""));
    #endif
    
    flexGridSizer163->Add(m_textCtrlGnuplotH, 0, wxALL, WXC_FROM_DIP(5));
    
    wxFlexGridSizer* flexGridSizer165 = new wxFlexGridSizer(5, 3, 0, 0);
    flexGridSizer165->SetFlexibleDirection( wxBOTH );
    flexGridSizer165->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    boxSizer160->Add(flexGridSizer165, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText197 = new wxStaticText(m_panelProfile, wxID_ANY, _("Classification"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer165->Add(m_staticText197, 0, wxALL, WXC_FROM_DIP(5));
    
    m_radioButtonClassWMM = new wxRadioButton(m_panelProfile, wxID_ANY, _("WMM"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), wxRB_GROUP);
    m_radioButtonClassWMM->SetValue(0);
    
    flexGridSizer165->Add(m_radioButtonClassWMM, 0, wxALL, WXC_FROM_DIP(5));
    
    m_radioButtonClassFD = new wxRadioButton(m_panelProfile, wxID_ANY, _("FD"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    m_radioButtonClassFD->SetValue(1);
    
    flexGridSizer165->Add(m_radioButtonClassFD, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText167 = new wxStaticText(m_panelProfile, wxID_ANY, _("x range"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer165->Add(m_staticText167, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlRangeXMin = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlRangeXMin->SetHint(wxT(""));
    #endif
    
    flexGridSizer165->Add(m_textCtrlRangeXMin, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlRangeXMax = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("5000"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlRangeXMax->SetHint(wxT(""));
    #endif
    
    flexGridSizer165->Add(m_textCtrlRangeXMax, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText173 = new wxStaticText(m_panelProfile, wxID_ANY, _("y range"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer165->Add(m_staticText173, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlRangeYMin = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("-200"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlRangeYMin->SetHint(wxT(""));
    #endif
    
    flexGridSizer165->Add(m_textCtrlRangeYMin, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlRangeYMax = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("2500"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlRangeYMax->SetHint(wxT(""));
    #endif
    
    flexGridSizer165->Add(m_textCtrlRangeYMax, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText187 = new wxStaticText(m_panelProfile, wxID_ANY, _("frame<->time"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    
    flexGridSizer165->Add(m_staticText187, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlFrameNo = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), wxTE_PROCESS_ENTER);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlFrameNo->SetHint(wxT(""));
    #endif
    
    flexGridSizer165->Add(m_textCtrlFrameNo, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlMMSS = new wxTextCtrl(m_panelProfile, wxID_ANY, wxT("14:55"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(50,-1)), wxTE_PROCESS_ENTER);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlMMSS->SetHint(wxT(""));
    #endif
    
    flexGridSizer165->Add(m_textCtrlMMSS, 0, wxALL, WXC_FROM_DIP(5));
    
    wxBoxSizer* boxSizer296 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer160->Add(boxSizer296, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_checkBoxSceneChangeBreak = new wxCheckBox(m_panelProfile, wxID_ANY, _("Scene change break"), wxDefaultPosition, wxDLG_UNIT(m_panelProfile, wxSize(-1,-1)), 0);
    m_checkBoxSceneChangeBreak->SetValue(false);
    
    boxSizer296->Add(m_checkBoxSceneChangeBreak, 0, wxALL, WXC_FROM_DIP(5));
    
    m_panelKDE = new wxPanel(m_auiBook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_auiBook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    m_auiBook->AddPage(m_panelKDE, _("KDE"), false);
    
    wxBoxSizer* boxSizer219 = new wxBoxSizer(wxVERTICAL);
    m_panelKDE->SetSizer(boxSizer219);
    
    wxFlexGridSizer* flexGridSizer221 = new wxFlexGridSizer(0, 2, 0, 10);
    flexGridSizer221->SetFlexibleDirection( wxBOTH );
    flexGridSizer221->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    boxSizer219->Add(flexGridSizer221, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText223 = new wxStaticText(m_panelKDE, wxID_ANY, _("KernelBW"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    
    flexGridSizer221->Add(m_staticText223, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlKernelBW = new wxTextCtrl(m_panelKDE, wxID_ANY, wxT("2"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlKernelBW->SetHint(wxT(""));
    #endif
    
    flexGridSizer221->Add(m_textCtrlKernelBW, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText227 = new wxStaticText(m_panelKDE, wxID_ANY, _("fg Prob"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    
    flexGridSizer221->Add(m_staticText227, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlFgProb = new wxTextCtrl(m_panelKDE, wxID_ANY, wxT("0.0000001"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlFgProb->SetHint(wxT(""));
    #endif
    
    flexGridSizer221->Add(m_textCtrlFgProb, 0, wxALL, WXC_FROM_DIP(5));
    
    wxStaticBoxSizer* staticBoxSizer239 = new wxStaticBoxSizer( new wxStaticBox(m_panelKDE, wxID_ANY, _("Snake Parameters")), wxVERTICAL);
    
    boxSizer219->Add(staticBoxSizer239, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    wxFlexGridSizer* flexGridSizer241 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer241->SetFlexibleDirection( wxBOTH );
    flexGridSizer241->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    staticBoxSizer239->Add(flexGridSizer241, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText276 = new wxStaticText(m_panelKDE, wxID_ANY, _("Snake Processing"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    
    flexGridSizer241->Add(m_staticText276, 0, wxALL, WXC_FROM_DIP(5));
    
    m_checkBoxEnableSnake = new wxCheckBox(m_panelKDE, wxID_ANY, _("Enable"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    m_checkBoxEnableSnake->SetValue(false);
    
    flexGridSizer241->Add(m_checkBoxEnableSnake, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText243 = new wxStaticText(m_panelKDE, wxID_ANY, _("lambda out"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    
    flexGridSizer241->Add(m_staticText243, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlLambdaOut = new wxTextCtrl(m_panelKDE, wxID_ANY, wxT("20"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlLambdaOut->SetHint(wxT(""));
    #endif
    
    flexGridSizer241->Add(m_textCtrlLambdaOut, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText247 = new wxStaticText(m_panelKDE, wxID_ANY, _("lambda in"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    
    flexGridSizer241->Add(m_staticText247, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlLambdaIn = new wxTextCtrl(m_panelKDE, wxID_ANY, wxT("9"), wxDefaultPosition, wxDLG_UNIT(m_panelKDE, wxSize(-1,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlLambdaIn->SetHint(wxT(""));
    #endif
    
    flexGridSizer241->Add(m_textCtrlLambdaIn, 0, wxALL, WXC_FROM_DIP(5));
    
    m_panelAlgo = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    wxFont m_panelAlgoFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_panelAlgo->SetFont(m_panelAlgoFont);
    
    m_auimgr21->AddPane(m_panelAlgo, wxAuiPaneInfo().Caption(_("Algorithm")).Direction(wxAUI_DOCK_RIGHT).Layer(0).Row(0).Position(0).BestSize(220,200).MinSize(200,200).MaxSize(200,200).CaptionVisible(true).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
    
    wxBoxSizer* boxSizer53 = new wxBoxSizer(wxVERTICAL);
    m_panelAlgo->SetSizer(boxSizer53);
    
    wxArrayString m_listBoxBGSArr;
    m_listBoxBGSArr.Add(_("FrameDifferenceBGS"));
    m_listBoxBGSArr.Add(_("StaticFrameDifferenceBGS"));
    m_listBoxBGSArr.Add(_("WeightedMovingMeanBGS"));
    m_listBoxBGSArr.Add(_("WeightedMovingVarianceBGS"));
    m_listBoxBGSArr.Add(_("MixtureOfGaussianV2BGS"));
    m_listBoxBGSArr.Add(_("AdaptiveBackgroundLearning"));
    m_listBoxBGSArr.Add(_("DPAdaptiveMedianBGS"));
    m_listBoxBGSArr.Add(_("DPGrimsonGMMBGS"));
    m_listBoxBGSArr.Add(_("DPZivkovicAGMMBGS"));
    m_listBoxBGSArr.Add(_("DPMeanBGS"));
    m_listBoxBGSArr.Add(_("DPWrenGABGS"));
    m_listBoxBGSArr.Add(_("DPPratiMediodBGS"));
    m_listBoxBGSArr.Add(_("DPEigenbackgroundBGS"));
    m_listBoxBGSArr.Add(_("DPTextureBGS"));
    m_listBoxBGSArr.Add(_("T2FGMM_UM"));
    m_listBoxBGSArr.Add(_("T2FGMM_UV"));
    m_listBoxBGSArr.Add(_("T2FMRF_UM"));
    m_listBoxBGSArr.Add(_("T2FMRF_UV"));
    m_listBoxBGSArr.Add(_("FuzzySugenoIntegral"));
    m_listBoxBGSArr.Add(_("FuzzyChoquetIntegral"));
    m_listBoxBGSArr.Add(_("LBSimpleGaussian"));
    m_listBoxBGSArr.Add(_("LBFuzzyGaussian"));
    m_listBoxBGSArr.Add(_("LBMixtureOfGaussians"));
    m_listBoxBGSArr.Add(_("LBAdaptiveSOM"));
    m_listBoxBGSArr.Add(_("LBFuzzyAdaptiveSOM"));
    m_listBoxBGSArr.Add(_("LbpMrf"));
    m_listBoxBGSArr.Add(_("VuMeter"));
    m_listBoxBGSArr.Add(_("KDE"));
    m_listBoxBGSArr.Add(_("IndependentMultimodalBGS"));
    m_listBoxBGSArr.Add(_("MultiCueBGS"));
    m_listBoxBGSArr.Add(_("SigmaDeltaBGS"));
    m_listBoxBGSArr.Add(_("SuBSENSEBGS"));
    m_listBoxBGSArr.Add(_("LOBSTERBGS"));
    m_listBoxBGS = new wxListBox(m_panelAlgo, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelAlgo, wxSize(-1,220)), m_listBoxBGSArr, wxLB_SINGLE);
    m_listBoxBGS->SetSelection(0);
    
    boxSizer53->Add(m_listBoxBGS, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_panelGlobalSet = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(50,-1)), wxTAB_TRAVERSAL);
    
    m_auimgr21->AddPane(m_panelGlobalSet, wxAuiPaneInfo().Caption(_("Global Setting")).Direction(wxAUI_DOCK_BOTTOM).Layer(0).Row(0).Position(0).BestSize(50,100).MinSize(50,100).MaxSize(50,100).CaptionVisible(true).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
    
    wxBoxSizer* boxSizer262 = new wxBoxSizer(wxVERTICAL);
    m_panelGlobalSet->SetSizer(boxSizer262);
    
    wxFlexGridSizer* flexGridSizer264 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer264->SetFlexibleDirection( wxBOTH );
    flexGridSizer264->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    boxSizer262->Add(flexGridSizer264, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText110 = new wxStaticText(m_panelGlobalSet, wxID_ANY, _("Frame wait (ms)"), wxDefaultPosition, wxDLG_UNIT(m_panelGlobalSet, wxSize(-1,-1)), 0);
    
    flexGridSizer264->Add(m_staticText110, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlFrameWait = new wxTextCtrl(m_panelGlobalSet, wxID_ANY, wxT("1"), wxDefaultPosition, wxDLG_UNIT(m_panelGlobalSet, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlFrameWait->SetHint(wxT(""));
    #endif
    
    flexGridSizer264->Add(m_textCtrlFrameWait, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText114 = new wxStaticText(m_panelGlobalSet, wxID_ANY, _("Start frame"), wxDefaultPosition, wxDLG_UNIT(m_panelGlobalSet, wxSize(-1,-1)), 0);
    
    flexGridSizer264->Add(m_staticText114, 0, wxALL|wxALIGN_TOP, WXC_FROM_DIP(5));
    
    m_textCtrlStartFrame = new wxTextCtrl(m_panelGlobalSet, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelGlobalSet, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlStartFrame->SetHint(wxT(""));
    #endif
    
    flexGridSizer264->Add(m_textCtrlStartFrame, 0, wxALL|wxALIGN_TOP, WXC_FROM_DIP(5));
    
    m_staticText122 = new wxStaticText(m_panelGlobalSet, wxID_ANY, _("Sampling rate"), wxDefaultPosition, wxDLG_UNIT(m_panelGlobalSet, wxSize(-1,-1)), 0);
    
    flexGridSizer264->Add(m_staticText122, 0, wxALL, WXC_FROM_DIP(5));
    
    m_textCtrlSampling = new wxTextCtrl(m_panelGlobalSet, wxID_ANY, wxT("1"), wxDefaultPosition, wxDLG_UNIT(m_panelGlobalSet, wxSize(50,-1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlSampling->SetHint(wxT(""));
    #endif
    
    flexGridSizer264->Add(m_textCtrlSampling, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText118 = new wxStaticText(m_panelGlobalSet, wxID_ANY, _("Show preprocess"), wxDefaultPosition, wxDLG_UNIT(m_panelGlobalSet, wxSize(-1,-1)), 0);
    
    flexGridSizer264->Add(m_staticText118, 0, wxALL, WXC_FROM_DIP(5));
    
    m_checkBoxShowPreprocess = new wxCheckBox(m_panelGlobalSet, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGlobalSet, wxSize(-1,-1)), 0);
    m_checkBoxShowPreprocess->SetValue(false);
    
    flexGridSizer264->Add(m_checkBoxShowPreprocess, 0, wxALL, WXC_FROM_DIP(5));
    
    m_panel270 = new wxPanel(m_panelGlobalSet, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGlobalSet, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    
    boxSizer262->Add(m_panel270, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    wxBoxSizer* boxSizer257 = new wxBoxSizer(wxHORIZONTAL);
    m_panel270->SetSizer(boxSizer257);
    
    wxArrayString m_radioBoxWholeRegionArr;
    m_radioBoxWholeRegionArr.Add(_("whole"));
    m_radioBoxWholeRegionArr.Add(_("left"));
    m_radioBoxWholeRegionArr.Add(_("right"));
    m_radioBoxWholeRegion = new wxRadioBox(m_panel270, wxID_ANY, _("Processing Region"), wxDefaultPosition, wxDLG_UNIT(m_panel270, wxSize(-1,-1)), m_radioBoxWholeRegionArr, 3, 0);
    m_radioBoxWholeRegion->SetSelection(2);
    
    boxSizer257->Add(m_radioBoxWholeRegion, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_panelMsg = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    wxFont m_panelMsgFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("Calibri"));
    m_panelMsg->SetFont(m_panelMsgFont);
    
    m_auimgr21->AddPane(m_panelMsg, wxAuiPaneInfo().Name(wxT("MsgPane")).Caption(_("Message Pane")).Direction(wxAUI_DOCK_BOTTOM).Layer(0).Row(0).Position(1).BestSize(450,200).MinSize(450,190).MaxSize(450,280).CaptionVisible(true).MaximizeButton(false).CloseButton(true).MinimizeButton(false).PinButton(false));
    m_auimgr21->Update();
    
    wxBoxSizer* boxSizer27 = new wxBoxSizer(wxVERTICAL);
    m_panelMsg->SetSizer(boxSizer27);
    
    m_richTextMsg = new wxRichTextCtrl(m_panelMsg, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelMsg, wxSize(-1,-1)), wxTE_MULTILINE|wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER|wxWANTS_CHARS);
    wxFont m_richTextMsgFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("Calibri"));
    m_richTextMsg->SetFont(m_richTextMsgFont);
    
    boxSizer27->Add(m_richTextMsg, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    
    #if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(m_auiBook)){
        wxPersistenceManager::Get().RegisterAndRestore(m_auiBook);
    } else {
        wxPersistenceManager::Get().Restore(m_auiBook);
    }
    #endif
    
    SetName(wxT("MainFrameBaseClass"));
    SetSize(750,700);
    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
    this->Connect(m_menuItemFileOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnFileOpen), NULL, this);
    this->Connect(m_menuItemLoadProfile->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnFileLoadProfile), NULL, this);
    this->Connect(m_menuItemExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnExit), NULL, this);
    this->Connect(m_menuItemViewMsgPane->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnViewMsgPane), NULL, this);
    this->Connect(m_menuItemViewShowProfile->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnViewShowProfile), NULL, this);
    this->Connect(m_menuItemViewShowFrameType->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnViewShowFrameType), NULL, this);
    this->Connect(m_menuItemVideoFrameProcessor->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnVideoFrameProcessor), NULL, this);
    this->Connect(m_menuItemVideoExtractFrame->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnVideoExtractFrames), NULL, this);
    this->Connect(m_menuItemVideoFGPixels->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnVideoFGPixels), NULL, this);
    this->Connect(m_menuItemBgKDE->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnBackgroundKDE), NULL, this);
    this->Connect(m_menuItemProfileGaussianSmooth->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnProfileGaussianSmooth), NULL, this);
    this->Connect(m_menuItemProfileClassification->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnProfileClassification), NULL, this);
    this->Connect(m_menuItemProfileCentroid->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnProfileCentroid), NULL, this);
    this->Connect(m_menuItemTrainData->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnTrainData), NULL, this);
    this->Connect(m_menuItemTestResult->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnShowTestResult), NULL, this);
    this->Connect(m_menuItemPredictedResult->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnShowPredictedResult), NULL, this);
    this->Connect(m_menuItem9->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnAbout), NULL, this);
    this->Connect(wxID_OPEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnFileOpen), NULL, this);
    this->Connect(wxID_SHOW_PROFILE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnViewShowProfile), NULL, this);
    this->Connect(wxID_FRAME_PROCESSOR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnVideoFrameProcessor), NULL, this);
    this->Connect(wxID_STOP, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnVideoStop), NULL, this);
    this->Connect(wxID_PAUSE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnVideoPause), NULL, this);
    this->Connect(wxID_EXTRACT_FRAME, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnVideoExtractFrames), NULL, this);
    m_auiBook->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(MainFrameBaseClass::OnBookPageChanged), NULL, this);
    m_buttonBrowse->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnBrowseDataPath), NULL, this);
    m_textCtrlFrameNo->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrameBaseClass::OnTextFrameNoEnter), NULL, this);
    m_textCtrlMMSS->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MainFrameBaseClass::OnTextMMSSEnter), NULL, this);
    m_checkBoxSceneChangeBreak->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnSceneChangeBreak), NULL, this);
    
}
SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : KIWAY_PLAYER( parent, id, title, pos, size, style, name )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	m_mainMenu = new wxMenuBar( 0 );
	m_fileMenu = new wxMenu();
	wxMenuItem* m_newPlot;
	m_newPlot = new wxMenuItem( m_fileMenu, wxID_NEW, wxString( _("New Plot") ) , wxEmptyString, wxITEM_NORMAL );
	m_fileMenu->Append( m_newPlot );
	
	m_fileMenu->AppendSeparator();
	
	wxMenuItem* m_openWorkbook;
	m_openWorkbook = new wxMenuItem( m_fileMenu, wxID_OPEN, wxString( _("Open Workbook") ) , wxEmptyString, wxITEM_NORMAL );
	m_fileMenu->Append( m_openWorkbook );
	
	wxMenuItem* m_saveWorkbook;
	m_saveWorkbook = new wxMenuItem( m_fileMenu, wxID_SAVE, wxString( _("Save Workbook") ) , wxEmptyString, wxITEM_NORMAL );
	m_fileMenu->Append( m_saveWorkbook );
	
	m_fileMenu->AppendSeparator();
	
	wxMenuItem* m_saveImage;
	m_saveImage = new wxMenuItem( m_fileMenu, wxID_ANY, wxString( _("Save as image") ) , wxEmptyString, wxITEM_NORMAL );
	m_fileMenu->Append( m_saveImage );
	
	wxMenuItem* m_saveCsv;
	m_saveCsv = new wxMenuItem( m_fileMenu, wxID_ANY, wxString( _("Save as .csv file") ) , wxEmptyString, wxITEM_NORMAL );
	m_fileMenu->Append( m_saveCsv );
	
	m_fileMenu->AppendSeparator();
	
	wxMenuItem* m_exitSim;
	m_exitSim = new wxMenuItem( m_fileMenu, wxID_CLOSE, wxString( _("Exit Simulation") ) , wxEmptyString, wxITEM_NORMAL );
	m_fileMenu->Append( m_exitSim );
	
	m_mainMenu->Append( m_fileMenu, _("File") ); 
	
	m_simulationMenu = new wxMenu();
	m_runSimulation = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Run Simulation") ) , wxEmptyString, wxITEM_NORMAL );
	m_simulationMenu->Append( m_runSimulation );
	
	m_simulationMenu->AppendSeparator();
	
	m_addSignals = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Add signals...") ) , wxEmptyString, wxITEM_NORMAL );
	m_simulationMenu->Append( m_addSignals );
	
	m_probeSignals = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Probe from schematics") ) , wxEmptyString, wxITEM_NORMAL );
	m_simulationMenu->Append( m_probeSignals );
	
	m_tuneValue = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Tune component value") ) , wxEmptyString, wxITEM_NORMAL );
	m_simulationMenu->Append( m_tuneValue );
	
	m_simulationMenu->AppendSeparator();
	
	m_settings = new wxMenuItem( m_simulationMenu, wxID_ANY, wxString( _("Settings...") ) , wxEmptyString, wxITEM_NORMAL );
	m_simulationMenu->Append( m_settings );
	
	m_mainMenu->Append( m_simulationMenu, _("Simulation") ); 
	
	m_viewMenu = new wxMenu();
	wxMenuItem* m_zoomIn;
	m_zoomIn = new wxMenuItem( m_viewMenu, wxID_ZOOM_IN, wxString( _("Zoom In") ) , wxEmptyString, wxITEM_NORMAL );
	m_viewMenu->Append( m_zoomIn );
	
	wxMenuItem* m_zoomOut;
	m_zoomOut = new wxMenuItem( m_viewMenu, wxID_ZOOM_OUT, wxString( _("Zoom Out") ) , wxEmptyString, wxITEM_NORMAL );
	m_viewMenu->Append( m_zoomOut );
	
	wxMenuItem* m_zoomFit;
	m_zoomFit = new wxMenuItem( m_viewMenu, wxID_ZOOM_FIT, wxString( _("Fit on Screen") ) , wxEmptyString, wxITEM_NORMAL );
	m_viewMenu->Append( m_zoomFit );
	
	m_viewMenu->AppendSeparator();
	
	wxMenuItem* m_showGrid;
	m_showGrid = new wxMenuItem( m_viewMenu, wxID_ANY, wxString( _("Show &grid") ) , wxEmptyString, wxITEM_CHECK );
	m_viewMenu->Append( m_showGrid );
	
	wxMenuItem* m_showLegend;
	m_showLegend = new wxMenuItem( m_viewMenu, wxID_ANY, wxString( _("Show &legend") ) , wxEmptyString, wxITEM_CHECK );
	m_viewMenu->Append( m_showLegend );
	
	m_mainMenu->Append( m_viewMenu, _("View") ); 
	
	this->SetMenuBar( m_mainMenu );
	
	m_sizer1 = new wxBoxSizer( wxVERTICAL );
	
	m_toolBar = new wxToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL|wxTB_TEXT ); 
	m_toolBar->Realize(); 
	
	m_sizer1->Add( m_toolBar, 0, wxEXPAND, 5 );
	
	m_splitterPlot = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
	m_splitterPlot->SetSashGravity( 0.8 );
	m_splitterPlot->Connect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterPlotOnIdle ), NULL, this );
	
	m_panel2 = new wxPanel( m_splitterPlot, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_sizer11 = new wxBoxSizer( wxVERTICAL );
	
	m_splitterConsole = new wxSplitterWindow( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
	m_splitterConsole->SetSashGravity( 0.8 );
	m_splitterConsole->Connect( wxEVT_IDLE, wxIdleEventHandler( SIM_PLOT_FRAME_BASE::m_splitterConsoleOnIdle ), NULL, this );
	
	m_plotPanel = new wxPanel( m_splitterConsole, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_sizer5 = new wxBoxSizer( wxHORIZONTAL );
	
	m_plotNotebook = new wxAuiNotebook( m_plotPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_MIDDLE_CLICK_CLOSE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT|wxAUI_NB_TOP );
	m_welcomePanel = new wxPanel( m_plotNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_sizer8 = new wxBoxSizer( wxVERTICAL );
	
	
	m_sizer8->Add( 0, 0, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer81;
	bSizer81 = new wxBoxSizer( wxHORIZONTAL );
	
	
	bSizer81->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_staticText2 = new wxStaticText( m_welcomePanel, wxID_ANY, _("Start the simulation by clicking the Run Simulation button"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText2->Wrap( -1 );
	m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
	m_staticText2->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
	
	bSizer81->Add( m_staticText2, 0, wxALIGN_RIGHT|wxALL|wxEXPAND, 5 );
	
	
	bSizer81->Add( 0, 0, 1, wxEXPAND, 5 );
	
	
	m_sizer8->Add( bSizer81, 0, wxEXPAND, 5 );
	
	
	m_sizer8->Add( 0, 0, 1, wxEXPAND, 5 );
	
	
	m_welcomePanel->SetSizer( m_sizer8 );
	m_welcomePanel->Layout();
	m_sizer8->Fit( m_welcomePanel );
	m_plotNotebook->AddPage( m_welcomePanel, _("a page"), false, wxNullBitmap );
	
	m_sizer5->Add( m_plotNotebook, 1, wxEXPAND | wxALL, 5 );
	
	
	m_plotPanel->SetSizer( m_sizer5 );
	m_plotPanel->Layout();
	m_sizer5->Fit( m_plotPanel );
	m_panel5 = new wxPanel( m_splitterConsole, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_sizer13 = new wxBoxSizer( wxVERTICAL );
	
	m_simConsole = new wxTextCtrl( m_panel5, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY );
	m_simConsole->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
	
	m_sizer13->Add( m_simConsole, 1, wxALL|wxEXPAND, 5 );
	
	
	m_panel5->SetSizer( m_sizer13 );
	m_panel5->Layout();
	m_sizer13->Fit( m_panel5 );
	m_splitterConsole->SplitHorizontally( m_plotPanel, m_panel5, 500 );
	m_sizer11->Add( m_splitterConsole, 1, wxEXPAND, 5 );
	
	
	m_panel2->SetSizer( m_sizer11 );
	m_panel2->Layout();
	m_sizer11->Fit( m_panel2 );
	m_sidePanel = new wxPanel( m_splitterPlot, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_sideSizer = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* sbSizer1;
	sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_sidePanel, wxID_ANY, _("Signals") ), wxVERTICAL );
	
	m_signals = new wxListBox( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_SORT ); 
	sbSizer1->Add( m_signals, 1, wxALL|wxEXPAND, 5 );
	
	
	m_sideSizer->Add( sbSizer1, 1, wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizer3;
	sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_sidePanel, wxID_ANY, _("Cursors") ), wxVERTICAL );
	
	m_cursors = new wxListCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL );
	sbSizer3->Add( m_cursors, 1, wxALL|wxEXPAND, 5 );
	
	
	m_sideSizer->Add( sbSizer3, 1, wxEXPAND, 5 );
	
	sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_sidePanel, wxID_ANY, _("Tune") ), wxVERTICAL );
	
	m_tuneSizer = new wxBoxSizer( wxHORIZONTAL );
	
	
	sbSizer4->Add( m_tuneSizer, 1, wxEXPAND, 5 );
	
	
	m_sideSizer->Add( sbSizer4, 1, wxEXPAND, 5 );
	
	
	m_sidePanel->SetSizer( m_sideSizer );
	m_sidePanel->Layout();
	m_sideSizer->Fit( m_sidePanel );
	m_splitterPlot->SplitVertically( m_panel2, m_sidePanel, 700 );
	m_sizer1->Add( m_splitterPlot, 1, wxEXPAND, 5 );
	
	
	this->SetSizer( m_sizer1 );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( m_newPlot->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuNewPlot ) );
	this->Connect( m_openWorkbook->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuOpenWorkbook ) );
	this->Connect( m_saveWorkbook->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveWorkbook ) );
	this->Connect( m_saveImage->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveImage ) );
	this->Connect( m_saveCsv->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveCsv ) );
	this->Connect( m_exitSim->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuExit ) );
	this->Connect( m_zoomIn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomIn ) );
	this->Connect( m_zoomOut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomOut ) );
	this->Connect( m_zoomFit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomFit ) );
	this->Connect( m_showGrid->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowGrid ) );
	this->Connect( m_showGrid->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowGridUpdate ) );
	this->Connect( m_showLegend->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegend ) );
	this->Connect( m_showLegend->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegendUpdate ) );
	m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotChanged ), NULL, this );
	m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotClose ), NULL, this );
	m_signals->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
	m_signals->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this );
}
Пример #11
0
HtMainFrame::HtMainFrame (const wxString &title, const wxPoint &pos, const wxSize &size, long flags) :
   wxAuiMDIParentFrame(0, wxID_ANY, title, pos, size, flags | wxBORDER_NONE | wxFRAME_NO_WINDOW_MENU),
   history(9, HT_FileHistory_Base)
{
   // logger
   logger = new wxLogWindow(this, wxT("Logger"), false);
   wxLog::SetActiveTarget(logger);

   aui_manager.SetManagedWindow(this);
   SetIcon(wxICON(hterminator));

   HtArtProvider &art = wxGetApp().art_provider;
   art.Add(wxT("images/common.png"), HTArtId_Common, wxT("image/png"), true, wxSize(16, 15));
   art.Add(wxT("images/main_tb.png"), HTArtId_MainTb, wxT("image/png"), true, wxSize(16, 16));
   art.Add(wxT("images/view_tb.png"), HTArtId_ViewTb, wxT("image/png"), true, wxSize(16, 15));
   art.Add(wxT("images/nav_tb.png"), HTArtId_NavTb, wxT("image/png"), true, wxSize(16, 15));

#if wxUSE_MENUS
   CreateMenu(art);
#endif //~wxUSE_MENUS

   BookmarksPanel *bookmarks = new BookmarksPanel(this, wxID_ANY);

   wxAuiToolBar *tb_main = new wxAuiToolBar(this, HT_Toolbar_Main/*, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW*/);
   tb_main->SetToolBitmapSize(wxSize(16, 15));
   tb_main->AddTool(HT_FileNew, _("New"), art.GetBitmap(HTArtId_MainTb, HTArt_New), _("New (Ctrl+N)"));
   tb_main->AddTool(HT_FileOpen, _("Open"), art.GetBitmap(HTArtId_MainTb, HTArt_Open), _("Open (Ctrl+O)"));
   tb_main->AddTool(HT_FileSave, _("Save"), art.GetBitmap(HTArtId_MainTb, HTArt_Save), _("Save (Ctrl+S)"))->SetDisabledBitmap(art.GetBitmap(HTArtId_MainTb, HTArt_SaveGr));
   tb_main->AddSeparator();
   tb_main->AddTool(HT_EditCut, _("Cut"), art.GetBitmap(HTArtId_MainTb, HTArt_Cut), _("Cut (Ctrl+X)"))->SetDisabledBitmap(art.GetBitmap(HTArtId_MainTb, HTArt_CutGr));
   tb_main->AddTool(HT_EditCopy, _("Copy"), art.GetBitmap(HTArtId_MainTb, HTArt_Copy), _("Copy (Ctrl+C)"))->SetDisabledBitmap(art.GetBitmap(HTArtId_MainTb, HTArt_CopyGr));
   tb_main->AddTool(HT_EditPaste, _("Paste"), art.GetBitmap(HTArtId_MainTb, HTArt_Paste), _("Paste (Ctrl+V)"))->SetDisabledBitmap(art.GetBitmap(HTArtId_MainTb, HTArt_PasteGr));
   tb_main->AddSeparator();
   tb_main->AddTool(HT_EditUndo, _("Undo"), art.GetBitmap(HTArtId_MainTb, HTArt_Undo), _("Undo (Ctrl+Z)"))->SetDisabledBitmap(art.GetBitmap(HTArtId_MainTb, HTArt_UndoGr));
   tb_main->AddTool(HT_EditRedo, _("Redo"), art.GetBitmap(HTArtId_MainTb, HTArt_Redo), _("Redo (Ctrl+Y)"))->SetDisabledBitmap(art.GetBitmap(HTArtId_MainTb, HTArt_RedoGr));
   tb_main->SetToolDropDown(HT_EditUndo, true);
   tb_main->SetToolDropDown(HT_FileOpen, true);
   tb_main->Realize();

   wxAuiToolBar *tb_view = new wxAuiToolBar(this, HT_Toolbar_View/*, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW*/);
   wxChoice *tablelist = new wxChoice(tb_view, HT_Tool_TableList);
   tb_view->AddControl(tablelist, _("Table"));
   tb_view->AddTool(HT_ViewAddTable, _("Add Table"), art.GetBitmap(HTArtId_ViewTb, HTArt_AddTable), _("Add table"));

   tablelist->Append(wxT("ASCII default"));
   tablelist->SetSelection(0);

   wxAuiToolBar *tb_nav = new wxAuiToolBar(this, HT_Toolbar_Navigation/*, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW*/);
   tb_nav->SetToolBitmapSize(wxSize(16, 15));
   tb_nav->AddTool(HT_EditFindForw, _("Find backward"), art.GetBitmap(HTArtId_NavTb, HTArt_SearchBack), _("Find Backward"));
   tb_nav->AddControl(new wxComboBox(tb_nav, HT_Tool_SearchBox, wxT(""), wxDefaultPosition, wxSize(200, 20)));
   tb_nav->AddTool(HT_EditFindBack, _("Find forward"), art.GetBitmap(HTArtId_NavTb, HTArt_SearchForw), _("Find Forward"));
   wxComboBox *jump_hex = new wxComboBox(tb_nav, HT_Tool_JumpHex, wxT(""), wxDefaultPosition, wxSize(115, 20));
   jump_hex->SetForegroundColour(wxColor(128, 0, 0));
   tb_nav->AddControl(jump_hex, _("Jump hex"));
   wxComboBox *jump_dec = new wxComboBox(tb_nav, HT_Tool_JumpDec, wxT(""), wxDefaultPosition, wxSize(140, 20));
   //jump_dec->SetFont(wxFont(10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false));
   jump_dec->SetForegroundColour(wxColor(0, 0, 128));
   tb_nav->AddControl(jump_dec, _("Jump decimal"));
   tb_nav->Realize();

   aui_manager.AddPane(tb_main, wxAuiPaneInfo().ToolbarPane().Top().LeftDockable(false).RightDockable(false));
   aui_manager.AddPane(tb_view, wxAuiPaneInfo().ToolbarPane().Top().Position(1).LeftDockable(false).RightDockable(false));
   aui_manager.AddPane(tb_nav, wxAuiPaneInfo().ToolbarPane().Top().Row(1).LeftDockable(false).RightDockable(false));
   
   aui_manager.AddPane(bookmarks, wxAuiPaneInfo().Right().PinButton().CloseButton().MinimizeButton().MinSize(150, 100)
      .BestSize(180, 100).FloatingSize(250, 200).Caption("Bookmarks").Name("bookmarks"));

   statusbar = new wxStatusBar(this, wxID_ANY, wxSB_FLAT);
   statusbar->SetFieldsCount(1);
   statusbar->PushStatusText(_("Ready"));
   SetStatusBar(statusbar);
  
   wxAuiMDIParentFrame::GetClientWindow()->Connect(
      wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(HtMainFrame::OnNotebookPageClose));

   jump_hex->Connect(wxEVT_TEXT_ENTER, wxCommandEventHandler(HtMainFrame::OnJumpHexTextEnter));
   //jump_hex->Connect(wxEVT_TEXT, wxCommandEventHandler(HtMainFrame::OnJumpHexTextEnter));


#ifdef WXDEBUG
   DebugPanel *debugPanel = new DebugPanel(this, HT_DebugPanel);
   
   aui_manager.AddPane(debugPanel, wxAuiPaneInfo().Right().PinButton().CloseButton().MinimizeButton()
      .MinSize(150, 100).BestSize(240, 100).FloatingSize(250, 200).Caption("Debug Info").Name("debug_pane"));

   aui_manager.GetPane("bookmarks").Hide();

   wxAuiMDIParentFrame::GetClientWindow()->Connect(
      wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(HtMainFrame::OnNotebookPageChange));
#endif

   aui_manager.Update();

   // TEMP -----------------
   //DoOpenFile(wxT("D:/Projects/ricardojricken/trunk/hexterminator/test/1452 - Metroid - Zero Mission (EU) (M5).gba"));
   DoOpenFile("test/1452 - Metroid - Zero Mission (EU) (M5).gba");
}