Exemple #1
0
  virtual bool OnInit() override
  {
    if (!wxExTestApp::OnInit())
    {
      return false;
    }
  
    m_Frame = new wxExTestManagedFrame(
      nullptr, wxID_ANY, wxTheApp->GetAppDisplayName());
    m_Frame->Show();
    
    wxExProcess::PrepareOutput(m_Frame);
    AddPane(m_Frame, wxExProcess::GetShell());
    
    std::vector<wxExStatusBarPane> panes;

    panes.emplace_back(wxExStatusBarPane());
    
    for (int i = 0; i < 15; i++)
    {
      panes.emplace_back(wxExStatusBarPane(wxString::Format("Pane%d", i)));
    }
    
    panes.emplace_back(wxExStatusBarPane("PaneInfo"));
    panes.emplace_back(wxExStatusBarPane("PaneLexer"));
    panes.emplace_back(wxExStatusBarPane("PaneFileType"));
    panes.emplace_back(wxExStatusBarPane("LastPane"));

    m_StatusBar = m_Frame->SetupStatusBar(panes);
    
    m_STC = new wxExSTC(m_Frame);
    AddPane(m_Frame, m_STC);
    
    return true;
  }
Exemple #2
0
void CFrame::OnToolBar(wxCommandEvent& event)
{
	ClearStatusBar();

	switch (event.GetId())
	{
		case IDM_SAVE_PERSPECTIVE:
			if (Perspectives.size() == 0)
			{
				wxMessageBox(_("Please create a perspective before saving"),
						_("Notice"), wxOK, this);
				return;
			}
			SaveIniPerspectives();
			GetStatusBar()->SetStatusText(wxString::FromAscii(std::string
						("Saved " + Perspectives[ActivePerspective].Name).c_str()), 0);
			break;
		case IDM_PERSPECTIVES_ADD_PANE:
			AddPane();
			break;
		case IDM_EDIT_PERSPECTIVES:
			m_bEdit = !m_bEdit;
			m_ToolBarAui->SetToolSticky(IDM_EDIT_PERSPECTIVES, m_bEdit);
			TogglePaneStyle(m_bEdit, IDM_EDIT_PERSPECTIVES);
			break;
	}
}
//================>>> myCmdWindow::myCmdWindow <<<================
  myCmdWindow::myCmdWindow(VCONST char* name, int width, int height) :
    vCmdWindow(name, width, height)
  {
    // Create and add the proper panes to the CmdWindow

    *_fname = 0;			// no name

    myMenu = new vMenuPane(MainMenu);	// Add the main menu
    AddPane(myMenu);

    myCmdPane = new vCommandPane(CommandBar); // Add command pane
    AddPane(myCmdPane);

    myCanvas = new myCanvasPane;	// Add the canvas pane
    AddPane(myCanvas);

    ShowWindow();	    // FINALLY, we must show the window!
  }
	//*************************************************************************
	// Method:		RefreshLayoutOfGroup
	// Description: refreshes the layout of the panes in a group based on positions
	//
	// Parameters:
	//	group - the group to refresh
	//
	// Return Value: None
	//*************************************************************************
	void DockablePaneManager::RefreshLayoutOfGroup(String *group)
	{
		ArrayList *list = dynamic_cast<ArrayList *>(groupToContentListTable->get_Item(group));
		if (!list || list->Count == 0)
			return;

		WindowContent *windowContent;

		// put them in the correct order in a new list
		ArrayList *orderedList = new ArrayList();
		IEnumerator *enumerator = list->GetEnumerator();
		while (enumerator->MoveNext())
		{
			Content *content = dynamic_cast<Content *>(enumerator->Current);
			if (!content)
				continue;
			DockablePane *pane = dynamic_cast<DockablePane *>(content->Control);
			if (!pane)
				continue;

			windowContent = content->ParentWindowContent;

			int insertPos = GetInsertPositionForContentList(orderedList, pane);
			orderedList->Insert(insertPos, content);
		}

		// remove all the panes
		enumerator = orderedList->GetEnumerator();
		while (enumerator->MoveNext())
		{
			Content *content = dynamic_cast<Content *>(enumerator->Current);
			if (!content)
				continue;

			if (dockManager->Contents && dockManager->Contents->Contains(content))
				dockManager->Contents->Remove(content);
			list->Remove(content);
		}
		groupToContentListTable->Remove(group);

		// put them back in the right order
		enumerator = orderedList->GetEnumerator();
		while (enumerator->MoveNext())
		{
			Content *content = dynamic_cast<Content *>(enumerator->Current);
			if (!content)
				continue;
			DockablePane *pane = dynamic_cast<DockablePane *>(content->Control);
			if (!pane)
				continue;

			AddPane(pane);
		}
	}
