当前位置: 首页>>代码示例>>C++>>正文


C++ BitmapLoader::LoadBitmap方法代码示例

本文整理汇总了C++中BitmapLoader::LoadBitmap方法的典型用法代码示例。如果您正苦于以下问题:C++ BitmapLoader::LoadBitmap方法的具体用法?C++ BitmapLoader::LoadBitmap怎么用?C++ BitmapLoader::LoadBitmap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BitmapLoader的用法示例。


在下文中一共展示了BitmapLoader::LoadBitmap方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

OverlayTool::OverlayTool()
{
    BitmapLoader bl;
    ms_bmpOK       = bl.LoadBitmap("overlay/16/ok");
    ms_bmpModified = bl.LoadBitmap("overlay/16/modified");
    ms_bmpConflict = bl.LoadBitmap("overlay/16/conflicted");
} 
开发者ID:AndrianDTR,项目名称:codelite,代码行数:7,代码来源:overlaytool.cpp

示例2:

clAuiDockArt::clAuiDockArt(IManager *manager)
    : m_manager(manager)
{
    BitmapLoader *bl = m_manager->GetStdIcons();
    m_bmpClose   = bl->LoadBitmap("aui/close");
    m_bmpCloseInactive = bl->LoadBitmap("aui/close-inactive");
}
开发者ID:HTshandou,项目名称:codelite,代码行数:7,代码来源:cl_aui_dock_art.cpp

示例3: DoInitialize

void OpenResourceDlg::DoInitialize()
{
    BitmapLoader *bmpLoader = m_mgr->GetStdIcons();

    CLASS_IMG_ID    = bmpLoader->LoadBitmap(wxT("cc/16/class"));
    FILE_IMG_ID     = bmpLoader->LoadBitmap(wxT("mime/16/php"));
    FUNC_IMG_ID     = bmpLoader->LoadBitmap(wxT("cc/16/function_public"));
    CONST_IMG_ID    = bmpLoader->LoadBitmap(wxT("cc/16/enumerator"));
    DEFINE_IMG_ID   = bmpLoader->LoadBitmap(wxT("cc/16/macro"));
    VARIABLE_IMG_ID = bmpLoader->LoadBitmap(wxT("cc/16/member_public"));

    WindowAttrManager::Load(this, wxT("OpenResourceDlg"), NULL);
    SetSelectedItem(NULL);
}
开发者ID:gahr,项目名称:codelite,代码行数:14,代码来源:php_open_resource_dlg.cpp

示例4: SetExtraStyle

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);
}
开发者ID:HTshandou,项目名称:codelite,代码行数:50,代码来源:DbViewerPanel.cpp

示例5: MessagePaneBase

MessagePane::MessagePane( wxWindow* parent )
    : MessagePaneBase( parent )
{
    BitmapLoader* bmpLoader = PluginManager::Get()->GetStdIcons();
    m_bitmap1->SetBitmap(bmpLoader->LoadBitmap(wxT("messages/48/info")));
    m_buttonAction->Hide();
    Hide();
}
开发者ID:292388900,项目名称:codelite,代码行数:8,代码来源:message_pane.cpp

示例6: CreateToolBar

clToolBar* CodeFormatter::CreateToolBar(wxWindow* parent)
{
    clToolBar* tb(NULL);
    if(m_mgr->AllowToolbar()) {
        // support both toolbars icon size
        int size = m_mgr->GetToolbarIconSize();

        tb = new clToolBar(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, clTB_DEFAULT_STYLE_PLUGIN);
        tb->SetToolBitmapSize(wxSize(size, size));

        BitmapLoader* bmpLoader = m_mgr->GetStdIcons();
        tb->AddTool(XRCID("format_source"),
                    _("Format Source"),
                    bmpLoader->LoadBitmap("format", size),
                    _("Format Source Code"));
        tb->AddTool(XRCID("formatter_options"),
                    _("Format Options"),
                    bmpLoader->LoadBitmap("cog", size),
                    _("Source Code Formatter Options..."));
        tb->Realize();
    }

    // Connect the events to us
    m_mgr->GetTheApp()->Connect(XRCID("format_source"),
                                wxEVT_COMMAND_MENU_SELECTED,
                                wxCommandEventHandler(CodeFormatter::OnFormat),
                                NULL,
                                (wxEvtHandler*)this);
    m_mgr->GetTheApp()->Connect(XRCID("formatter_options"),
                                wxEVT_COMMAND_MENU_SELECTED,
                                wxCommandEventHandler(CodeFormatter::OnFormatOptions),
                                NULL,
                                (wxEvtHandler*)this);
    m_mgr->GetTheApp()->Connect(XRCID("format_source"),
                                wxEVT_UPDATE_UI,
                                wxUpdateUIEventHandler(CodeFormatter::OnFormatUI),
                                NULL,
                                (wxEvtHandler*)this);
    m_mgr->GetTheApp()->Connect(XRCID("formatter_options"),
                                wxEVT_UPDATE_UI,
                                wxUpdateUIEventHandler(CodeFormatter::OnFormatOptionsUI),
                                NULL,
                                (wxEvtHandler*)this);
    return tb;
}
开发者ID:292388900,项目名称:codelite,代码行数:45,代码来源:codeformatter.cpp

