Пример #1
0
void RightPopupMenu::SetRightPopupMenu(wxMenu& menu, int x, int y)
{
	OnSelected(x, y);

	CreateCommonMenu(menu);
	CreateSelectMenu(menu);
	CreateDebugMenu(menu);
}
Пример #2
0
void MainMenuBar::AddMenus()
{
  Append(CreateFileMenu(), _("&File"));
  Append(CreateEmulationMenu(), _("&Emulation"));
  Append(CreateMovieMenu(), _("&Movie"));
  Append(CreateOptionsMenu(), _("&Options"));
  Append(CreateToolsMenu(), _("&Tools"));
  Append(CreateViewMenu(), _("&View"));

  if (m_type == MenuType::Debug)
  {
    Append(CreateJITMenu(), _("&JIT"));
    Append(CreateDebugMenu(), _("&Debug"));
    Append(CreateSymbolsMenu(), _("&Symbols"));
    Append(CreateProfilerMenu(), _("&Profiler"));
  }

  Append(CreateHelpMenu(), _("&Help"));
}
Пример #3
0
int _tmain(int argc, _TCHAR* argv[])
{
	osgDB::FilePathList filepath;

	char* ptr = getenv( "SIGMAOSG_DATA_PATH" );
	if ( ptr )
	{
		osgDB::convertStringPathIntoFilePathList( ptr, filepath );
		osgDB::appendPlatformSpecificResourceFilePaths(filepath);
		osgDB::setDataFilePathList(filepath);
	}

    // construct the viewer
    osg::ref_ptr<osgViewer::Viewer> rViewer = new osgViewer::Viewer;

	rViewer->setThreadingModel( osgViewer::ViewerBase::SingleThreaded );

    rViewer->setUpViewInWindow( 32, 32, 800, 600 );

   // add the handler to the viewer
	CreateDebugMenu();
    osg::ref_ptr<CSulDebugMenuKeyboardHandler> rKeyboardHandler = new CSulDebugMenuKeyboardHandler( pMenu );
    rViewer->addEventHandler( rKeyboardHandler.get() );

    // set the scene-graph data the viewer will render
	osg::Group* pGroupRoot = new osg::Group;
	pGroupRoot->addChild( CreateScene( rViewer ) );
    rViewer->setSceneData( pGroupRoot );

	rViewer->setCameraManipulator( new osgGA::TrackballManipulator );

	pGroupRoot->addChild( pMenu );

    // execute main loop
    return rViewer->run();
}
Пример #4
0
CMainWindow::CMainWindow(CPS2VM& virtualMachine, char* cmdLine) 
: m_virtualMachine(virtualMachine)
, m_recordingAvi(false)
, m_recordBuffer(nullptr)
, m_recordBufferWidth(0)
, m_recordBufferHeight(0)
, m_recordAviMutex(NULL)
, m_frames(0)
, m_drawCallCount(0)
, m_stateSlot(0)
, m_outputWnd(nullptr)
, m_statusBar(nullptr)
, m_accTable(NULL)
{
	m_recordAviMutex = CreateMutex(NULL, FALSE, NULL);

	TCHAR sVersion[256];

	CAppConfig::GetInstance().RegisterPreferenceBoolean(PREF_UI_PAUSEWHENFOCUSLOST, true);

	if(!DoesWindowClassExist(CLSNAME))
	{
		WNDCLASSEX wc;
		memset(&wc, 0, sizeof(WNDCLASSEX));
		wc.cbSize			= sizeof(WNDCLASSEX);
		wc.hCursor			= LoadCursor(NULL, IDC_ARROW);
		wc.hbrBackground	= (HBRUSH)(COLOR_WINDOW); 
		wc.hInstance		= GetModuleHandle(NULL);
		wc.lpszClassName	= CLSNAME;
		wc.lpfnWndProc		= CWindow::WndProc;
		wc.style			= CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
		RegisterClassEx(&wc);
	}

	Create(NULL, CLSNAME, _T(""), WNDSTYLE, Framework::Win32::CRect(0, 0, 640, 480), NULL, NULL);
	SetClassPtr();

#ifdef DEBUGGER_INCLUDED
	CDebugger::InitializeConsole();
#endif

	m_virtualMachine.Initialize();

	SetIcon(ICON_SMALL, LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_PUREI)));
	SetIcon(ICON_BIG, LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_PUREI)));

	SetMenu(LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MAINWINDOW)));

#ifdef DEBUGGER_INCLUDED
	m_debugger = std::unique_ptr<CDebugger>(new CDebugger(m_virtualMachine));
	m_frameDebugger = std::unique_ptr<CFrameDebugger>(new CFrameDebugger());
	CreateDebugMenu();
#endif

	PrintVersion(sVersion, countof(sVersion));

	m_outputWnd = new COutputWnd(m_hWnd);

	m_statusBar = new Framework::Win32::CStatusBar(m_hWnd);
	m_statusBar->SetParts(2, m_statusBarPanelWidths);
	m_statusBar->SetText(STATUSPANEL,	sVersion);
	m_statusBar->SetText(FPSPANEL,		_T(""));

	//m_virtualMachine.CreateGSHandler(CGSH_Null::GetFactoryFunction());
	m_virtualMachine.CreateGSHandler(CGSH_OpenGLWin32::GetFactoryFunction(m_outputWnd));

	m_virtualMachine.CreatePadHandler(CPH_DirectInput::GetFactoryFunction(m_hWnd));

	m_deactivatePause = false;
	m_pauseFocusLost = CAppConfig::GetInstance().GetPreferenceBoolean(PREF_UI_PAUSEWHENFOCUSLOST);

	m_virtualMachine.m_gs->OnNewFrame.connect(boost::bind(&CMainWindow::OnNewFrame, this, _1));

	SetTimer(m_hWnd, NULL, 1000, NULL);
	//Initialize status bar
	OnTimer(0);

	m_virtualMachine.m_os->OnExecutableChange.connect(boost::bind(&CMainWindow::OnExecutableChange, this));

	CreateStateSlotMenu();
	CreateAccelerators();

	if(strstr(cmdLine, "--cdrom0") != nullptr)
	{
		BootCDROM();
	}
#ifdef DEBUGGER_INCLUDED
	if(strstr(cmdLine, "--debugger") != nullptr)
	{
		ShowDebugger();
	}
	if(strstr(cmdLine, "--framedebugger") != nullptr)
	{
		ShowFrameDebugger();
	}
#endif

	RefreshLayout();

	UpdateUI();
	Center();
	Show(SW_SHOW);
}