static void DOT_DrawAbout (PaneL p) { RecT r; Char str [60]; FonT titleFont=NULL; if (titleFont == NULL) { #ifdef WIN_MAC titleFont = GetFont ("Geneva", 18, TRUE, TRUE, FALSE, ""); #endif #ifdef WIN_MSWIN titleFont = GetFont ("Arial", 24, TRUE, TRUE, FALSE, ""); #endif #ifdef WIN_MOTIF titleFont = GetFont ("Courier", 24, TRUE, TRUE, FALSE, ""); #endif } sprintf (str, "Beta 1.05 [%s - %s]", date_of_compilation, time_of_compilation); ObjectRect (p, &r); InsetRect (&r, 4, 4); r.top += 10; Magenta (); DOT_CenterString (&r, " ~ D-Viewer ~", titleFont, 5); /* DOT_CenterString (&r, str, programFont, 10); */ /* CenterString (&r, "National Center for Biotechnology Information", systemFont, 5); CenterString (&r, "National Library of Medicine", systemFont, 5); CenterString (&r, "National Institutes of Health", systemFont, 10); */ }
/******************************************************************************* Function : DDV_DrawSequenceName() Purpose : draw the name of the sequence (left column of the DDV panel) Parameters : GrData; graphical data (font size, etc) ScaleStyle;style of the ParaG scale top, left; coord to start the draw Return value : none *******************************************************************************/ static void DDV_DrawSequenceName(UnDViewerGraphDataPtr GrData,ParaGPtr pgp, Int2 top,Int2 left,Int4 cur_row,Int4 CurEditRow,Int4 CurMasterRow) { SeqIdPtr sip = NULL; RecT rc; Int2 x,y,decal=1,size;/*text position/size*/ Char szAccess[21]; BioseqPtr bsp; /*get a name*/ bsp = BioseqLockById(pgp->sip); if(bsp) { sip = SeqIdFindBestAccession(bsp->id); BioseqUnlock(bsp); } if (!sip) sip = SeqIdFindBest(pgp->sip, 0); SeqIdWrite(sip, szAccess,PRINTID_TEXTID_ACCESSION, 20); /*compute position*/ if (pgp->ScaleStyle==SCALE_POS_TOP) decal++; /*draw name*/ size=StringWidth(szAccess); x=left/*-GrData->udv_scale.cxLeftScale*/-size; y=top+decal*GrData->udv_font.LineHeight; MoveTo(x,y); if (cur_row==CurEditRow){ Magenta(); } PaintString (szAccess); if (cur_row==CurMasterRow){ Blue(); MoveTo(x,y); LineTo(x+size,y); } /*draw a little box (for selection a full sequence)*/ left+=GrData->udv_font.cxChar; top+=GrData->udv_font.cxChar/2; LoadRect(&rc,left,top,left+GrData->udv_font.cxChar, top+GrData->udv_font.cxChar); Blue(); PaintOval(&rc); Black(); }
//============================================================================================== /*static*/ Color ConnState::ConvertStateToColor(EnumConnState enumConnState) { switch (enumConnState) { case NOCON_NEVER: return Gray(); case NOCON_WASSUCC: return Green(); case NOCON_WASFAIL: return Red(); case NOCON_UNDEF: return LtGray(); case NOCON_MISCONFIG: return Magenta(); case CONNECTING_START: return LtYellow(); case CONNECTING_YAWN: return Yellow(); case CONNECTING_2NDTRY: return LtMagenta(); case CONNECTING_3RDTRY: return White(); case CONNECTING_TIMEOUT: return Cyan(); case CON_SUCCEED: return LtGreen(); case CON_FAIL: return LtRed(); case CON_STALE: return LtBlue(); } return Black(); }