BreakpointsWindow::BreakpointsWindow(MainFrame* mainFrame, wxWindowID winid) : wxPanel(mainFrame, winid) { // Create the tool bar. m_buttonBar = new ButtonBar(this, wxID_ANY); m_buttonBar->SetToolBitmapSize( wxSize(22, 22) ); wxBitmap deleteBreakpointBitmap = wxMEMORY_BITMAP(DeleteBreakpoint_png); wxBitmap deleteAllBreakpointsBitmap = wxMEMORY_BITMAP(DeleteAllBreakpoints_png); wxBitmap goToSourceCodeBitmap = wxMEMORY_BITMAP(GoToSourceCode_png); m_buttonBar->AddTool( ID_DeleteBreakpoint, _("Delete Breakpoint"), deleteBreakpointBitmap, deleteBreakpointBitmap ); m_buttonBar->AddTool( ID_DeleteAllBreakpoints, _("Delete All Breakpoints"), deleteAllBreakpointsBitmap, deleteAllBreakpointsBitmap ); m_buttonBar->AddTool( ID_GoToSourceCode, _("Go To Source Code"), goToSourceCodeBitmap, goToSourceCodeBitmap ); // Create the list view used to show the breakpoints. m_breakpointList = new ListView(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL); m_breakpointList->SetAllowColumnResizing(false); m_mainFrame = mainFrame; // Add the column that will contain the check box. m_breakpointList->InsertColumn(0, _(""), wxLIST_FORMAT_CENTER, 20); // Add the column that will contain the name. m_breakpointList->InsertColumn(1, _("Name")); // Set the icons. wxBitmap breakpointBitmap = wxMEMORY_BITMAP(Breakpoint_png); wxImageList* imageList = new wxImageList(13, 13); imageList->Add(breakpointBitmap); m_breakpointList->AssignImageList(imageList, wxIMAGE_LIST_SMALL); m_project = NULL; // Setup the layout. wxFlexGridSizer* fgSizer1; fgSizer1 = new wxFlexGridSizer( 2, 1, 0, 0 ); fgSizer1->AddGrowableCol( 0 ); fgSizer1->AddGrowableRow( 1 ); fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer1->Add( m_buttonBar, 0, wxALL|wxEXPAND, 3 ); fgSizer1->Add( m_breakpointList, 0, wxALL|wxEXPAND, 0 ); SetSizer( fgSizer1 ); Layout(); }
void CodeEdit::SetDefaultLexer() { SetLexer(wxSTC_LEX_NULL); SetKeyWords(1, ""); // Set the caret width to match MSVC. SetCaretWidth(2); // Set the marker bitmaps. MarkerDefineBitmap(Marker_Breakpoint, wxMEMORY_BITMAP(Breakpoint_png) ); MarkerDefineBitmap(Marker_CurrentLine, wxMEMORY_BITMAP(Currentline_png) ); MarkerDefineBitmap(Marker_BreakLine, wxMEMORY_BITMAP(Breakline_png) ); // Setup the dwell time before a tooltip is displayed. SetMouseDwellTime(300); SetMarginSensitive(1, true); SetMarginType(1, wxSTC_MARGIN_SYMBOL); // Set the autocomplete icons. wxColour maskColor(0xFF, 0x9B, 0x77); wxBitmap functionIcon(functionicon, wxBITMAP_TYPE_XPM); functionIcon.SetMask(new wxMask(functionicon, maskColor)); RegisterImage(AutoCompleteManager::Type_Function, functionIcon); wxBitmap classIcon(classicon, wxBITMAP_TYPE_XPM); classIcon.SetMask(new wxMask(classicon, maskColor)); RegisterImage(AutoCompleteManager::Type_Class, classIcon); }
void EditorFrame::createToolbar() { if(!toolbarCtrl) return; toolbarCtrl->AddTool( Toolbar_ToogleGrid, "Grid", wxMEMORY_BITMAP(grid_icon), "Show/hide the editor grid", wxITEM_CHECK ); //toolbarCtrl->AddTool( Toolbar_TooglePhysicsDebug, "Physics", wxMEMORY_BITMAP(grid_icon), "Show/hide the physics debug", wxITEM_CHECK ); toolbarCtrl->ToggleTool( Toolbar_ToogleGrid, true ); toolbarCtrl->AddTool( Toolbar_TooglePlay, "Play", wxMEMORY_BITMAP(resultset_next), "Enable/disable Play mode", wxITEM_CHECK ); toolbarCtrl->AddSeparator(); toolbarCtrl->AddTool( Toolbar_ToogleViewport, "Toogles maximize view", wxMEMORY_BITMAP(application_split), "Toogles maximize view" ); toolbarCtrl->AddTool( Toolbar_ToogleSidebar, "Shows/hides the sidebar", wxMEMORY_BITMAP(application_side_tree_right), "Shows/hides the sidebar" ); wxAuiPaneInfo toolPane; const char* name = "Toolbar"; toolPane.ToolbarPane().Name(name).Caption(name).Top().PaneBorder(false); paneCtrl->AddPane(toolbarCtrl, toolPane); }
void ResourcesPage::initIcons() { imageList = new wxImageList(16, 16, false, 8); imageList->Add(wxMEMORY_BITMAP(bullet_blue)); CREATE_RESOURCE_ICON( General, package ) CREATE_RESOURCE_ICON( Images, image ) CREATE_RESOURCE_ICON( Meshes, shape_flip_horizontal ) CREATE_RESOURCE_ICON( Fonts, font ) CREATE_RESOURCE_ICON( Shaders, script_palette ) CREATE_RESOURCE_ICON( Audio, music ) CREATE_RESOURCE_ICON( Scripts, page_code ) CREATE_RESOURCE_ICON( Materials, palette ) AssignImageList(imageList); }
void SelectionPlugin::onPluginEnable() { wxAuiToolBar* toolbar = editor->getToolbar(); if(toolbar) { addTool( toolbar->AddSeparator() ); wxBitmap iconSelect = wxMEMORY_BITMAP(cursor); buttonSelect = toolbar->AddTool( SelectionTool::Select, "Select", iconSelect, "Selects the selection tool", wxITEM_RADIO ); addTool(buttonSelect, true); #pragma TODO(Remove the hack to select the select tool automatically) ((ToolbarHack*) toolbar)->SelectItem(buttonSelect); } selections = nullptr; buttonSelect = nullptr; additiveMode = false; handlingEvents = false; }