DetailVisualization::DetailVisualization(Form ^ parentForm,Panel ^ parentPanel, GLsizei iWidth, GLsizei iHeight,ReadCSV read_csv_ref,Preprocessing_Data preprocessing_data_ref):VisualizationPanel(parentForm,parentPanel,iWidth,iHeight,read_csv_ref,preprocessing_data_ref){ title_string(); //Initialize mouse handler variable scale_x[2] = 0.0; scale_y[2] = 0.0; scale_z[2] = 0.0; scale_size[2] = 0.05; move_x[2] = 0.0; move_y[2] = 0.0; move_z[2] = 0.0; scale_factor[2] = 0.6; //Initialize window size windowWidth[2] = iWidth; windowHeight[2] = iHeight; }
void MapItemListRenderer::Draw(Canvas &canvas, const PixelRect rc, const TrafficMapItem &item, const DialogLook &dialog_look, const TrafficLook &traffic_look) { const PixelScalar line_height = rc.bottom - rc.top; const FlarmTraffic traffic = item.traffic; RasterPoint pt = { (PixelScalar)(rc.left + line_height / 2), (PixelScalar)(rc.top + line_height / 2) }; // Render the representation of the traffic icon TrafficRenderer::Draw(canvas, traffic_look, traffic, traffic.track, pt); // Now render the text information const Font &name_font = *dialog_look.list.font; const Font &small_font = *dialog_look.small_font; PixelScalar left = rc.left + line_height + Layout::FastScale(2); canvas.SetTextColor(COLOR_BLACK); StaticString<26> title_string(_("FLARM Traffic")); // Append name to the title, if it exists if (traffic.HasName()) { title_string.append(_T(" - ")); title_string.append(traffic.name); } canvas.Select(name_font); canvas.text_clipped(left, rc.top + Layout::FastScale(2), rc, title_string); StaticString<256> info_string(FlarmTraffic::GetTypeString(item.traffic.type)); // Generate the line of info about the target, if it's available if (traffic.altitude_available) { TCHAR tmp[15]; FormatUserAltitude(traffic.altitude, tmp, 15); info_string.AppendFormat(_T(" - %s: %s"), _("Altitude"), tmp); } if (traffic.climb_rate_avg30s_available) { TCHAR tmp[15]; FormatUserVerticalSpeed(traffic.climb_rate_avg30s, tmp, 15); info_string.AppendFormat(_T(" - %s: %s"), _("Vario"), tmp); } canvas.Select(small_font); canvas.text_clipped(left, rc.top + name_font.GetHeight() + Layout::FastScale(4), rc, info_string); }
LLDebugVarMessageBox* LLDebugVarMessageBox::show(const std::string& title, EDebugVarType var_type, void *var) { std::string title_string(title); LLDebugVarMessageBox *box = sInstances[title_string]; if (!box) { box = new LLDebugVarMessageBox(title, var_type, var); sInstances[title_string] = box; gFloaterView->addChild(box); box->reshape(200,150); box->open(); /*Flawfinder: ignore*/ box->mTitle = title_string; } return box; }
void CSysArgMenu::SysArg_SetTitle(int num, struct _Sys_Arg_info *arg_info) { DBG_PRINT(("进入SysArg_SetTitle函数")); char str_val[30], str_No[5]; string title_string(""), errStr(""); if (ReadArgByID(arg_info->id, errStr) != SUCCESS) { DBG_PRINT(("ReadArgByID函数执行失败")); //this->ShowMsg(errStr); } sprintf(str_No, "%u.", arg_info->id); title_string = str_No; title_string += arg_info->name; if (*(arg_info->item[0])!=0 && m_sysArg->m_vInt<5) { if (arg_info->id == SYS_DEFAULT_PAYER_NAME) { sprintf(str_val, ":%s", m_sysArg->m_vText.c_str()); } else { sprintf(str_val, ":%s", arg_info->item[m_sysArg->m_vInt]); } } else { sprintf(str_val, ":%u", m_sysArg->m_vInt); DBG_PRINT(("m_sysArg->m_vInt : %u", m_sysArg->m_vInt)); } title_string += str_val; DBG_PRINT(("title_string : %s", title_string.c_str())); SetTitle(num, title_string.c_str()); DBG_PRINT(("退出SysArg_SetTitle函数")); }