CodeCompletionBasePage::CodeCompletionBasePage(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxPanel(parent, id, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC3C39InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer9 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer9); m_splitter1 = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH); m_splitter1->SetSashGravity(0.5); m_splitter1->SetMinimumPaneSize(1); bSizer9->Add(m_splitter1, 1, wxEXPAND, 5); m_panel8 = new wxPanel(m_splitter1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); wxBoxSizer* bSizer24 = new wxBoxSizer(wxVERTICAL); m_panel8->SetSizer(bSizer24); m_staticText5 = new wxStaticText(m_panel8, wxID_ANY, _("Search paths:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer24->Add(m_staticText5, 0, wxLEFT|wxRIGHT|wxTOP, 5); m_textCtrlSearchPaths = new wxTextCtrl(m_panel8, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_MULTILINE); #ifdef __WXMSW__ // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE wxFont m_textCtrlSearchPathsFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_textCtrlSearchPathsFont.SetFamily(wxFONTFAMILY_TELETYPE); #else wxFont m_textCtrlSearchPathsFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); m_textCtrlSearchPathsFont.SetFamily(wxFONTFAMILY_TELETYPE); #endif m_textCtrlSearchPaths->SetFont(m_textCtrlSearchPathsFont); m_textCtrlSearchPaths->SetToolTip(_("Add here search paths used by clang / ctags for locating include files")); bSizer24->Add(m_textCtrlSearchPaths, 1, wxALL|wxEXPAND, 5); m_panel6 = new wxPanel(m_splitter1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); m_splitter1->SplitHorizontally(m_panel8, m_panel6, 0); wxBoxSizer* bSizer221 = new wxBoxSizer(wxVERTICAL); m_panel6->SetSizer(bSizer221); m_staticText12 = new wxStaticText(m_panel6, wxID_ANY, _("Macros (clang):"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer221->Add(m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5); m_textCtrlMacros = new wxTextCtrl(m_panel6, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_MULTILINE); #ifdef __WXMSW__ // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE wxFont m_textCtrlMacrosFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_textCtrlMacrosFont.SetFamily(wxFONTFAMILY_TELETYPE); #else wxFont m_textCtrlMacrosFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); m_textCtrlMacrosFont.SetFamily(wxFONTFAMILY_TELETYPE); #endif m_textCtrlMacros->SetFont(m_textCtrlMacrosFont); m_textCtrlMacros->SetToolTip(_("Add here macros to pass to clang when generating PCH files\nOne macro per line")); bSizer221->Add(m_textCtrlMacros, 1, wxALL|wxEXPAND, 5); wxBoxSizer* boxSizer3 = new wxBoxSizer(wxHORIZONTAL); bSizer221->Add(boxSizer3, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_checkBoxCpp11 = new wxCheckBox(m_panel6, wxID_ANY, _("Enable C++11 Standard"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxCpp11->SetValue(false); boxSizer3->Add(m_checkBoxCpp11, 0, wxALL, 5); m_checkBoxCpp14 = new wxCheckBox(m_panel6, wxID_ANY, _("Enable C++14 Standard"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxCpp14->SetValue(false); boxSizer3->Add(m_checkBoxCpp14, 0, wxALL, 5); m_checkBoxSWTLW = new wxCheckBox(m_panel6, wxID_ANY, _("Sync to Workspace File"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxSWTLW->SetValue(false); m_checkBoxSWTLW->SetToolTip(_("When enabled search paths folders for Code Completion will be synced between the Workspace file and the local search paths database.")); boxSizer3->Add(m_checkBoxSWTLW, 0, wxALL, 5); SetName(wxT("CodeCompletionBasePage")); SetSize(500,300); if (GetSizer()) { GetSizer()->Fit(this); } // Connect events m_textCtrlSearchPaths->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(CodeCompletionBasePage::OnCCContentModified), NULL, this); m_textCtrlMacros->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(CodeCompletionBasePage::OnCCContentModified), NULL, this); }
LayersEditorPanelBase::LayersEditorPanelBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxPanel(parent, id, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxCraftergfm8VaInitBitmapResources(); bBitmapLoaded = true; } m_auimgr = new wxAuiManager; m_auimgr->SetManagedWindow( this ); m_auimgr->SetFlags( wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_TRANSPARENT_HINT|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING); m_auimgr->GetArtProvider()->SetMetric( wxAUI_DOCKART_PANE_BORDER_SIZE, 0); m_auimgr->GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE); m_toolbar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE); m_toolbar->SetToolBitmapSize(wxSize(16,16)); m_auimgr->AddPane(m_toolbar, wxAuiPaneInfo().Caption(_("Layers editor")).Direction(wxAUI_DOCK_TOP).Layer(0).Row(0).Position(0).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false)); m_toolbar->AddTool(ADD_LAYER_TOOL, _("Add a layer"), wxXmlResource::Get()->LoadBitmap(wxT("add16")), wxNullBitmap, wxITEM_NORMAL, _("Add a new layer"), wxT(""), NULL); m_toolbar->AddTool(DELETE_LAYER_TOOL, _("Delete the selected layer"), wxXmlResource::Get()->LoadBitmap(wxT("delete16")), wxNullBitmap, wxITEM_NORMAL, _("Delete the selected layer"), wxT(""), NULL); m_toolbar->AddSeparator(); m_toolbar->AddTool(EDIT_LAYER_TOOL, _("Edit the properties of the layer"), wxXmlResource::Get()->LoadBitmap(wxT("properties16")), wxNullBitmap, wxITEM_NORMAL, _("Edit the properties of the layer"), wxT(""), NULL); m_toolbar->AddTool(LAYER_UP_TOOL, _("Move the layer over"), wxXmlResource::Get()->LoadBitmap(wxT("up16")), wxNullBitmap, wxITEM_NORMAL, _("Move the layer over"), wxT(""), NULL); m_toolbar->AddTool(LAYER_DOWN_TOOL, _("Move the layer below"), wxXmlResource::Get()->LoadBitmap(wxT("down16")), wxNullBitmap, wxITEM_NORMAL, _("Move the layer below"), wxT(""), NULL); m_toolbar->AddSeparator(); m_toolbar->AddTool(REFRESH_TOOL, _("Refresh the list"), wxXmlResource::Get()->LoadBitmap(wxT("refreshicon")), wxNullBitmap, wxITEM_NORMAL, _("Refresh the list"), wxT(""), NULL); m_toolbar->AddSeparator(); m_toolbar->AddTool(HELP_TOOL, _("Help"), wxXmlResource::Get()->LoadBitmap(wxT("help16")), wxNullBitmap, wxITEM_NORMAL, _("Display help about the layers editor"), wxT(""), NULL); m_toolbar->Realize(); m_panel715 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); m_auimgr->AddPane(m_panel715, wxAuiPaneInfo().Direction(wxAUI_DOCK_CENTER).Layer(0).Row(0).Position(0).BestSize(100,100).MinSize(100,100).MaxSize(100,100).CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false)); m_auimgr->Update(); wxFlexGridSizer* flexGridSizer1316 = new wxFlexGridSizer(1, 1, 0, 0); flexGridSizer1316->SetFlexibleDirection( wxBOTH ); flexGridSizer1316->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer1316->AddGrowableCol(0); flexGridSizer1316->AddGrowableRow(0); m_panel715->SetSizer(flexGridSizer1316); m_layersList = new wxListCtrl(m_panel715, LAYERS_LIST_ID, wxDefaultPosition, wxDefaultSize, wxLC_REPORT); flexGridSizer1316->Add(m_layersList, 0, wxALL|wxEXPAND, 0); SetName(wxT("LayersEditorPanelBase")); SetSize(500,300); if (GetSizer()) { GetSizer()->Fit(this); } // Connect events this->Connect(ADD_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnAddLayerClicked), NULL, this); this->Connect(DELETE_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnDeleteLayerClicked), NULL, this); this->Connect(EDIT_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnEditLayerClicked), NULL, this); this->Connect(LAYER_UP_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnLayerUpClicked), NULL, this); this->Connect(LAYER_DOWN_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnLayerDownClicked), NULL, this); this->Connect(REFRESH_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnRefreshClicked), NULL, this); this->Connect(HELP_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnHelpClicked), NULL, this); }
EditorOptionsGeneralGuidesPanelBase::EditorOptionsGeneralGuidesPanelBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxPanel(parent, id, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC77E7InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer1); wxStaticBoxSizer* sbSizer3 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("General:")), wxVERTICAL); bSizer1->Add(sbSizer3, 0, wxALL|wxEXPAND, 5); wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0); fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer1->AddGrowableCol(0); fgSizer1->AddGrowableCol(1); sbSizer3->Add(fgSizer1, 0, wxALL|wxEXPAND, 5); m_displayLineNumbers = new wxCheckBox(this, wxID_ANY, _("Display line numbers"), wxDefaultPosition, wxSize(-1, -1), 0); m_displayLineNumbers->SetValue(false); m_displayLineNumbers->SetToolTip(_("Show line numbers margin")); fgSizer1->Add(m_displayLineNumbers, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_showIndentationGuideLines = new wxCheckBox(this, wxID_ANY, _("Show indentation guidelines"), wxDefaultPosition, wxSize(-1, -1), 0); m_showIndentationGuideLines->SetValue(false); m_showIndentationGuideLines->SetToolTip(_("Turn on indentation highlights guides (small vertical lines)")); fgSizer1->Add(m_showIndentationGuideLines, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_checkBoxMatchBraces = new wxCheckBox(this, wxID_ANY, _("Highlight matched braces"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxMatchBraces->SetValue(false); m_checkBoxMatchBraces->SetToolTip(_("Highlight matched braces")); fgSizer1->Add(m_checkBoxMatchBraces, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_checkBoxAutoCompleteCurlyBraces = new wxCheckBox(this, wxID_ANY, _("Auto Complete Curly Braces \"{\""), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxAutoCompleteCurlyBraces->SetValue(true); m_checkBoxAutoCompleteCurlyBraces->SetToolTip(_("Auto add matching close brace")); fgSizer1->Add(m_checkBoxAutoCompleteCurlyBraces, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_checkBoxDisableSemicolonShift = new wxCheckBox(this, wxID_ANY, _("Disable semicolon shift"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxDisableSemicolonShift->SetValue(false); m_checkBoxDisableSemicolonShift->SetToolTip(_("Auto swap between semicolon and closing brace")); fgSizer1->Add(m_checkBoxDisableSemicolonShift, 0, wxALL|wxEXPAND, 5); m_checkBoxAutoCompleteNormalBraces = new wxCheckBox(this, wxID_ANY, _("Auto Complete Braces \"[(\""), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxAutoCompleteNormalBraces->SetValue(true); fgSizer1->Add(m_checkBoxAutoCompleteNormalBraces, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_checkBoxHideChangeMarkerMargin = new wxCheckBox(this, wxID_ANY, _("Hide change marker margin"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxHideChangeMarkerMargin->SetValue(false); m_checkBoxHideChangeMarkerMargin->SetToolTip(_("Hide / Display the change marker margin (red/green marks when line is modified)")); fgSizer1->Add(m_checkBoxHideChangeMarkerMargin, 0, wxALL, 5); m_checkBoxDoubleQuotes = new wxCheckBox(this, wxID_ANY, _("Auto Complete Double / Single Quotes"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxDoubleQuotes->SetValue(false); fgSizer1->Add(m_checkBoxDoubleQuotes, 0, wxALL, 5); wxStaticBoxSizer* sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Whitespaces:")), wxVERTICAL); bSizer1->Add(sbSizer1, 0, wxALL|wxEXPAND, 5); wxFlexGridSizer* fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0); fgSizer3->SetFlexibleDirection( wxBOTH ); fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer3->AddGrowableCol(1); sbSizer1->Add(fgSizer3, 1, wxEXPAND, 5); m_staticText2 = new wxStaticText(this, wxID_ANY, _("Whitespace visibility:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer3->Add(m_staticText2, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_whitespaceStyleArr; m_whitespaceStyle = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_whitespaceStyleArr, 0); fgSizer3->Add(m_whitespaceStyle, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_staticText4 = new wxStaticText(this, wxID_ANY, _("EOL Mode:"), wxDefaultPosition, wxSize(-1, -1), 0); m_staticText4->SetToolTip(_("Set the editor's EOL mode (End Of Line)")); fgSizer3->Add(m_staticText4, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_choiceEOLArr; m_choiceEOL = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_choiceEOLArr, 0); m_choiceEOL->SetToolTip(_("Set the editor's EOL mode (End Of Line). When set to 'Default' CodeLite will set the EOL according to the hosting OS")); fgSizer3->Add(m_choiceEOL, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); wxStaticBoxSizer* sbSizer2 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Caret line:")), wxVERTICAL); bSizer1->Add(sbSizer2, 0, wxALL|wxEXPAND, 5); wxFlexGridSizer* fgSizer2 = new wxFlexGridSizer( 3, 2, 0, 0); fgSizer2->SetFlexibleDirection( wxBOTH ); fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer2->AddGrowableCol(1); sbSizer2->Add(fgSizer2, 0, wxALL|wxEXPAND, 5); m_highlightCaretLine = new wxCheckBox(this, wxID_ANY, _("Highlight caret line"), wxDefaultPosition, wxSize(-1, -1), 0); m_highlightCaretLine->SetValue(false); m_highlightCaretLine->SetToolTip(_("Highlight the caret line")); fgSizer2->Add(m_highlightCaretLine, 0, wxRIGHT|wxTOP|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); fgSizer2->Add(0, 0, 1, wxEXPAND, 5); m_staticText1 = new wxStaticText(this, wxID_ANY, _("Caret line background colour:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer2->Add(m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_caretLineColourPicker = new wxColourPickerCtrl(this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize(-1, -1), wxCLRP_SHOW_LABEL|wxCLRP_DEFAULT_STYLE); fgSizer2->Add(m_caretLineColourPicker, 0, wxALL|wxEXPAND|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxStaticBoxSizer* sbSizer4 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Debugger Marker:")), wxVERTICAL); bSizer1->Add(sbSizer4, 0, wxALL|wxEXPAND, 5); wxFlexGridSizer* fgSizer4 = new wxFlexGridSizer( 0, 2, 0, 0); fgSizer4->SetFlexibleDirection( wxBOTH ); fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer4->AddGrowableCol(1); sbSizer4->Add(fgSizer4, 0, wxEXPAND, 5); m_checkBoxMarkdebuggerLine = new wxCheckBox(this, wxID_ANY, _("Highlight debugger line"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxMarkdebuggerLine->SetValue(false); fgSizer4->Add(m_checkBoxMarkdebuggerLine, 0, wxALL, 5); fgSizer4->Add(0, 0, 1, wxEXPAND, 5); m_staticText41 = new wxStaticText(this, wxID_ANY, _("Debugger line colour:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer4->Add(m_staticText41, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_colourPickerDbgLine = new wxColourPickerCtrl(this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize(-1, -1), wxCLRP_SHOW_LABEL|wxCLRP_DEFAULT_STYLE); fgSizer4->Add(m_colourPickerDbgLine, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); // Connect events m_highlightCaretLine->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(EditorOptionsGeneralGuidesPanelBase::OnHighlightCaretLine), NULL, this); m_staticText1->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnhighlightCaretLineUI), NULL, this); m_caretLineColourPicker->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnhighlightCaretLineUI), NULL, this); m_staticText41->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnDebuggerLineUI), NULL, this); m_colourPickerDbgLine->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnDebuggerLineUI), NULL, this); }
DebuggerGUIBase::DebuggerGUIBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxPanel(parent, id, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxCCA21InitBitmapResources(); bBitmapLoaded = true; } m_auimgr = new wxAuiManager; m_auimgr->SetManagedWindow( this ); m_auimgr->SetFlags( wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_TRANSPARENT_HINT|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING); m_auimgr->GetArtProvider()->SetMetric( wxAUI_DOCKART_PANE_BORDER_SIZE, 0); m_auimgr->GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE); m_toolbar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE); m_toolbar->SetToolBitmapSize(wxSize(16,16)); m_auimgr->AddPane(m_toolbar, wxAuiPaneInfo().Direction(wxAUI_DOCK_TOP).Layer(0).Row(0).Position(0).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false)); m_toolbar->AddTool(ID_PLAY_TOOL, _("Play the scene"), wxXmlResource::Get()->LoadBitmap(wxT("starticon")), wxNullBitmap, wxITEM_NORMAL, _("Play the current scene"), wxT(""), NULL); m_toolbar->AddTool(ID_PAUSE_TOOL, _("Pause the scene"), wxXmlResource::Get()->LoadBitmap(wxT("pauseicon")), wxNullBitmap, wxITEM_NORMAL, _("Pause the scene being played"), wxT(""), NULL); m_toolbar->AddTool(ID_STEP_TOOL, _("Render only one frame of the scene"), wxXmlResource::Get()->LoadBitmap(wxT("stepicon")), wxNullBitmap, wxITEM_NORMAL, _("Render only one frame of the scene"), wxT(""), NULL); m_toolbar->AddSeparator(); m_toolbar->AddTool(ID_ADD_OBJECT_TOOL, _("Create a new object"), wxXmlResource::Get()->LoadBitmap(wxT("addobjet")), wxNullBitmap, wxITEM_NORMAL, _("Create a new object"), wxT(""), NULL); m_toolbar->AddTool(ID_ADD_VAR_TOOL, _("Add a scene variable"), wxXmlResource::Get()->LoadBitmap(wxT("addvaricon")), wxNullBitmap, wxITEM_NORMAL, _("Add a scene variable"), wxT(""), NULL); m_toolbar->AddTool(ID_ADD_VARG_TOOL, _("Create a new global variable"), wxXmlResource::Get()->LoadBitmap(wxT("addvargicon")), wxNullBitmap, wxITEM_NORMAL, _("Create a new global variable"), wxT(""), NULL); m_toolbar->Realize(); m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT); m_notebook->SetName(wxT("m_notebook")); wxImageList* m_notebook_il = new wxImageList(16, 16); m_notebook->AssignImageList(m_notebook_il); m_auimgr->AddPane(m_notebook, wxAuiPaneInfo().Direction(wxAUI_DOCK_CENTER).Layer(0).Row(0).Position(0).BestSize(100,100).MinSize(100,100).MaxSize(100,100).CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false)); m_auimgr->Update(); m_panel31 = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); int m_panel31ImgIndex; m_panel31ImgIndex = m_notebook_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("debuggericon"))); m_notebook->AddPage(m_panel31, _("General"), false, m_panel31ImgIndex); wxFlexGridSizer* flexGridSizer35 = new wxFlexGridSizer(1, 1, 0, 0); flexGridSizer35->SetFlexibleDirection( wxBOTH ); flexGridSizer35->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer35->AddGrowableCol(0); flexGridSizer35->AddGrowableRow(0); m_panel31->SetSizer(flexGridSizer35); m_generalList = new wxListCtrl(m_panel31, ID_GENERAL_LIST_CTRL, wxDefaultPosition, wxDefaultSize, wxLC_REPORT); flexGridSizer35->Add(m_generalList, 0, wxALL|wxEXPAND, 0); m_generalList->SetMinSize(wxSize(200,100)); m_panel33 = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); int m_panel33ImgIndex; m_panel33ImgIndex = m_notebook_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("objet"))); m_notebook->AddPage(m_panel33, _("Objects"), false, m_panel33ImgIndex); wxFlexGridSizer* flexGridSizer39 = new wxFlexGridSizer(1, 2, 0, 0); flexGridSizer39->SetFlexibleDirection( wxBOTH ); flexGridSizer39->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer39->AddGrowableCol(1); flexGridSizer39->AddGrowableRow(0); m_panel33->SetSizer(flexGridSizer39); m_objectsTree = new wxTreeCtrl(m_panel33, ID_OBJECTS_TREE_CTRL); flexGridSizer39->Add(m_objectsTree, 0, wxALL|wxEXPAND, 0); m_objectsTree->SetMinSize(wxSize(150,100)); wxFlexGridSizer* flexGridSizer41 = new wxFlexGridSizer(2, 1, 0, 0); flexGridSizer41->SetFlexibleDirection( wxBOTH ); flexGridSizer41->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer41->AddGrowableCol(0); flexGridSizer41->AddGrowableRow(1); flexGridSizer39->Add(flexGridSizer41, 1, wxALL|wxEXPAND, 0); wxFlexGridSizer* flexGridSizer43 = new wxFlexGridSizer(1, 3, 0, 0); flexGridSizer43->SetFlexibleDirection( wxBOTH ); flexGridSizer43->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer43->AddGrowableCol(1); flexGridSizer43->AddGrowableRow(0); flexGridSizer41->Add(flexGridSizer43, 1, wxALL|wxEXPAND, 0); m_staticText45 = new wxStaticText(m_panel33, wxID_ANY, _("Object :"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer43->Add(m_staticText45, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_objectName = new wxStaticText(m_panel33, wxID_ANY, _("aaa"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer43->Add(m_objectName, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_deleteBt = new wxBitmapButton(m_panel33, ID_DELETE_BT, wxXmlResource::Get()->LoadBitmap(wxT("deleteicon")), wxDefaultPosition, wxSize(-1,-1), wxBU_AUTODRAW); m_deleteBt->SetToolTip(_("Delete the selected object")); flexGridSizer43->Add(m_deleteBt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_objectList = new wxListCtrl(m_panel33, ID_OBJECT_LIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT); flexGridSizer41->Add(m_objectList, 0, wxALL|wxEXPAND, 0); m_objectList->SetMinSize(wxSize(150,100)); SetName(wxT("DebuggerGUIBase")); SetSize(500,300); if (GetSizer()) { GetSizer()->Fit(this); } }
PrefabSelector::PrefabSelector() : DialogBase(_(PREFABSELECTOR_TITLE)), _treeStore(new wxutil::TreeModel(_columns)), _treeView(NULL), _lastPrefab(""), _populated(false), _description(NULL), _customPath(NULL) { SetSizer(new wxBoxSizer(wxVERTICAL)); wxBoxSizer* vbox = new wxBoxSizer(wxVERTICAL); GetSizer()->Add(vbox, 1, wxEXPAND | wxALL, 12); setupPathSelector(vbox); wxSplitterWindow* splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D | wxSP_LIVE_UPDATE); splitter->SetMinimumPaneSize(10); // disallow unsplitting setupTreeView(splitter); wxPanel* previewPanel = new wxPanel(splitter, wxID_ANY); previewPanel->SetSizer(new wxBoxSizer(wxVERTICAL)); _preview.reset(new ui::MapPreview(previewPanel)); _description = new wxTextCtrl(previewPanel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_LEFT | wxTE_MULTILINE | wxTE_READONLY | wxTE_WORDWRAP); _description->SetMinClientSize(wxSize(-1, 60)); previewPanel->GetSizer()->Add(_description, 0, wxEXPAND | wxBOTTOM, 6); previewPanel->GetSizer()->Add(_preview->getWidget(), 1, wxEXPAND); splitter->SplitVertically(_treeView, previewPanel); vbox->Add(splitter, 1, wxEXPAND); wxStdDialogButtonSizer* buttonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL); wxButton* reloadButton = new wxButton(this, wxID_ANY, _("Rescan Prefab Folders")); reloadButton->Connect(wxEVT_BUTTON, wxCommandEventHandler(PrefabSelector::onRescanPrefabs), NULL, this); buttonSizer->Prepend(reloadButton, 0, wxRIGHT, 32); vbox->Add(buttonSizer, 0, wxALIGN_RIGHT | wxTOP, 12); // Set the default size of the window _position.connect(this); _position.readPosition(); // The model preview is half the width and 20% of the parent's height (to // allow vertical shrinking) _preview->setSize(static_cast<int>(_position.getSize()[0] * 0.4f), static_cast<int>(_position.getSize()[1] * 0.2f)); FitToScreen(0.8f, 0.8f); splitter->SetSashPosition(static_cast<int>(GetSize().GetWidth() * 0.2f)); _panedPosition.connect(splitter); _panedPosition.loadFromPath(RKEY_SPLIT_POS); Connect(wxutil::EV_TREEMODEL_POPULATION_FINISHED, TreeModelPopulationFinishedHandler(PrefabSelector::onTreeStorePopulationFinished), NULL, this); }
void CImportDialog::Run() { wxFileDialog dlg(m_parent, _("Select file to import settings from"), wxString(), _T("FileZilla.xml"), _T("XML files (*.xml)|*.xml"), wxFD_OPEN | wxFD_FILE_MUST_EXIST); dlg.CenterOnParent(); if (dlg.ShowModal() != wxID_OK) return; wxFileName fn(dlg.GetPath()); wxString const path = fn.GetPath(); wxString const settingsDir(COptions::Get()->GetOption(OPTION_DEFAULT_SETTINGSDIR)); if (path == settingsDir) { wxMessageBoxEx(_("You cannot import settings from FileZilla's own settings directory."), _("Error importing"), wxICON_ERROR, m_parent); return; } CXmlFile fz3(dlg.GetPath()); TiXmlElement* fz3Root = fz3.Load(); if (fz3Root) { bool settings = fz3Root->FirstChildElement("Settings") != 0; bool queue = fz3Root->FirstChildElement("Queue") != 0; bool sites = fz3Root->FirstChildElement("Servers") != 0; if (settings || queue || sites) { if (!Load(m_parent, _T("ID_IMPORT"))) { wxBell(); return; } if (!queue) XRCCTRL(*this, "ID_QUEUE", wxCheckBox)->Hide(); if (!sites) XRCCTRL(*this, "ID_SITEMANAGER", wxCheckBox)->Hide(); if (!settings) XRCCTRL(*this, "ID_SETTINGS", wxCheckBox)->Hide(); GetSizer()->Fit(this); if (ShowModal() != wxID_OK) { return; } if (fz3.IsFromFutureVersion()) { wxString msg = wxString::Format(_("The file '%s' has been created by a more recent version of FileZilla.\nLoading files created by newer versions can result in loss of data.\nDo you want to continue?"), fz3.GetFileName()); if (wxMessageBoxEx(msg, _("Detected newer version of FileZilla"), wxICON_QUESTION | wxYES_NO) != wxYES) { return; } } if (queue && XRCCTRL(*this, "ID_QUEUE", wxCheckBox)->IsChecked()) { m_pQueueView->ImportQueue(fz3Root->FirstChildElement("Queue"), true); } if (sites && XRCCTRL(*this, "ID_SITEMANAGER", wxCheckBox)->IsChecked()) { ImportSites(fz3Root->FirstChildElement("Servers")); } if (settings && XRCCTRL(*this, "ID_SETTINGS", wxCheckBox)->IsChecked()) { COptions::Get()->Import(fz3Root->FirstChildElement("Settings")); wxMessageBoxEx(_("The settings have been imported. You have to restart FileZilla for all settings to have effect."), _("Import successful"), wxOK, this); } wxMessageBoxEx(_("The selected categories have been imported."), _("Import successful"), wxOK, this); return; } } CXmlFile fz2(dlg.GetPath(), _T("FileZilla")); TiXmlElement* fz2Root = fz2.Load(); if (fz2Root) { TiXmlElement* sites_fz2 = fz2Root->FirstChildElement("Sites"); if (sites_fz2) { int res = wxMessageBoxEx(_("The file you have selected contains site manager data from a previous version of FileZilla.\nDue to differences in the storage format, only host, port, username and password will be imported.\nContinue with the import?"), _("Import data from older version"), wxICON_QUESTION | wxYES_NO); if (res == wxYES) ImportLegacySites(sites_fz2); return; } } wxMessageBoxEx(_("File does not contain any importable data."), _("Error importing"), wxICON_ERROR, m_parent); }
bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) { wxASSERT_MSG( page != m_page, wxT("this is useless") ); wxSizerFlags flags(1); flags.Border(wxALL, m_border).Expand(); if ( !m_started ) { if ( m_usingSizer ) { m_sizerBmpAndPage->Add(m_sizerPage, flags); // now that our layout is computed correctly, hide the pages // artificially shown in wxWizardSizer::Insert() back again m_sizerPage->HidePages(); } } // we'll use this to decide whether we have to change the label of this // button or not (initially the label is "Next") bool btnLabelWasNext = true; // remember the old bitmap (if any) to compare with the new one later wxBitmap bmpPrev; // check for previous page if ( m_page ) { // send the event to the old page wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGING, GetId(), goingForward, m_page); if ( m_page->GetEventHandler()->ProcessEvent(event) && !event.IsAllowed() ) { // vetoed by the page return false; } m_page->Hide(); btnLabelWasNext = HasNextPage(m_page); bmpPrev = m_page->GetBitmap(); if ( !m_usingSizer ) m_sizerBmpAndPage->Detach(m_page); } // set the new page m_page = page; // is this the end? if ( !m_page ) { // terminate successfully if ( IsModal() ) { EndModal(wxID_OK); } else { SetReturnCode(wxID_OK); Hide(); } // and notify the user code (this is especially useful for modeless // wizards) wxWizardEvent event(wxEVT_WIZARD_FINISHED, GetId(), false, 0); (void)GetEventHandler()->ProcessEvent(event); return true; } // position and show the new page (void)m_page->TransferDataToWindow(); if ( m_usingSizer ) { // wxWizardSizer::RecalcSizes wants to be called when m_page changes m_sizerPage->RecalcSizes(); } else // pages are not managed by the sizer { m_sizerBmpAndPage->Add(m_page, flags); m_sizerBmpAndPage->SetItemMinSize(m_page, GetPageSize()); } #if wxUSE_STATBMP // update the bitmap if:it changed if ( m_statbmp ) { wxBitmap bmp = m_page->GetBitmap(); if ( !bmp.Ok() ) bmp = m_bitmap; if ( !bmpPrev.Ok() ) bmpPrev = m_bitmap; if ( !bmp.IsSameAs(bmpPrev) ) m_statbmp->SetBitmap(bmp); } #endif // wxUSE_STATBMP // and update the buttons state m_btnPrev->Enable(HasPrevPage(m_page)); bool hasNext = HasNextPage(m_page); if ( btnLabelWasNext != hasNext ) { m_btnNext->SetLabel(hasNext ? _("&Next >") : _("&Finish")); } // nothing to do: the label was already correct m_btnNext->SetDefault(); // send the change event to the new page now wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGED, GetId(), goingForward, m_page); (void)m_page->GetEventHandler()->ProcessEvent(event); // and finally show it m_page->Show(); m_page->SetFocus(); if ( !m_usingSizer ) m_sizerBmpAndPage->Layout(); if ( !m_started ) { m_started = true; if ( wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA ) { GetSizer()->SetSizeHints(this); if ( m_posWizard == wxDefaultPosition ) CentreOnScreen(); } } wxWizardEvent pageShownEvent(wxEVT_WIZARD_PAGE_SHOWN, GetId(), goingForward, m_page); m_page->GetEventHandler()->ProcessEvent(pageShownEvent); return true; }
SvnSelectLocalRepoBase::SvnSelectLocalRepoBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC95F2InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer33 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer33); wxFlexGridSizer* fgSizer13 = new wxFlexGridSizer(0, 2, 0, 0); fgSizer13->SetFlexibleDirection( wxBOTH ); fgSizer13->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer13->AddGrowableCol(1); bSizer33->Add(fgSizer13, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5); m_staticText37 = new wxStaticText(this, wxID_ANY, _("Select path:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer13->Add(m_staticText37, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_dirPicker1 = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, wxSize(-1, -1), wxDIRP_DEFAULT_STYLE); fgSizer13->Add(m_dirPicker1, 0, wxALL|wxEXPAND, 5); m_staticText36 = new wxStaticText(this, wxID_ANY, _("Recently used paths:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer33->Add(m_staticText36, 0, wxALL, 5); wxArrayString m_listBoxPathsArr; m_listBoxPaths = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_listBoxPathsArr, wxLB_EXTENDED); bSizer33->Add(m_listBoxPaths, 1, wxALL|wxEXPAND, 5); m_staticline9 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL); bSizer33->Add(m_staticline9, 0, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer34 = new wxBoxSizer(wxHORIZONTAL); bSizer33->Add(bSizer34, 0, wxALIGN_CENTER_HORIZONTAL, 5); m_button25 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); m_button25->SetDefault(); bSizer34->Add(m_button25, 0, wxALL, 5); m_button26 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer34->Add(m_button26, 0, wxALL, 5); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); // Connect events m_listBoxPaths->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(SvnSelectLocalRepoBase::OnPathSelected), NULL, this); m_listBoxPaths->Connect(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(SvnSelectLocalRepoBase::OnPathActivated), NULL, this); m_listBoxPaths->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(SvnSelectLocalRepoBase::OnMenu), NULL, this); }
SvnBlameFrameBase::SvnBlameFrameBase(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); wxC95F2InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer9 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer9); m_panel11 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); boxSizer9->Add(m_panel11, 1, wxEXPAND, 5); wxBoxSizer* boxSizer13 = new wxBoxSizer(wxVERTICAL); m_panel11->SetSizer(boxSizer13); m_stc = new SvnBlameEditor(m_panel11, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0); // Configure the fold margin m_stc->SetMarginType (4, wxSTC_MARGIN_SYMBOL); m_stc->SetMarginMask (4, wxSTC_MASK_FOLDERS); m_stc->SetMarginSensitive(4, true); m_stc->SetMarginWidth (4, 16); m_stc->SetProperty(wxT("fold"),wxT("1")); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDER, wxSTC_MARK_ARROW); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_BACKGROUND); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_BACKGROUND); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_ARROW); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN); m_stc->MarkerDefine(wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_BACKGROUND); // Configure the tracker margin m_stc->SetMarginWidth(1, 0); // Configure the symbol margin m_stc->SetMarginType (2, wxSTC_MARGIN_SYMBOL); m_stc->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS)); m_stc->SetMarginWidth(2, 0); m_stc->SetMarginSensitive(2, true); // Configure the line numbers margin int m_stc_PixelWidth = 4 + 5 *m_stc->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9")); m_stc->SetMarginType(0, wxSTC_MARGIN_NUMBER); m_stc->SetMarginWidth(0,m_stc_PixelWidth); // Configure the line symbol margin m_stc->SetMarginType(3, wxSTC_MARGIN_FORE); m_stc->SetMarginMask(3, 0); m_stc->SetMarginWidth(3,0); // Select the lexer m_stc->SetLexer(wxSTC_LEX_NULL); // Set default font / styles m_stc->StyleClearAll(); m_stc->SetWrapMode(0); m_stc->SetIndentationGuides(0); m_stc->SetKeyWords(0, wxT("")); m_stc->SetKeyWords(1, wxT("")); m_stc->SetKeyWords(2, wxT("")); m_stc->SetKeyWords(3, wxT("")); m_stc->SetKeyWords(4, wxT("")); boxSizer13->Add(m_stc, 1, wxALL|wxEXPAND, 5); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); }
NewKeyShortcutBaseDlg::NewKeyShortcutBaseDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC8418InitBitmapResources(); bBitmapLoaded = true; } bSizer3 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer3); m_panel1 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); bSizer3->Add(m_panel1, 1, wxALL|wxEXPAND, 5); bSizer5 = new wxBoxSizer(wxVERTICAL); m_panel1->SetSizer(bSizer5); flexGridSizer8 = new wxFlexGridSizer( 0, 2, 0, 0); flexGridSizer8->SetFlexibleDirection( wxBOTH ); flexGridSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer8->AddGrowableCol(1); bSizer5->Add(flexGridSizer8, 1, wxALL|wxEXPAND, 5); m_staticTextActionLabel = new wxStaticText(m_panel1, wxID_ANY, _("Action:"), wxDefaultPosition, wxSize(-1, -1), 0); flexGridSizer8->Add(m_staticTextActionLabel, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_staticTextAction = new wxStaticText(m_panel1, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer8->Add(m_staticTextAction, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_staticText10 = new wxStaticText(m_panel1, wxID_ANY, _("Key:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer8->Add(m_staticText10, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrl1 = new wxTextCtrl(m_panel1, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER); m_textCtrl1->SetToolTip(_("Hit any keyboard key")); m_textCtrl1->SetFocus(); flexGridSizer8->Add(m_textCtrl1, 0, wxALL|wxEXPAND, 5); m_staticText12 = new wxStaticText(m_panel1, wxID_ANY, _("Modifiers:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer8->Add(m_staticText12, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); bSizer6 = new wxBoxSizer(wxHORIZONTAL); flexGridSizer8->Add(bSizer6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_checkBoxCtrl = new wxCheckBox(m_panel1, wxID_ANY, _("Ctrl/Cmd"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxCtrl->SetValue(false); bSizer6->Add(m_checkBoxCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_checkBoxAlt = new wxCheckBox(m_panel1, wxID_ANY, _("Alt"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxAlt->SetValue(false); bSizer6->Add(m_checkBoxAlt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_checkBoxShift = new wxCheckBox(m_panel1, wxID_ANY, _("Shift"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxShift->SetValue(false); bSizer6->Add(m_checkBoxShift, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); bSizer4 = new wxBoxSizer(wxHORIZONTAL); bSizer3->Add(bSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_buttonOk = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); m_buttonOk->SetDefault(); bSizer4->Add(m_buttonOk, 0, wxALL, 5); m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer4->Add(m_buttonCancel, 0, wxALL, 5); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(); // Connect events m_textCtrl1->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(NewKeyShortcutBaseDlg::OnKeyDown), NULL, this); }
// Lay out controls void wxBookCtrlBase::DoSize() { if ( !m_bookctrl ) { // we're not fully created yet or OnSize() should be hidden by derived class return; } if (GetSizer()) Layout(); else { // resize controller and the page area to fit inside our new size const wxSize sizeClient( GetClientSize() ), sizeBorder( m_bookctrl->GetSize() - m_bookctrl->GetClientSize() ), sizeCtrl( GetControllerSize() ); m_bookctrl->SetClientSize( sizeCtrl.x - sizeBorder.x, sizeCtrl.y - sizeBorder.y ); // if this changes the visibility of the scrollbars the best size changes, relayout in this case wxSize sizeCtrl2 = GetControllerSize(); if ( sizeCtrl != sizeCtrl2 ) { wxSize sizeBorder2 = m_bookctrl->GetSize() - m_bookctrl->GetClientSize(); m_bookctrl->SetClientSize( sizeCtrl2.x - sizeBorder2.x, sizeCtrl2.y - sizeBorder2.y ); } const wxSize sizeNew = m_bookctrl->GetSize(); wxPoint posCtrl; switch ( GetWindowStyle() & wxBK_ALIGN_MASK ) { default: wxFAIL_MSG( wxT("unexpected alignment") ); // fall through case wxBK_TOP: case wxBK_LEFT: // posCtrl is already ok break; case wxBK_BOTTOM: posCtrl.y = sizeClient.y - sizeNew.y; break; case wxBK_RIGHT: posCtrl.x = sizeClient.x - sizeNew.x; break; } if ( m_bookctrl->GetPosition() != posCtrl ) m_bookctrl->Move(posCtrl); } // resize all pages to fit the new control size const wxRect pageRect = GetPageRect(); const unsigned pagesCount = m_pages.GetCount(); for ( unsigned int i = 0; i < pagesCount; ++i ) { wxWindow * const page = m_pages[i]; if ( !page ) { wxASSERT_MSG( AllowNullPage(), wxT("Null page in a control that does not allow null pages?") ); continue; } page->SetSize(pageRect); } }
CodeFormatterBaseDlg::CodeFormatterBaseDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxCrafterGgLOZbInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizerMain = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizerMain); m_treebook = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT); m_treebook->SetName(wxT("m_treebook")); wxImageList* m_treebook_il = new wxImageList(16, 16); m_treebook->AssignImageList(m_treebook_il); bSizerMain->Add(m_treebook, 1, wxALL|wxEXPAND, 5); m_panel133 = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); int m_panel133ImgIndex; m_panel133ImgIndex = m_treebook_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("configure"))); m_treebook->AddPage(m_panel133, _("General"), true, m_panel133ImgIndex); wxBoxSizer* boxSizer179 = new wxBoxSizer(wxVERTICAL); m_panel133->SetSizer(boxSizer179); wxFlexGridSizer* flexGridSizer158 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer158->SetFlexibleDirection( wxBOTH ); flexGridSizer158->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer158->AddGrowableCol(1); boxSizer179->Add(flexGridSizer158, 1, wxALL|wxEXPAND, 2); m_staticText162 = new wxStaticText(m_panel133, wxID_ANY, _("Format editor on file save:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer158->Add(m_staticText162, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_checkBoxFormatOnSave = new wxCheckBox(m_panel133, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxFormatOnSave->SetValue(false); m_checkBoxFormatOnSave->SetToolTip(_("When saving a file, automatically format it")); flexGridSizer158->Add(m_checkBoxFormatOnSave, 0, wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_LEFT, 5); m_staticText115 = new wxStaticText(m_panel133, wxID_ANY, _("Select C++ formatter:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer158->Add(m_staticText115, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_choiceCxxEngineArr; m_choiceCxxEngineArr.Add(wxT("AStyle")); m_choiceCxxEngineArr.Add(wxT("clang-format")); m_choiceCxxEngine = new wxChoice(m_panel133, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceCxxEngineArr, 0); m_choiceCxxEngine->SetToolTip(_("Select the formatter engine for C/C++\nNote that JavaScript, clang-format is always used")); m_choiceCxxEngine->SetSelection(1); flexGridSizer158->Add(m_choiceCxxEngine, 0, wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); int m_panelCxxImgIndex; m_panelCxxImgIndex = m_treebook_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("page_white_cplusplus"))); m_treebook->AddPage(NULL, _("C++"), false, m_panelCxxImgIndex); m_panelAstyle = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); int m_panelAstyleImgIndex; m_panelAstyleImgIndex = m_treebook_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("astyle"))); m_treebook->InsertSubPage(1, m_panelAstyle, _("AStyle"), false, m_panelAstyleImgIndex); wxBoxSizer* boxSizer95 = new wxBoxSizer(wxVERTICAL); m_panelAstyle->SetSizer(boxSizer95); m_splitter145 = new wxSplitterWindow(m_panelAstyle, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE); m_splitter145->SetSashGravity(0.5); m_splitter145->SetMinimumPaneSize(10); boxSizer95->Add(m_splitter145, 1, wxEXPAND, 5); m_splitterPage149 = new wxPanel(m_splitter145, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); wxBoxSizer* boxSizer155 = new wxBoxSizer(wxVERTICAL); m_splitterPage149->SetSizer(boxSizer155); wxArrayString m_pgMgrAstyleArr; wxUnusedVar(m_pgMgrAstyleArr); wxArrayInt m_pgMgrAstyleIntArr; wxUnusedVar(m_pgMgrAstyleIntArr); m_pgMgrAstyle = new wxPropertyGridManager(m_splitterPage149, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED); boxSizer155->Add(m_pgMgrAstyle, 1, wxALL|wxEXPAND, 2); m_pgPropAstyleOptions = m_pgMgrAstyle->Append( new wxPropertyCategory( _("AStyle Options") ) ); m_pgPropAstyleOptions->SetHelpString(wxT("")); m_pgMgrAstyleArr.Clear(); m_pgMgrAstyleIntArr.Clear(); m_pgMgrAstyleArr.Add(_("GNU")); m_pgMgrAstyleArr.Add(_("Java")); m_pgMgrAstyleArr.Add(_("K&R")); m_pgMgrAstyleArr.Add(_("Linux")); m_pgMgrAstyleArr.Add(_("ANSI")); m_pgPropPreDefinedStyles = m_pgMgrAstyle->AppendIn( m_pgPropAstyleOptions, new wxEnumProperty( _("PreDefined Styles"), wxPG_LABEL, m_pgMgrAstyleArr, m_pgMgrAstyleIntArr, 0) ); m_pgPropPreDefinedStyles->SetHelpString(_("Choose the formatting from one of the known styles")); m_pgMgrAstyleArr.Clear(); m_pgMgrAstyleIntArr.Clear(); m_pgMgrAstyleArr.Add(_("Break closing")); m_pgMgrAstyleArr.Add(_("Attach")); m_pgMgrAstyleArr.Add(_("Linux")); m_pgMgrAstyleArr.Add(_("Break")); m_pgMgrAstyleArr.Add(_("None")); m_pgPropBrackets = m_pgMgrAstyle->AppendIn( m_pgPropAstyleOptions, new wxEnumProperty( _("Brackets"), wxPG_LABEL, m_pgMgrAstyleArr, m_pgMgrAstyleIntArr, 0) ); m_pgPropBrackets->SetHelpString(_("Bracket Style options define the bracket style to use")); m_pgMgrAstyleArr.Clear(); m_pgMgrAstyleIntArr.Clear(); m_pgMgrAstyleArr.Add(_("Class")); m_pgMgrAstyleArr.Add(_("Brackets")); m_pgMgrAstyleArr.Add(_("Switches")); m_pgMgrAstyleArr.Add(_("Namespaces")); m_pgMgrAstyleArr.Add(_("Case")); m_pgMgrAstyleArr.Add(_("Labels")); m_pgMgrAstyleArr.Add(_("Blocks")); m_pgMgrAstyleArr.Add(_("Preprocessors")); m_pgMgrAstyleArr.Add(_("Max Instatement Indent")); m_pgMgrAstyleArr.Add(_("Min Instatement Indent")); m_pgMgrAstyleIntArr.Add(AS_INDENT_CLASS); m_pgMgrAstyleIntArr.Add(AS_INDENT_BRACKETS); m_pgMgrAstyleIntArr.Add(AS_INDENT_SWITCHES); m_pgMgrAstyleIntArr.Add(AS_INDENT_NAMESPACES); m_pgMgrAstyleIntArr.Add(AS_INDENT_CASE); m_pgMgrAstyleIntArr.Add(AS_INDENT_LABELS); m_pgMgrAstyleIntArr.Add(AS_INDENT_BLOCKS); m_pgMgrAstyleIntArr.Add(AS_INDENT_PREPROCESSORS); m_pgMgrAstyleIntArr.Add(AS_MAX_INSTATEMENT_INDENT); m_pgMgrAstyleIntArr.Add(AS_MIN_COND_INDENT); m_pgPropIndentation = m_pgMgrAstyle->AppendIn( m_pgPropAstyleOptions, new wxFlagsProperty( _("Indentation"), wxPG_LABEL, m_pgMgrAstyleArr, m_pgMgrAstyleIntArr, 0) ); m_pgPropIndentation->SetHelpString(wxT("")); m_pgMgrAstyleArr.Clear(); m_pgMgrAstyleIntArr.Clear(); m_pgMgrAstyleArr.Add(_("Break Blocks")); m_pgMgrAstyleArr.Add(_("Pad Parenthesis")); m_pgMgrAstyleArr.Add(_("Break Blocks All")); m_pgMgrAstyleArr.Add(_("Pad Parenthesis Outside")); m_pgMgrAstyleArr.Add(_("Break else-if")); m_pgMgrAstyleArr.Add(_("Pad Parenthesis Inside")); m_pgMgrAstyleArr.Add(_("Pad Operators")); m_pgMgrAstyleArr.Add(_("UnPad Parenthesis")); m_pgMgrAstyleArr.Add(_("One Line Keep Statement")); m_pgMgrAstyleArr.Add(_("Fill Empty Lines")); m_pgMgrAstyleArr.Add(_("One Line Keep Blocks")); m_pgMgrAstyleIntArr.Add(AS_BREAK_BLOCKS); m_pgMgrAstyleIntArr.Add(AS_PAD_PARENTHESIS); m_pgMgrAstyleIntArr.Add(AS_BREAK_BLOCKS_ALL); m_pgMgrAstyleIntArr.Add(AS_PAD_PARENTHESIS_OUT); m_pgMgrAstyleIntArr.Add(AS_BREAK_ELSEIF); m_pgMgrAstyleIntArr.Add(AS_PAD_PARENTHESIS_IN); m_pgMgrAstyleIntArr.Add(AS_PAD_OPER); m_pgMgrAstyleIntArr.Add(AS_UNPAD_PARENTHESIS); m_pgMgrAstyleIntArr.Add(AS_ONE_LINE_KEEP_STATEMENT); m_pgMgrAstyleIntArr.Add(AS_FILL_EMPTY_LINES); m_pgMgrAstyleIntArr.Add(AS_ONE_LINE_KEEP_BLOCKS); m_pgPropFormatting = m_pgMgrAstyle->AppendIn( m_pgPropAstyleOptions, new wxFlagsProperty( _("Formatting"), wxPG_LABEL, m_pgMgrAstyleArr, m_pgMgrAstyleIntArr, 0) ); m_pgPropFormatting->SetHelpString(_("Select one or more formatting option from the list below")); wxBoxSizer* bCustomSettingsSizer = new wxBoxSizer(wxVERTICAL); boxSizer155->Add(bCustomSettingsSizer, 0, wxALL|wxEXPAND, 2); wxBoxSizer* boxSizer57 = new wxBoxSizer(wxHORIZONTAL); bCustomSettingsSizer->Add(boxSizer57, 0, wxEXPAND, 5); m_staticText59 = new wxStaticText(m_splitterPage149, wxID_ANY, _("AStyle Only:"), wxDefaultPosition, wxSize(-1,-1), 0); wxFont m_staticText59Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText59Font.SetWeight(wxFONTWEIGHT_BOLD); m_staticText59->SetFont(m_staticText59Font); boxSizer57->Add(m_staticText59, 0, wxRIGHT|wxTOP|wxBOTTOM, 5); m_staticText3 = new wxStaticText(m_splitterPage149, wxID_ANY, _("Custom user settings"), wxDefaultPosition, wxSize(-1, -1), 0); boxSizer57->Add(m_staticText3, 0, wxALL, 5); m_textCtrlUserFlags = new wxTextCtrl(m_splitterPage149, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,80), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER|wxTE_MULTILINE); wxFont m_textCtrlUserFlagsFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("Sans")); m_textCtrlUserFlags->SetFont(m_textCtrlUserFlagsFont); bCustomSettingsSizer->Add(m_textCtrlUserFlags, 1, wxEXPAND, 5); m_splitterPage153 = new wxPanel(m_splitter145, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); m_splitter145->SplitVertically(m_splitterPage149, m_splitterPage153, 0); wxBoxSizer* boxSizer157 = new wxBoxSizer(wxVERTICAL); m_splitterPage153->SetSizer(boxSizer157); m_textCtrlPreview = new wxStyledTextCtrl(m_splitterPage153, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0); // Configure the fold margin m_textCtrlPreview->SetMarginType (4, wxSTC_MARGIN_SYMBOL); m_textCtrlPreview->SetMarginMask (4, wxSTC_MASK_FOLDERS); m_textCtrlPreview->SetMarginSensitive(4, true); m_textCtrlPreview->SetMarginWidth (4, 0); // Configure the tracker margin m_textCtrlPreview->SetMarginWidth(1, 0); // Configure the symbol margin m_textCtrlPreview->SetMarginType (2, wxSTC_MARGIN_SYMBOL); m_textCtrlPreview->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS)); m_textCtrlPreview->SetMarginWidth(2, 0); m_textCtrlPreview->SetMarginSensitive(2, true); // Configure the line numbers margin m_textCtrlPreview->SetMarginType(0, wxSTC_MARGIN_NUMBER); m_textCtrlPreview->SetMarginWidth(0,0); // Configure the line symbol margin m_textCtrlPreview->SetMarginType(3, wxSTC_MARGIN_FORE); m_textCtrlPreview->SetMarginMask(3, 0); m_textCtrlPreview->SetMarginWidth(3,0); // Select the lexer m_textCtrlPreview->SetLexer(wxSTC_LEX_NULL); // Set default font / styles m_textCtrlPreview->StyleClearAll(); m_textCtrlPreview->SetWrapMode(0); m_textCtrlPreview->SetIndentationGuides(0); m_textCtrlPreview->SetKeyWords(0, wxT("")); m_textCtrlPreview->SetKeyWords(1, wxT("")); m_textCtrlPreview->SetKeyWords(2, wxT("")); m_textCtrlPreview->SetKeyWords(3, wxT("")); m_textCtrlPreview->SetKeyWords(4, wxT("")); boxSizer157->Add(m_textCtrlPreview, 1, wxALL|wxEXPAND, 2); m_panelClang = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); int m_panelClangImgIndex; m_panelClangImgIndex = m_treebook_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("clang"))); m_treebook->InsertSubPage(1, m_panelClang, _("clang-format"), false, m_panelClangImgIndex); wxBoxSizer* boxSizer97 = new wxBoxSizer(wxVERTICAL); m_panelClang->SetSizer(boxSizer97); m_splitter165 = new wxSplitterWindow(m_panelClang, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE); m_splitter165->SetSashGravity(0.5); m_splitter165->SetMinimumPaneSize(10); boxSizer97->Add(m_splitter165, 1, wxEXPAND, 5); m_splitterPage169 = new wxPanel(m_splitter165, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); wxBoxSizer* boxSizer175 = new wxBoxSizer(wxVERTICAL); m_splitterPage169->SetSizer(boxSizer175); wxArrayString m_pgMgrClangArr; wxUnusedVar(m_pgMgrClangArr); wxArrayInt m_pgMgrClangIntArr; wxUnusedVar(m_pgMgrClangIntArr); m_pgMgrClang = new wxPropertyGridManager(m_splitterPage169, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED); boxSizer175->Add(m_pgMgrClang, 1, wxALL|wxEXPAND, 2); m_pgPropClangFormat = m_pgMgrClang->Append( new wxPropertyCategory( _("ClangFormat Options") ) ); m_pgPropClangFormat->SetHelpString(wxT("")); m_pgPropClangFormatExePath = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxFileProperty( _("clang-format path"), wxPG_LABEL, wxT("")) ); #if !defined(__WXOSX__) && !defined(_WIN64) m_pgMgrClang->SetPropertyAttribute(m_pgPropClangFormatExePath, wxPG_FILE_WILDCARD, wxT("")); #endif // !defined(__WXOSX__) && !defined(_WIN64) m_pgPropClangFormatExePath->SetHelpString(_("Select the path to clang-format executable tool")); m_pgPropColumnLimit = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxIntProperty( _("Column Limit"), wxPG_LABEL, 0) ); m_pgPropColumnLimit->SetHelpString(_("The column limit\nA column limit of 0 means that there is no column limit.\nIn this case, clang-format will respect the input's line breaking decisions within statements unless they contradict other rules")); m_pgMgrClangArr.Clear(); m_pgMgrClangIntArr.Clear(); m_pgMgrClangArr.Add(_("Linux")); m_pgMgrClangArr.Add(_("Attach")); m_pgMgrClangArr.Add(_("Stroustrup")); m_pgMgrClangArr.Add(_("Allman")); m_pgMgrClangArr.Add(_("GNU")); m_pgMgrClangIntArr.Add(kLinux); m_pgMgrClangIntArr.Add(kAttach); m_pgMgrClangIntArr.Add(kStroustrup); m_pgMgrClangIntArr.Add(kAllman); m_pgMgrClangIntArr.Add(kGNU); m_pgPropClangBraceBreakStyle = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxEnumProperty( _("Brace breaking style"), wxPG_LABEL, m_pgMgrClangArr, m_pgMgrClangIntArr, 0) ); m_pgPropClangBraceBreakStyle->SetHelpString(_("The brace breaking style to use.")); m_pgMgrClangArr.Clear(); m_pgMgrClangIntArr.Clear(); m_pgMgrClangArr.Add(_("LLVM")); m_pgMgrClangArr.Add(_("Google")); m_pgMgrClangArr.Add(_("WebKit")); m_pgMgrClangArr.Add(_("Chromium")); m_pgMgrClangArr.Add(_("Mozilla")); m_pgMgrClangIntArr.Add(kClangFormatLLVM); m_pgMgrClangIntArr.Add(kClangFormatGoogle); m_pgMgrClangIntArr.Add(kClangFormatWebKit); m_pgMgrClangIntArr.Add(kClangFormatChromium); m_pgMgrClangIntArr.Add(kClangFormatMozilla); m_pgPropClangFormatStyle = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxEnumProperty( _("Style"), wxPG_LABEL, m_pgMgrClangArr, m_pgMgrClangIntArr, 0) ); m_pgPropClangFormatStyle->SetHelpString(_("Coding style")); m_pgMgrClangArr.Clear(); m_pgMgrClangIntArr.Clear(); m_pgMgrClangArr.Add(_("Align Escaped Newlines Left")); m_pgMgrClangArr.Add(_("Align Trailing Comments")); m_pgMgrClangArr.Add(_("Allow All Parameters Of Declaration On Next Line")); m_pgMgrClangArr.Add(_("Allow Short Functions On A Single Line")); m_pgMgrClangArr.Add(_("Allow Short Blocks On A Single Line")); m_pgMgrClangArr.Add(_("Allow Short Loops On A Single Line")); m_pgMgrClangArr.Add(_("Allow Short If Statements On A SingleLine")); m_pgMgrClangArr.Add(_("Always Break Before Multiline Strings")); m_pgMgrClangArr.Add(_("Always Break Template Declarations")); m_pgMgrClangArr.Add(_("Bin Pack Parameters")); m_pgMgrClangArr.Add(_("Break Before Binary Operators")); m_pgMgrClangArr.Add(_("Break Before Ternary Operators")); m_pgMgrClangArr.Add(_("Break Constructor Initializers Before Comma")); m_pgMgrClangArr.Add(_("Indent Case Labels")); m_pgMgrClangArr.Add(_("Indent Function DeclarationAfterType")); m_pgMgrClangArr.Add(_("Space Before Assignment Operators")); m_pgMgrClangArr.Add(_("Space Before Parentheses")); m_pgMgrClangArr.Add(_("Spaces In Parentheses")); m_pgMgrClangArr.Add(_("Pointer And Reference Aligned to the Right")); m_pgMgrClangIntArr.Add(kAlignEscapedNewlinesLeft); m_pgMgrClangIntArr.Add(kAlignTrailingComments); m_pgMgrClangIntArr.Add(kAllowAllParametersOfDeclarationOnNextLine); m_pgMgrClangIntArr.Add(kAllowShortFunctionsOnASingleLine); m_pgMgrClangIntArr.Add(kAllowShortBlocksOnASingleLine); m_pgMgrClangIntArr.Add(kAllowShortLoopsOnASingleLine); m_pgMgrClangIntArr.Add(kAllowShortIfStatementsOnASingleLine); m_pgMgrClangIntArr.Add(kAlwaysBreakBeforeMultilineStrings); m_pgMgrClangIntArr.Add(kAlwaysBreakTemplateDeclarations); m_pgMgrClangIntArr.Add(kBinPackParameters); m_pgMgrClangIntArr.Add(kBreakBeforeBinaryOperators); m_pgMgrClangIntArr.Add(kBreakBeforeTernaryOperators); m_pgMgrClangIntArr.Add(kBreakConstructorInitializersBeforeComma); m_pgMgrClangIntArr.Add(kIndentCaseLabels); m_pgMgrClangIntArr.Add(kIndentFunctionDeclarationAfterType); m_pgMgrClangIntArr.Add(kSpaceBeforeAssignmentOperators); m_pgMgrClangIntArr.Add(kSpaceBeforeParens); m_pgMgrClangIntArr.Add(kSpacesInParentheses); m_pgMgrClangIntArr.Add(kPointerAlignmentRight); m_pgPropClangFormattingOptions = m_pgMgrClang->AppendIn( m_pgPropClangFormat, new wxFlagsProperty( _("Clang Formatting Options"), wxPG_LABEL, m_pgMgrClangArr, m_pgMgrClangIntArr, 0) ); m_pgPropClangFormattingOptions->SetHelpString(wxT("")); m_splitterPage173 = new wxPanel(m_splitter165, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); m_splitter165->SplitVertically(m_splitterPage169, m_splitterPage173, 0); wxBoxSizer* boxSizer177 = new wxBoxSizer(wxVERTICAL); m_splitterPage173->SetSizer(boxSizer177); m_textCtrlPreview_Clang = new wxStyledTextCtrl(m_splitterPage173, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0); // Configure the fold margin m_textCtrlPreview_Clang->SetMarginType (4, wxSTC_MARGIN_SYMBOL); m_textCtrlPreview_Clang->SetMarginMask (4, wxSTC_MASK_FOLDERS); m_textCtrlPreview_Clang->SetMarginSensitive(4, true); m_textCtrlPreview_Clang->SetMarginWidth (4, 0); // Configure the tracker margin m_textCtrlPreview_Clang->SetMarginWidth(1, 0); // Configure the symbol margin m_textCtrlPreview_Clang->SetMarginType (2, wxSTC_MARGIN_SYMBOL); m_textCtrlPreview_Clang->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS)); m_textCtrlPreview_Clang->SetMarginWidth(2, 0); m_textCtrlPreview_Clang->SetMarginSensitive(2, true); // Configure the line numbers margin m_textCtrlPreview_Clang->SetMarginType(0, wxSTC_MARGIN_NUMBER); m_textCtrlPreview_Clang->SetMarginWidth(0,0); // Configure the line symbol margin m_textCtrlPreview_Clang->SetMarginType(3, wxSTC_MARGIN_FORE); m_textCtrlPreview_Clang->SetMarginMask(3, 0); m_textCtrlPreview_Clang->SetMarginWidth(3,0); // Select the lexer m_textCtrlPreview_Clang->SetLexer(wxSTC_LEX_NULL); // Set default font / styles m_textCtrlPreview_Clang->StyleClearAll(); m_textCtrlPreview_Clang->SetWrapMode(0); m_textCtrlPreview_Clang->SetIndentationGuides(0); m_textCtrlPreview_Clang->SetKeyWords(0, wxT("")); m_textCtrlPreview_Clang->SetKeyWords(1, wxT("")); m_textCtrlPreview_Clang->SetKeyWords(2, wxT("")); m_textCtrlPreview_Clang->SetKeyWords(3, wxT("")); m_textCtrlPreview_Clang->SetKeyWords(4, wxT("")); boxSizer177->Add(m_textCtrlPreview_Clang, 1, wxALL|wxEXPAND, 2); m_panelPHP = new wxPanel(m_treebook, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); int m_panelPHPImgIndex; m_panelPHPImgIndex = m_treebook_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("php"))); m_treebook->AddPage(m_panelPHP, _("PHP"), false, m_panelPHPImgIndex); wxBoxSizer* boxSizer99 = new wxBoxSizer(wxVERTICAL); m_panelPHP->SetSizer(boxSizer99); m_splitter119 = new wxSplitterWindow(m_panelPHP, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE); m_splitter119->SetSashGravity(0.5); m_splitter119->SetMinimumPaneSize(10); boxSizer99->Add(m_splitter119, 1, wxEXPAND, 5); m_splitterPage123 = new wxPanel(m_splitter119, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); wxBoxSizer* boxSizer129 = new wxBoxSizer(wxVERTICAL); m_splitterPage123->SetSizer(boxSizer129); wxArrayString m_pgMgrPhpArr; wxUnusedVar(m_pgMgrPhpArr); wxArrayInt m_pgMgrPhpIntArr; wxUnusedVar(m_pgMgrPhpIntArr); m_pgMgrPhp = new wxPropertyGridManager(m_splitterPage123, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED); boxSizer129->Add(m_pgMgrPhp, 1, wxALL|wxEXPAND, 2); m_pgPropPhpFormatter = m_pgMgrPhp->Append( new wxPropertyCategory( _("PHP") ) ); m_pgPropPhpFormatter->SetHelpString(_("PHP related settings")); m_pgMgrPhpArr.Clear(); m_pgMgrPhpIntArr.Clear(); m_pgMgrPhpArr.Add(_("Break before class")); m_pgMgrPhpArr.Add(_("Break before function")); m_pgMgrPhpArr.Add(_("Break before 'while'")); m_pgMgrPhpArr.Add(_("Break before 'foreach'")); m_pgMgrPhpArr.Add(_("'else' doesn't break")); m_pgMgrPhpArr.Add(_("Break after 'heredoc' statement")); m_pgMgrPhpArr.Add(_("Break PHP Arrays vertically")); m_pgMgrPhpArr.Add(_("Break after string concatentation operator (\".\")")); m_pgMgrPhpIntArr.Add(kPFF_BreakBeforeClass); m_pgMgrPhpIntArr.Add(kPFF_BreakBeforeFunction); m_pgMgrPhpIntArr.Add(kPFF_BreakBeforeWhile); m_pgMgrPhpIntArr.Add(kPFF_BreakBeforeForeach); m_pgMgrPhpIntArr.Add(kPFF_ElseOnSameLineAsClosingCurlyBrace); m_pgMgrPhpIntArr.Add(kPFF_BreakAfterHeredoc); m_pgMgrPhpIntArr.Add(kPFF_VerticalArrays); m_pgMgrPhpIntArr.Add(kPFF_BreakAfterStringConcatentation); m_pgPropPhpFormatterOptions = m_pgMgrPhp->AppendIn( m_pgPropPhpFormatter, new wxFlagsProperty( _("PHPFormatter Options"), wxPG_LABEL, m_pgMgrPhpArr, m_pgMgrPhpIntArr, 0) ); m_pgPropPhpFormatterOptions->SetHelpString(wxT("")); m_splitterPage127 = new wxPanel(m_splitter119, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); m_splitter119->SplitVertically(m_splitterPage123, m_splitterPage127, 0); wxBoxSizer* boxSizer131 = new wxBoxSizer(wxVERTICAL); m_splitterPage127->SetSizer(boxSizer131); m_stcPhpPreview = new wxStyledTextCtrl(m_splitterPage127, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0); // Configure the fold margin m_stcPhpPreview->SetMarginType (4, wxSTC_MARGIN_SYMBOL); m_stcPhpPreview->SetMarginMask (4, wxSTC_MASK_FOLDERS); m_stcPhpPreview->SetMarginSensitive(4, true); m_stcPhpPreview->SetMarginWidth (4, 0); // Configure the tracker margin m_stcPhpPreview->SetMarginWidth(1, 0); // Configure the symbol margin m_stcPhpPreview->SetMarginType (2, wxSTC_MARGIN_SYMBOL); m_stcPhpPreview->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS)); m_stcPhpPreview->SetMarginWidth(2, 0); m_stcPhpPreview->SetMarginSensitive(2, true); // Configure the line numbers margin m_stcPhpPreview->SetMarginType(0, wxSTC_MARGIN_NUMBER); m_stcPhpPreview->SetMarginWidth(0,0); // Configure the line symbol margin m_stcPhpPreview->SetMarginType(3, wxSTC_MARGIN_FORE); m_stcPhpPreview->SetMarginMask(3, 0); m_stcPhpPreview->SetMarginWidth(3,0); // Select the lexer m_stcPhpPreview->SetLexer(wxSTC_LEX_HTML); // Set default font / styles m_stcPhpPreview->StyleClearAll(); m_stcPhpPreview->SetWrapMode(0); m_stcPhpPreview->SetIndentationGuides(0); m_stcPhpPreview->SetKeyWords(0, wxT("")); m_stcPhpPreview->SetKeyWords(1, wxT("")); m_stcPhpPreview->SetKeyWords(2, wxT("")); m_stcPhpPreview->SetKeyWords(3, wxT("")); m_stcPhpPreview->SetKeyWords(4, wxT("")); boxSizer131->Add(m_stcPhpPreview, 1, wxALL|wxEXPAND, 2); wxBoxSizer* bSizerButtons = new wxBoxSizer(wxHORIZONTAL); bSizerMain->Add(bSizerButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5); m_stdBtnSizer30 = new wxStdDialogButtonSizer(); bSizerButtons->Add(m_stdBtnSizer30, 0, wxALL, 5); m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_buttonOK->SetDefault(); m_stdBtnSizer30->AddButton(m_buttonOK); m_buttonApply = new wxButton(this, wxID_APPLY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer30->AddButton(m_buttonApply); m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer30->AddButton(m_buttonCancel); m_buttonHelp = new wxButton(this, wxID_HELP, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer30->AddButton(m_buttonHelp); m_stdBtnSizer30->Realize(); #if wxVERSION_NUMBER >= 2900 wxPersistenceManager::Get().RegisterAndRestore(m_treebook); #endif m_treebook->ExpandNode( 0, true ); m_treebook->ExpandNode( 1, true ); m_treebook->ExpandNode( 2, true ); m_treebook->ExpandNode( 3, true ); m_treebook->ExpandNode( 4, true ); SetName(wxT("CodeFormatterBaseDlg")); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } CentreOnParent(wxBOTH); #if wxVERSION_NUMBER >= 2900 wxPersistenceManager::Get().RegisterAndRestore(this); #endif // Connect events m_checkBoxFormatOnSave->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnFormatOnSave), NULL, this); m_choiceCxxEngine->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(CodeFormatterBaseDlg::OnChoicecxxengineChoiceSelected), NULL, this); m_pgMgrAstyle->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CodeFormatterBaseDlg::OnPgmgrastylePgChanged), NULL, this); m_textCtrlUserFlags->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(CodeFormatterBaseDlg::OnCustomAstyleFlags), NULL, this); m_pgMgrClang->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CodeFormatterBaseDlg::OnPgmgrclangPgChanged), NULL, this); m_pgMgrPhp->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(CodeFormatterBaseDlg::OnPgmgrphpPgChanged), NULL, this); m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnOK), NULL, this); m_buttonApply->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CodeFormatterBaseDlg::OnApplyUI), NULL, this); m_buttonApply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnApply), NULL, this); m_buttonHelp->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterBaseDlg::OnHelp), NULL, this); }
void BookmarkView::refreshLayout() { GetSizer()->Layout(); Update(); Refresh(); }
WorkspaceSettingsBase::WorkspaceSettingsBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC3C39InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(mainSizer); m_notebook1 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), 0); m_notebook1->SetName(wxT("m_notebook1")); mainSizer->Add(m_notebook1, 1, wxALL|wxEXPAND, 5); m_panelEnv = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); m_notebook1->AddPage(m_panelEnv, _("Environment"), false); wxBoxSizer* bSizer81 = new wxBoxSizer(wxVERTICAL); m_panelEnv->SetSizer(bSizer81); wxStaticBoxSizer* sbSizer3 = new wxStaticBoxSizer( new wxStaticBox(m_panelEnv, wxID_ANY, wxT("")), wxVERTICAL); bSizer81->Add(sbSizer3, 0, wxALL, 5); m_staticText3 = new wxStaticText(m_panelEnv, wxID_ANY, _("By default, CodeLite uses the current active environment variables set as defined in the Settings > Environment Variables dialog.\nHowever, you may choose a different set to become the active set when this workspace is loaded selecting it here."), wxDefaultPosition, wxSize(-1, -1), 0); sbSizer3->Add(m_staticText3, 0, wxALL, 5); m_staticText4 = new wxStaticText(m_panelEnv, wxID_ANY, _("Environment sets:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer81->Add(m_staticText4, 0, wxALL|wxEXPAND, 5); wxArrayString m_choiceEnvSetsArr; m_choiceEnvSetsArr.Add(wxT("Default")); m_choiceEnvSets = new wxChoice(m_panelEnv, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_choiceEnvSetsArr, 0); m_choiceEnvSets->SetSelection(0); bSizer81->Add(m_choiceEnvSets, 0, wxALL|wxEXPAND, 5); m_staticline2 = new wxStaticLine(m_panelEnv, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL); bSizer81->Add(m_staticline2, 0, wxALL|wxEXPAND, 5); m_staticText6 = new wxStaticText(m_panelEnv, wxID_ANY, _("Specify here an additional environment variables that will be shared with other people who are using this workspace:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer81->Add(m_staticText6, 0, wxALL|wxEXPAND, 5); m_textCtrlWspEnvVars = new wxTextCtrl(m_panelEnv, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_MULTILINE); #ifdef __WXMSW__ // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE wxFont m_textCtrlWspEnvVarsFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_textCtrlWspEnvVarsFont.SetFamily(wxFONTFAMILY_TELETYPE); #else wxFont m_textCtrlWspEnvVarsFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); m_textCtrlWspEnvVarsFont.SetFamily(wxFONTFAMILY_TELETYPE); #endif m_textCtrlWspEnvVars->SetFont(m_textCtrlWspEnvVarsFont); bSizer81->Add(m_textCtrlWspEnvVars, 1, wxALL|wxEXPAND, 5); m_staticline1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL); mainSizer->Add(m_staticline1, 0, wxALL|wxEXPAND, 5); wxBoxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL); mainSizer->Add(buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5); m_buttonOk = new wxButton(this, wxID_OK, _("&Ok"), wxDefaultPosition, wxSize(-1, -1), 0); m_buttonOk->SetDefault(); buttonSizer->Add(m_buttonOk, 0, wxALL, 5); m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); buttonSizer->Add(m_buttonCancel, 0, wxALL, 5); #if wxVERSION_NUMBER >= 2900 if(!wxPersistenceManager::Get().Find(m_notebook1)){ wxPersistenceManager::Get().RegisterAndRestore(m_notebook1); } else { wxPersistenceManager::Get().Restore(m_notebook1); } #endif SetName(wxT("WorkspaceSettingsBase")); SetSize(-1,-1); 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 m_choiceEnvSets->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(WorkspaceSettingsBase::OnEnvSelected), NULL, this); m_buttonOk->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WorkspaceSettingsBase::OnButtonOK), NULL, this); }
NewPHPClassBase::NewPHPClassBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC847AInitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL); this->SetSizer(boxSizer2); wxStaticBoxSizer* staticBoxSizer24 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("General:")), wxVERTICAL); boxSizer2->Add(staticBoxSizer24, 0, wxALL|wxEXPAND, 5); wxFlexGridSizer* flexGridSizer10 = new wxFlexGridSizer(0, 3, 0, 0); flexGridSizer10->SetFlexibleDirection( wxBOTH ); flexGridSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer10->AddGrowableCol(1); staticBoxSizer24->Add(flexGridSizer10, 1, wxALL|wxEXPAND, 5); m_staticText50 = new wxStaticText(this, wxID_ANY, _("Type:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer10->Add(m_staticText50, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_choiceTypeArr; m_choiceTypeArr.Add(wxT("class")); m_choiceTypeArr.Add(wxT("interface")); m_choiceTypeArr.Add(wxT("trait")); m_choiceType = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceTypeArr, 0); m_choiceType->SetToolTip(_("Choose the object type")); m_choiceType->SetSelection(0); flexGridSizer10->Add(m_choiceType, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); flexGridSizer10->Add(0, 0, 1, wxALL, 5); m_staticText12 = new wxStaticText(this, wxID_ANY, _("Name:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer10->Add(m_staticText12, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlClassName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); m_textCtrlClassName->SetToolTip(_("The name")); m_textCtrlClassName->SetFocus(); #if wxVERSION_NUMBER >= 3000 m_textCtrlClassName->SetHint(wxT("")); #endif flexGridSizer10->Add(m_textCtrlClassName, 0, wxALL|wxEXPAND, 5); flexGridSizer10->Add(0, 0, 1, wxALL, 5); m_staticText16 = new wxStaticText(this, wxID_ANY, _("Namespace:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer10->Add(m_staticText16, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlNamespace = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); m_textCtrlNamespace->SetToolTip(_("If set, the generated code will be placed inside this namespace")); #if wxVERSION_NUMBER >= 3000 m_textCtrlNamespace->SetHint(wxT("")); #endif flexGridSizer10->Add(m_textCtrlNamespace, 0, wxALL|wxEXPAND, 5); flexGridSizer10->Add(0, 0, 1, wxALL, 5); m_staticText74 = new wxStaticText(this, wxID_ANY, _("Extends:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer10->Add(m_staticText74, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlExtends = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); m_textCtrlExtends->SetToolTip(_("A comma separated list of parents for this class")); #if wxVERSION_NUMBER >= 3000 m_textCtrlExtends->SetHint(wxT("")); #endif flexGridSizer10->Add(m_textCtrlExtends, 0, wxALL|wxEXPAND, 5); m_button90 = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT); m_button90->SetToolTip(_("Edit in a small text editor...")); flexGridSizer10->Add(m_button90, 0, wxALL, 5); m_staticText78 = new wxStaticText(this, wxID_ANY, _("Implements:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer10->Add(m_staticText78, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlImplements = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); m_textCtrlImplements->SetToolTip(_("A comma separated list of interfaces for this class")); #if wxVERSION_NUMBER >= 3000 m_textCtrlImplements->SetHint(wxT("")); #endif flexGridSizer10->Add(m_textCtrlImplements, 0, wxALL|wxEXPAND|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_button92 = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT); m_button92->SetToolTip(_("Edit in a small text editor...")); flexGridSizer10->Add(m_button92, 0, wxALL, 5); wxStaticBoxSizer* staticBoxSizer40 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Options:")), wxVERTICAL); boxSizer2->Add(staticBoxSizer40, 0, wxALL|wxEXPAND, 5); wxFlexGridSizer* flexGridSizer46 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer46->SetFlexibleDirection( wxBOTH ); flexGridSizer46->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer46->AddGrowableCol(0); flexGridSizer46->AddGrowableCol(1); staticBoxSizer40->Add(flexGridSizer46, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_checkBoxCtor = new wxCheckBox(this, wxID_ANY, _("Generate consturctor"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxCtor->SetValue(true); flexGridSizer46->Add(m_checkBoxCtor, 0, wxALL|wxEXPAND, 5); m_checkBoxDtor = new wxCheckBox(this, wxID_ANY, _("Generate desctructor"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxDtor->SetValue(false); flexGridSizer46->Add(m_checkBoxDtor, 0, wxALL|wxEXPAND, 5); m_checkBoxFolderPerNamespace = new wxCheckBox(this, wxID_ANY, _("Create folder per namespace"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxFolderPerNamespace->SetValue(false); flexGridSizer46->Add(m_checkBoxFolderPerNamespace, 0, wxALL, 5); m_checkBoxSingleton = new wxCheckBox(this, wxID_ANY, _("Make singleton (available for classes only)"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxSingleton->SetValue(false); m_checkBoxSingleton->SetToolTip(_("The generated class will be generated as a singleton\nclass")); flexGridSizer46->Add(m_checkBoxSingleton, 0, wxALL, 5); boxSizer2->Add(0, 0, 1, wxALL, 5); wxBoxSizer* boxSizer4 = new wxBoxSizer(wxHORIZONTAL); boxSizer2->Add(boxSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); m_buttonOK = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0); m_buttonOK->SetDefault(); boxSizer4->Add(m_buttonOK, 0, wxALL, 5); m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0); boxSizer4->Add(m_buttonCancel, 0, wxALL, 5); SetName(wxT("NewPHPClassBase")); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } CentreOnParent(wxBOTH); #if wxVERSION_NUMBER >= 2900 if(!wxPersistenceManager::Get().Find(this)) { wxPersistenceManager::Get().RegisterAndRestore(this); } else { wxPersistenceManager::Get().Restore(this); } #endif // Connect events m_textCtrlClassName->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NewPHPClassBase::OnClassNameUpdate), NULL, this); m_textCtrlNamespace->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NewPHPClassBase::OnNamespaceTextUpdated), NULL, this); m_button90->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewPHPClassBase::OnEditExtends), NULL, this); m_button92->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewPHPClassBase::OnEditImplements), NULL, this); m_checkBoxCtor->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewPHPClassBase::OnMakeSingletonUI), NULL, this); m_checkBoxDtor->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewPHPClassBase::OnMakeSingletonUI), NULL, this); m_checkBoxFolderPerNamespace->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(NewPHPClassBase::OnFolderPerNamespace), NULL, this); m_checkBoxSingleton->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewPHPClassBase::OnMakeSingletonUI), NULL, this); m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewPHPClassBase::OnOKUI), NULL, this); }
SvnPreferencesDialogBase::SvnPreferencesDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC95F2InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer12 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer12); m_treebook1 = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT); wxImageList* m_treebook1_il = new wxImageList(16, 16); m_treebook1->AssignImageList(m_treebook1_il); bSizer12->Add(m_treebook1, 1, wxALL|wxEXPAND, 5); m_panel3 = new wxPanel(m_treebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); int m_panel3ImgIndex; m_panel3ImgIndex = m_treebook1_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("general"))); m_treebook1->AddPage(m_panel3, _("General"), true, m_panel3ImgIndex); wxBoxSizer* bSizer15 = new wxBoxSizer(wxVERTICAL); m_panel3->SetSizer(bSizer15); wxFlexGridSizer* fgSizer3 = new wxFlexGridSizer(2, 3, 0, 0); fgSizer3->SetFlexibleDirection( wxBOTH ); fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer3->AddGrowableCol(1); bSizer15->Add(fgSizer3, 0, wxALL|wxEXPAND, 5); m_staticTextExe = new wxStaticText(m_panel3, wxID_ANY, _("Executable:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer3->Add(m_staticTextExe, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlSvnExecutable = new wxTextCtrl(m_panel3, wxID_ANY, wxT("svn"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer3->Add(m_textCtrlSvnExecutable, 1, wxALL|wxEXPAND, 5); m_buttonBrowse = new wxButton(m_panel3, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer3->Add(m_buttonBrowse, 0, wxRIGHT|wxTOP|wxBOTTOM, 5); m_staticText9 = new wxStaticText(m_panel3, wxID_ANY, _("Ignore the following file patterns:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer15->Add(m_staticText9, 0, wxALL, 5); m_textCtrlIgnorePattern = new wxTextCtrl(m_panel3, wxID_ANY, wxT("*.o *.obj *.exe *.lib *.so *.dll *.a *.dynlib *.exp *.ilk *.pdb *.d *.tags *.suo *.ncb *.bak *.orig *.dll *.mine *.o.d *.session Debug Release DebugUnicode ReleaseUnicode"), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_MULTILINE); bSizer15->Add(m_textCtrlIgnorePattern, 1, wxALL|wxEXPAND, 5); wxStaticBoxSizer* sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(m_panel3, wxID_ANY, wxT("")), wxVERTICAL); bSizer15->Add(sbSizer1, 0, wxALL|wxEXPAND, 5); m_checkBoxAddToSvn = new wxCheckBox(m_panel3, wxID_ANY, _("When adding file(s) to project, add it to svn as well"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxAddToSvn->SetValue(false); sbSizer1->Add(m_checkBoxAddToSvn, 0, wxALL|wxEXPAND, 5); m_checkBoxRetag = new wxCheckBox(m_panel3, wxID_ANY, _("Retag workspace after svn update, revert or applying patch"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxRetag->SetValue(false); sbSizer1->Add(m_checkBoxRetag, 0, wxALL|wxEXPAND, 5); m_checkBoxRenameFile = new wxCheckBox(m_panel3, wxID_ANY, _("When renaming a file in the project, rename it in the repository as well"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxRenameFile->SetValue(false); sbSizer1->Add(m_checkBoxRenameFile, 0, wxALL|wxEXPAND, 5); m_checkBoxUsePosixLocale = new wxCheckBox(m_panel3, wxID_ANY, _("Use POSIX Locale"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxUsePosixLocale->SetValue(true); m_checkBoxUsePosixLocale->SetToolTip(_("When checked, CodeLite will use the default \"C\" locale instead of the current locale. This will ensure that svn command line output is parsed properly.")); sbSizer1->Add(m_checkBoxUsePosixLocale, 0, wxALL|wxEXPAND, 5); m_panel4 = new wxPanel(m_treebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); int m_panel4ImgIndex; m_panel4ImgIndex = m_treebook1_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("diff"))); m_treebook1->AddPage(m_panel4, _("External Diff"), false, m_panel4ImgIndex); wxBoxSizer* bSizer16 = new wxBoxSizer(wxVERTICAL); m_panel4->SetSizer(bSizer16); m_checkBoxUseExternalDiff = new wxCheckBox(m_panel4, wxID_ANY, _("Use external diff tool"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxUseExternalDiff->SetValue(false); bSizer16->Add(m_checkBoxUseExternalDiff, 0, wxALL, 5); wxFlexGridSizer* fgSizer5 = new wxFlexGridSizer(1, 3, 0, 0); fgSizer5->SetFlexibleDirection( wxBOTH ); fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer5->AddGrowableCol(1); bSizer16->Add(fgSizer5, 0, wxALL|wxEXPAND, 5); m_staticText10 = new wxStaticText(m_panel4, wxID_ANY, _("External Diff Viewer:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer5->Add(m_staticText10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlDiffViewer = new wxTextCtrl(m_panel4, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer5->Add(m_textCtrlDiffViewer, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5); m_buttonBrowseExtDiff = new wxButton(m_panel4, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer5->Add(m_buttonBrowseExtDiff, 0, wxALL, 5); m_panel5 = new wxPanel(m_treebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); int m_panel5ImgIndex; m_panel5ImgIndex = m_treebook1_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("secure"))); m_treebook1->AddPage(m_panel5, _("SSH Client"), false, m_panel5ImgIndex); wxBoxSizer* bSizer161 = new wxBoxSizer(wxVERTICAL); m_panel5->SetSizer(bSizer161); wxFlexGridSizer* fgSizer6 = new wxFlexGridSizer(2, 3, 0, 0); fgSizer6->SetFlexibleDirection( wxBOTH ); fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer6->AddGrowableCol(1); bSizer161->Add(fgSizer6, 0, wxALL|wxEXPAND, 5); m_staticText20 = new wxStaticText(m_panel5, wxID_ANY, _("SSH Client:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer6->Add(m_staticText20, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlSSHClient = new wxTextCtrl(m_panel5, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer6->Add(m_textCtrlSSHClient, 0, wxALL|wxEXPAND, 5); m_button12 = new wxButton(m_panel5, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer6->Add(m_button12, 0, wxALL, 5); m_staticText21 = new wxStaticText(m_panel5, wxID_ANY, _("SSH Client arguments:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer6->Add(m_staticText21, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlSshClientArgs = new wxTextCtrl(m_panel5, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer6->Add(m_textCtrlSshClientArgs, 0, wxALL|wxEXPAND, 5); wxStaticBoxSizer* sbSizer2 = new wxStaticBoxSizer( new wxStaticBox(m_panel5, wxID_ANY, wxT("")), wxVERTICAL); bSizer161->Add(sbSizer2, 1, wxALL|wxEXPAND, 5); m_staticText22 = new wxStaticText(m_panel5, wxID_ANY, _("The SSH client field should contain the command to be\nused by the SVN command line client for establishing a secured channel. \n\nFor example, on Windows it should contain something like:\n/path/to/plink.exe -l <user name> -pw <svn password>\n\nIf you dont need SSH channel, leave this field empty"), wxDefaultPosition, wxSize(-1, -1), 0); sbSizer2->Add(m_staticText22, 0, wxALL|wxEXPAND, 5); m_panel6 = new wxPanel(m_treebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL); int m_panel6ImgIndex; m_panel6ImgIndex = m_treebook1_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("integration"))); m_treebook1->AddPage(m_panel6, _("Integration"), false, m_panel6ImgIndex); wxBoxSizer* bSizer23 = new wxBoxSizer(wxVERTICAL); m_panel6->SetSizer(bSizer23); wxStaticBoxSizer* sbSizer5 = new wxStaticBoxSizer( new wxStaticBox(m_panel6, wxID_ANY, _("Auto Revision:")), wxVERTICAL); bSizer23->Add(sbSizer5, 0, wxALL|wxEXPAND, 5); m_checkBoxExposeRevisionMacro = new wxCheckBox(m_panel6, wxID_ANY, _("Add revision number as preprocessor definition in the compilation line"), wxDefaultPosition, wxSize(-1, -1), 0); m_checkBoxExposeRevisionMacro->SetValue(false); sbSizer5->Add(m_checkBoxExposeRevisionMacro, 0, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer24 = new wxBoxSizer(wxHORIZONTAL); sbSizer5->Add(bSizer24, 0, wxALL|wxEXPAND, 5); m_staticText29 = new wxStaticText(m_panel6, wxID_ANY, _("Preprocessor name:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer24->Add(m_staticText29, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlMacroName = new wxTextCtrl(m_panel6, wxID_ANY, wxT("SVN_REVISION"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer24->Add(m_textCtrlMacroName, 1, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer13 = new wxBoxSizer(wxHORIZONTAL); bSizer12->Add(bSizer13, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_button8 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); m_button8->SetDefault(); bSizer13->Add(m_button8, 0, wxALL, 5); m_button9 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer13->Add(m_button9, 0, wxALL, 5); m_treebook1->ExpandNode( 0, true ); m_treebook1->ExpandNode( 1, true ); m_treebook1->ExpandNode( 2, true ); m_treebook1->ExpandNode( 3, true ); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); // Connect events m_buttonBrowse->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnPreferencesDialogBase::OnBrowseSvnExe), NULL, this); m_staticText10->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnUseExternalDiffUI), NULL, this); m_textCtrlDiffViewer->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnUseExternalDiffUI), NULL, this); m_buttonBrowseExtDiff->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnPreferencesDialogBase::OnBrowseDiffViewer), NULL, this); m_buttonBrowseExtDiff->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnUseExternalDiffUI), NULL, this); m_button12->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnPreferencesDialogBase::OnBrowseSSHClient), NULL, this); m_staticText29->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnAddRevisionMacroUI), NULL, this); m_textCtrlMacroName->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnAddRevisionMacroUI), NULL, this); m_button8->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnPreferencesDialogBase::OnButtonOK), NULL, this); }
void LocSelDlg::InitValues() { TraceOp.trc( "app", TRCLEVEL_INFO, __LINE__, 9999, "InitValues %s", wLoc.getid( m_Props ) ); // Init General if( wLoc.getimage( m_Props ) != NULL && StrOp.len(wLoc.getimage(m_Props)) > 0 ) { bool isSupported = true; wxBitmapType bmptype = wxBITMAP_TYPE_XPM; if( StrOp.endsWithi( wLoc.getimage( m_Props ), ".gif" ) ) bmptype = wxBITMAP_TYPE_GIF; else if( StrOp.endsWithi( wLoc.getimage( m_Props ), ".png" ) ) bmptype = wxBITMAP_TYPE_PNG; else { TraceOp.trc( "locseldlg", TRCLEVEL_WARNING, __LINE__, 9999, "unsupported image format %s", wLoc.getimage( m_Props ) ); isSupported = false; } const char* imagepath = wGui.getimagepath(wxGetApp().getIni()); const char* imagename = FileOp.ripPath( wLoc.getimage( m_Props ) ); static char pixpath[256]; StrOp.fmtb( pixpath, "%s%c%s", imagepath, SystemOp.getFileSeparator(), imagename ); if( isSupported && imagename != NULL && StrOp.len(imagename) > 0 && FileOp.exist(pixpath)) { TraceOp.trc( "locseldlg", TRCLEVEL_INFO, __LINE__, 9999, "picture [%s]", pixpath ); wxImage img(wxString(pixpath,wxConvUTF8), bmptype); if( img.IsOk() && img.GetHeight() > MAXHEIGHT ) { int h = img.GetHeight(); int w = img.GetWidth(); float scale = (float)h / (float)MAXHEIGHT; float width = (float)w / scale; wxBitmap bmp(img.Scale((int)width, MAXHEIGHT, wxIMAGE_QUALITY_HIGH)); m_LocImageIndex->SetBitmapLabel( bmp ); } else if(img.IsOk()) { m_LocImageIndex->SetBitmapLabel( wxBitmap(img) ); } } else { if( wGui.isgrayicons(wxGetApp().getIni()) ) m_LocImageIndex->SetBitmapLabel( *_img_noimg ); else m_LocImageIndex->SetBitmapLabel( wxBitmap(nopict_xpm) ); if( isSupported && StrOp.len(imagename) > 0 ) { TraceOp.trc( "locdlg", TRCLEVEL_INFO, __LINE__, 9999, "picture [%s] not found; request it from server.", pixpath ); // request the image from server: iONode node = NodeOp.inst( wDataReq.name(), NULL, ELEMENT_NODE ); wDataReq.setid( node, wLoc.getid(m_Props) ); wDataReq.setcmd( node, wDataReq.get ); wDataReq.settype( node, wDataReq.image ); wDataReq.setfilename( node, imagename ); wxGetApp().sendToRocrail( node ); } } m_LocImageIndex->SetToolTip(wxString(wLoc.getdesc( m_Props ),wxConvUTF8)); //m_LocImage->SetBitmapLabel( wxBitmap(wxString(wLoc.getimage( m_Props ),wxConvUTF8), bmptype) ); //m_LocImageIndex->SetBitmapLabel( wxBitmap(wxString(wLoc.getimage( m_Props ),wxConvUTF8), bmptype) ); } else { if( wGui.isgrayicons(wxGetApp().getIni()) ) m_LocImageIndex->SetBitmapLabel( *_img_noimg ); else m_LocImageIndex->SetBitmapLabel( wxBitmap(nopict_xpm) ); //m_LocImageIndex->SetBitmapLabel( wxBitmap(nopict_xpm) ); } m_LocImageIndex->Refresh(); GetSizer()->Fit(this); GetSizer()->Layout(); }
SvnInfoDialogBase::SvnInfoDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC95F2InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer17 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer17); wxStaticBoxSizer* sbSizer3 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL); bSizer17->Add(sbSizer3, 0, wxALL|wxEXPAND, 5); wxFlexGridSizer* fgSizer7 = new wxFlexGridSizer(5, 2, 0, 0); fgSizer7->SetFlexibleDirection( wxBOTH ); fgSizer7->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer7->AddGrowableCol(1); sbSizer3->Add(fgSizer7, 1, wxALL|wxEXPAND, 5); m_staticText19 = new wxStaticText(this, wxID_ANY, _("Root URL:"), wxDefaultPosition, wxSize(-1, -1), 0); wxFont m_staticText19Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText19Font.SetWeight(wxFONTWEIGHT_BOLD); m_staticText19->SetFont(m_staticText19Font); fgSizer7->Add(m_staticText19, 0, wxALL|wxALIGN_RIGHT, 5); m_textCtrlRootURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(500,-1), wxTE_READONLY); fgSizer7->Add(m_textCtrlRootURL, 0, wxALL|wxEXPAND, 5); m_staticText21 = new wxStaticText(this, wxID_ANY, _("URL:"), wxDefaultPosition, wxSize(-1, -1), 0); wxFont m_staticText21Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText21Font.SetWeight(wxFONTWEIGHT_BOLD); m_staticText21->SetFont(m_staticText21Font); fgSizer7->Add(m_staticText21, 0, wxALL|wxALIGN_RIGHT, 5); m_textCtrlURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_READONLY); fgSizer7->Add(m_textCtrlURL, 0, wxALL|wxEXPAND, 5); m_staticText23 = new wxStaticText(this, wxID_ANY, _("Revision:"), wxDefaultPosition, wxSize(-1, -1), 0); wxFont m_staticText23Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText23Font.SetWeight(wxFONTWEIGHT_BOLD); m_staticText23->SetFont(m_staticText23Font); fgSizer7->Add(m_staticText23, 0, wxALL|wxALIGN_RIGHT, 5); m_textCtrlRevision = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_READONLY); fgSizer7->Add(m_textCtrlRevision, 0, wxALL|wxEXPAND, 5); m_staticText25 = new wxStaticText(this, wxID_ANY, _("Author:"), wxDefaultPosition, wxSize(-1, -1), 0); wxFont m_staticText25Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText25Font.SetWeight(wxFONTWEIGHT_BOLD); m_staticText25->SetFont(m_staticText25Font); fgSizer7->Add(m_staticText25, 0, wxALL|wxALIGN_RIGHT, 5); m_textCtrlAuthor = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_READONLY); fgSizer7->Add(m_textCtrlAuthor, 0, wxALL|wxEXPAND, 5); m_staticText27 = new wxStaticText(this, wxID_ANY, _("Date:"), wxDefaultPosition, wxSize(-1, -1), 0); wxFont m_staticText27Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticText27Font.SetWeight(wxFONTWEIGHT_BOLD); m_staticText27->SetFont(m_staticText27Font); fgSizer7->Add(m_staticText27, 0, wxALL|wxALIGN_RIGHT, 5); m_textCtrlDate = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_READONLY); fgSizer7->Add(m_textCtrlDate, 0, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer18 = new wxBoxSizer(wxHORIZONTAL); bSizer17->Add(bSizer18, 0, wxALIGN_CENTER_HORIZONTAL, 5); m_button13 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); m_button13->SetDefault(); bSizer18->Add(m_button13, 0, wxALL, 5); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); }
void TabBook::setTabBarHeight(const int height) { GetSizer()->SetItemMinSize(m_tabBar, wxDefaultCoord, height); Layout(); }
SvnCheckoutDialogBase::SvnCheckoutDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC95F2InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer19 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer19); wxStaticBoxSizer* sbSizer4 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL); bSizer19->Add(sbSizer4, 0, wxALL|wxEXPAND, 5); wxFlexGridSizer* fgSizer8 = new wxFlexGridSizer(2, 3, 0, 0); fgSizer8->SetFlexibleDirection( wxBOTH ); fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer8->AddGrowableCol(1); sbSizer4->Add(fgSizer8, 1, wxALL|wxEXPAND, 5); m_staticText24 = new wxStaticText(this, wxID_ANY, _("URL of repository:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer8->Add(m_staticText24, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); wxArrayString m_comboBoxRepoURLArr; m_comboBoxRepoURL = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), m_comboBoxRepoURLArr, 0); fgSizer8->Add(m_comboBoxRepoURL, 0, wxALL|wxEXPAND, 5); fgSizer8->Add(0, 0, 1, wxEXPAND, 5); m_staticText25 = new wxStaticText(this, wxID_ANY, _("Checkout directory:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer8->Add(m_staticText25, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_textCtrl20 = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2); fgSizer8->Add(m_textCtrl20, 0, wxALL|wxEXPAND, 5); m_buttonBrowseDir = new wxButton(this, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer8->Add(m_buttonBrowseDir, 0, wxALL, 5); bSizer19->Add(0, 0, 1, wxBOTTOM|wxEXPAND, 5); wxBoxSizer* bSizer20 = new wxBoxSizer(wxHORIZONTAL); bSizer19->Add(bSizer20, 0, wxALIGN_CENTER_HORIZONTAL, 5); m_button14 = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(-1, -1), 0); m_button14->SetDefault(); bSizer20->Add(m_button14, 0, wxALL, 5); m_button15 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer20->Add(m_button15, 0, wxALL, 5); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); // Connect events m_comboBoxRepoURL->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(SvnCheckoutDialogBase::OnCheckoutDirectoryText), NULL, this); m_buttonBrowseDir->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnCheckoutDialogBase::OnBrowseDirectory), NULL, this); m_button14->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnCheckoutDialogBase::OnOK), NULL, this); m_button14->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnCheckoutDialogBase::OnOkUI), NULL, this); }
AndroidExportDialogBase::AndroidExportDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxCCA21InitBitmapResources(); bBitmapLoaded = true; } wxFlexGridSizer* flexGridSizer53 = new wxFlexGridSizer(0, 1, 0, 0); flexGridSizer53->SetFlexibleDirection( wxBOTH ); flexGridSizer53->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer53->AddGrowableCol(0); flexGridSizer53->AddGrowableRow(5); this->SetSizer(flexGridSizer53); m_staticText55 = new wxStaticText(this, wxID_ANY, _("Exports the game to a native Android application. This will produce source files ready to be compiled for Android using the Android SDK and NDK."), wxDefaultPosition, wxSize(-1,-1), 0); m_staticText55->Wrap(500); flexGridSizer53->Add(m_staticText55, 0, wxALL, 5); wxStaticBoxSizer* staticBoxSizer83 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Note")), wxVERTICAL); flexGridSizer53->Add(staticBoxSizer83, 1, wxALL|wxEXPAND, 5); m_staticText85 = new wxStaticText(this, wxID_ANY, _("This exporter is experimental and requires you to use advanced tools to compile the game for Android. Read this article for more information:"), wxDefaultPosition, wxSize(-1,-1), 0); m_staticText85->Wrap(450); staticBoxSizer83->Add(m_staticText85, 0, wxALL, 5); m_hyperLink57 = new wxHyperlinkCtrl(this, wxID_ANY, _("How to compile your game exported files"), wxT(""), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink57->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink57->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink57->SetVisitedColour(wxColour(wxT("#FF0000"))); staticBoxSizer83->Add(m_hyperLink57, 0, wxALL, 5); m_staticLine59 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLI_HORIZONTAL); flexGridSizer53->Add(m_staticLine59, 0, wxALL|wxEXPAND, 5); m_staticText61 = new wxStaticText(this, wxID_ANY, _("Export folder:"), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer53->Add(m_staticText61, 0, wxALL, 5); wxFlexGridSizer* flexGridSizer63 = new wxFlexGridSizer(1, 2, 0, 0); flexGridSizer63->SetFlexibleDirection( wxBOTH ); flexGridSizer63->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer63->AddGrowableCol(0); flexGridSizer63->AddGrowableRow(0); flexGridSizer53->Add(flexGridSizer63, 1, wxALL|wxEXPAND, 0); m_exportFolderTextCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); #if wxVERSION_NUMBER >= 3000 m_exportFolderTextCtrl->SetHint(wxT("")); #endif m_exportFolderTextCtrl->AutoCompleteDirectories(); flexGridSizer63->Add(m_exportFolderTextCtrl, 0, wxALL|wxEXPAND, 5); m_browserButton = new wxButton(this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxSize(-1,-1), 0); flexGridSizer63->Add(m_browserButton, 0, wxALL, 5); wxFlexGridSizer* flexGridSizer79 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer79->SetFlexibleDirection( wxBOTH ); flexGridSizer79->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer53->Add(flexGridSizer79, 1, wxALL|wxEXPAND, 5); m_stdBtnSizer71 = new wxStdDialogButtonSizer(); flexGridSizer53->Add(m_stdBtnSizer71, 0, wxALL|wxEXPAND, 5); m_okButton = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_okButton->SetDefault(); m_stdBtnSizer71->AddButton(m_okButton); m_cancelButton = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_stdBtnSizer71->AddButton(m_cancelButton); m_stdBtnSizer71->Realize(); SetName(wxT("AndroidExportDialogBase")); SetMinClientSize(wxSize(300,250)); SetSize(-1,-1); 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 m_hyperLink57->Connect(wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler(AndroidExportDialogBase::OnHelpButtonClicked), NULL, this); m_browserButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AndroidExportDialogBase::OnBrowseButtonClicked), NULL, this); }
SvnLogDialogBase::SvnLogDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC95F2InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer21 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer21); wxFlexGridSizer* fgSizer9 = new wxFlexGridSizer(2, 2, 0, 0); fgSizer9->SetFlexibleDirection( wxBOTH ); fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer9->AddGrowableCol(1); bSizer21->Add(fgSizer9, 0, wxALL|wxEXPAND, 5); m_staticText28 = new wxStaticText(this, wxID_ANY, _("From revision:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer9->Add(m_staticText28, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_from = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(200,-1), 0); fgSizer9->Add(m_from, 0, wxALL|wxEXPAND, 5); m_staticText29 = new wxStaticText(this, wxID_ANY, _("To revision:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer9->Add(m_staticText29, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_to = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer9->Add(m_to, 0, wxALL|wxEXPAND, 5); m_compact = new wxCheckBox(this, wxID_ANY, _("Create compact log"), wxDefaultPosition, wxSize(-1, -1), 0); m_compact->SetValue(false); bSizer21->Add(m_compact, 0, wxALL|wxEXPAND, 5); m_staticline5 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL); bSizer21->Add(m_staticline5, 0, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer22 = new wxBoxSizer(wxHORIZONTAL); bSizer21->Add(bSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5); m_button17 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); m_button17->SetDefault(); bSizer22->Add(m_button17, 0, wxALL, 5); m_button18 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer22->Add(m_button18, 0, wxALL, 5); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); }
void MainFrame::OnTreeSelectionChanged(wxTreeEvent &event) { auto treeItemId = event.GetItem(); auto rootId = dirTree->GetRootItem(); auto currentFileEntry = dynamic_cast<EntryItemData *>(dirTree->GetItemData(treeItemId))->Get(); auto gridPanel = dynamic_cast<wxScrolledWindow *>(splitter->GetWindow2()); if (loadThread) { loadThread->Delete(nullptr, wxTHREAD_WAIT_BLOCK); loadThread = nullptr; } gridPanel->Show(false); auto grid = gridPanel->GetSizer(); grid->Clear(true); std::vector<Entry *> loadEntries; imgButtons.clear(); for (int i = 0; i < currentFileEntry->Count(); ++i) { Entry *childEntry = (*currentFileEntry)[i]; if (childEntry->IsDirectory()) continue; auto ext = childEntry->Name().AfterLast('.').Lower(); if (ext != "jpg" && ext != "jpeg" && ext != "png" && ext != "gif") continue; loadEntries.push_back(childEntry); } for (auto entry : loadEntries) { auto button = new wxButton(gridPanel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); imgButtons.push_back(button); button->Bind(wxEVT_BUTTON, &MainFrame::OnImageButtonClick, this); button->SetClientObject(new EntryItemData(entry)); button->SetMinSize({250, 250}); auto staticText = new wxStaticText(gridPanel, wxID_ANY, entry->Name()); staticText->SetMaxSize({250, 50}); auto btnSizer = new wxBoxSizer(wxVERTICAL); btnSizer->Add(button, 0, wxEXPAND); btnSizer->Add(staticText); grid->Add(btnSizer, 0, wxALL | wxEXPAND, 5); } GetStatusBar()->SetStatusText(wxString::Format("Loading Thumbnail %i of %i", 1, (int)loadEntries.size())); grid->FitInside(gridPanel); gridPanel->Show(true); gridPanel->Scroll(0, 0); gridPanel->Refresh(); gridPanel->Update(); loadThread = new ThumbnailLoadThread(this, loadEntries, currentEntry); loadThread->Run(); threadId = loadThread->GetId(); }
SvnCopyDialogBase::SvnCopyDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC95F2InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer7 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer7); wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(2, 2, 0, 0); fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer1->AddGrowableCol(1); bSizer7->Add(fgSizer1, 0, wxEXPAND, 5); m_staticText3 = new wxStaticText(this, wxID_ANY, _("Source URL:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer1->Add(m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlSourceURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer1->Add(m_textCtrlSourceURL, 1, wxALL|wxEXPAND, 5); m_staticText4 = new wxStaticText(this, wxID_ANY, _("Target URL:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer1->Add(m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlTargetURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer1->Add(m_textCtrlTargetURL, 1, wxALL|wxEXPAND, 5); m_staticText5 = new wxStaticText(this, wxID_ANY, _("Comment:"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer7->Add(m_staticText5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_textCtrlComment = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER|wxTE_MULTILINE); #ifdef __WXMSW__ // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE wxFont m_textCtrlCommentFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_textCtrlCommentFont.SetFamily(wxFONTFAMILY_TELETYPE); #else wxFont m_textCtrlCommentFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); m_textCtrlCommentFont.SetFamily(wxFONTFAMILY_TELETYPE); #endif m_textCtrlComment->SetFont(m_textCtrlCommentFont); bSizer7->Add(m_textCtrlComment, 1, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer8 = new wxBoxSizer(wxHORIZONTAL); bSizer7->Add(bSizer8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_button4 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); m_button4->SetDefault(); bSizer8->Add(m_button4, 0, wxALL, 5); m_button5 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer8->Add(m_button5, 0, wxALL, 5); SetSizeHints(575,315); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); }
BaseStartHerePage::BaseStartHerePage(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxPanel(parent, id, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxCraftergfm8VaInitBitmapResources(); bBitmapLoaded = true; } wxFlexGridSizer* flexGridSizer3 = new wxFlexGridSizer(0, 1, 0, 0); flexGridSizer3->SetFlexibleDirection( wxBOTH ); flexGridSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer3->AddGrowableCol(0); flexGridSizer3->AddGrowableRow(1); this->SetSizer(flexGridSizer3); wxFlexGridSizer* logoSizer = new wxFlexGridSizer(0, 1, 0, 0); logoSizer->SetFlexibleDirection( wxBOTH ); logoSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); logoSizer->AddGrowableCol(0); flexGridSizer3->Add(logoSizer, 1, wxALL|wxEXPAND, 5); logoBmp = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(-1,-1), 0 ); logoSizer->Add(logoBmp, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_HORIZONTAL, 15); m_staticText9 = new wxStaticText(this, wxID_ANY, _("The open source, codingless game creator"), wxDefaultPosition, wxSize(-1,-1), 0); m_staticText9->SetForegroundColour(wxColour(wxT("rgb(160,160,160)"))); logoSizer->Add(m_staticText9, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 7); wxFlexGridSizer* centerSizer = new wxFlexGridSizer(0, 2, 0, 0); centerSizer->SetFlexibleDirection( wxBOTH ); centerSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer3->Add(centerSizer, 1, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); wxFlexGridSizer* gettingstartedSizer = new wxFlexGridSizer(0, 1, 0, 0); gettingstartedSizer->SetFlexibleDirection( wxBOTH ); gettingstartedSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); centerSizer->Add(gettingstartedSizer, 1, wxALL|wxEXPAND, 10); wxFlexGridSizer* flexGridSizer82 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer82->SetFlexibleDirection( wxBOTH ); flexGridSizer82->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gettingstartedSizer->Add(flexGridSizer82, 0, wxALL, 0); gettingStartedBmp = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(-1,-1), 0 ); flexGridSizer82->Add(gettingStartedBmp, 0, wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5); gettingStartedTxt = new wxStaticText(this, wxID_ANY, _("Getting started"), wxDefaultPosition, wxSize(-1,-1), 0); gettingStartedTxt->SetForegroundColour(wxColour(wxT("rgb(120,120,120)"))); flexGridSizer82->Add(gettingStartedTxt, 0, wxALL, 3); wxFlexGridSizer* flexGridSizer21 = new wxFlexGridSizer(0, 1, 0, 0); flexGridSizer21->SetFlexibleDirection( wxBOTH ); flexGridSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gettingstartedSizer->Add(flexGridSizer21, 1, wxALL|wxEXPAND, 5); m_hyperLink17 = new wxHyperlinkCtrl(this, wxID_ANY, _("Start a platformer game in 5 minutes"), wxT("https://www.youtube.com/watch?v=5jdOR-NAiSA"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink17->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink17->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink17->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer21->Add(m_hyperLink17, 0, wxALL, 3); m_hyperLink231 = new wxHyperlinkCtrl(this, wxID_ANY, _("Step-by-step Beginner Tutorial"), wxT("http://wiki.compilgames.net/doku.php/en/game_develop/tutorials/beginnertutorial2"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink231->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink231->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink231->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer21->Add(m_hyperLink231, 0, wxALL, 3); m_hyperLink23 = new wxHyperlinkCtrl(this, wxID_ANY, _("More videos and tutorials on the wiki"), wxT("http://wiki.compilgames.net/doku.php/en/game_develop/tutorials"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink23->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink23->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink23->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer21->Add(m_hyperLink23, 0, wxALL, 3); wxFlexGridSizer* latestProjectsSizer = new wxFlexGridSizer(0, 1, 0, 0); latestProjectsSizer->SetFlexibleDirection( wxBOTH ); latestProjectsSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); centerSizer->Add(latestProjectsSizer, 1, wxALL|wxEXPAND, 10); wxFlexGridSizer* flexGridSizer85 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer85->SetFlexibleDirection( wxBOTH ); flexGridSizer85->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); latestProjectsSizer->Add(flexGridSizer85, 0, wxALL, 0); latestProjectsBmp = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(-1,-1), 0 ); flexGridSizer85->Add(latestProjectsBmp, 0, wxRIGHT|wxBOTTOM, 5); latestProjectsTxt = new wxStaticText(this, wxID_ANY, _("Latest projects"), wxDefaultPosition, wxSize(-1,-1), 0); latestProjectsTxt->SetForegroundColour(wxColour(wxT("rgb(120,120,120)"))); flexGridSizer85->Add(latestProjectsTxt, 0, wxALL, 3); wxFlexGridSizer* flexGridSizer21410 = new wxFlexGridSizer(0, 1, 0, 0); flexGridSizer21410->SetFlexibleDirection( wxBOTH ); flexGridSizer21410->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); latestProjectsSizer->Add(flexGridSizer21410, 1, wxALL|wxEXPAND, 5); lastProject1Bt = new wxHyperlinkCtrl(this, wxID_ANY, _("-"), wxT(""), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); lastProject1Bt->SetNormalColour(wxColour(wxT("#0000FF"))); lastProject1Bt->SetHoverColour(wxColour(wxT("#0000FF"))); lastProject1Bt->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer21410->Add(lastProject1Bt, 0, wxALL, 3); lastProject2Bt = new wxHyperlinkCtrl(this, wxID_ANY, _("-"), wxT(""), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); lastProject2Bt->SetNormalColour(wxColour(wxT("#0000FF"))); lastProject2Bt->SetHoverColour(wxColour(wxT("#0000FF"))); lastProject2Bt->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer21410->Add(lastProject2Bt, 0, wxALL, 3); lastProject3Bt = new wxHyperlinkCtrl(this, wxID_ANY, _("-"), wxT(""), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); lastProject3Bt->SetNormalColour(wxColour(wxT("#0000FF"))); lastProject3Bt->SetHoverColour(wxColour(wxT("#0000FF"))); lastProject3Bt->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer21410->Add(lastProject3Bt, 0, wxALL, 3); wxFlexGridSizer* communitySizer = new wxFlexGridSizer(0, 1, 0, 0); communitySizer->SetFlexibleDirection( wxBOTH ); communitySizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); centerSizer->Add(communitySizer, 1, wxALL|wxEXPAND, 10); wxFlexGridSizer* flexGridSizer91 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer91->SetFlexibleDirection( wxBOTH ); flexGridSizer91->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); communitySizer->Add(flexGridSizer91, 0, wxALL, 0); communityBmp = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(-1,-1), 0 ); flexGridSizer91->Add(communityBmp, 0, wxRIGHT|wxBOTTOM, 5); communityTxt = new wxStaticText(this, wxID_ANY, _("Community"), wxDefaultPosition, wxSize(-1,-1), 0); communityTxt->SetForegroundColour(wxColour(wxT("rgb(120,120,120)"))); flexGridSizer91->Add(communityTxt, 0, wxALL, 3); wxFlexGridSizer* flexGridSizer214 = new wxFlexGridSizer(0, 1, 0, 0); flexGridSizer214->SetFlexibleDirection( wxBOTH ); flexGridSizer214->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); communitySizer->Add(flexGridSizer214, 1, wxALL|wxEXPAND, 5); m_hyperLink175 = new wxHyperlinkCtrl(this, wxID_ANY, _("Go on GDevelop community forums"), wxT("http://forum.compilgames.net/viewforum.php?f=17"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink175->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink175->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink175->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer214->Add(m_hyperLink175, 0, wxALL, 3); m_hyperLink2316 = new wxHyperlinkCtrl(this, wxID_ANY, _("Facebook page"), wxT("https://www.facebook.com/GameDevelop"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink2316->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink2316->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink2316->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer214->Add(m_hyperLink2316, 0, wxALL, 3); m_hyperLink237 = new wxHyperlinkCtrl(this, wxID_ANY, _("Follow GDevelop on Twitter"), wxT("https://twitter.com/Game_Develop"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink237->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink237->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink237->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer214->Add(m_hyperLink237, 0, wxALL, 3); wxFlexGridSizer* newsSizer = new wxFlexGridSizer(0, 1, 0, 0); newsSizer->SetFlexibleDirection( wxBOTH ); newsSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); centerSizer->Add(newsSizer, 1, wxALL|wxEXPAND, 10); wxFlexGridSizer* flexGridSizer88 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer88->SetFlexibleDirection( wxBOTH ); flexGridSizer88->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); newsSizer->Add(flexGridSizer88, 0, wxALL, 0); newsBmp = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(-1,-1), 0 ); flexGridSizer88->Add(newsBmp, 0, wxRIGHT|wxBOTTOM, 5); newsTxt = new wxStaticText(this, wxID_ANY, _("Latest news"), wxDefaultPosition, wxSize(-1,-1), 0); newsTxt->SetForegroundColour(wxColour(wxT("rgb(120,120,120)"))); flexGridSizer88->Add(newsTxt, 0, wxALL, 3); newsEdit = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY|wxTE_MULTILINE); newsSizer->Add(newsEdit, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5); newsEdit->SetMinSize(wxSize(300,65)); wxFlexGridSizer* flexGridSizer77 = new wxFlexGridSizer(0, 2, 0, 0); flexGridSizer77->SetFlexibleDirection( wxBOTH ); flexGridSizer77->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer77->AddGrowableCol(0); newsSizer->Add(flexGridSizer77, 1, wxALL|wxEXPAND, 5); newsLink1 = new wxHyperlinkCtrl(this, wxID_ANY, wxT(""), wxT(""), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); newsLink1->SetNormalColour(wxColour(wxT("#0000FF"))); newsLink1->SetHoverColour(wxColour(wxT("#0000FF"))); newsLink1->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer77->Add(newsLink1, 0, wxLEFT|wxRIGHT|wxALIGN_RIGHT, 5); newsLink2 = new wxHyperlinkCtrl(this, wxID_ANY, wxT(""), wxT(""), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); newsLink2->SetNormalColour(wxColour(wxT("#0000FF"))); newsLink2->SetHoverColour(wxColour(wxT("#0000FF"))); newsLink2->SetVisitedColour(wxColour(wxT("#FF0000"))); flexGridSizer77->Add(newsLink2, 0, wxLEFT|wxRIGHT, 5); wxFlexGridSizer* bottomSizer = new wxFlexGridSizer(0, 7, 0, 0); bottomSizer->SetFlexibleDirection( wxBOTH ); bottomSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); flexGridSizer3->Add(bottomSizer, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM, 5); m_staticText53 = new wxStaticText(this, wxID_ANY, _("GDevelop is open source:"), wxDefaultPosition, wxSize(-1,-1), 0); bottomSizer->Add(m_staticText53, 0, wxALL|wxALIGN_CENTER_VERTICAL, 10); donateBmp = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(-1,-1), 0 ); bottomSizer->Add(donateBmp, 0, wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 4); donateLinkBt = new wxHyperlinkCtrl(this, wxID_ANY, _("Donate if you like it"), wxT("http://www.compilgames.net/donate.php"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); donateLinkBt->SetNormalColour(wxColour(wxT("#0000FF"))); donateLinkBt->SetHoverColour(wxColour(wxT("#0000FF"))); donateLinkBt->SetVisitedColour(wxColour(wxT("#FF0000"))); bottomSizer->Add(donateLinkBt, 0, wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5); githubBmp = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(-1,-1), 0 ); bottomSizer->Add(githubBmp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 4); m_hyperLink57 = new wxHyperlinkCtrl(this, wxID_ANY, _("Contribute on GitHub"), wxT("https://github.com/4ian/GD"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink57->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink57->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink57->SetVisitedColour(wxColour(wxT("#FF0000"))); bottomSizer->Add(m_hyperLink57, 0, wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5); localeBmp = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(-1,-1), 0 ); bottomSizer->Add(localeBmp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 4); m_hyperLink572 = new wxHyperlinkCtrl(this, wxID_ANY, _("Help to translate GD in your language"), wxT("https://crowdin.com/project/gdevelop"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE); m_hyperLink572->SetNormalColour(wxColour(wxT("#0000FF"))); m_hyperLink572->SetHoverColour(wxColour(wxT("#0000FF"))); m_hyperLink572->SetVisitedColour(wxColour(wxT("#FF0000"))); bottomSizer->Add(m_hyperLink572, 0, wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5); SetBackgroundColour(wxColour(wxT("rgb(255,255,255)"))); SetName(wxT("BaseStartHerePage")); SetSize(700,500); if (GetSizer()) { GetSizer()->Fit(this); } // Connect events lastProject1Bt->Connect(wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler(BaseStartHerePage::OnLastProject1Click), NULL, this); lastProject2Bt->Connect(wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler(BaseStartHerePage::OnLastProject2Click), NULL, this); lastProject3Bt->Connect(wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler(BaseStartHerePage::OnLastProject3Click), NULL, this); }
DiffDialogBase::DiffDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC95F2InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer25 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer25); wxFlexGridSizer* fgSizer9 = new wxFlexGridSizer(0, 2, 0, 0); fgSizer9->SetFlexibleDirection( wxBOTH ); fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer9->AddGrowableCol(1); bSizer25->Add(fgSizer9, 0, wxALL|wxEXPAND, 5); m_staticText25 = new wxStaticText(this, wxID_ANY, _("From Revision:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer9->Add(m_staticText25, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlFromRev = new wxTextCtrl(this, wxID_ANY, wxT("BASE"), wxDefaultPosition, wxSize(-1, -1), 0); m_textCtrlFromRev->SetFocus(); fgSizer9->Add(m_textCtrlFromRev, 0, wxALL|wxEXPAND, 5); m_staticText26 = new wxStaticText(this, wxID_ANY, _("To Revision:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer9->Add(m_staticText26, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlToRev = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer9->Add(m_textCtrlToRev, 0, wxALL|wxEXPAND, 5); bSizer25->Add(0, 0, 1, wxTOP|wxBOTTOM|wxEXPAND, 5); m_checkBoxIgnoreWhitespace = new wxCheckBox(this, wxID_ANY, _("Ignore whitespaces"), wxDefaultPosition, wxSize(-1,-1), 0); m_checkBoxIgnoreWhitespace->SetValue(true); bSizer25->Add(m_checkBoxIgnoreWhitespace, 0, wxALL, 5); wxBoxSizer* bSizer26 = new wxBoxSizer(wxHORIZONTAL); bSizer25->Add(bSizer26, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); m_button20 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); m_button20->SetDefault(); bSizer26->Add(m_button20, 0, wxALL, 5); m_button19 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer26->Add(m_button19, 0, wxALL, 5); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); }
bool TextDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) { ////@begin TextDialog member initialisation m_Notebook = NULL; m_IndexPanel = NULL; m_IndexList = NULL; m_New = NULL; m_Delete = NULL; m_GeneralPanel = NULL; m_LabelID = NULL; m_ID = NULL; m_LabelText = NULL; m_Text = NULL; m_labImage = NULL; m_ImageButton = NULL; m_LabelTip = NULL; m_Tip = NULL; m_labPointsize = NULL; m_Pointsize = NULL; m_labColor = NULL; m_Color = NULL; m_labBackColor = NULL; m_Background = NULL; m_AttributesBox = NULL; m_Bold = NULL; m_Underlined = NULL; m_Italic = NULL; m_Transparent = NULL; m_Input = NULL; m_Border = NULL; m_Clock = NULL; m_Ori = NULL; m_Reset = NULL; m_Actions = NULL; m_InterfacePanel = NULL; m_labIID = NULL; m_IID = NULL; m_labBus = NULL; m_Bus = NULL; m_labAddress = NULL; m_Address = NULL; m_labDisplay = NULL; m_Display = NULL; m_LocationPanel = NULL; m_LabelX = NULL; m_x = NULL; m_LabelY = NULL; m_y = NULL; m_LabelZ = NULL; m_z = NULL; m_LabelCx = NULL; m_Cx = NULL; m_LabelCy = NULL; m_Cy = NULL; m_OK = NULL; m_Cancel = NULL; m_Help = NULL; m_Apply = NULL; ////@end TextDialog member initialisation ////@begin TextDialog creation SetExtraStyle(wxWS_EX_BLOCK_EVENTS); wxDialog::Create( parent, id, caption, pos, size, style ); CreateControls(); if (GetSizer()) { GetSizer()->SetSizeHints(this); } Centre(); ////@end TextDialog creation return true; }
SvnPropsBaseDlg::SvnPropsBaseDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style) { if ( !bBitmapLoaded ) { // We need to initialise the default bitmap handler wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); wxC95F2InitBitmapResources(); bBitmapLoaded = true; } wxBoxSizer* bSizer28 = new wxBoxSizer(wxVERTICAL); this->SetSizer(bSizer28); m_staticTextURL = new wxStaticText(this, wxID_ANY, _("Title"), wxDefaultPosition, wxSize(-1, -1), 0); wxFont m_staticTextURLFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_staticTextURLFont.SetStyle(wxFONTSTYLE_ITALIC); m_staticTextURLFont.SetWeight(wxFONTWEIGHT_BOLD); m_staticTextURL->SetFont(m_staticTextURLFont); bSizer28->Add(m_staticTextURL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); wxFlexGridSizer* fgSizer10 = new wxFlexGridSizer(0, 2, 0, 0); fgSizer10->SetFlexibleDirection( wxBOTH ); fgSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer10->AddGrowableCol(1); bSizer28->Add(fgSizer10, 0, wxALL|wxEXPAND, 5); m_staticText27 = new wxStaticText(this, wxID_ANY, _("Bug URL Pattern:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer10->Add(m_staticText27, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlBugURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_textCtrlBugURL->SetToolTip(_("Enter here the URL for the bug details.\nFor example: http://mytracker.com?bug_id=$(BUGID)")); fgSizer10->Add(m_textCtrlBugURL, 0, wxALL|wxEXPAND, 5); m_staticText33 = new wxStaticText(this, wxID_ANY, _("Bug Message Pattern:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer10->Add(m_staticText33, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlBugMsg = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_textCtrlBugMsg->SetToolTip(_("Enter here the message to add to the commit log. You may use the $(BUG_URL) and $(BUGID) macros.\nAn example: \"Fixed: BUG#$(BUGID), See $(BUG_URL) for more details\"")); fgSizer10->Add(m_textCtrlBugMsg, 0, wxALL|wxEXPAND, 5); m_staticText31 = new wxStaticText(this, wxID_ANY, _("Feature URL Pattern:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer10->Add(m_staticText31, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlFrURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_textCtrlFrURL->SetToolTip(_("Enter here the URL for the feature request details.\nFor example: http://mytracker.com?fr_id=$(FRID)")); fgSizer10->Add(m_textCtrlFrURL, 0, wxALL|wxEXPAND, 5); m_staticText34 = new wxStaticText(this, wxID_ANY, _("Feature Message Pattern:"), wxDefaultPosition, wxSize(-1, -1), 0); fgSizer10->Add(m_staticText34, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); m_textCtrlFrMsg = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); m_textCtrlFrMsg->SetToolTip(_("Enter here the message to add to the commit log. You may use the $(FR_URL) and $(FRID) macros.\nAn example: \"Implements FR#$(FRID), See $(FR_URL) for more details\"")); fgSizer10->Add(m_textCtrlFrMsg, 0, wxALL|wxEXPAND, 5); bSizer28->Add(0, 0, 1, wxEXPAND, 5); m_staticline7 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL); bSizer28->Add(m_staticline7, 0, wxALL|wxEXPAND, 5); wxBoxSizer* bSizer29 = new wxBoxSizer(wxHORIZONTAL); bSizer28->Add(bSizer29, 0, wxALIGN_CENTER_HORIZONTAL, 5); m_button21 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); m_button21->SetDefault(); bSizer29->Add(m_button21, 0, wxALL, 5); m_button22 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); bSizer29->Add(m_button22, 0, wxALL, 5); SetSizeHints(-1,-1); if ( GetSizer() ) { GetSizer()->Fit(this); } Centre(wxBOTH); }
void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane) { m_pane_window = pane.window; m_pane_window->Reparent(this); wxAuiPaneInfo contained_pane = pane; contained_pane.Dock().Center().Show(). CaptionVisible(false). PaneBorder(false). Layer(0).Row(0).Position(0); // Carry over the minimum size wxSize pane_min_size = pane.window->GetMinSize(); // if the frame window's max size is greater than the min size // then set the max size to the min size as well wxSize cur_max_size = GetMaxSize(); if (cur_max_size.IsFullySpecified() && (cur_max_size.x < pane.min_size.x || cur_max_size.y < pane.min_size.y) ) { SetMaxSize(pane_min_size); } SetMinSize(pane.window->GetMinSize()); m_mgr.AddPane(m_pane_window, contained_pane); m_mgr.Update(); if (pane.min_size.IsFullySpecified()) { // because SetSizeHints() calls Fit() too (which sets the window // size to its minimum allowed), we keep the size before calling // SetSizeHints() and reset it afterwards... wxSize tmp = GetSize(); GetSizer()->SetSizeHints(this); SetSize(tmp); } SetTitle(pane.caption); if (pane.floating_size != wxDefaultSize) { SetSize(pane.floating_size); } else { wxSize size = pane.best_size; if (size == wxDefaultSize) size = pane.min_size; if (size == wxDefaultSize) size = m_pane_window->GetSize(); if (pane.HasGripper()) { if (pane.HasGripperTop()) size.y += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE); else size.x += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE); } SetClientSize(size); } }
bool CtrlAuthentication::Enable(bool enable) { enableWindowsFromSizer(GetSizer(), enable); return true; }