本文整理汇总了C++中BitmapLoader类的典型用法代码示例。如果您正苦于以下问题:C++ BitmapLoader类的具体用法?C++ BitmapLoader怎么用?C++ BitmapLoader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BitmapLoader类的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");
}
示例2: PHPWorkspaceViewBase
PHPWorkspaceView::PHPWorkspaceView(wxWindow* parent, IManager* mgr)
: PHPWorkspaceViewBase(parent)
, m_mgr(mgr)
{
// Initialise images map
BitmapLoader* bmpLoader = m_mgr->GetStdIcons();
m_bitmaps = bmpLoader->MakeStandardMimeMap();
EventNotifier::Get()->Connect(
wxEVT_CMD_EXECUTE_ACTIVE_PROJECT, clExecuteEventHandler(PHPWorkspaceView::OnRunActiveProject), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_STOP_EXECUTED_PROGRAM, wxCommandEventHandler(PHPWorkspaceView::OnStopExecutedProgram), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_CMD_IS_PROGRAM_RUNNING, wxCommandEventHandler(PHPWorkspaceView::OnIsProgramRunning), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_ACTIVE_EDITOR_CHANGED, wxCommandEventHandler(PHPWorkspaceView::OnEditorChanged), NULL, this);
EventNotifier::Get()->Connect(wxEVT_PHP_FILE_RENAMED, PHPEventHandler(PHPWorkspaceView::OnFileRenamed), NULL, this);
EventNotifier::Get()->Connect(
wxEVT_PHP_WORKSPACE_RENAMED, PHPEventHandler(PHPWorkspaceView::OnWorkspaceRenamed), NULL, this);
EventNotifier::Get()->Bind(wxPHP_PARSE_ENDED, &PHPWorkspaceView::OnPhpParserDone, this);
EventNotifier::Get()->Bind(wxPHP_PARSE_PROGRESS, &PHPWorkspaceView::OnPhpParserProgress, this);
BitmapLoader* bl = m_mgr->GetStdIcons();
wxImageList* imageList = bl->MakeStandardMimeImageList();
m_treeCtrlView->AssignImageList(imageList);
}
示例3: m_manager
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");
}
示例4: 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();
}
示例5: dimensions
Texture CubeTransitionApp::LoadStageFillingTexture( const char* filepath )
{
ImageDimensions dimensions( Stage::GetCurrent().GetSize().x, Stage::GetCurrent().GetSize().y );
BitmapLoader loader = BitmapLoader::New( filepath, dimensions, FittingMode::SCALE_TO_FILL );
loader.Load();
PixelData pixelData = loader.GetPixelData();
Texture texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() );
texture.Upload( pixelData );
return texture;
}
示例6: ReconcileProjectDlgBaseClass
ReconcileProjectDlg::ReconcileProjectDlg(wxWindow* parent, const wxString& projname)
: ReconcileProjectDlgBaseClass(parent)
, m_projname(projname)
, m_projectModified(false)
{
BitmapLoader bl;
m_bitmaps = bl.MakeStandardMimeMap();
m_dvListCtrl1Unassigned->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(ReconcileProjectDlg::OnDVLCContextMenu), this);
WindowAttrManager::Load(this, wxT("ReconcileProjectDlg"), NULL);
}
示例7: GetPopupMenuSelectionFromUser
int
WelcomePage::DoGetPopupMenuSelection(wxCommandLinkButton* btn, const wxArrayString& strings, const wxString& menuTitle)
{
BitmapLoader bl;
BitmapLoader::BitmapMap_t bmps = bl.MakeStandardMimeMap();
m_idToName.clear();
wxUnusedVar(menuTitle);
wxMenu menu;
for(size_t i = 0; i < strings.GetCount(); i++) {
wxBitmap bmp = bmps[FileExtManager::TypeText];
wxString filename = strings.Item(i);
if(filename.Find("@") != wxNOT_FOUND) {
filename = filename.AfterFirst('@');
}
filename.Trim().Trim(false);
FileExtManager::FileType type = FileExtManager::GetType(filename);
if(bmps.count(type)) {
bmp = bmps[type];
}
wxMenuItem* item = new wxMenuItem(&menu, wxID_ANY, strings.Item(i));
item->SetBitmap(bmp);
m_idToName.insert(std::make_pair(item->GetId(), strings.Item(i)));
menu.Append(item);
}
// get the best position to show the menu
wxPoint pos = btn->GetPosition();
pos = m_scrollWin247->CalcScrolledPosition(pos);
pos.y += btn->GetSize().y;
#ifdef __WXGTK__
pos.y += 5;
pos.x += 5;
#elif defined(__WXMAC__)
pos.y += 10;
pos.x += 10;
#else // MSW
pos.y += 5;
pos.x += 5;
#endif
return GetPopupMenuSelectionFromUser(menu, pos);
}
示例8: OpenWindowsPanelBase
OpenWindowsPanel::OpenWindowsPanel(wxWindow* parent, const wxString& caption)
: OpenWindowsPanelBase(parent)
, m_caption(caption)
, m_mgr(PluginManager::Get())
, m_initDone(false)
, m_workspaceClosing(false)
, m_workspaceOpened(false)
{
BitmapLoader bmpLoader;
m_bitmaps = bmpLoader.MakeStandardMimeMap();
clConfig cfg;
m_auibar->ToggleTool(XRCID("TabsSortTool"), cfg.Read(kConfigTabsPaneSortAlphabetically, true));
EventNotifier::Get()->Connect(wxEVT_INIT_DONE, wxCommandEventHandler(OpenWindowsPanel::OnInitDone), NULL, this);
Bind(wxEVT_IDLE, &OpenWindowsPanel::OnIdle, this);
}
示例9: tb
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;
}
示例10: wxBoxSizer
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();
}
示例11: wxBoxSizer
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();
}
示例12: locker
void PHPWorkspaceView::LoadWorkspace()
{
wxString workspaceName;
workspaceName << PHPWorkspace::Get()->GetFilename().GetName();
wxWindowUpdateLocker locker(m_treeCtrlView);
m_treeCtrlView->DeleteAllItems();
// Add the root item
BitmapLoader* bl = m_mgr->GetStdIcons();
wxTreeItemId root = m_treeCtrlView->AddRoot(workspaceName,
bl->GetMimeImageId(PHPWorkspace::Get()->GetFilename().GetFullName()),
bl->GetMimeImageId(PHPWorkspace::Get()->GetFilename().GetFullName()),
new ItemData(ItemData::Kind_Workspace));
const PHPProject::Map_t& projects = PHPWorkspace::Get()->GetProjects();
// add projects
wxStringSet_t files;
PHPProject::Map_t::const_iterator iter_project = projects.begin();
for(; iter_project != projects.end(); ++iter_project) {
ItemData* data = new ItemData(ItemData::Kind_Project);
data->SetProjectName(iter_project->first);
data->SetActive(iter_project->second->IsActive());
wxTreeItemId projectItemId = m_treeCtrlView->AppendItem(root,
iter_project->second->GetName(),
bl->GetMimeImageId(FileExtManager::TypeProject),
bl->GetMimeImageId(FileExtManager::TypeProject),
data);
if(data->IsActive()) {
m_treeCtrlView->SetItemBold(projectItemId, true);
}
DoBuildProjectNode(projectItemId, iter_project->second);
}
if(m_treeCtrlView->HasChildren(root)) {
m_treeCtrlView->Expand(root);
}
}
示例13: 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"));
NAMESPACE_IMG_ID = bmpLoader->LoadBitmap(wxT("cc/16/namespace"));
WindowAttrManager::Load(this, wxT("OpenResourceDlg"), NULL);
SetSelectedItem(NULL);
}
示例14: CscopeTabBase
CscopeTab::CscopeTab( wxWindow* parent, IManager *mgr )
: CscopeTabBase( parent )
, m_table(NULL)
, m_mgr(mgr)
{
BitmapLoader bl;
m_bitmaps = bl.MakeStandardMimeMap();
CScopeConfData data;
m_mgr->GetConfigTool()->ReadObject(wxT("CscopeSettings"), &data);
const wxString SearchScope[] = { wxTRANSLATE("Entire Workspace"), wxTRANSLATE("Active Project") };
m_stringManager.AddStrings(sizeof(SearchScope)/sizeof(wxString), SearchScope, data.GetScanScope(), m_choiceSearchScope);
wxFont defFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
m_font = wxFont( defFont.GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
m_checkBoxUpdateDb->SetValue(data.GetRebuildOption());
m_checkBoxRevertedIndex->SetValue(data.GetBuildRevertedIndexOption());
SetMessage(_("Ready"), 0);
Clear(); // To make the Clear button UpdateUI work initially
EventNotifier::Get()->Connect(wxEVT_CL_THEME_CHANGED, wxCommandEventHandler(CscopeTab::OnThemeChanged), NULL, this);
}
示例15: 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;
}