示例7: CreateGUIControls

void OutputPane::CreateGUIControls()
{
    wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
    SetSizer(mainSizer);

    m_book = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER);

    BitmapLoader *bmpLoader = PluginManager::Get()->GetStdIcons();

    // Calculate the widest tab (the one with the 'Workspace' label) TODO: What happens with translations?
    int xx, yy;
    wxFont fnt = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    wxWindow::GetTextExtent(wxGetTranslation(REPLACE_IN_FILES), &xx, &yy, NULL, NULL, &fnt);

    mainSizer->Add(m_book, 1, wxEXPAND | wxALL | wxGROW, 0);

#if CL_USE_NEW_BUILD_TAB
    m_buildWin = new NewBuildTab(m_book);
#else
    m_buildWin = new BuildTab(m_book, wxID_ANY, wxGetTranslation(BUILD_WIN));
#endif
    m_book->AddPage(m_buildWin, wxGetTranslation(BUILD_WIN), true, bmpLoader->LoadBitmap(wxT("toolbars/16/build/build")));

#ifdef __WXMAC__
    m_findResultsTab = new FindResultsTab(m_book, wxID_ANY, wxGetTranslation(FIND_IN_FILES_WIN), false);
#else
    m_findResultsTab = new FindResultsTab(m_book, wxID_ANY, wxGetTranslation(FIND_IN_FILES_WIN), true);
#endif

    m_book->AddPage(m_findResultsTab, wxGetTranslation(FIND_IN_FILES_WIN), false, bmpLoader->LoadBitmap(wxT("toolbars/16/search/find")));

    m_replaceResultsTab = new ReplaceInFilesPanel(m_book, wxID_ANY, wxGetTranslation(REPLACE_IN_FILES));
    m_book->AddPage(m_replaceResultsTab, wxGetTranslation(REPLACE_IN_FILES), false, bmpLoader->LoadBitmap(wxT("toolbars/16/search/find_and_replace")) );

    m_showUsageTab = new FindUsageTab(m_book, wxGetTranslation(SHOW_USAGE));
    m_book->AddPage(m_showUsageTab, wxGetTranslation(SHOW_USAGE), false, bmpLoader->LoadBitmap(wxT("toolbars/16/search/find")) );

    m_outputWind = new ShellTab(m_book, wxID_ANY, wxGetTranslation(OUTPUT_WIN));
    m_book->AddPage(m_outputWind, wxGetTranslation(OUTPUT_WIN), false, bmpLoader->LoadBitmap(wxT("output-pane/16/terminal")));

    wxTextCtrl *text = new wxTextCtrl(m_book, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_RICH2 | wxTE_MULTILINE | wxTE_READONLY| wxHSCROLL);

    /////////////////////////////////////
    // Set the trace's font & colors
    /////////////////////////////////////

    m_book->AddPage(text, wxGetTranslation(TRACE_TAB), false, wxXmlResource::Get()->LoadBitmap(wxT("debug_window")));
    m_logTargetOld = wxLog::SetActiveTarget( new wxclTextCtrl(text) );

    // Now that we set up our own log target, re-enable the logging
    wxLog::EnableLogging(true);

    m_taskPanel = new TaskPanel(m_book, wxID_ANY, wxGetTranslation(TASKS));
    m_book->AddPage(m_taskPanel, wxGetTranslation(TASKS), false, bmpLoader->LoadBitmap(wxT("output-pane/16/tasks")));
    SetMinSize( wxSize(200, 100) );
    mainSizer->Layout();
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:57,代码来源:output_pane.cpp

示例8: CreateGUIControls

void OutputTabWindow::CreateGUIControls()
{
    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
    SetSizer(mainSizer);

    m_vSizer = new wxBoxSizer(wxVERTICAL);

// Create the default scintilla control
#ifdef __WXGTK__
    m_sci = new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER);
#else
    m_sci = new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);