//====================>>> testCmdWindow::testCmdWindow <<<====================
  testCmdWindow::testCmdWindow(char* name, int height, int width) :
    vCmdWindow(name, height, width)
  {
    UserDebug1(Constructor,"testCmdWindow::testCmdWindow(%s) Constructor\n",name)

    // The Menu Bar
    testMenu = new vMenuPane(StandardMenu);
    AddPane(testMenu);

    // The Canvas
    testCanvas = new testCanvasPane;
    AddPane(testCanvas);


    // Show Window

    ShowWindow();
    testCanvas->ShowVScroll(1);	// Show Vert Scroll
    testCanvas->ShowHScroll(1);	// Show Horiz Scroll
  }
Exemple #6
0
 FrameWithHistory(wxWindow* parent,
   wxWindowID id,
   const wxString& title,
   size_t maxFiles = 9,
   size_t maxProjects = 0,
   int style = wxDEFAULT_FRAME_STYLE) 
   : wxExFrameWithHistory(parent, id, title, maxFiles, maxProjects, style) {
     wxExLexer lexer("cpp");
     m_Report = new wxExListView(
       this, 
       wxExListView::LIST_KEYWORD,
       wxID_ANY,
       &lexer);
     AddPane(this, m_Report);};
Exemple #7
0
MainFrame::MainFrame()
	: FrameBase(NULL, wxID_ANY, "", "MainFrame", wxSize(280, 180))
	, m_aui_mgr(this)
{
	SetLabel(wxString::Format(_PRGNAME_ " " _PRGVER_ " r%d" SVN_MOD " (" SVN_DATE ")", SVN_REV));
	wxMenuBar& menubar(*new wxMenuBar());

	wxMenu& menu_boot(*new wxMenu());
	wxMenu& menu_sys(*new wxMenu());
	wxMenu& menu_conf(*new wxMenu());

	menubar.Append(&menu_boot, "Boot");
	menubar.Append(&menu_sys, "System");
	menubar.Append(&menu_conf, "Config");

	menu_boot.Append(id_boot_game, "Boot game");
	menu_boot.AppendSeparator();
	menu_boot.Append(id_boot_elf, "Boot Elf");
	//menu_boot.Append(id_boot_self, "Boot Self");

	menu_sys.Append(id_sys_pause, "Pause");
	menu_sys.Append(id_sys_stop, "Stop\tCtrl + S");
	menu_sys.AppendSeparator();
	menu_sys.Append(id_sys_send_exit, "Send exit cmd");

	menu_conf.Append(id_config_emu, "Settings");

	SetMenuBar(&menubar);

	m_game_viewer = new GameViewer(this);
	AddPane(m_game_viewer, "Game List", wxAUI_DOCK_BOTTOM);
	
	Connect( id_boot_game,  wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::BootGame) );
	Connect( id_boot_elf,   wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::BootElf) );
	Connect( id_boot_self,  wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::BootSelf) );

	Connect( id_sys_pause,  wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::Pause) );
	Connect( id_sys_stop,   wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::Stop) );
	Connect( id_sys_send_exit,   wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::SendExit) );
	Connect( id_update_dbg, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::UpdateUI) );

	Connect( id_config_emu, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::Config) );
	m_app_connector.Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainFrame::OnKeyDown), (wxObject*)0, this);

	UpdateUI();
}
Exemple #8
0
/* $pw insert $index $slave ?-option value ...?
 * 	Insert new slave, or move existing one.
 */
