コード例 #1
0
wxPanel *SyntaxHighlightDlg::CreateSyntaxHighlightPage()
{
    wxPanel *page = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
    wxBoxSizer *sz = new wxBoxSizer(wxVERTICAL);
    page->SetSizer(sz);

    wxStaticText *txt = new wxStaticText(page, wxID_ANY, _("Colouring scheme:"), wxDefaultPosition, wxDefaultSize, 0);
    sz->Add(txt, 0, wxEXPAND|wxALL, 5);

    m_themes = new wxChoice(page, wxID_ANY, wxDefaultPosition, wxDefaultSize, EditorConfigST::Get()->GetLexersThemes(), 0 );
    sz->Add(m_themes, 0, wxEXPAND|wxALL, 5);

    if (m_themes->IsEmpty() == false) {
        int where = m_themes->FindString(EditorConfigST::Get()->GetStringValue( wxT("LexerTheme") ));
        if ( where != wxNOT_FOUND) {
            m_themes->SetSelection( where );
        }
    }

    long style = wxNB_DEFAULT;
    m_lexersBook = new wxTreebook(page, wxID_ANY, wxDefaultPosition, wxDefaultSize, style);
    MSWSetNativeTheme(m_lexersBook->GetTreeCtrl());
    m_lexersBook->GetTreeCtrl()->SetSizeHints(150, -1);
    sz->Add(m_lexersBook, 1, wxEXPAND | wxALL, 5);
    m_lexersBook->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
    m_lexersBook->Connect(XRCID("ID_buttonTextSelApplyToAll"), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyntaxHighlightDlg::OnTextSelApplyToAll), NULL, this );

    LoadLexers(m_themes->GetStringSelection().IsEmpty() ? wxT("Default") : m_themes->GetStringSelection());

    m_startingTheme = m_themes->GetStringSelection().IsEmpty() ? wxT("Default") : m_themes->GetStringSelection();
    ConnectChoice(m_themes, SyntaxHighlightDlg::OnThemeChanged);
    return page;
}
コード例 #2
0
DisplayVariableDlg::DisplayVariableDlg( wxWindow* parent)
    : clDebuggerTipWindowBase( parent )
    , m_debugger(NULL)
    , m_keepCurrentPosition(false)
    , m_dragging(false)
    , m_editDlgIsUp(false)
{
    Hide();
    Centre();
    MSWSetNativeTheme(m_treeCtrl);
    m_timer2 = new wxTimer(this);
    m_mousePosTimer = new wxTimer(this);

    SetName("clDebuggerEditItemDlgBase");
    
    bool sizeSet(false);
    if (!wxPersistenceManager::Get().Find(this)) {
        sizeSet = wxPersistentRegisterAndRestore(this, "CLDebuggerTip");
    }
    wxUnusedVar(sizeSet);
    if (GetSize().x < 100 || GetSize().y < 100 ) {
        SetSize( wxRect(GetPosition(), wxSize(100, 100) ) );
    }

    Connect(m_timer2->GetId(),        wxEVT_TIMER, wxTimerEventHandler(DisplayVariableDlg::OnTimer2), NULL, this);
    Connect(m_mousePosTimer->GetId(), wxEVT_TIMER, wxTimerEventHandler(DisplayVariableDlg::OnCheckMousePosTimer), NULL, this);
    m_panelStatusBar->Connect(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(DisplayVariableDlg::OnCaptureLost), NULL, this);
}
コード例 #3
0
CppSymbolTree::CppSymbolTree(wxWindow *parent, const wxWindowID id, const wxPoint &pos, const wxSize &size, long style)
    : SymbolTree(parent, id, pos, size, style)
{
    Connect(GetId(), wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, wxTreeEventHandler(CppSymbolTree::OnMouseRightUp));
    Connect(GetId(), wxEVT_LEFT_DCLICK, wxMouseEventHandler(CppSymbolTree::OnMouseDblClick));
    Connect(GetId(), wxEVT_COMMAND_TREE_KEY_DOWN, wxTreeEventHandler(CppSymbolTree::OnItemActivated));
    MSWSetNativeTheme(this);
}
コード例 #4
0
PHPProjectSettingsDlg::PHPProjectSettingsDlg(wxWindow* parent, const wxString& projectName)
    : PHPProjectSettingsBase(parent)
    , m_dirty(false)
    , m_projectName(projectName)
    , m_resyncNeeded(false)
{
    MSWSetNativeTheme(m_treebook41->GetTreeCtrl());
    const PHPProjectSettingsData& data = PHPWorkspace::Get()->GetProject(m_projectName)->GetSettings();

    // General settings
    m_choicebook1->SetSelection(data.GetRunAs() == PHPProjectSettingsData::kRunAsCLI ? 0 : 1);
    m_filePickerPHPExe->SetPath(data.GetPhpExe());
    m_filePickerIndex->SetPath(data.GetIndexFile());
    m_textCtrlProgramArgs->ChangeValue(data.GetArgs());
    m_dirPickerWorkingDirectory->SetPath(data.GetWorkingDirectory());
    m_textCtrlPHPIncludePath->ChangeValue(data.GetIncludePath());
    m_checkBoxPauseWhenExecutionEnds->SetValue(data.IsPauseWhenExeTerminates());
    m_textCtrlWebSiteURL->ChangeValue(data.GetProjectURL());
    m_checkBoxSystemBrowser->SetValue(data.IsUseSystemBrowser());

    wxString fileExts = PHPWorkspace::Get()->GetProject(m_projectName)->GetImportFileSpec();
    fileExts.Replace(";", ",");
    m_pgPropFileTypes->SetValueFromString(fileExts);

    wxString excludeFolders = PHPWorkspace::Get()->GetProject(m_projectName)->GetExcludeFolders();
    excludeFolders.Replace(";", ",");
    m_pgPropExcludeFolders->SetValueFromString(excludeFolders);

    if(!data.GetPhpIniFile().IsEmpty()) {
        m_filePickerPhpIni->SetPath(data.GetPhpIniFile());
    }

    const JSONElement::wxStringMap_t& mapping = data.GetFileMapping();
    JSONElement::wxStringMap_t::const_iterator iter = mapping.begin();
    for(; iter != mapping.end(); ++iter) {
        wxVector<wxVariant> cols;
        cols.push_back(iter->first);
        cols.push_back(iter->second);
        m_dvListCtrlFileMapping->AppendItem(cols);
    }

    // Code Completion settings
    m_textCtrlCCIncludePath->ChangeValue(data.GetCcIncludePath());

    SetDirty(false);
    GetSizer()->Fit(this);
    SetName("PHPProjectSettingsDlg");
    WindowAttrManager::Load(this);

    m_dvListCtrlFileMapping->Bind(
        wxEVT_COMMAND_MENU_SELECTED, &PHPProjectSettingsDlg::OnNewFileMapping, this, wxID_NEW);
    m_dvListCtrlFileMapping->Bind(
        wxEVT_COMMAND_MENU_SELECTED, &PHPProjectSettingsDlg::OnDeleteFileMapping, this, wxID_DELETE);
    m_dvListCtrlFileMapping->Bind(
        wxEVT_COMMAND_MENU_SELECTED, &PHPProjectSettingsDlg::OnEditFileMapping, this, wxID_EDIT);
}
コード例 #5
0
PHPFileLayoutTree::PHPFileLayoutTree(wxWindow* parent)
    : wxTreeCtrl(parent,
                 wxID_ANY,
                 wxDefaultPosition,
                 wxDefaultSize,
                 wxTR_DEFAULT_STYLE | wxTR_FULL_ROW_HIGHLIGHT | wxTR_HIDE_ROOT | wxTR_NO_LINES | wxTR_SINGLE)
    , m_editor(NULL)
    , m_manager(NULL)
{
    MSWSetNativeTheme(this);
}
コード例 #6
0
PHPFileLayoutTree::PHPFileLayoutTree(wxWindow* parent, IEditor* editor, IManager* manager)
    : wxTreeCtrl(parent,
                 wxID_ANY,
                 wxDefaultPosition,
                 wxDefaultSize,
                 wxTR_DEFAULT_STYLE | wxTR_FULL_ROW_HIGHLIGHT | wxTR_HIDE_ROOT | wxTR_NO_LINES | wxTR_SINGLE)
    , m_editor(editor)
    , m_manager(manager)
{
    MSWSetNativeTheme(this);
    m_keyboard.reset(new clTreeKeyboardInput(this));
}
コード例 #7
0
svSymbolTree::svSymbolTree(wxWindow *parent, IManager* manager, const wxWindowID id, const wxPoint &pos, const wxSize &size, long style)
    : SymbolTree(parent, id, pos, size, style)
    , m_uid(0)
{
    m_manager = manager;
    Connect(GetId(), wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, wxTreeEventHandler(svSymbolTree::OnMouseRightUp));
    Connect(GetId(), wxEVT_LEFT_DCLICK, wxMouseEventHandler(svSymbolTree::OnMouseDblClick));
    Connect(GetId(), wxEVT_COMMAND_TREE_KEY_DOWN, wxTreeEventHandler(svSymbolTree::OnItemActivated));
    Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(svSymbolTree::OnMouseDblClick), NULL, this);
    Connect(wxEVT_PARSE_INCLUDE_STATEMENTS_DONE, wxCommandEventHandler(svSymbolTree::OnIncludeStatements), NULL, this);
    MSWSetNativeTheme(this);
}
コード例 #8
0
ファイル: options_dlg2.cpp プロジェクト: 292388900/codelite
OptionsDlg2::OptionsDlg2(wxWindow* parent)
    : OptionsBaseDlg2(parent)
    , m_contentObjects()
    , restartRquired(false)
{
    Initialize();
    SetName("OptionsDlg2");
    WindowAttrManager::Load(this);
    CenterOnParent();
    MSWSetNativeTheme(m_treeBook->GetTreeCtrl());
    GetSizer()->Layout();
}
コード例 #9
0
ファイル: DbViewerPanel.cpp プロジェクト: HTshandou/codelite
DbViewerPanel::DbViewerPanel(wxWindow *parent, wxWindow* notebook, IManager* pManager)
    : _DbViewerPanel(parent)
{
    SetExtraStyle( wxWS_EX_BLOCK_EVENTS );

    m_pNotebook = notebook;
    m_pGlobalParent = parent;
    m_mgr = pManager;
    m_pPrevPanel = NULL;
    m_SuppressUpdate = false;

    MSWSetNativeTheme(m_treeDatabases);

    m_pDbAdapter = NULL;
    m_pConnections = new xsSerializable();

    m_pThumbnail = new wxSFThumbnail(this);
    m_pThumbnail->SetSizeHints(wxSize(-1, 200));

    GetSizer()->Add(m_pThumbnail, 0, wxEXPAND);
    GetSizer()->Hide(m_pThumbnail);

    GetSizer()->Layout();

    // replace the icons...
    BitmapLoader *bmpLoader = pManager->GetStdIcons();

    m_toolBar1->AddTool( XRCID("IDT_DBE_CONNECT"), _("Open connection"),         bmpLoader->LoadBitmap(wxT("db-explorer/16/connect")),          wxNullBitmap, wxITEM_NORMAL, _("Open new connection"), _("Open new connection"), NULL );
    m_toolBar1->AddTool( XRCID("IDT_DBE_CLOSE_CONNECTION"), _("tool"),           bmpLoader->LoadBitmap(wxT("db-explorer/16/disconnect")),       wxNullBitmap, wxITEM_NORMAL, _("Close selected connection"), _("Close selected connection"), NULL );
    m_toolBar1->AddTool( XRCID("IDT_DBE_REFRESH"), _("tool"),               bmpLoader->LoadBitmap(wxT("db-explorer/16/database_refresh")), wxNullBitmap, wxITEM_NORMAL, _("Refresh View"), wxEmptyString, NULL );
    m_toolBar1->AddTool( XRCID("IDT_DBE_ERD"), _("ERD"),                    bmpLoader->LoadBitmap(wxT("db-explorer/16/table")),            wxNullBitmap, wxITEM_NORMAL, _("Open ERD View"), wxEmptyString, NULL );
    m_toolBar1->AddTool( XRCID("IDT_DBE_PREVIEW"), _("Show ERD Thumbnail"), bmpLoader->LoadBitmap(wxT("db-explorer/16/thumbnail")), _("Show ERD Thumbnail"), wxITEM_CHECK);
    m_toolBar1->Realize();

    Layout();

    m_mgr->GetEditorPaneNotebook()->Connect(wxEVT_COMMAND_BOOK_PAGE_CHANGED,NotebookEventHandler(DbViewerPanel::OnPageChanged), NULL, this);
    m_mgr->GetEditorPaneNotebook()->Connect(wxEVT_COMMAND_BOOK_PAGE_CLOSING,NotebookEventHandler(DbViewerPanel::OnPageClosing), NULL, this);

    this->Connect( XRCID("IDT_DBE_CONNECT"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( DbViewerPanel::OnConnectClick ) );
    //this->Connect( XRCID("IDT_DBE_CONNECT"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DbViewerPanel::OnConnectUI ) );
    this->Connect( XRCID("IDT_DBE_CLOSE_CONNECTION"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( DbViewerPanel::OnToolCloseClick ) );
    this->Connect( XRCID("IDT_DBE_CLOSE_CONNECTION"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DbViewerPanel::OnToolCloseUI ) );
    this->Connect( XRCID("IDT_DBE_REFRESH"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( DbViewerPanel::OnRefreshClick ) );
    this->Connect( XRCID("IDT_DBE_REFRESH"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DbViewerPanel::OnRefreshUI ) );
    this->Connect( XRCID("IDT_DBE_ERD"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( DbViewerPanel::OnERDClick ) );
    this->Connect( XRCID("IDT_DBE_PREVIEW"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( DbViewerPanel::OnShowThumbnail ) );
    
    m_themeHelper = new ThemeHandlerHelper(this);
}
コード例 #10
0
ファイル: PHPOutlineTree.cpp プロジェクト: lpc1996/codelite
PHPOutlineTree::PHPOutlineTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxTreeCtrl(parent, id, pos, size, style)
{
    MSWSetNativeTheme(this);
    SetFont(DrawingUtils::GetDefaultGuiFont());
}
コード例 #11
0
ファイル: PHPOutlineTree.cpp プロジェクト: LoviPanda/codelite
PHPOutlineTree::PHPOutlineTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxTreeCtrl(parent, id, pos, size, style)
{
    MSWSetNativeTheme(this);
}
コード例 #12
0
PHPOutlineTree::PHPOutlineTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxTreeCtrl(parent, id, pos, size, style)
{
    MSWSetNativeTheme(this);
    SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
}
コード例 #13
0
TagsOptionsDlg::TagsOptionsDlg(wxWindow* parent, const TagsOptionsData& data)
    : TagsOptionsBaseDlg(parent)
    , m_data(data)
{
    MSWSetNativeTheme(m_treebook2->GetTreeCtrl());
    ::wxPGPropertyBooleanUseCheckbox(m_pgMgrColouring->GetGrid());
    Centre();
    GetSizer()->Fit(this);
    SetName("TagsOptionsDlg");
    WindowAttrManager::Load(this);

    // Set default values

    //------------------------------------------------------------------
    // Display and behavior
    //------------------------------------------------------------------
    m_checkDisplayFunctionTip->SetValue(m_data.GetFlags() & CC_DISP_FUNC_CALLTIP ? true : false);
    m_checkDisplayTypeInfo->SetValue(m_data.GetFlags() & CC_DISP_TYPE_INFO ? true : false);
    m_checkCppKeywordAssist->SetValue(m_data.GetFlags() & CC_CPP_KEYWORD_ASISST ? true : false);
    m_checkDisableParseOnSave->SetValue(m_data.GetFlags() & CC_DISABLE_AUTO_PARSING ? true : false);
    m_checkBoxretagWorkspaceOnStartup->SetValue(m_data.GetFlags() & CC_RETAG_WORKSPACE_ON_STARTUP ? true : false);
    m_checkBoxDeepUsingNamespaceResolving->SetValue(m_data.GetFlags() & CC_DEEP_SCAN_USING_NAMESPACE_RESOLVING ? true :
                                                                                                                 false);
    m_checkBoxEnableCaseSensitiveCompletion->SetValue(m_data.GetFlags() & CC_IS_CASE_SENSITIVE ? true : false);
    m_checkBoxKeepFunctionSignature->SetValue(m_data.GetFlags() & CC_KEEP_FUNCTION_SIGNATURE_UNFORMATTED);
    m_spinCtrlNumberOfCCItems->ChangeValue(::wxIntToString(m_data.GetCcNumberOfDisplayItems()));

    //------------------------------------------------------------------
    // Colouring
    //------------------------------------------------------------------
    m_pgPropColourWorkspaceSymbols->SetValueFromInt(m_data.GetCcColourFlags());
    m_pgPropColourLocalVariables->SetValue(m_data.GetFlags() & CC_COLOUR_VARS ? true : false);
    m_pgPropTrackPreProcessors->SetValue(m_data.GetCcColourFlags() & CC_COLOUR_MACRO_BLOCKS ? true : false);

    //----------------------------------------------------
    // Triggering
    //----------------------------------------------------
    m_checkWordAssist->SetValue(m_data.GetFlags() & CC_WORD_ASSIST ? true : false);
    m_checkAutoInsertSingleChoice->SetValue(m_data.GetFlags() & CC_AUTO_INSERT_SINGLE_CHOICE ? true : false);
    m_sliderMinWordLen->SetValue(m_data.GetMinWordLen());

    //----------------------------------------------------
    // CTags search paths
    //----------------------------------------------------
    m_textCtrlCtagsSearchPaths->SetValue(wxImplode(m_data.GetParserSearchPaths(), wxT("\n")));
    m_textCtrlCtagsExcludePaths->SetValue(wxImplode(m_data.GetParserExcludePaths(), wxT("\n")));

    //----------------------------------------------------
    // CTags advanced page
    //----------------------------------------------------
    m_textPrep->SetValue(m_data.GetTokens());
    m_textTypes->SetValue(m_data.GetTypes());
    m_textCtrlFilesList->SetValue(m_data.GetMacrosFiles());
    m_textFileSpec->SetValue(m_data.GetFileSpec());

//----------------------------------------------------
// Clang page
//----------------------------------------------------
#if HAS_LIBCLANG
    m_checkBoxEnableClangCC->SetValue(m_data.GetClangOptions() & CC_CLANG_ENABLED);
#else
    m_checkBoxEnableClangCC->SetValue(false);
    m_checkBoxEnableClangCC->Enable(false);
#endif

    m_checkBoxClangFirst->SetValue(m_data.GetClangOptions() & CC_CLANG_FIRST);
    m_textCtrlClangSearchPaths->SetValue(m_data.GetClangSearchPaths());
    m_choiceCachePolicy->Clear();

    // defaults
    m_choiceCachePolicy->Append(TagsOptionsData::CLANG_CACHE_LAZY);
    m_choiceCachePolicy->Append(TagsOptionsData::CLANG_CACHE_ON_FILE_LOAD);
    m_choiceCachePolicy->Select(1);

    int where = m_choiceCachePolicy->FindString(m_data.GetClangCachePolicy());
    if(where != wxNOT_FOUND) {
        m_choiceCachePolicy->Select(where);
    }
}