#endif

    // We dont really want to collect undo in the output tabs...
    m_sci->SetUndoCollection(false);
    m_sci->EmptyUndoBuffer();

    InitStyle(m_sci, wxSTC_LEX_CONTAINER, false);

    // Add the find bar
    mainSizer->Add(m_vSizer, 1, wxEXPAND | wxALL, 0);
    BitmapLoader* bmpLoader = PluginManager::Get()->GetStdIcons();

    // Create the toolbar
    m_tb = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_PLAIN_BACKGROUND);
    m_tb->SetToolBitmapSize(wxSize(16, 16));

    m_tb->AddTool(XRCID("hold_pane_open"),
                  _("Keep open"),
                  bmpLoader->LoadBitmap("ToolPin"),
                  _("Don't close this pane when an editor gets focus"),
                  wxITEM_CHECK);

    m_tb->AddTool(XRCID("scroll_on_output"),
                  _("Scroll on Output"),
                  bmpLoader->LoadBitmap("link_editor"),
                  _("Scroll on Output"),
                  wxITEM_CHECK);
    m_tb->ToggleTool(XRCID("scroll_on_output"), m_outputScrolls);

    m_tb->AddTool(
        XRCID("word_wrap_output"), _("Word Wrap"), bmpLoader->LoadBitmap("word_wrap"), _("Word Wrap"), wxITEM_CHECK);

    m_tb->AddTool(XRCID("clear_all_output"), _("Clear All"), bmpLoader->LoadBitmap("clear"), _("Clear All"));
    m_tb->AddTool(XRCID("collapse_all"), _("Fold All Results"), bmpLoader->LoadBitmap("fold"), _("Fold All Results"));
    m_tb->AddTool(XRCID("repeat_output"), _("Repeat"), bmpLoader->LoadBitmap("debugger_restart"), _("Repeat"));

    m_tb->Realize();

    m_vSizer->Add(m_tb, 0, wxEXPAND);
    m_vSizer->Add(m_sci, 1, wxEXPAND);

    // Hide the find bar by default
    m_vSizer->Layout();
}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:56,代码来源:outputtabwindow.cpp

示例9: clToolBar

