void SequenceViewer::DisplayAlignment(BlockMultipleAlignment *alignment) { SequenceDisplay *display = new SequenceDisplay(true, viewerWindow); for (unsigned int row=0; row<alignment->NRows(); ++row) display->AddRowFromAlignment(row, alignment); // set starting scroll to a few residues left of the first aligned block display->SetStartingColumn(alignment->GetFirstAlignedBlockPosition() - 5); AlignmentList alignments; alignments.push_back(alignment); InitData(&alignments, display); if (sequenceWindow) sequenceWindow->UpdateDisplay(display); else if (IsWindowedMode()) CreateSequenceWindow(false); }
void SequenceViewer::DisplaySequences(const SequenceList *sequenceList) { SequenceDisplay *display = new SequenceDisplay(false, viewerWindow); // populate each line of the display with one sequence, with blank lines inbetween SequenceList::const_iterator s, se = sequenceList->end(); for (s=sequenceList->begin(); s!=se; ++s) { // only do sequences from structure if this is a single-structure data file if (!(*s)->parentSet->IsMultiStructure() && (*s)->parentSet->objects.front()->mmdbID != (*s)->identifier->mmdbID) continue; if (display->NRows() > 0) display->AddRowFromString(""); // whole sequence on one row display->AddRowFromSequence(*s, 0, (*s)->Length() - 1); } InitData(NULL, display); if (sequenceWindow) sequenceWindow->UpdateDisplay(display); else if (IsWindowedMode()) CreateSequenceWindow(false); }
static void SetRegistryDefaults(void) { // default log window startup RegistrySetBoolean(REG_CONFIG_SECTION, REG_SHOW_LOG_ON_START, false); RegistrySetString(REG_CONFIG_SECTION, REG_FAVORITES_NAME, NO_FAVORITES_FILE); RegistrySetInteger(REG_CONFIG_SECTION, REG_MT_DIALOG_POS_X, 50); RegistrySetInteger(REG_CONFIG_SECTION, REG_MT_DIALOG_POS_Y, 50); RegistrySetInteger(REG_CONFIG_SECTION, REG_MT_DIALOG_SIZE_W, 400); RegistrySetInteger(REG_CONFIG_SECTION, REG_MT_DIALOG_SIZE_H, 400); // default animation controls RegistrySetInteger(REG_ANIMATION_SECTION, REG_SPIN_DELAY, 50); RegistrySetDouble(REG_ANIMATION_SECTION, REG_SPIN_INCREMENT, 2.0), RegistrySetInteger(REG_ANIMATION_SECTION, REG_FRAME_DELAY, 500); // default quality settings RegistrySetInteger(REG_QUALITY_SECTION, REG_QUALITY_ATOM_SLICES, 10); RegistrySetInteger(REG_QUALITY_SECTION, REG_QUALITY_ATOM_STACKS, 8); RegistrySetInteger(REG_QUALITY_SECTION, REG_QUALITY_BOND_SIDES, 6); RegistrySetInteger(REG_QUALITY_SECTION, REG_QUALITY_WORM_SIDES, 6); RegistrySetInteger(REG_QUALITY_SECTION, REG_QUALITY_WORM_SEGMENTS, 6); RegistrySetInteger(REG_QUALITY_SECTION, REG_QUALITY_HELIX_SIDES, 12); RegistrySetBoolean(REG_QUALITY_SECTION, REG_HIGHLIGHTS_ON, true); RegistrySetString(REG_QUALITY_SECTION, REG_PROJECTION_TYPE, "Perspective"); if (IsWindowedMode()) { // default font for OpenGL (structure window) wxFont *font = wxFont::New( #if defined(__WXMSW__) 12, #elif defined(__WXGTK__) 14, #elif defined(__WXMAC__) 14, #endif wxSWISS, wxNORMAL, wxBOLD, false); if (font && font->Ok()) RegistrySetString(REG_OPENGL_FONT_SECTION, REG_FONT_NATIVE_FONT_INFO, font->GetNativeFontInfoDesc().c_str()); else ERRORMSG("Can't create default structure window font"); if (font) delete font; // default font for sequence viewers font = wxFont::New( #if defined(__WXMSW__) 10, #elif defined(__WXGTK__) 14, #elif defined(__WXMAC__) 12, #endif wxROMAN, wxNORMAL, wxNORMAL, false); if (font && font->Ok()) RegistrySetString(REG_SEQUENCE_FONT_SECTION, REG_FONT_NATIVE_FONT_INFO, font->GetNativeFontInfoDesc().c_str()); else ERRORMSG("Can't create default sequence window font"); if (font) delete font; } // default cache settings RegistrySetBoolean(REG_CACHE_SECTION, REG_CACHE_ENABLED, true); if (GetPrefsDir().size() > 0) RegistrySetString(REG_CACHE_SECTION, REG_CACHE_FOLDER, GetPrefsDir() + "cache"); else RegistrySetString(REG_CACHE_SECTION, REG_CACHE_FOLDER, GetProgramDir() + "cache"); RegistrySetInteger(REG_CACHE_SECTION, REG_CACHE_MAX_SIZE, 25); // default advanced options RegistrySetBoolean(REG_ADVANCED_SECTION, REG_CDD_ANNOT_READONLY, true); #ifdef __WXGTK__ RegistrySetString(REG_ADVANCED_SECTION, REG_BROWSER_LAUNCH, // for launching netscape in a separate window "( netscape -noraise -remote 'openURL(<URL>,new-window)' || netscape '<URL>' ) >/dev/null 2>&1 &" // for launching netscape in an existing window // "( netscape -raise -remote 'openURL(<URL>)' || netscape '<URL>' ) >/dev/null 2>&1 &" ); #endif RegistrySetInteger(REG_ADVANCED_SECTION, REG_MAX_N_STRUCTS, 10); RegistrySetInteger(REG_ADVANCED_SECTION, REG_FOOTPRINT_RES, 0); // default stereo options RegistrySetDouble(REG_ADVANCED_SECTION, REG_STEREO_SEPARATION, 5.0); RegistrySetBoolean(REG_ADVANCED_SECTION, REG_PROXIMAL_STEREO, true); }