wxImageList* Resources::GetTreeListIconList() { static wxImageList* icons = NULL; if (icons == NULL) { icons = new wxImageList( GetModuleIcon().GetWidth(), GetModuleIcon().GetHeight(), true, ICON_COUNT); // Important: Keep in sync with TreeListIconID enum. icons->Add(GetModuleIcon()); icons->Add(GetFolderIcon()); icons->Add(GetTypeIcon()); icons->Add(GetFunctionIcon()); icons->Add(GetVariableIcon()); icons->Add(GetAliasIcon()); icons->Add(GetConstantIcon()); icons->Add(GetTyperefIcon()); icons->Add(GetMetaIcon()); icons->Add(GetDebugIcon()); } return icons; }
void ListEmuBrowser::SetSelectedInfos() { if((oldSelectedItem == selectedItem) && (oldPageIndex == browser->GetPageIndex())) return; oldSelectedItem = selectedItem; oldPageIndex = browser->GetPageIndex(); infosWindow->RemoveAll(); if (infoIconImg) delete infoIconImg; if (infoTypeImg) delete infoTypeImg; if (infoNameTxt) delete infoNameTxt; if (infoSubnameTxt) delete infoSubnameTxt; if (infoIDTxt) delete infoIDTxt; if (infoSizeTxt) delete infoSizeTxt; if (pathTxt) delete pathTxt; if (infoPathTxt) delete infoPathTxt; infoIconImg = NULL; infoTypeImg = NULL; infoNameTxt = NULL; infoSubnameTxt = NULL; infoIDTxt = NULL; infoSizeTxt = NULL; pathTxt = NULL; infoPathTxt = NULL; int y = 18; int txtmaxwidth = infosWindow->GetWidth()-25; FoundSaveType(); infoTypeImg = new GuiImage(GetTypeIcon()); infoTypeImg->SetParent(infosWindow); infoTypeImg->SetWidescreen(Settings.Widescreen); infoTypeImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); infoTypeImg->SetPosition(-20, y); y += 2; infoIconImg = new GuiImage(fileSave); infoIconImg->SetParent(infosWindow); infoIconImg = GetSaveIcon(); infoIconImg->SetWidescreen(Settings.Widescreen); infoIconImg->SetAlignment(ALIGN_LEFT, ALIGN_TOP); infoIconImg->SetPosition(10, y); y += infoIconImg->GetHeight()+10; infoNameTxt = new GuiText(browser->GetItemEmuName(browser->GetPageIndex()+selectedItem), 17, thColor("r=0 g=0 b=0 a=255 - mainbrowser entry text color")); infoNameTxt->SetParent(infosWindow); infoNameTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); infoNameTxt->SetPosition(10, y); infoNameTxt->SetMaxWidth(txtmaxwidth, SCROLL_HORIZONTAL); y += 21; infoSubnameTxt = new GuiText(browser->GetItemEmuSubname(browser->GetPageIndex()+selectedItem), 15, thColor("r=0 g=0 b=0 a=255 - mainbrowser entry text color")); infoSubnameTxt->SetParent(infosWindow); infoSubnameTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); infoSubnameTxt->SetPosition(10, y); infoSubnameTxt->SetMaxWidth(txtmaxwidth, DOTTED); y += 28; std::string ID = tr( "ID:" ); ID += " "; ID += browser->GetItemEmuID(browser->GetPageIndex()+selectedItem); infoIDTxt = new GuiText(ID, 16, thColor("r=0 g=0 b=0 a=255 - mainbrowser entry text color")); infoIDTxt->SetParent(infosWindow); infoIDTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); infoIDTxt->SetPosition(10, y); infoIDTxt->SetMaxWidth(txtmaxwidth, DOTTED); y += 22; std::string size = tr( "Size:" ); size += fmt(" %0.f %s", ceil(browser->GetItemEmuBlocks(browser->GetPageIndex()+selectedItem)), tr( "Block(s)" )); infoSizeTxt = new GuiText(size, 16, thColor("r=0 g=0 b=0 a=255 - mainbrowser entry text color")); infoSizeTxt->SetParent(infosWindow); infoSizeTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); infoSizeTxt->SetPosition(10, y); infoSizeTxt->SetMaxWidth(txtmaxwidth, DOTTED); y += 22; int Y = -40; infoPathTxt = new GuiText(GetCurrentPath(), 16, thColor("r=0 g=0 b=0 a=255 - mainbrowser entry text color")); infoPathTxt->SetParent(infosWindow); infoPathTxt->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); infoPathTxt->SetPosition(10, Y); infoPathTxt->SetLinesToDraw(3); infoPathTxt->SetInterline(2); infoPathTxt->SetMaxWidth(txtmaxwidth, WRAP); Y -= 18; pathTxt = new GuiText(tr( "Path:" ), 16, thColor("r=0 g=0 b=0 a=255 - mainbrowser entry text color")); pathTxt->SetParent(infosWindow); pathTxt->SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM); pathTxt->SetPosition(10, Y); infosWindow->Append(infoIconImg); infosWindow->Append(infoTypeImg); infosWindow->Append(infoIDTxt); infosWindow->Append(infoNameTxt); infosWindow->Append(infoSubnameTxt); infosWindow->Append(infoSizeTxt); infosWindow->Append(pathTxt); infosWindow->Append(infoPathTxt); }
Add(wxS("package"), GetPackageIcon()); Add(wxS("parameter"), GetParameterIcon()); Add(CODE_PYTHON, GetPythonIcon()); Add(CODE_PHP, GetPHPIcon()); Add(wxS("private"), GetPrivateIcon()); Add(wxS("protected"), GetProtectedIcon()); Add(wxS("public"), GetPublicIcon()); Add(wxS("relation"), GetRelationIcon()); Add(wxS("inrelation"), wxBitmap(GetRelationIcon().ConvertToImage().Mirror(false))); Add(wxS("selftransition"), GetSelftransitionIcon()); Add(wxS("sequence"), GetSequenceIcon()); Add(wxS("statechart"), GetStatechartIcon()); Add(wxS("state"), GetStateIcon()); Add(wxS("static"), GetStaticIcon()); Add(wxS("terminate"), GetTerminateIcon()); Add(wxS("traced"), GetTracedIcon()); Add(wxS("tracable"), GetTracableIcon()); Add(wxS("transition"), GetTransitionIcon()); Add(wxS("type"), GetTypeIcon()); Add(wxS("usecasediagram"), GetUsecasediagramIcon()); Add(wxS("virtual"), GetVirtualIcon()); Add(wxS("website"), GetWebsiteIcon()); Add(wxS("inputparameter"), GetInputParameter()); Add(wxS("outputparameter"), GetOutputParameter()); Add(wxS("inoutparameter"), GetInOutParameter()); Add(wxS("port"), GetPortIcon()); Add(wxS("delegate"), GetDelegateIcon()); Add(wxS("found"), GetFoundIcon()); Add(wxS("hasfound"), GetHasFoundIcon()); Add(wxS("user/txt"), GetTxtIcon());