clToolBar *CallGraph::CreateToolBar(wxWindow *parent)
{
    //Create the toolbar to be used by the plugin
    clToolBar *tb(NULL);

    // First, check that CodeLite allows plugin to register plugins
    if (m_mgr->AllowToolbar()) {
        // Support both toolbars icon size
        int size = m_mgr->GetToolbarIconSize();

        // Allocate new toolbar, which will be freed later by CodeLite
        tb = new clToolBar(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, clTB_DEFAULT_STYLE);

        // Set the toolbar size
        tb->SetToolBitmapSize(wxSize(size, size));

        // Add tools to the plugins toolbar. You must provide 2 sets of icons: 24x24 and 16x16
        BitmapLoader *bmpLoader = m_mgr->GetStdIcons();

        if (size == 24) {
            tb->AddTool(XRCID("cg_show_callgraph"),
                        _("Show call graph"),
                        bmpLoader->LoadBitmap(wxT("callgraph/24/cg")),
                        _("Show call graph for selected/active project"),
                        wxITEM_NORMAL);
        } else {
            tb->AddTool(XRCID("cg_show_callgraph"),
                        _("Show call graph"),
                        bmpLoader->LoadBitmap(wxT("callgraph/16/cg")),
                        _("Show call graph for selected/active project"),
                        wxITEM_NORMAL);
        }
        tb->Realize();
    }
    return tb;
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:36,代码来源:callgraph.cpp

示例10: DoInitialize

void OpenResourceDlg::DoInitialize()
{
    BitmapLoader* bmpLoader = m_mgr->GetStdIcons();
    m_fileImages = bmpLoader->MakeStandardMimeMap();

    CLASS_IMG_ID = bmpLoader->LoadBitmap(wxT("cc/16/class"));
    FUNC_IMG_ID = bmpLoader->LoadBitmap(wxT("cc/16/function_public"));
    CONST_IMG_ID = bmpLoader->LoadBitmap(wxT("cc/16/enumerator"));
    DEFINE_IMG_ID = bmpLoader->LoadBitmap(wxT("cc/16/macro"));
    VARIABLE_IMG_ID = bmpLoader->LoadBitmap(wxT("cc/16/member_public"));
    NAMESPACE_IMG_ID = bmpLoader->LoadBitmap(wxT("cc/16/namespace"));

    SetName("OpenResourceDlg");
    WindowAttrManager::Load(this);
    SetSelectedItem(NULL);
}
开发者ID:anatooly,项目名称:codelite,代码行数:16,代码来源:php_open_resource_dlg.cpp

示例11: CreateGUIControls

void OutputPane::CreateGUIControls()
{
    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
    SetSizer(mainSizer);
    SetMinClientSize(wxSize(-1, 250));
    long style = (kNotebook_Default | kNotebook_AllowDnD);
    if(EditorConfigST::Get()->GetOptions()->GetWorkspaceTabsDirection() == wxBOTTOM) {
        style |= kNotebook_BottomTabs;
    } else if(EditorConfigST::Get()->GetOptions()->GetWorkspaceTabsDirection() == wxLEFT) {

#ifdef __WXOSX__
        style &= ~(kNotebook_BottomTabs | kNotebook_LeftTabs | kNotebook_RightTabs);
#else
        style |= kNotebook_LeftTabs;
#endif

    } else if(EditorConfigST::Get()->GetOptions()->GetWorkspaceTabsDirection() == wxRIGHT) {
#ifdef __WXOSX__
        style |= kNotebook_BottomTabs;
#else
        style |= kNotebook_RightTabs;
#endif
    }
    //style |= kNotebook_UnderlineActiveTab;
    
    m_book = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style);

    BitmapLoader* bmpLoader = PluginManager::Get()->GetStdIcons();

    // Calculate the widest tab (the one with the 'Workspace' label) TODO: What happens with translations?
    int xx, yy;
    wxFont fnt = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    wxWindow::GetTextExtent(wxGetTranslation(REPLACE_IN_FILES), &xx, &yy, NULL, NULL, &fnt);

    mainSizer->Add(m_book, 1, wxEXPAND | wxALL | wxGROW, 0);

    // the IManager instance
    IManager* mgr = PluginManager::Get();

    // Build tab
    m_buildWin = new NewBuildTab(m_book);
    m_book->AddPage(m_buildWin, wxGetTranslation(BUILD_WIN), true, bmpLoader->LoadBitmap(wxT("build")));
    m_tabs.insert(std::make_pair(wxGetTranslation(BUILD_WIN),
                                 Tab(wxGetTranslation(BUILD_WIN), m_buildWin, bmpLoader->LoadBitmap(wxT("build")))));
    mgr->AddOutputTab(wxGetTranslation(BUILD_WIN));

    // Find in files
    m_findResultsTab = new FindResultsTab(m_book, wxID_ANY, wxGetTranslation(FIND_IN_FILES_WIN));
    m_book->AddPage(m_findResultsTab, wxGetTranslation(FIND_IN_FILES_WIN), false, bmpLoader->LoadBitmap(wxT("find")));
    m_tabs.insert(
        std::make_pair(wxGetTranslation(FIND_IN_FILES_WIN),
                       Tab(wxGetTranslation(FIND_IN_FILES_WIN), m_findResultsTab, bmpLoader->LoadBitmap(wxT("find")))));
    mgr->AddOutputTab(wxGetTranslation(FIND_IN_FILES_WIN));

    // Replace In Files
    m_replaceResultsTab = new ReplaceInFilesPanel(m_book, wxID_ANY, wxGetTranslation(REPLACE_IN_FILES));
    m_book->AddPage(
        m_replaceResultsTab, wxGetTranslation(REPLACE_IN_FILES), false, bmpLoader->LoadBitmap(wxT("find_and_replace")));
    m_tabs.insert(std::make_pair(
        REPLACE_IN_FILES, Tab(REPLACE_IN_FILES, m_replaceResultsTab, bmpLoader->LoadBitmap(wxT("find_and_replace")))));
    mgr->AddOutputTab(REPLACE_IN_FILES);

    // Show Usage ("References")
    m_showUsageTab = new FindUsageTab(m_book, wxGetTranslation(SHOW_USAGE));
    m_book->AddPage(m_showUsageTab, wxGetTranslation(SHOW_USAGE), false, bmpLoader->LoadBitmap(wxT("find")));
    m_tabs.insert(
        std::make_pair(wxGetTranslation(SHOW_USAGE),
                       Tab(wxGetTranslation(SHOW_USAGE), m_showUsageTab, bmpLoader->LoadBitmap(wxT("find")))));
    mgr->AddOutputTab(wxGetTranslation(SHOW_USAGE));

    // Output tab
    m_outputWind = new OutputTab(m_book, wxID_ANY, wxGetTranslation(OUTPUT_WIN));
    m_book->AddPage(m_outputWind, wxGetTranslation(OUTPUT_WIN), false, bmpLoader->LoadBitmap(wxT("console")));
    m_tabs.insert(
        std::make_pair(wxGetTranslation(OUTPUT_WIN),
                       Tab(wxGetTranslation(OUTPUT_WIN), m_outputWind, bmpLoader->LoadBitmap(wxT("console")))));
    mgr->AddOutputTab(wxGetTranslation(OUTPUT_WIN));

#if HAS_LIBCLANG
    // Clang tab
    NewProjImgList images;
    m_clangOutputTab = new ClangOutputTab(m_book);
    m_book->AddPage(m_clangOutputTab, wxGetTranslation(CLANG_TAB), false, images.Bitmap("clang16"));
    m_tabs.insert(std::make_pair(wxGetTranslation(CLANG_TAB),
                                 Tab(wxGetTranslation(CLANG_TAB), m_clangOutputTab, images.Bitmap("clang16"))));
    mgr->AddOutputTab(wxGetTranslation(CLANG_TAB));
#endif

    wxTextCtrl* text = new wxTextCtrl(m_book,
                                      wxID_ANY,
                                      wxEmptyString,
                                      wxDefaultPosition,
                                      wxDefaultSize,
                                      wxTE_RICH2 | wxTE_MULTILINE | wxTE_READONLY | wxHSCROLL);

    /////////////////////////////////////
    // Set the trace's font & colors
    /////////////////////////////////////

    m_book->AddPage(text, wxGetTranslation(TRACE_TAB), false, bmpLoader->LoadBitmap("log"));
//.........这里部分代码省略.........
开发者ID:292388900,项目名称:codelite,代码行数:101,代码来源:output_pane.cpp

示例12: rect

wxCodeCompletionBox::wxCodeCompletionBox(wxWindow* parent, wxEvtHandler* eventObject, size_t flags)
    : wxCodeCompletionBoxBase(parent)
    , m_index(0)
    , m_stc(NULL)
    , m_startPos(wxNOT_FOUND)
    , m_useLightColours(false)
    , m_eventObject(eventObject)
    , m_tipWindow(NULL)
    , m_flags(flags)
{
    SetBackgroundStyle(wxBG_STYLE_PAINT);
    
    m_ccFont = DrawingUtils::GetDefaultFixedFont();
    SetCursor(wxCURSOR_HAND);

    // Calculate the size of the box
    int singleLineHeight = GetSingleLineHeight();
    int boxHeight = singleLineHeight * LINES_PER_PAGE;
    int boxWidth = BOX_WIDTH; // 100 pixels
    wxSize boxSize = wxSize(boxWidth, boxHeight);
    wxRect rect(boxSize);

    // Set the default bitmap list
    BitmapLoader* bmpLoader = clGetManager()->GetStdIcons();
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/class"));              // 0
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/struct"));             // 1
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/namespace"));          // 2
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/member_public"));      // 3
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/typedef"));            // 4
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/member_private"));     // 5
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/member_public"));      // 6
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/member_protected"));   // 7
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/function_private"));   // 8
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/function_public"));    // 9
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/function_protected")); // 10
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/typedef"));            // 11
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/enum"));               // 12
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/enumerator"));         // 13
    m_bitmaps.push_back(bmpLoader->LoadBitmap("mime/16/cpp"));              // 14
    m_bitmaps.push_back(bmpLoader->LoadBitmap("mime/16/h"));                // 15
    m_bitmaps.push_back(bmpLoader->LoadBitmap("mime/16/text"));             // 16
    m_bitmaps.push_back(bmpLoader->LoadBitmap("cc/16/cpp_keyword"));        // 17

    InitializeDefaultBitmaps();

    // Increase the size by 2 pixel for each dimension
    rect.Inflate(2, 2);
    SetSize(rect);
    m_canvas->SetBackgroundStyle(wxBG_STYLE_PAINT);
    m_canvas->Bind(wxEVT_LEFT_DOWN, &wxCodeCompletionBox::OnLeftDClick, this);
    m_canvas->Bind(wxEVT_LEFT_DCLICK, &wxCodeCompletionBox::OnLeftDClick, this);

    // Default colorus (dark theme)
    clColourPalette palette = DrawingUtils::GetColourPalette();

    m_lightBorder = wxColour("rgb(77, 77, 77)");
    m_darkBorder = wxColour("rgb(54, 54, 54)");
    m_penColour = palette.penColour;
    m_bgColour = palette.bgColour;
    m_textColour = palette.textColour;
    m_selectedTextColour = palette.selecteTextColour;
    m_selection = palette.selectionBgColour;
    m_scrollBgColour = wxColour("rgb(50, 50, 50)");

    IManager* manager = ::clGetManager();
    if(manager) {
        IEditor* editor = manager->GetActiveEditor();
        if(editor) {
            wxColour bgColour = editor->GetCtrl()->StyleGetBackground(0);
            if(!DrawingUtils::IsDark(bgColour)) {
                m_useLightColours = true;
                // Need bright colours
                m_lightBorder = *wxWHITE;
                m_darkBorder = wxColour("rgb(207, 207, 207)");
                m_scrollBgColour = wxColour("rgb(198, 198, 198)");
            }
        }
    }

    m_bmpDown = wxXmlResource::Get()->LoadBitmap("cc-box-down");
    m_bmpDownEnabled = m_bmpDown.ConvertToDisabled();

    m_bmpUp = wxXmlResource::Get()->LoadBitmap("cc-box-up");
    m_bmpUpEnabled = m_bmpUp.ConvertToDisabled();

    if(m_useLightColours) {
        // swap between the disabled and enabeld bitmaps
        {
            wxBitmap tmpBitmap;
            tmpBitmap = m_bmpDown;
            m_bmpDown = m_bmpDownEnabled;
            m_bmpDownEnabled = tmpBitmap;
        }

        {
            wxBitmap tmpBitmap;
            tmpBitmap = m_bmpUp;
            m_bmpUp = m_bmpUpEnabled;
            m_bmpUpEnabled = tmpBitmap;
        }
//.........这里部分代码省略.........
开发者ID:kluete,项目名称:codelite,代码行数:101,代码来源:wxCodeCompletionBox.cpp

示例13: DoShowCurrentMessage

void MessagePane::DoShowCurrentMessage()
{
    MessageDetails msg   = m_messages.CurrentMessage();
    wxString txt         = msg.message;

    m_buttonAction->Hide();
    m_buttonAction1->Hide();
    m_buttonAction2->Hide();
    m_DontAnnoyMeCheck->Hide();

    bool hasDefaultButton (false);
    if(msg.bmp.IsOk() == false) {
        BitmapLoader* bmpLoader = PluginManager::Get()->GetStdIcons();
        m_bitmap1->SetBitmap(bmpLoader->LoadBitmap(wxT("messages/48/info")));

    } else {
        m_bitmap1->SetBitmap(msg.bmp);

    }

    // display the buttons
    if (msg.btn1.buttonLabel.IsEmpty() == false) {
        m_buttonAction->SetLabel(msg.btn1.buttonLabel);
        m_buttonAction->Show();
        if(msg.btn1.isDefault) {
            m_buttonAction->SetDefault();
            hasDefaultButton = true;
        }
    }

    if (msg.btn2.buttonLabel.IsEmpty() == false) {
        m_buttonAction1->SetLabel(msg.btn2.buttonLabel);
        m_buttonAction1->Show();
        if(msg.btn2.isDefault) {
            m_buttonAction1->SetDefault();
            hasDefaultButton = true;
        }
    }

    if (msg.btn3.buttonLabel.IsEmpty() == false) {
        m_buttonAction2->SetLabel(msg.btn3.buttonLabel);
        m_buttonAction2->Show();
        if(msg.btn3.isDefault) {
            m_buttonAction2->SetDefault();
            hasDefaultButton = true;
        }
    }

    // Show hide button if needed and make the default if there is
    // no default button
    if(msg.showHideButton) {
        m_buttonClose->Show();
        if(!hasDefaultButton) {
            m_buttonClose->SetDefault();
        }
    } else {
        m_buttonClose->Hide();
    }

    m_staticTextMessage->SetLabel(txt);
    if (IsShown() == false) {
        Show();
    }

    // Show the NoSpam checkbox if needed
    m_DontAnnoyMeCheck->Show(msg.check.GetShowCheckbox());
    //Uncheck it, otherwise it will remember a stale 'tick' that the user subsequently reverted
    m_DontAnnoyMeCheck->SetValue(0);

    m_staticTextMessage->Fit();
    GetSizer()->Fit(this);
    GetParent()->GetSizer()->Layout();
    GetParent()->Refresh();
}
开发者ID:292388900,项目名称:codelite,代码行数:74,代码来源:message_pane.cpp

示例14: Init

void ErdPanel::Init(wxWindow* parent, IDbAdapter* dbAdapter)
{

    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

    ErdInfo* pInfo = new ErdInfo();
    pInfo->SetAdapterType(m_pDbAdapter->GetAdapterType());
    m_diagramManager.SetRootItem(pInfo);

    m_pFrameCanvas = new FrameCanvas(&m_diagramManager, dbAdapter, m_wxsfPanel, this, wxID_ANY);
    m_wxsfPanel->GetSizer()->Add(m_pFrameCanvas, 1, wxEXPAND, 2);
    m_wxsfPanel->Layout();

    m_nToolMode = modeDESIGN;

    BitmapLoader* bmpLoader = DatabaseExplorer::GetManager()->GetStdIcons();

    //	m_toolBarErd->SetToolBitmapSize(wxSize(16, 16));
    m_toolBarErd->AddTool(
        XRCID("IDT_OPEN"), _("Open"), bmpLoader->LoadBitmap(wxT("toolbars/16/standard/file_open")), _("Open diagram"));
    m_toolBarErd->AddTool(
        XRCID("IDT_SAVE"), _("Save"), bmpLoader->LoadBitmap(wxT("toolbars/16/standard/file_save")), _("Save diagram"));
    m_toolBarErd->AddTool(XRCID("IDT_ERD_SAVE_SQL"), _("Save SQL"), wxBitmap(export_sql_xpm), _("Save SQL"));
    m_toolBarErd->AddTool(XRCID("IDT_ERD_COMMIT"), _("Commit ERD"), wxBitmap(export_db_xpm), _("Commit ERD"));
    m_toolBarErd->AddTool(
        XRCID("IDT_ERD_SAVE_IMG"), _("Export canvas to image"), wxBitmap(export_img_xpm), _("Export canvas to image"));
    m_toolBarErd->AddSeparator();
    m_toolBarErd->AddTool(XRCID("IDT_PRINT"), _("Print"), wxBitmap(fileprint_xpm), _("Print diagram"));
    m_toolBarErd->AddTool(XRCID("IDT_PREVIEW"), _("Preview"), wxBitmap(filepreview_xpm), _("Print preview"));
    m_toolBarErd->AddSeparator();
    m_toolBarErd->AddTool(
        XRCID("IDT_COPY"), _("Copy"), bmpLoader->LoadBitmap(wxT("toolbars/16/standard/copy")), _("Copy item"));
    m_toolBarErd->AddTool(
        XRCID("IDT_CUT"), _("Cut"), bmpLoader->LoadBitmap(wxT("toolbars/16/standard/cut")), _("Cut item"));
    m_toolBarErd->AddTool(
        XRCID("IDT_PASTE"), _("Paste"), bmpLoader->LoadBitmap(wxT("toolbars/16/standard/paste")), _("Paste item"));
    m_toolBarErd->AddSeparator();
    m_toolBarErd->AddTool(
        XRCID("IDT_UNDO"), _("Undo"), bmpLoader->LoadBitmap(wxT("toolbars/16/standard/undo")), _("Undo"));
    m_toolBarErd->AddTool(
        XRCID("IDT_REDO"), _("Redo"), bmpLoader->LoadBitmap(wxT("toolbars/16/standard/redo")), _("Redo"));
    m_toolBarErd->AddSeparator();
    m_toolBarErd->AddTool(XRCID("IDT_ERD_TOOL"),
                          _("Tool"),
                          wxBitmap(Tool_xpm),
                          wxNullBitmap,
                          wxITEM_RADIO,
                          _("Design tool"),
                          _("Design tool"),
                          NULL);
    m_toolBarErd->AddTool(XRCID("IDT_ERD_TABLE"),
                          _("DBETable"),
                          bmpLoader->LoadBitmap(wxT("db-explorer/16/table")),
                          wxNullBitmap,
                          wxITEM_RADIO,
                          _("Database table"),
                          _("Database table"),
                          NULL);
    m_toolBarErd->AddTool(XRCID("IDT_ERD_VIEW"),
                          _("View"),
                          bmpLoader->LoadBitmap(wxT("toolbars/16/search/find")),
                          wxNullBitmap,
                          wxITEM_RADIO,
                          _("Database view"),
                          _("Database view"),
                          NULL);
    m_toolBarErd->AddTool(XRCID("IDT_ERD_LINE"),
                          _("Constraint 1:N"),
                          wxXmlResource::Get()->LoadBitmap(wxT("link_editor")),
                          wxNullBitmap,
                          wxITEM_RADIO,
                          _("Foreign key connection"),
                          _("Foreign key connection"),
                          NULL);
    m_toolBarErd->AddSeparator();
    m_toolBarErd->AddTool(
        XRCID("IDT_ERD_ALIGN_CIRCLE"), _("Align into circle"), wxBitmap(AlignCircle_xpm), _("Align into circle"));
    m_toolBarErd->AddTool(
        XRCID("IDT_ERD_ALIGN_MESH"), _("Align into mesh"), wxBitmap(AlignMesh_xpm), _("Align into mesh"));
    m_toolBarErd->AddTool(XRCID("IDT_ERD_ALIGN_VTREE"),
                          _("Align into vertical tree"),
                          wxBitmap(AlignVTree_xpm),
                          _("Align into vertical tree"));
    m_toolBarErd->AddTool(XRCID("IDT_ERD_ALIGN_HTREE"),
                          _("Align into horizontal tree"),
                          wxBitmap(AlignHTree_xpm),
                          _("Align into horizontal tree"));
    m_toolBarErd->AddSeparator();
    m_toolBarErd->AddTool(XRCID("IDT_ERD_ZOOM100"), _("Zoom 100%"), wxBitmap(Zoom100_xpm), _("Zoom 100%"));
    m_toolBarErd->AddTool(XRCID("IDT_ERD_ZOOMALL"), _("Zoom to all"), wxBitmap(ZoomAll_xpm), _("Zoom to all"));
    m_toolBarErd->Realize();

    wxAcceleratorEntry entries[4];
    entries[0].Set(wxACCEL_CTRL, (int)'C', XRCID("IDT_COPY"));
    entries[1].Set(wxACCEL_CTRL, (int)'X', XRCID("IDT_CUT"));
    entries[2].Set(wxACCEL_CTRL, (int)'V', XRCID("IDT_PASTE"));
    entries[3].Set(wxACCEL_CTRL, (int)'A', XRCID("IDT_SELECTALL"));
    wxAcceleratorTable accel(4, entries);
    SetAcceleratorTable(accel);
}
开发者ID:capturePointer,项目名称:codelite,代码行数:100,代码来源:ErdPanel.cpp

示例15: fn

OpenResourceDialog::OpenResourceDialog(wxWindow* parent, IManager* manager, const wxString& initialSelection)
    : OpenResourceDialogBase(parent)
    , m_manager(manager)
    , m_needRefresh(false)
    , m_lineNumber(wxNOT_FOUND)
{
    Hide();
    BitmapLoader* bmpLoader = m_manager->GetStdIcons();

    m_tagImgMap[wxT("class")] = bmpLoader->LoadBitmap(wxT("cc/16/class"));
    m_tagImgMap[wxT("struct")] = bmpLoader->LoadBitmap(wxT("cc/16/struct"));
    m_tagImgMap[wxT("namespace")] = bmpLoader->LoadBitmap(wxT("cc/16/namespace"));
    m_tagImgMap[wxT("typedef")] = bmpLoader->LoadBitmap(wxT("cc/16/typedef"));
    m_tagImgMap[wxT("member_private")] = bmpLoader->LoadBitmap(wxT("cc/16/member_private"));
    m_tagImgMap[wxT("member_public")] = bmpLoader->LoadBitmap(wxT("cc/16/member_public"));
    m_tagImgMap[wxT("member_protected")] = bmpLoader->LoadBitmap(wxT("cc/16/member_protected"));
    m_tagImgMap[wxT("function_private")] = bmpLoader->LoadBitmap(wxT("cc/16/function_private"));
    m_tagImgMap[wxT("function_public")] = bmpLoader->LoadBitmap(wxT("cc/16/function_public"));
    m_tagImgMap[wxT("function_protected")] = bmpLoader->LoadBitmap(wxT("cc/16/function_protected"));
    m_tagImgMap[wxT("enum")] = bmpLoader->LoadBitmap(wxT("cc/16/enum"));
    m_tagImgMap[wxT("cenum")] = bmpLoader->LoadBitmap(wxT("cc/16/enum"));
    m_tagImgMap[wxT("enumerator")] = bmpLoader->LoadBitmap(wxT("cc/16/enumerator"));
    m_tagImgMap[wxT("cpp")] = bmpLoader->LoadBitmap(wxT("mime-cpp"));
    m_tagImgMap[wxT("h")] = bmpLoader->LoadBitmap(wxT("mime-h"));
    m_tagImgMap[wxT("text")] = bmpLoader->LoadBitmap(wxT("mime-txt"));
    m_tagImgMap[wxT("c")] = bmpLoader->LoadBitmap(wxT("mime-c"));
    m_tagImgMap[wxT("wxfb")] = bmpLoader->LoadBitmap(wxT("blocks"));
    m_tagImgMap[wxT("wxcp")] = bmpLoader->LoadBitmap(wxT("blocks"));

    m_timer = new wxTimer(this, XRCID("OR_TIMER"));

    m_textCtrlResourceName->SetFocus();
    SetLabel(_("Open resource..."));

    SetMinClientSize(wxSize(600, 400));
    GetSizer()->Fit(this);

    SetName("OpenResourceDialog");
    WindowAttrManager::Load(this);

    // load all files from the workspace
    if(m_manager->IsWorkspaceOpen()) {
        wxArrayString projects;
        m_manager->GetWorkspace()->GetProjectList(projects);

        for(size_t i = 0; i < projects.GetCount(); i++) {
            ProjectPtr p = m_manager->GetWorkspace()->GetProject(projects.Item(i));
            if(p) {
                const Project::FilesMap_t& files = p->GetFiles();
                // convert std::vector to wxArrayString
                std::for_each(files.begin(), files.end(), [&](const Project::FilesMap_t::value_type& vt) {
                    wxFileName fn(vt.second->GetFilename());
                    m_files.insert(std::make_pair(fn.GetFullName(), fn.GetFullPath()));
                });
            }
        }
    }

    wxString lastStringTyped = clConfig::Get().Read("OpenResourceDialog/SearchString", wxString());
    // Set the initial selection
    // We use here 'SetValue' so an event will get fired and update the control
    if(!initialSelection.IsEmpty()) {
        m_textCtrlResourceName->SetValue(initialSelection);
        m_textCtrlResourceName->SelectAll();
    } else if(!lastStringTyped.IsEmpty()) {
        m_textCtrlResourceName->SetValue(lastStringTyped);
        m_textCtrlResourceName->SelectAll();
    }

    m_dataview->GetColumn(0)->SetWidth(400);
    m_dataview->GetColumn(1)->SetWidth(60);
    m_dataview->GetColumn(2)->SetWidth(500);

    bool showFiles = clConfig::Get().Read("OpenResourceDialog/ShowFiles", true);
    bool showSymbols = clConfig::Get().Read("OpenResourceDialog/ShowSymbols", true);
    m_checkBoxFiles->SetValue(showFiles);
    m_checkBoxShowSymbols->SetValue(showSymbols);
    CentreOnParent();
}
开发者ID:stahta01,项目名称:codelite,代码行数:79,代码来源:open_resource_dialog.cpp


注:本文中的BitmapLoader::LoadBitmap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。