void CppLayoutPreviewer::SetParentAuiManager(wxAuiManager * manager) { parentAuiManager = manager; //Create now subeditors if needed if ( manager && editor.GetParentControl() ) { if ( !debugger ) { wxLogNull noLogPlease; //Avoid libpng warnings. debugger = std::shared_ptr<DebuggerGUI>(new DebuggerGUI(editor.GetParentControl(), previewScene, [this](bool newState) { playing = newState; })); if ( !parentAuiManager->GetPane("DBG").IsOk() ) parentAuiManager->AddPane( debugger.get(), wxAuiPaneInfo().Name( wxT( "DBG" ) ).Float().CloseButton( true ).Caption( _( "Debugger" ) ).MaximizeButton( true ).MinimizeButton( false ).CaptionVisible(true).MinSize(200, 100).Show(false) ); else parentAuiManager->GetPane("DBG").Window(debugger.get()); } if ( !profiler ) { profiler = std::shared_ptr<ProfileDlg>(new ProfileDlg(editor.GetParentControl(), *this)); editor.GetLayout().SetProfiler(profiler.get()); if ( !parentAuiManager->GetPane("PROFILER").IsOk() ) parentAuiManager->AddPane( profiler.get(), wxAuiPaneInfo().Name( wxT( "PROFILER" ) ).Float().CloseButton( true ).Caption( _( "Profiling" ) ).MaximizeButton( true ).MinimizeButton( false ).CaptionVisible(true).MinSize(50, 50).BestSize(230,100).Show(false) ); else parentAuiManager->GetPane("PROFILER").Window(profiler.get()); } parentAuiManager->Update(); } }
void CEditorMainFrame::AddPageToBook() { m_pLeft->Freeze(); m_pLeft->AddPage( m_pComponentModelTC, wxT("Component Model") ); m_pLeft->AddPage( m_pCurComponentTC, wxT("Current Conponent") ); m_pLeft->Thaw(); m_pRight->Freeze(); m_pRight->AddPage( m_pPropGridManager, wxT("Inspector") ); m_pRight->Thaw(); m_pBottom->Freeze(); m_pBottom->AddPage( new wxTextCtrl( m_pBottom, wxID_ANY, wxT("Some more text")), wxT("wxTextCtrl 1") ); m_pBottom->AddPage( m_pTimeBar, wxT("wxTextCtrl 2") ); m_pBottom->Thaw(); m_pCenter->Freeze(); m_pCenter->AddPage( m_pSplitter, wxT("wxTextCtrl 1") ); m_pCenter->Thaw(); m_Manager.AddPane(m_pLeft, wxAuiPaneInfo().CenterPane(). Name(wxT("Pane1")). Left()); m_Manager.AddPane(m_pRight, wxAuiPaneInfo().CenterPane(). Name(wxT("Pane2")). Right()); m_Manager.AddPane(m_pBottom, wxAuiPaneInfo().CenterPane(). Name(wxT("Pane3")).Caption(wxT("Pane Caption")). Bottom()); m_Manager.AddPane(m_pCenter, wxAuiPaneInfo().CenterPane(). Name(wxT("Pane4")).Caption(wxT("Pane Caption")). Center()); }
void MainFrame::CreateNoteBookPane() { m_mgr.AddPane(CreateLeftNotebook(), wxAuiPaneInfo().Name(_T("Left NoteBook")).Caption(_T("YUV info")). BestSize(wxSize(300,100)).MaxSize(wxSize(500,100)).Left().Layer(1)); m_mgr.AddPane(CreateCenterNotebook(), wxAuiPaneInfo().Name(_T("Center NoteBook")).Center().Layer(0)); m_mgr.AddPane(CreateBottomNotebook(), wxAuiPaneInfo().Name(_T("Bottom NoteBook")).Bottom().Layer(1)); }
void LLDBPlugin::InitializeUI() { if(!m_callstack) { m_callstack = new LLDBCallStackPane(EventNotifier::Get()->TopFrame(), &m_connector); m_mgr->GetDockingManager()->AddPane( m_callstack, wxAuiPaneInfo().MinSize(200, 200).Bottom().Position(0).CloseButton().Caption("Callstack").Name( LLDB_CALLSTACK_PANE_NAME)); } if(!m_breakpointsView) { m_breakpointsView = new LLDBOutputView(EventNotifier::Get()->TopFrame(), this); m_mgr->GetDockingManager()->AddPane( m_breakpointsView, wxAuiPaneInfo().MinSize(200, 200).Bottom().Position(1).CloseButton().Caption("Breakpoints").Name( LLDB_BREAKPOINTS_PANE_NAME)); } if(!m_localsView) { m_localsView = new LLDBLocalsView(EventNotifier::Get()->TopFrame(), this); m_mgr->GetDockingManager()->AddPane( m_localsView, wxAuiPaneInfo().MinSize(200, 200).Bottom().Position(0).CloseButton().Caption("Locals & Watches").Name( LLDB_LOCALS_PANE_NAME)); } if(!m_threadsView) { m_threadsView = new LLDBThreadsView(EventNotifier::Get()->TopFrame(), this); m_mgr->GetDockingManager()->AddPane( m_threadsView, wxAuiPaneInfo().MinSize(200, 200).Bottom().Position(0).CloseButton().Caption("Threads").Name( LLDB_THREADS_PANE_NAME)); } }
DebuggerPanel::DebuggerPanel(wxWindow* parent) : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(400, 600), wxTAB_TRAVERSAL) { m_aui_mgr.SetManagedWindow(this); m_aui_mgr.AddPane(new DbgEmuPanel(this), wxAuiPaneInfo().Top()); m_aui_mgr.AddPane(new InterpreterDisAsmFrame(this), wxAuiPaneInfo().Center().CaptionVisible(false).CloseButton().MaximizeButton()); m_aui_mgr.Update(); }
void MainFrame::InitializeComponents(){ m_channelsPanel = new DatalogChannelsPanel(DatalogChannelsParams(&m_currentConfig, &_appPrefs, &m_appOptions, &m_datalogStore), this); m_datalogPlayer.SetPlayerListener(m_channelsPanel); _frameManager.AddPane(m_channelsPanel, wxAuiPaneInfo().Name(wxT(PANE_ANALYSIS)).Caption(wxT(CAPTION_CHANNELS)).Center().Hide().CloseButton(false).Show(true)); m_configPanel = new ConfigPanel(this, ConfigPanelParams(&m_raceAnalyzerComm, &m_currentConfig, &m_appOptions)); _frameManager.AddPane(m_configPanel, wxAuiPaneInfo().Name(wxT(PANE_CONFIGURATION)).Caption(wxT(CAPTION_CONFIG)).Center().Hide().CloseButton(false).Show(true)); _frameManager.Update(); }
void ASSDrawFrame::SetPanes() { m_mgr.AddPane(shapelib, wxAuiPaneInfo().Name(_T("library")).Caption(_T("Shapes Library")). Right().Layer(2).Position(0).CloseButton(true).BestSize(wxSize(120, 480)).MinSize(wxSize(100, 200))); m_mgr.AddPane(m_canvas, wxAuiPaneInfo().Name(_T("canvas")).CenterPane()); m_mgr.AddPane(srctxtctrl, wxAuiPaneInfo().Name(_T("commands")).Caption(_T("Drawing commands")). Bottom().Layer(1).CloseButton(false).BestSize(wxSize(320, 48))); if (settingsdlg) m_mgr.AddPane(settingsdlg, wxAuiPaneInfo().Name(_T("settings")).Caption(_T("Settings")). Right().Layer(3).Position(0).CloseButton(true).BestSize(wxSize(240, 480)).MinSize(wxSize(200, 200)).Show(false)); }
END_EVENT_TABLE() EDA_3D_FRAME::EDA_3D_FRAME( PCB_BASE_FRAME* parent, const wxString& title, long style ) : EDA_BASE_FRAME( parent, DISPLAY3D_FRAME_TYPE, title, wxDefaultPosition, wxDefaultSize, style, wxT( "Frame3D" ) ) { m_canvas = NULL; m_reloadRequest = false; m_ortho = false; // Give it an icon wxIcon icon; icon.CopyFromBitmap( KiBitmap( icon_3d_xpm ) ); SetIcon( icon ); GetSettings(); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); // Create the status line static const int dims[5] = { -1, 100, 100, 100, 140 }; CreateStatusBar( 5 ); SetStatusWidths( 5, dims ); CreateMenuBar(); ReCreateMainToolbar(); // Make a EDA_3D_CANVAS int attrs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 }; m_canvas = new EDA_3D_CANVAS( this, attrs ); m_auimgr.SetManagedWindow( this ); EDA_PANEINFO horiztb; horiztb.HorizontalToolbarPane(); m_auimgr.AddPane( m_mainToolBar, wxAuiPaneInfo( horiztb ).Name( wxT( "m_mainToolBar" ) ).Top() ); m_auimgr.AddPane( m_canvas, wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); m_auimgr.Update(); // Fixes bug in Windows (XP and possibly others) where the canvas requires the focus // in order to receive mouse events. Otherwise, the user has to click somewhere on // the canvas before it will respond to mouse wheel events. m_canvas->SetFocus(); }
void ASSDrawFrame::SetToolBars() { drawtbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_FLAT | wxTB_TEXT | wxTB_NODIVIDER | wxTB_HORIZONTAL); drawtbar->AddTool(TB_CLEAR, _T("Clear"), wxBITMAP(new_), wxNullBitmap, wxITEM_NORMAL, _T(""), TIPS_CLEAR); //tbar->AddTool(TB_EDITSRC, _T("Source"), wxBITMAP(src_), wxNullBitmap, wxITEM_NORMAL, _T(""), TIPS_EDITSRC); drawtbar->AddCheckTool(TB_PREVIEW, _T("Preview"), wxBITMAP(preview_), wxNullBitmap, _T(""), TIPS_PREVIEW); //drawtbar->AddTool(TB_TRANSFORM, _T("Transform"), wxBITMAP(rot_), wxNullBitmap, wxITEM_NORMAL, _T(""), TIPS_TRANSFORM); zoomslider = new wxSlider(drawtbar, TB_ZOOMSLIDER, 1000, 100, 5000, __DPDS__ ); //zoomslider->SetSize(280, zoomslider->GetSize().y); zoomslider->Connect(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); zoomslider->Connect(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); zoomslider->Connect(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); zoomslider->Connect(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); zoomslider->Connect(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); zoomslider->Connect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); drawtbar->AddControl(zoomslider); drawtbar->Realize(); m_mgr.AddPane(drawtbar, wxAuiPaneInfo().Name(_T("drawtbar")).Caption(TBNAME_DRAW). ToolbarPane().Top().Position(0).Dockable(true).LeftDockable(false).RightDockable(false)); modetbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_FLAT | wxTB_TEXT | wxTB_NODIVIDER | wxTB_HORIZONTAL); modetbar->AddRadioTool(MODE_ARR, _T("Drag"), wxBITMAP(arr_), wxNullBitmap, _T(""), TIPS_ARR); modetbar->AddRadioTool(MODE_M, _T("Move"), wxBITMAP(m_), wxNullBitmap, _T(""), TIPS_M); //modetbar->AddRadioTool(MODE_N, _T("Move*"), wxBITMAP(n_), wxNullBitmap, _T(""), TIPS_N); modetbar->AddRadioTool(MODE_L, _T("Line"), wxBITMAP(l_), wxNullBitmap, _T(""), TIPS_L); modetbar->AddRadioTool(MODE_B, _T("Bezier"), wxBITMAP(b_), wxNullBitmap, _T(""), TIPS_B); //modetbar->AddRadioTool(MODE_S, _T("Spline"), wxBITMAP(s_), wxNullBitmap, _T(""), TIPS_S); //modetbar->AddRadioTool(MODE_P, _T("Extend"), wxBITMAP(p_), wxNullBitmap, _T(""), TIPS_P); //modetbar->AddRadioTool(MODE_C, _T("Close"), wxBITMAP(c_), wxNullBitmap, _T(""), TIPS_C); modetbar->AddRadioTool(MODE_DEL, _T("Delete"), wxBITMAP(del_), wxNullBitmap, _T(""), TIPS_DEL); modetbar->AddRadioTool(MODE_SCALEROTATE, _T("Scale/Rotate"), wxBITMAP(sc_rot_), wxNullBitmap, _T(""), TIPS_SCALEROTATE); modetbar->AddRadioTool(MODE_NUT_BILINEAR, _T("Bilinear"), wxBITMAP(nut_), wxNullBitmap, _T(""), TIPS_NUTB); //modetbar->AddRadioTool(MODE_NUT_PERSPECTIVE, _T("NUT:P"), wxBITMAP(arr_), wxNullBitmap, _T(""), _T("")); modetbar->Realize(); m_mgr.AddPane(modetbar, wxAuiPaneInfo().Name(_T("modetbar")).Caption(TBNAME_MODE). ToolbarPane().Top().Position(1).Dockable(true).LeftDockable(false).RightDockable(false)); bgimgtbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_FLAT | wxTB_TEXT | wxTB_NODIVIDER | wxTB_HORIZONTAL); bgimgtbar->SetToolBitmapSize(wxSize(24,15)); bgimgtbar->AddCheckTool(DRAG_DWG, _T("Pan drawing"), wxBITMAP(pan_shp), wxNullBitmap, _T(""), TIPS_DWG); bgimgtbar->AddCheckTool(DRAG_BGIMG, _T("Pan background"), wxBITMAP(pan_bg), wxNullBitmap, _T(""), TIPS_BGIMG); //bgimgtbar->AddRadioTool(DRAG_BOTH, _T("Pan both"), wxBITMAP(pan_both), wxNullBitmap, _T(""), TIPS_BOTH); bgimgtbar->Realize(); m_mgr.AddPane(bgimgtbar, wxAuiPaneInfo().Name(_T("bgimgtbar")).Caption(TBNAME_BGIMG). ToolbarPane().Top().Position(2).Dockable(true).LeftDockable(false).RightDockable(false)); }
void PWUpdaterFrame::CreateControls() { /* icons */ wxIconBundle icons; icons.AddIcon(wxIcon(ruby_16_xpm)); icons.AddIcon(wxIcon(ruby_32_xpm)); icons.AddIcon(wxIcon(ruby_48_xpm)); SetIcons(icons); /* menu bar */ wxMenu *file_menu = new wxMenu; file_menu->Append(wxID_EXIT, _("&Quit"), _("Quit this program.")); wxMenu *view_menu = new wxMenu; view_menu->AppendCheckItem(myID_MBAR_VIEW_LOG, _("Log Message\tCTRL+F1"), _("Show or hide the log message.")); view_menu->AppendSeparator(); view_menu->Append(wxID_PREFERENCES, _("&Preferences"), _("Modify user configuration.")); wxMenu *help_menu = new wxMenu; help_menu->Append(wxID_ABOUT, _("&About"), _("About this program.")); wxMenuBar *menuBar = new wxMenuBar; menuBar->Append(file_menu, _("&File")); menuBar->Append(view_menu, _("&View")); menuBar->Append(help_menu, _("&Help")); SetMenuBar(menuBar); /* tool bar */ /* status bar */ wxStatusBar *statBar = new wxStatusBar(this, myID_FRAME_STATUSBAR, wxSTB_DEFAULT_STYLE); int stBarWidths[STATBAR_FLD_MAX] = { -1, -3 }; statBar->SetFieldsCount(STATBAR_FLD_MAX); statBar->SetStatusWidths(STATBAR_FLD_MAX, stBarWidths); SetStatusBar(statBar); /* aui manager & panes */ _auiMgr.SetManagedWindow(this); _auiMgr.SetFlags(_auiMgr.GetFlags() | wxAUI_MGR_LIVE_RESIZE); _auiMgr.AddPane(new LogPane(this), wxAuiPaneInfo().Name(PANE_NAME_LOG).Caption(_("Log Window")). CloseButton(true).DestroyOnClose(false).MinSize(750, 120). Bottom().LeftDockable(false).RightDockable(false).TopDockable(false). Hide()); _auiMgr.AddPane(new DownloadPane(this, myID_PANE_DOWNLOAD), wxAuiPaneInfo().Name(PANE_NAME_DOWNLOAD).CaptionVisible(false). CenterPane().CloseButton(false).DestroyOnClose(false)); _auiMgr.Update(); }
DebuggerPanel::DebuggerPanel(wxWindow* parent) : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(400, 600), wxTAB_TRAVERSAL) { m_aui_mgr.SetManagedWindow(this); m_nb = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_WINDOWLIST_BUTTON | wxAUI_NB_TAB_MOVE | wxNO_BORDER); m_aui_mgr.AddPane(new DbgEmuPanel(this), wxAuiPaneInfo().Top()); m_aui_mgr.AddPane(m_nb, wxAuiPaneInfo().Center().CaptionVisible(false).CloseButton().MaximizeButton()); m_aui_mgr.Update(); m_app_connector.Connect(wxEVT_DBG_COMMAND, wxCommandEventHandler(DebuggerPanel::HandleCommand), (wxObject*)0, this); }
CWatchWindow::CWatchWindow(wxWindow* parent, wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name) : wxPanel(parent, id, position, size, style, name) , m_GPRGridView(nullptr) { m_mgr.SetManagedWindow(this); m_mgr.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE); m_GPRGridView = new CWatchView(this); m_mgr.AddPane(new CWatchToolbar(this, wxID_ANY), wxAuiPaneInfo().ToolbarPane().Top(). LeftDockable(true).RightDockable(true).BottomDockable(false).Floatable(false)); m_mgr.AddPane(m_GPRGridView, wxAuiPaneInfo().CenterPane()); m_mgr.Update(); }
void reToolManager::CreateToolbars(){ m_TransformToolbar = new wxAuiToolBar(m_owner); m_TransformToolbar->SetToolBitmapSize(wxSize(16, 16)); wxAuiToolBarItem* item = m_TransformToolbar->AddTool(reTOOL_SELECT, "Select", wxBitmap("assets/tool-select.png", wxBITMAP_TYPE_PNG)); item->SetKind(wxITEM_RADIO); item->SetState(wxAUI_BUTTON_STATE_CHECKED); m_TransformToolbar->AddTool(reTOOL_TRANSLATE, "Translate", wxBitmap("assets/tool-translate.png", wxBITMAP_TYPE_PNG))->SetKind(wxITEM_RADIO); m_TransformToolbar->AddTool(reTOOL_ROTATE, "Rotate", wxBitmap("assets/tool-rotate.png", wxBITMAP_TYPE_PNG))->SetKind(wxITEM_RADIO); m_TransformToolbar->AddTool(reTOOL_SCALE, "Scale", wxBitmap("assets/tool-scale.png", wxBITMAP_TYPE_PNG))->SetKind(wxITEM_RADIO); m_TransformToolbar->Realize(); m_TransformToolbar->Bind(wxEVT_MENU, &reToolManager::OnToolbarToolClick, this); m_manager->AddPane(m_TransformToolbar, wxAuiPaneInfo() .Name("Transform Tools") .Caption("Transform Tools") .ToolbarPane() .Top() .Position(0) .Floatable(false) .Gripper(false)); }
// What to do when a view is created. Creates actual // windows for displaying the view. bool wxStfView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) { childFrame = wxGetApp().CreateChildFrame(doc, this); if (childFrame==NULL) { return false; } // extract file name: wxFileName fn(doc->GetFilename()); childFrame->SetTitle(fn.GetName()); graph = GetMainFrame()->CreateGraph(this, childFrame); if (graph==NULL) { return false; } childFrame->GetMgr()->AddPane( graph, wxAuiPaneInfo().Caption(wxT("Traces")).Name(wxT("Traces")).CaptionVisible(true). CloseButton(false).Centre().PaneBorder(true) ); childFrame->GetMgr()->Update(); // childFrame->ActivateGraph(); #if defined(__X__) || defined(__WXMAC__) // X seems to require a forced resize // childFrame->SetClientSize(800,600); #endif childFrame->Show(true); Activate(true); return true; }
void CreateNoteBook() { // Notebook // Tabs at bottom not implemented yet wxAuiNotebook* noteBook = new wxAuiNotebook(this, wxID_ANY); noteBook->SetWindowStyle(wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_TAB_MOVE); wxTreeCtrl* tree = new wxTreeCtrl(noteBook); mTreeImageList.Add(wxIcon(wxT("./icons/chart_organisation.png"), wxBITMAP_TYPE_PNG)); mTreeImageList.Add(wxIcon(wxT("./icons/brick.png"), wxBITMAP_TYPE_PNG)); mTreeImageList.Add(wxIcon(wxT("./icons/lightbulb.png"), wxBITMAP_TYPE_PNG)); tree->SetImageList(&mTreeImageList); wxTreeItemId rootid = tree->AddRoot(wxT("SceneGraph"), 0); wxTreeItemId id = tree->AppendItem(rootid, wxT("Node"), 0); tree->AppendItem(id, wxT("Ninja1"), 1); tree->AppendItem(id, wxT("Ninja2"), 1); tree->AppendItem(id, wxT("Ninja3"), 1); id = tree->AppendItem(rootid, wxT("n2"), 0); tree->AppendItem(id, wxT("Light1"), 2); tree->ExpandAll(); noteBook->AddPage(tree, wxEmptyString, true, wxBitmap(wxT("./icons/chart_organisation.png"), wxBITMAP_TYPE_PNG)); noteBook->AddPage(new wxPanel(noteBook), wxEmptyString, false, wxBitmap(wxT("./icons/shape_square_edit.png"), wxBITMAP_TYPE_PNG)); noteBook->AddPage(new wxPanel(noteBook), wxEmptyString, false, wxBitmap(wxT("./icons/page_lightning.png"), wxBITMAP_TYPE_PNG)); mAuiManager->AddPane(noteBook, wxAuiPaneInfo(). Name(wxT("scene")).Caption(wxT("Scene")). DefaultPane().Left().TopDockable(false).BottomDockable(false). CloseButton(false).Layer(1).MinSize(150, 100)); }
void WebTools::OnNodeJSDebuggerStarted(clDebugEvent& event) { event.Skip(); m_savePerspective = clGetManager()->GetDockingManager()->SavePerspective(); // Show the debugger pane if(!m_nodejsDebuggerPane) { m_nodejsDebuggerPane = new NodeJSDebuggerPane(EventNotifier::Get()->TopFrame()); clGetManager()->GetDockingManager()->AddPane(m_nodejsDebuggerPane, wxAuiPaneInfo() .Layer(5) .Name("nodejs_debugger") .Caption("Node.js Debugger") .CloseButton(false) .MaximizeButton() .Bottom() .Position(0)); } wxString layout; wxFileName fnNodeJSLayout(clStandardPaths::Get().GetUserDataDir(), "nodejs.layout"); fnNodeJSLayout.AppendDir("config"); if(FileUtils::ReadFileContent(fnNodeJSLayout, layout)) { m_mgr->GetDockingManager()->LoadPerspective(layout); } EnsureAuiPaneIsVisible("nodejs_debugger", true); m_hideToolBarOnDebugStop = false; if(!m_mgr->AllowToolbar()) { // Using native toolbar m_hideToolBarOnDebugStop = !m_mgr->IsToolBarShown(); m_mgr->ShowToolBar(true); } }
virtual void CreateUI(const GamePtr& game, wxAuiManager& manager) { // Create all of the UI needed for network games. wxWindow* frame = GetMainFrame(); wxSize minSize = wxSize(165, 150); // Create the notebook off screen to avoid flicker. wxSize size = frame->GetClientSize(); wxAuiNotebook* notebook = new wxAuiNotebook(frame, wxID_ANY, wxPoint(size.x, size.y), minSize, wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT |wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER); // Chat window. wxChatUI* chat = new wxChatUI(notebook); notebook->AddPage(chat, stChat); // Event window. wxEventUI* event = new wxEventUI(notebook); notebook->AddPage(event, stEvents); // Spectator window. wxSpectatorUI* spectators = new wxSpectatorUI(notebook); notebook->AddPage(spectators, stSpectators); manager.AddPane(notebook, wxAuiPaneInfo().MinSize(minSize) .Caption(stNetwork).CloseButton(false) .MaximizeButton(false).Dockable(true).Right() .Name(swNetwork)); }
void CFrame::ReloadPanes() { // Close all pages ClosePages(); CloseAllNotebooks(); // Create new panes with notebooks for (u32 i = 0; i < Perspectives[ActivePerspective].Width.size() - 1; i++) { wxString PaneName = wxString::Format("Pane %i", i + 1); m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo().Hide() .CaptionVisible(m_bEdit).Dockable(!m_bNoDocking).Position(i) .Name(PaneName).Caption(PaneName)); } // Perspectives m_Mgr->LoadPerspective(Perspectives[ActivePerspective].Perspective, false); // Restore settings TogglePaneStyle(m_bNoDocking, IDM_NO_DOCKING); TogglePaneStyle(m_bEdit, IDM_EDIT_PERSPECTIVES); // Load GUI settings g_pCodeWindow->Load(); // Open notebook pages AddRemoveBlankPage(); g_pCodeWindow->OpenPages(); // Repopulate perspectives PopulateSavedPerspectives(); }
void CFrame::AddPane(int dir) { int PaneNum = GetNotebookCount() + 1; wxString PaneName = wxString::Format("Pane %i", PaneNum); wxAuiPaneInfo PaneInfo = wxAuiPaneInfo() .CaptionVisible(m_bEdit).Dockable(!m_bNoDocking) .Name(PaneName).Caption(PaneName) .Position(GetNotebookCount()); switch (dir) { case ADD_PANE_TOP: PaneInfo = PaneInfo.Top(); break; case ADD_PANE_BOTTOM: PaneInfo = PaneInfo.Bottom(); break; case ADD_PANE_LEFT: PaneInfo = PaneInfo.Left(); break; case ADD_PANE_RIGHT: PaneInfo = PaneInfo.Right(); break; case ADD_PANE_CENTER: PaneInfo = PaneInfo.Center(); break; default: break; } m_Mgr->AddPane(CreateEmptyNotebook(), PaneInfo); AddRemoveBlankPage(); m_Mgr->Update(); }
void wxStfChildFrame::ShowTable(const stf::Table &table,const wxString& caption) { // Create and show notebook if necessary: if (m_notebook==NULL && !m_mgr.GetPane(m_notebook).IsOk()) { m_notebook=CreateNotebook(); m_mgr.AddPane( m_notebook, wxAuiPaneInfo().Caption(wxT("Analysis results")). Floatable().Dock().Left().Name( wxT("Notebook") ) ); } else { // Re-open notebook if it has been closed: if (!m_mgr.GetPane(m_notebook).IsShown()) { m_mgr.GetPane(m_notebook).Show(); } } wxStfGrid* pGrid = new wxStfGrid( m_notebook, wxID_ANY, wxPoint(0,20), wxDefaultSize ); wxStfTable* pTable(new wxStfTable(table)); pGrid->SetTable(pTable,true); // the grid will take care of the deletion pGrid->SetEditable(false); pGrid->SetDefaultCellAlignment(wxALIGN_RIGHT,wxALIGN_CENTRE); for (std::size_t n_row=0; n_row<=table.nRows()+1; ++n_row) { pGrid->SetCellAlignment(wxALIGN_LEFT,(int)n_row,0); } m_notebook->AddPage( pGrid, caption, true ); // "commit" all changes made to wxAuiManager m_mgr.Update(); wxStfView* pView=(wxStfView*)GetView(); if (pView != NULL && pView->GetGraph()!= NULL) { pView->GetGraph()->Enable(); pView->GetGraph()->SetFocus(); } }
wxAuiNotebook *MainFrame::GetAuiNotebook() { wxAuiNotebook *auiNotebook = static_cast<wxAuiNotebook *>(FindWindowById(ID_WINDOWHOLDER)); // If a notebook is hidden, we have to close and recreate it. if (auiNotebook != NULL && !auiNotebook->IsShown()) { m_auiManager->DetachPane(auiNotebook); auiNotebook->Close(); delete auiNotebook; auiNotebook = NULL; } // find and create a notebook window if (auiNotebook == NULL) { auiNotebook = new wxAuiNotebook( this, ID_WINDOWHOLDER, wxDefaultPosition, wxSize(100, 300), wxAUI_NB_TOP | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_TAB_SPLIT | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); m_auiManager->AddPane(auiNotebook, wxAuiPaneInfo() .Name(wxT("Controls")).Caption(wxT("Controls")).Bottom()); m_auiManager->Update(); } return auiNotebook; }
int kmloverlay_pi::Init(void) { m_puserinput = NULL; AddLocaleCatalog( _T("opencpn-kmloverlay_pi") ); m_toolbar_item_id = InsertPlugInTool( _T(""), _img_kmloverlay, _img_kmloverlay, wxITEM_NORMAL, _("KML overlay"), _T(""), NULL, KMLOVERLAY_TOOL_POSITION, 0, this ); m_pauimgr = GetFrameAuiManager(); m_puserinput = new KMLOverlayUI( GetOCPNCanvasWindow(), wxID_ANY, _T("") ); wxAuiPaneInfo pane = wxAuiPaneInfo().Name(_T("KMLOverlay")).Caption(_("KML overlay")).CaptionVisible(true).Float().FloatingPosition(50,150).Dockable(false).Resizable().CloseButton(true).Show(false); m_pauimgr->AddPane( m_puserinput, pane ); m_pauimgr->Update(); // Get a pointer to the opencpn configuration object m_pconfig = GetOCPNConfigObject(); // And load the configuration items LoadConfig(); ApplyConfig(); return ( WANTS_OVERLAY_CALLBACK | WANTS_OPENGL_OVERLAY_CALLBACK | WANTS_TOOLBAR_CALLBACK | INSTALLS_TOOLBAR_TOOL | // nothing yet // WANTS_PREFERENCES | WANTS_CONFIG ); }
void MainFrame::AddDigitalGauges(DatalogChannelSelectionSet *selectionSet){ size_t selectionSetCount = selectionSet->Count(); for (size_t i = 0; i < selectionSetCount; i++){ DatalogChannelSelection &sel = (*selectionSet)[i]; int datalogId = sel.datalogId; DatalogInfo datalogInfo; m_datalogStore.ReadDatalogInfo(datalogId, datalogInfo); wxString channelName = sel.channelName; DigitalGaugePane *gaugePane = new DigitalGaugePane(this, ChartParams(&_appPrefs,&m_appOptions)); ViewChannel viewChannel(datalogId, channelName); gaugePane->CreateGauge(viewChannel); m_channelViews.Add(gaugePane); wxString name = wxString::Format("digitalGauge_%lu", (unsigned long)m_channelViews.Count()); wxString caption = wxString::Format("%s - %s", datalogInfo.name.ToAscii(), channelName.ToAscii()); _frameManager.AddPane(gaugePane, wxAuiPaneInfo(). BestSize(150,50). MinSize(150,50). Name(name). Caption(caption). Bottom(). Layer(1). Position(2). Show(true)); _frameManager.Update(); } }
bool wxGISApplicationEx::CreateApp(void) { m_mgr.SetManagedWindow(this); m_mgr.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_ALLOW_ACTIVE_PANE | wxAUI_MGR_TRANSPARENT_DRAG); wxGISApplication::CreateApp(); wxLogMessage(_("wxGISApplicationEx: Start. Creating main application frame...")); for(size_t i = 0; i < m_CommandBarArray.GetCount(); ++i) { if(m_CommandBarArray[i]->GetType() == enumGISCBToolbar) { wxGISToolBar* pToolBar = static_cast<wxGISToolBar*>(m_CommandBarArray[i]); if(pToolBar) { m_mgr.AddPane(pToolBar, wxAuiPaneInfo().Name(pToolBar->GetName()).Caption(pToolBar->GetCaption()).ToolbarPane().Top().Position(i).LeftDockable(pToolBar->GetLeftDockable()).RightDockable(pToolBar->GetRightDockable()).BestSize(-1,-1)); //pToolBar->Activate(this); } } } //SerializeFramePosEx(false); //m_mgr.Update(); wxLogMessage(_("wxGISApplicationEx: Creation complete")); return true; }
void wxChartSplitPanel::AddPlot(Plot *plot, int pos, bool allowRemove) { wxChartPanel *chartPanel = new wxChartPanel(this, wxID_ANY, new Chart(plot, wxT(""))); switch (pos) { case wxLEFT: pos = wxAUI_DOCK_LEFT; break; case wxRIGHT: pos = wxAUI_DOCK_RIGHT; break; case wxTOP: pos = wxAUI_DOCK_TOP; break; case wxBOTTOM: pos = wxAUI_DOCK_BOTTOM; break; case wxCENTER: pos = wxAUI_DOCK_CENTER; break; } wxAuiPaneInfo paneInfo = wxAuiPaneInfo().CloseButton(allowRemove).DestroyOnClose().Floatable(false).Direction(pos); m_auiManager->AddPane(chartPanel, paneInfo); m_auiManager->Update(); }
bool wxGISApplicationEx::AddCommandBar(wxGISCommandBar* pBar) { if(!pBar) return false; m_CommandBarArray.Add(pBar); switch(pBar->GetType()) { case enumGISCBMenubar: m_pMenuBar->AddMenu(pBar); break; case enumGISCBToolbar: { wxGISToolBar* pToolBar = static_cast<wxGISToolBar*>(pBar); if(pToolBar) { m_mgr.AddPane(pToolBar, wxAuiPaneInfo().Name(pToolBar->GetName()).Caption(pToolBar->GetCaption()).ToolbarPane().Top().Position(100).LeftDockable(pToolBar->GetLeftDockable()).RightDockable(pToolBar->GetRightDockable())); m_mgr.Update(); } } break; case enumGISCBContextmenu: case enumGISCBSubMenu: case enumGISCBNone: break; } return true; }
CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style) : wxPanel(parent, id, position, size, style, title) , m_pCodeWindow(_pCodeWindow) { m_mgr.SetManagedWindow(this); m_mgr.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE); m_BreakPointListView = new CBreakPointView(this, wxID_ANY); m_mgr.AddPane(new CBreakPointBar(this, wxID_ANY), wxAuiPaneInfo().ToolbarPane().Top(). LeftDockable(false).RightDockable(false).BottomDockable(false).Floatable(false)); m_mgr.AddPane(m_BreakPointListView, wxAuiPaneInfo().CenterPane()); m_mgr.Update(); }
void MainFrame::CreateControls() { ////@begin MainFrame content construction MainFrame* itemFrame1 = this; GetAuiManager().SetManagedWindow(this); wxMenuBar* menuBar = new wxMenuBar; wxMenu* itemMenu4 = new wxMenu; itemMenu4->Append(wxID_EXIT, _("Exit\tAlt+F4"), wxEmptyString, wxITEM_NORMAL); menuBar->Append(itemMenu4, _("File")); itemFrame1->SetMenuBar(menuBar); wxStatusBar* itemStatusBar2 = new wxStatusBar( itemFrame1, ID_STATUSBAR, wxST_SIZEGRIP|wxNO_BORDER ); itemStatusBar2->SetFieldsCount(2); itemFrame1->SetStatusBar(itemStatusBar2); m_Notebook = new wxAuiNotebook( itemFrame1, ID_AUINOTEBOOK, wxDefaultPosition, wxDefaultSize, wxAUI_NB_DEFAULT_STYLE|wxAUI_NB_TOP|wxNO_BORDER ); itemFrame1->GetAuiManager().AddPane(m_Notebook, wxAuiPaneInfo() .Name(_T("Pane1")).Centre().CaptionVisible(false).CloseButton(false).DestroyOnClose(false).Resizable(true).Floatable(false)); GetAuiManager().Update(); ////@end MainFrame content construction AddPagesFromGuiPlugins(); }
void LLDBPlugin::InitializeUI() { wxWindow* parent = m_mgr->GetDockingManager()->GetManagedWindow(); if(!m_breakpointsView) { m_breakpointsView = new LLDBOutputView(parent, this); m_mgr->GetDockingManager()->AddPane(m_breakpointsView, wxAuiPaneInfo() .MinSize(200, 200) .Right() .Position(1) .Layer(10) .CloseButton() .Caption("Breakpoints") .Name(LLDB_BREAKPOINTS_PANE_NAME)); } if(!m_callstack) { m_callstack = new LLDBCallStackPane(parent, *this); m_mgr->GetDockingManager()->AddPane(m_callstack, wxAuiPaneInfo() .MinSize(200, 200) .Right() .Position(2) // top one .Layer(10) // outer layer .CloseButton() .Caption("Callstack") .Name(LLDB_CALLSTACK_PANE_NAME)); } if(!m_threadsView) { m_threadsView = new LLDBThreadsView(parent, this); m_mgr->GetDockingManager()->AddPane( m_threadsView, wxAuiPaneInfo().MinSize(200, 200).Layer(10).Right().Position(1).CloseButton().Caption("Threads").Name( LLDB_THREADS_PANE_NAME)); } if(!m_localsView) { m_localsView = new LLDBLocalsView(parent, this); m_mgr->GetDockingManager()->AddPane(m_localsView, wxAuiPaneInfo() .MinSize(200, 200) .Bottom() .Layer(5) // outer, but not on the same layer as the left side pane .Position(0) .CloseButton() .Caption("Locals & Watches") .Name(LLDB_LOCALS_PANE_NAME)); } }
int gecomapi_pi::Init(void) { m_bshuttingDown = false; mPriPosition = 99; m_pgecomapi_window = NULL; AddLocaleCatalog( _T("opencpn-gecomapi_pi") ); // Get a pointer to the opencpn display canvas, to use as a parent for the POI Manager dialog m_parent_window = GetOCPNCanvasWindow(); m_pauimgr = GetFrameAuiManager(); // Get a pointer to the opencpn configuration object m_pconfig = GetOCPNConfigObject(); // And load the configuration items LoadConfig(); // This PlugIn needs a toolbar icon #ifdef GECOMAPI_USE_SVG m_toolbar_item_id = InsertPlugInToolSVG(_T("GoogleEarth"), _svg_gecomapi, _svg_gecomapi_rollover, _svg_gecomapi_toggled, wxITEM_CHECK, _T("GoogleEarth"), _T(""), NULL, GECOMAPI_TOOL_POSITION, 0, this); #else m_toolbar_item_id = InsertPlugInTool(_T("GoogleEarth"), _img_gecomapi, _img_gecomapi, wxITEM_CHECK, _T("GoogleEarth"), _T(""), NULL, GECOMAPI_TOOL_POSITION, 0, this); #endif m_pgecomapi_window = new GEUIDialog(GetOCPNCanvasWindow(), wxID_ANY, m_pauimgr, m_toolbar_item_id, this); wxAuiPaneInfo pane = wxAuiPaneInfo().Name(_T("GoogleEarth")).Caption(_T("GoogleEarth")).CaptionVisible(true).Float().FloatingPosition(0,0).Show(!m_bstartHidden).TopDockable(false).BottomDockable(false).LeftDockable(true).RightDockable(true).CaptionVisible(true).CloseButton(false).MinSize(300,300); m_pauimgr->AddPane(m_pgecomapi_window, pane); if(m_pgecomapi_window) { m_pgecomapi_window->SetCameraParameters(m_iCameraAzimuth, m_iCameraTilt, m_iCameraRange); } ApplyConfig(); m_pauimgr->Update(); //m_pauimgr->Connect( wxEVT_AUI_RENDER, wxAuiManagerEventHandler( gecomapi_pi::OnAuiRender ), NULL, this ); return (WANTS_OVERLAY_CALLBACK | WANTS_CURSOR_LATLON | WANTS_TOOLBAR_CALLBACK | INSTALLS_TOOLBAR_TOOL | WANTS_PREFERENCES | WANTS_CONFIG | WANTS_NMEA_EVENTS | WANTS_NMEA_SENTENCES | USES_AUI_MANAGER | WANTS_ONPAINT_VIEWPORT ); }