static int PanedInsertCommand(
    void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
    Paned *pw = recordPtr;
    int nSlaves = Ttk_NumberSlaves(pw->paned.mgr);
    int srcIndex, destIndex;
    Tk_Window slaveWindow;

    if (objc < 4) {
        Tcl_WrongNumArgs(interp, 2,objv, "index slave ?-option value ...?");
        return TCL_ERROR;
    }

    slaveWindow = Tk_NameToWindow(
                      interp, Tcl_GetString(objv[3]), pw->core.tkwin);
    if (!slaveWindow) {
        return TCL_ERROR;
    }

    if (!strcmp(Tcl_GetString(objv[2]), "end")) {
        destIndex = Ttk_NumberSlaves(pw->paned.mgr);
    } else if (TCL_OK != Ttk_GetSlaveIndexFromObj(
                   interp,pw->paned.mgr,objv[2],&destIndex))
    {
        return TCL_ERROR;
    }

    srcIndex = Ttk_SlaveIndex(pw->paned.mgr, slaveWindow);
    if (srcIndex < 0) { /* New slave: */
        return AddPane(interp, pw, destIndex, slaveWindow, objc-4, objv+4);
    } /* else -- move existing slave: */

    if (destIndex >= nSlaves)
        destIndex  = nSlaves - 1;
    Ttk_ReorderSlave(pw->paned.mgr, srcIndex, destIndex);

    return objc == 4 ? TCL_OK :
           ConfigurePane(interp, pw,
                         Ttk_SlaveData(pw->paned.mgr, destIndex),
                         Ttk_SlaveWindow(pw->paned.mgr, destIndex),
                         objc-4,objv+4);
}
Exemple #9
0
/* $pw add window [ options ... ]
 */
static int PanedAddCommand(
    void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
    Paned *pw = recordPtr;
    Tk_Window slaveWindow;

    if (objc < 3) {
        Tcl_WrongNumArgs(interp, 2, objv, "window");
        return TCL_ERROR;
    }

    slaveWindow = Tk_NameToWindow(
                      interp, Tcl_GetString(objv[2]), pw->core.tkwin);

    if (!slaveWindow) {
        return TCL_ERROR;
    }

    return AddPane(interp, pw, Ttk_NumberSlaves(pw->paned.mgr), slaveWindow,
                   objc - 3, objv + 3);
}
Exemple #10
0
MainFrame::MainFrame()
	: FrameBase(nullptr, wxID_ANY, "", "MainFrame", wxSize(900, 600))
	, m_aui_mgr(this)
	, m_sys_menu_opened(false)
{

	SetLabel("RPCS3 v" + rpcs3::version.to_string());

	wxMenuBar* menubar = new wxMenuBar();

	wxMenu* menu_boot = new wxMenu();
	menubar->Append(menu_boot, "&Boot");
	menu_boot->Append(id_boot_elf, "Boot &ELF / SELF file");
	menu_boot->Append(id_boot_game, "Boot &game");
	menu_boot->AppendSeparator();
	menu_boot->Append(id_boot_install_pkg, "&Install PKG");
	menu_boot->AppendSeparator();
	menu_boot->Append(id_boot_exit, "&Exit");

	wxMenu* menu_sys = new wxMenu();
	menubar->Append(menu_sys, "&System");
	menu_sys->Append(id_sys_pause, "&Pause")->Enable(false);
	menu_sys->Append(id_sys_stop, "&Stop\tCtrl + S")->Enable(false);
	menu_sys->AppendSeparator();
	menu_sys->Append(id_sys_send_open_menu, "Send &open system menu cmd")->Enable(false);
	menu_sys->Append(id_sys_send_exit, "Send &exit cmd")->Enable(false);

	wxMenu* menu_conf = new wxMenu();
	menubar->Append(menu_conf, "&Config");
	menu_conf->Append(id_config_emu, "&Settings");
	menu_conf->Append(id_config_pad, "&PAD Settings");
	menu_conf->AppendSeparator();
	menu_conf->Append(id_config_autopause_manager, "&Auto Pause Settings");
	//menu_conf->AppendSeparator();
	//menu_conf->Append(id_config_vfs_manager, "Virtual &File System Manager");
	//menu_conf->Append(id_config_vhdd_manager, "Virtual &HDD Manager");
	//menu_conf->Append(id_config_savedata_manager, "Save &Data Utility");

	wxMenu* menu_tools = new wxMenu();
	menubar->Append(menu_tools, "&Tools");
	//menu_tools->Append(id_tools_compiler, "&ELF Compiler");
	menu_tools->Append(id_tools_cg_disasm, "&Cg Disasm")->Enable();
	menu_tools->Append(id_tools_kernel_explorer, "&Kernel Explorer")->Enable(false);
	menu_tools->Append(id_tools_memory_viewer, "&Memory Viewer")->Enable(false);
	menu_tools->Append(id_tools_rsx_debugger, "&RSX Debugger")->Enable(false);
	menu_tools->Append(id_tools_string_search, "&String Search")->Enable(false);
	menu_tools->AppendSeparator();
	menu_tools->Append(id_tools_decrypt_sprx_libraries, "&Decrypt SPRX libraries");

	wxMenu* menu_help = new wxMenu();
	menubar->Append(menu_help, "&Help");
	menu_help->Append(id_help_about, "&About...");

	SetMenuBar(menubar);
	SetIcon(wxICON(frame_icon));

	// Panels
	m_log_frame = new LogFrame(this);
	m_game_viewer = new GameViewer(this);
	m_debugger_frame = new DebuggerPanel(this);

	AddPane(m_game_viewer, "Game List", wxAUI_DOCK_CENTRE);
	AddPane(m_log_frame, "Log", wxAUI_DOCK_BOTTOM);
	AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT);
	
	// Events
	Bind(wxEVT_MENU, &MainFrame::BootElf, this, id_boot_elf);
	Bind(wxEVT_MENU, &MainFrame::BootGame, this, id_boot_game);
	Bind(wxEVT_MENU, &MainFrame::InstallPkg, this, id_boot_install_pkg);
	Bind(wxEVT_MENU, [](wxCommandEvent&){ wxGetApp().Exit(); }, id_boot_exit);

	Bind(wxEVT_MENU, &MainFrame::Pause, this, id_sys_pause);
	Bind(wxEVT_MENU, &MainFrame::Stop, this, id_sys_stop);
	Bind(wxEVT_MENU, &MainFrame::SendOpenCloseSysMenu, this, id_sys_send_open_menu);
	Bind(wxEVT_MENU, &MainFrame::SendExit, this, id_sys_send_exit);

	Bind(wxEVT_MENU, &MainFrame::Config, this, id_config_emu);
	Bind(wxEVT_MENU, &MainFrame::ConfigPad, this, id_config_pad);
	Bind(wxEVT_MENU, &MainFrame::ConfigAutoPause, this, id_config_autopause_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigVFS, this, id_config_vfs_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigVHDD, this, id_config_vhdd_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigSaveData, this, id_config_savedata_manager);
	Bind(wxEVT_MENU, &MainFrame::DecryptSPRXLibraries, this, id_tools_decrypt_sprx_libraries);

	Bind(wxEVT_MENU, &MainFrame::OpenELFCompiler, this, id_tools_compiler);
	Bind(wxEVT_MENU, &MainFrame::OpenKernelExplorer, this, id_tools_kernel_explorer);
	Bind(wxEVT_MENU, &MainFrame::OpenMemoryViewer, this, id_tools_memory_viewer);
	Bind(wxEVT_MENU, &MainFrame::OpenRSXDebugger, this, id_tools_rsx_debugger);
	Bind(wxEVT_MENU, &MainFrame::OpenStringSearch, this, id_tools_string_search);
	Bind(wxEVT_MENU, &MainFrame::OpenCgDisasm, this, id_tools_cg_disasm);

	Bind(wxEVT_MENU, &MainFrame::AboutDialogHandler, this, id_help_about);

	Bind(wxEVT_MENU, &MainFrame::UpdateUI, this, id_update_dbg);

	wxGetApp().Bind(wxEVT_KEY_DOWN, &MainFrame::OnKeyDown, this);
	wxGetApp().Bind(wxEVT_DBG_COMMAND, &MainFrame::UpdateUI, this);
}
Exemple #11
0
MainFrame::MainFrame()
	: FrameBase(nullptr, wxID_ANY, "", "MainFrame", wxSize(800, 600))
	, m_aui_mgr(this)
	, m_sys_menu_opened(false)
{

#ifdef _DEBUG
	SetLabel(wxString::Format(_PRGNAME_ " git-" RPCS3_GIT_VERSION));
#else
	SetLabel(wxString::Format(_PRGNAME_ " " _PRGVER_));
#endif

	wxMenuBar* menubar = new wxMenuBar();

	wxMenu* menu_boot = new wxMenu();
	menubar->Append(menu_boot, "Boot");
	menu_boot->Append(id_boot_elf, "Boot ELF / SELF file");
	menu_boot->Append(id_boot_game, "Boot game");
	menu_boot->AppendSeparator();
	menu_boot->Append(id_install_pkg, "Install PKG");

	wxMenu* menu_sys = new wxMenu();
	menubar->Append(menu_sys, "System");
	menu_sys->Append(id_sys_pause, "Pause")->Enable(false);
	menu_sys->Append(id_sys_stop, "Stop\tCtrl + S")->Enable(false);
	menu_sys->AppendSeparator();
	menu_sys->Append(id_sys_send_open_menu, "Send open system menu cmd")->Enable(false);
	menu_sys->Append(id_sys_send_exit, "Send exit cmd")->Enable(false);

	wxMenu* menu_conf = new wxMenu();
	menubar->Append(menu_conf, "Config");
	menu_conf->Append(id_config_emu, "Settings");
	menu_conf->Append(id_config_pad, "PAD Settings");
	menu_conf->AppendSeparator();
	menu_conf->Append(id_config_autopause_manager, "Auto Pause Settings");
	menu_conf->AppendSeparator();
	menu_conf->Append(id_config_vfs_manager, "Virtual File System Manager");
	menu_conf->Append(id_config_vhdd_manager, "Virtual HDD Manager");
	menu_conf->Append(id_config_savedata_manager, "Save Data Utility");

	wxMenu* menu_tools = new wxMenu();
	menubar->Append(menu_tools, "Tools");
	menu_tools->Append(id_tools_compiler, "ELF Compiler");
	menu_tools->Append(id_tools_kernel_explorer, "Kernel Explorer")->Enable(false);
	menu_tools->Append(id_tools_memory_viewer, "Memory Viewer")->Enable(false);
	menu_tools->Append(id_tools_rsx_debugger, "RSX Debugger")->Enable(false);

	wxMenu* menu_help = new wxMenu();
	menubar->Append(menu_help, "Help");
	menu_help->Append(id_help_about, "About...");

	SetMenuBar(menubar);

	// Panels
	m_game_viewer = new GameViewer(this);
	m_debugger_frame = new DebuggerPanel(this);
	m_log_frame = new LogFrame(this);

	AddPane(m_game_viewer, "Game List", wxAUI_DOCK_CENTRE);
	AddPane(m_log_frame, "Log", wxAUI_DOCK_BOTTOM);
	AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT);
	
	// Events
	Bind(wxEVT_MENU, &MainFrame::BootElf, this, id_boot_elf);
	Bind(wxEVT_MENU, &MainFrame::BootGame, this, id_boot_game);
	Bind(wxEVT_MENU, &MainFrame::InstallPkg, this, id_install_pkg);

	Bind(wxEVT_MENU, &MainFrame::Pause, this, id_sys_pause);
	Bind(wxEVT_MENU, &MainFrame::Stop, this, id_sys_stop);
	Bind(wxEVT_MENU, &MainFrame::SendOpenCloseSysMenu, this, id_sys_send_open_menu);
	Bind(wxEVT_MENU, &MainFrame::SendExit, this, id_sys_send_exit);

	Bind(wxEVT_MENU, &MainFrame::Config, this, id_config_emu);
	Bind(wxEVT_MENU, &MainFrame::ConfigPad, this, id_config_pad);
	Bind(wxEVT_MENU, &MainFrame::ConfigVFS, this, id_config_vfs_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigVHDD, this, id_config_vhdd_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigAutoPause, this, id_config_autopause_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigSaveData, this, id_config_savedata_manager);

	Bind(wxEVT_MENU, &MainFrame::OpenELFCompiler, this, id_tools_compiler);
	Bind(wxEVT_MENU, &MainFrame::OpenKernelExplorer, this, id_tools_kernel_explorer);
	Bind(wxEVT_MENU, &MainFrame::OpenMemoryViewer, this, id_tools_memory_viewer);
	Bind(wxEVT_MENU, &MainFrame::OpenRSXDebugger, this, id_tools_rsx_debugger);

	Bind(wxEVT_MENU, &MainFrame::AboutDialogHandler, this, id_help_about);

	Bind(wxEVT_MENU, &MainFrame::UpdateUI, this, id_update_dbg);

	wxGetApp().Bind(wxEVT_KEY_DOWN, &MainFrame::OnKeyDown, this);
	wxGetApp().Bind(wxEVT_DBG_COMMAND, &MainFrame::UpdateUI, this);
}
Exemple #12
0
void CFrame::OnPerspectiveMenu(wxCommandEvent& event)
{
	ClearStatusBar();

	switch (event.GetId())
	{
		case IDM_SAVE_PERSPECTIVE:
			if (Perspectives.size() == 0)
			{
				wxMessageBox(_("Please create a perspective before saving"),
						_("Notice"), wxOK, this);
				return;
			}
			SaveIniPerspectives();
			GetStatusBar()->SetStatusText(StrToWxStr(std::string
						("Saved " + Perspectives[ActivePerspective].Name)), 0);
			break;
		case IDM_PERSPECTIVES_ADD_PANE:
			AddPane();
			break;
		case IDM_EDIT_PERSPECTIVES:
			m_bEdit = event.IsChecked();
			TogglePaneStyle(m_bEdit, IDM_EDIT_PERSPECTIVES);
			break;
		case IDM_ADD_PERSPECTIVE:
			{
				wxTextEntryDialog dlg(this,
						_("Enter a name for the new perspective:"),
						_("Create new perspective"));
				wxString DefaultValue = wxString::Format(_("Perspective %d"), (int)(Perspectives.size() + 1));
				dlg.SetValue(DefaultValue);

				int Return = 0;
				bool DlgOk = false;

				while (!DlgOk)
				{
					Return = dlg.ShowModal();
					if (Return == wxID_CANCEL)
					{
						return;
					}
					else if (dlg.GetValue().Find(",") != -1)
					{
						wxMessageBox(_("The name cannot contain the character ','"),
								_("Notice"), wxOK, this);
						wxString Str = dlg.GetValue();
						Str.Replace(",", "", true);
						dlg.SetValue(Str);
					}
					else if (dlg.GetValue().IsSameAs(""))
					{
						wxMessageBox(_("The name cannot be empty"),
								_("Notice"), wxOK, this);
						dlg.SetValue(DefaultValue);
					}
					else
					{
						DlgOk = true;
					}
				}

				SPerspectives Tmp;
				Tmp.Name = WxStrToStr(dlg.GetValue());
				Tmp.Perspective = m_Mgr->SavePerspective();

				ActivePerspective = (u32)Perspectives.size();
				Perspectives.push_back(Tmp);

				UpdateCurrentPerspective();
				PopulateSavedPerspectives();
			}
			break;
		case IDM_TAB_SPLIT:
			m_bTabSplit = event.IsChecked();
			ToggleNotebookStyle(m_bTabSplit, wxAUI_NB_TAB_SPLIT);
			break;
		case IDM_NO_DOCKING:
			m_bNoDocking = event.IsChecked();
			TogglePaneStyle(m_bNoDocking, IDM_NO_DOCKING);
			break;
	}
}
Exemple #13
0
MainFrame::MainFrame()
	: FrameBase(nullptr, wxID_ANY, "", "MainFrame", wxSize(800, 600))
	, m_aui_mgr(this)
	, m_sys_menu_opened(false)
{

#ifdef _DEBUG
	SetLabel(wxString::Format(_PRGNAME_ " git-" RPCS3_GIT_VERSION));
#else
	SetLabel(wxString::Format(_PRGNAME_ " " _PRGVER_));
#endif

	wxMenuBar& menubar(*new wxMenuBar());

	wxMenu& menu_boot(*new wxMenu());
	menubar.Append(&menu_boot, "Boot");
	menu_boot.Append(id_boot_game, "Boot game");
	menu_boot.Append(id_install_pkg, "Install PKG");
	menu_boot.AppendSeparator();
	menu_boot.Append(id_boot_elf, "Boot (S)ELF");

	wxMenu& menu_sys(*new wxMenu());
	menubar.Append(&menu_sys, "System");
	menu_sys.Append(id_sys_pause, "Pause")->Enable(false);
	menu_sys.Append(id_sys_stop, "Stop\tCtrl + S")->Enable(false);
	menu_sys.AppendSeparator();
	menu_sys.Append(id_sys_send_open_menu, "Send open system menu cmd")->Enable(false);
	menu_sys.Append(id_sys_send_exit, "Send exit cmd")->Enable(false);

	wxMenu& menu_conf(*new wxMenu());
	menubar.Append(&menu_conf, "Config");
	menu_conf.Append(id_config_emu, "Settings");
	menu_conf.Append(id_config_pad, "PAD Settings");
	menu_conf.AppendSeparator();
	menu_conf.Append(id_config_vfs_manager, "Virtual File System Manager");
	menu_conf.Append(id_config_vhdd_manager, "Virtual HDD Manager");

	wxMenu& menu_tools(*new wxMenu());
	menubar.Append(&menu_tools, "Tools");
	menu_tools.Append(id_tools_compiler, "ELF Compiler");
	menu_tools.Append(id_tools_memory_viewer, "Memory Viewer");
	menu_tools.Append(id_tools_rsx_debugger, "RSX Debugger");

	wxMenu& menu_help(*new wxMenu());
	menubar.Append(&menu_help, "Help");
	menu_help.Append(id_help_about, "About...");

	SetMenuBar(&menubar);

	// Panels
	m_game_viewer = new GameViewer(this);
	m_debugger_frame = new DebuggerPanel(this);
	ConLogFrame = new LogFrame(this);

	AddPane(m_game_viewer, "Game List", wxAUI_DOCK_BOTTOM);
	AddPane(ConLogFrame, "Log", wxAUI_DOCK_BOTTOM);
	AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT);
	
	// Events
	Connect( id_boot_game,			 wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::BootGame) );
	Connect( id_install_pkg,		 wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::InstallPkg) );
	Connect( id_boot_elf,			 wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::BootElf) );

	Connect( id_sys_pause,           wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::Pause) );
	Connect( id_sys_stop,            wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::Stop) );
	Connect( id_sys_send_open_menu,	 wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::SendOpenCloseSysMenu) );
	Connect( id_sys_send_exit,       wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::SendExit) );

	Connect( id_config_emu,          wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::Config) );
	Connect( id_config_pad,          wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::ConfigPad) );
	Connect( id_config_vfs_manager,  wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::ConfigVFS) );
	Connect( id_config_vhdd_manager, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::ConfigVHDD) );

	Connect( id_tools_compiler,		 wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OpenELFCompiler));
	Connect( id_tools_memory_viewer, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OpenMemoryViewer));
	Connect( id_tools_rsx_debugger,  wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OpenRSXDebugger));

	Connect( id_help_about,          wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::AboutDialogHandler) );

	Connect( id_update_dbg,          wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::UpdateUI) );

	m_app_connector.Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainFrame::OnKeyDown), (wxObject*)0, this);
	m_app_connector.Connect(wxEVT_DBG_COMMAND, wxCommandEventHandler(MainFrame::UpdateUI), (wxObject*)0, this);
}
Exemple #14
0
MainFrame::MainFrame()
	: FrameBase(nullptr, wxID_ANY, "", "MainFrame", wxSize(900, 600))
	, m_aui_mgr(this)
	, m_sys_menu_opened(false)
{

	SetLabel(wxString::Format(_PRGNAME_ " v" _PRGVER_ "-" RPCS3_GIT_VERSION));

	wxMenuBar* menubar = new wxMenuBar();

	wxMenu* menu_boot = new wxMenu();
	menubar->Append(menu_boot, "&File");
	menu_boot->Append(id_boot_elf, "Boot &ELF / SELF file");
	menu_boot->Append(id_boot_game, "Boot &game");
	menu_boot->AppendSeparator();
	menu_boot->Append(id_boot_install_pkg, "&Install PKG");
	menu_boot->AppendSeparator();
	menu_boot->Append(id_boot_exit, "&Exit");

	wxMenu* menu_sys = new wxMenu();
	menubar->Append(menu_sys, "&System");
	menu_sys->Append(id_sys_pause, "&Pause")->Enable(false);
	menu_sys->Append(id_sys_stop, "&Stop\tCtrl + S")->Enable(false);
	menu_sys->AppendSeparator();
	menu_sys->Append(id_sys_send_open_menu, "Press &PS button")->Enable(false);
	menu_sys->Append(id_sys_send_exit, "Send &exit cmd")->Enable(false);

	wxMenu* menu_conf = new wxMenu();
	menubar->Append(menu_conf, "&Config");
	menu_conf->Append(id_config_emu, "&Settings");
	menu_conf->Append(id_config_pad, "&Controller settings");
	menu_conf->AppendSeparator();
	menu_conf->Append(id_config_autopause_manager, "&Auto pause settings");
	menu_conf->AppendSeparator();
	menu_conf->Append(id_config_vfs_manager, "Virtual &file system manager");
	menu_conf->Append(id_config_vhdd_manager, "Virtual &hard drive manager");
	menu_conf->Append(id_config_savedata_manager, "Save &data manager");
	menu_conf->Append(id_config_lle_modules_manager, "Modules &LLE manager");


	wxMenu* menu_tools = new wxMenu();
	menubar->Append(menu_tools, "&Tools");
	menu_tools->Append(id_tools_compiler, "&ELF compiler");
	menu_tools->Append(id_tools_kernel_explorer, "&Kernel explorer")->Enable(false);
	menu_tools->Append(id_tools_memory_viewer, "&Memory viewer")->Enable(false);
	menu_tools->Append(id_tools_rsx_debugger, "&RSX debugger")->Enable(false);
	menu_tools->Append(id_tools_string_search, "&String search")->Enable(false);
	menu_tools->Append(id_tools_cg_disasm, "&Cg disassembler")->Enable();

	wxMenu* menu_help = new wxMenu();
	menubar->Append(menu_help, "&Help");
	menu_help->Append(id_help_about, "&About...");

	SetMenuBar(menubar);
	SetIcon(wxICON(frame_icon));

	// Panels
	m_log_frame = new LogFrame(this);
	m_game_viewer = new GameViewer(this);
	m_debugger_frame = new DebuggerPanel(this);

	AddPane(m_game_viewer, "PS3 software", wxAUI_DOCK_CENTRE);
	AddPane(m_log_frame, "Log", wxAUI_DOCK_BOTTOM);
	AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT);
	
	// Events
	Bind(wxEVT_MENU, &MainFrame::BootElf, this, id_boot_elf);
	Bind(wxEVT_MENU, &MainFrame::BootGame, this, id_boot_game);
	Bind(wxEVT_MENU, &MainFrame::InstallPkg, this, id_boot_install_pkg);
	Bind(wxEVT_MENU, [](wxCommandEvent&){ wxGetApp().Exit(); }, id_boot_exit);

	Bind(wxEVT_MENU, &MainFrame::Pause, this, id_sys_pause);
	Bind(wxEVT_MENU, &MainFrame::Stop, this, id_sys_stop);
	Bind(wxEVT_MENU, &MainFrame::SendOpenCloseSysMenu, this, id_sys_send_open_menu);
	Bind(wxEVT_MENU, &MainFrame::SendExit, this, id_sys_send_exit);

	Bind(wxEVT_MENU, &MainFrame::Config, this, id_config_emu);
	Bind(wxEVT_MENU, &MainFrame::ConfigPad, this, id_config_pad);
	Bind(wxEVT_MENU, &MainFrame::ConfigVFS, this, id_config_vfs_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigVHDD, this, id_config_vhdd_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigAutoPause, this, id_config_autopause_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigSaveData, this, id_config_savedata_manager);
	Bind(wxEVT_MENU, &MainFrame::ConfigLLEModules, this, id_config_lle_modules_manager);

	Bind(wxEVT_MENU, &MainFrame::OpenELFCompiler, this, id_tools_compiler);
	Bind(wxEVT_MENU, &MainFrame::OpenKernelExplorer, this, id_tools_kernel_explorer);
	Bind(wxEVT_MENU, &MainFrame::OpenMemoryViewer, this, id_tools_memory_viewer);
	Bind(wxEVT_MENU, &MainFrame::OpenRSXDebugger, this, id_tools_rsx_debugger);
	Bind(wxEVT_MENU, &MainFrame::OpenStringSearch, this, id_tools_string_search);
	Bind(wxEVT_MENU, &MainFrame::OpenCgDisasm, this, id_tools_cg_disasm);

	Bind(wxEVT_MENU, &MainFrame::AboutDialogHandler, this, id_help_about);

	Bind(wxEVT_MENU, &MainFrame::UpdateUI, this, id_update_dbg);

	wxGetApp().Bind(wxEVT_KEY_DOWN, &MainFrame::OnKeyDown, this);
	wxGetApp().Bind(wxEVT_DBG_COMMAND, &MainFrame::UpdateUI, this);

	LOG_NOTICE(GENERAL, _PRGNAME_ " v" _PRGVER_ "-" RPCS3_GIT_VERSION);
	LOG_NOTICE(GENERAL, "");
}