IMPLEMENT_APP(Cn3D::Cn3DApp)
110 constwxPoint& pos = wxDefaultPosition,
constwxSize&
size= wxDefaultSize) :
112wxDEFAULT_FRAME_STYLE
113#
ifdefined(__WXMSW__)
114| wxFRAME_TOOL_WINDOW | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT
119SetIcon(wxICON(cn3d));
126DECLARE_EVENT_TABLE()
129BEGIN_EVENT_TABLE(
MsgFrame, wxFrame)
135 if(event.CanVeto()) {
153diagMsg.
Write(errMsg);
159 static boolavoidRecursion =
false;
160 if(!avoidRecursion) {
161avoidRecursion =
true;
162wxMessageDialog dlg(
NULL, errMsg.c_str(),
"Severe Error!", wxOK | wxCENTRE | wxICON_EXCLAMATION);
164avoidRecursion =
false;
181 backLog.push_back(errMsg.c_str());
189 logFrame=
new MsgFrame(
"Cn3D Message Log", wxPoint(500, 0), wxSize(500, 500));
193wxMenuBar *menuBar =
newwxMenuBar;
198wxPoint(0,0),
logFrame->GetClientSize(), wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxHSCROLL);
208 #if defined(__WXMSW__) 215BEGIN_EVENT_TABLE(
Cn3DApp, wxApp
)
246 INFOMSG(
"Built "<< __DATE__ <<
" with wxWidgets "<< wxVERSION_NUM_DOT_STRING);
249 INFOMSG(
"This is a debug build");
251 INFOMSG(
"This is a release build");
253 #ifdef _USE_TEST_MMDBSRV_ 254 INFOMSG(
"This build uses a test mmdbsrv");
256 INFOMSG(
"This build uses the standard mmdbsrv");
260 static constwxCmdLineEntryDesc cmdLineDesc[] = {
261{ wxCMD_LINE_SWITCH,
"h",
"help",
"show this help message",
262wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
263{ wxCMD_LINE_SWITCH,
"r",
"readonly",
"message file is read-only",
264wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
265{ wxCMD_LINE_SWITCH,
"i",
"imports",
"show imports window on startup",
266wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
267{ wxCMD_LINE_SWITCH,
"n",
"noalign",
"do not show alignment window on startup",
268wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
269{ wxCMD_LINE_SWITCH,
"f",
"force",
"force saves to same file",
270wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
271{ wxCMD_LINE_OPTION,
"m",
"message",
"message file",
272wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
273{ wxCMD_LINE_OPTION,
"a",
"targetapp",
"messaging target application name",
274wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
275{ wxCMD_LINE_OPTION,
"o",
"model",
"model choice: alpha, single, or PDB",
276wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
277{ wxCMD_LINE_OPTION,
"d",
"id",
"MMDB/PDB ID to load via network",
278wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
279{ wxCMD_LINE_OPTION,
"s",
"style",
"preferred favorite style",
280wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
281{ wxCMD_LINE_PARAM,
NULL,
NULL,
"input file",
282wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL},
289 case0:
TRACEMSG(
"command line parsed successfully");
break;
290 default:
return false;
294wxFileSystem::AddHandler(
newwxZipFSHandler);
300wxString dictFile = wxString(
GetDataDir().c_str()) +
"bstdt.val";
317SetExitOnFrameDelete(
true);
321 boolshowLog =
false;
334 if(modelStr ==
"alpha")
336 else if(modelStr ==
"single")
338 else if(modelStr ==
"PDB")
341 ERRORMSG(
"Model type (-o) must be one of alpha|single|PDB");
346wxString filename =
commandLine.GetParam(0).c_str();
347 INFOMSG(
"command line file: "<< filename.c_str());
366 ERRORMSG(
"-o requires either -d or Biostruc file name");
377wxString messageFilename;
378 if(
commandLine.Found(
"m", &messageFilename)) {
381messageApp =
"Listener";
424 #if wxCHECK_VERSION(2,9,0) 427wxApp::OnIdle(event);
433 voidCn3DApp::MacOpenFile(
constwxString& filename)
435 if(filename.size() > 0) {
436 INFOMSG(
"apple open event file: "<< filename);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
void LoadStandardDictionary(const char *filename)
void DeleteStandardDictionary(void)
void ShowUpdateWindow(void) const
unsigned int NUpdates(void) const
wxCmdLineParser commandLine
StructureWindow * structureWindow
void OnIdle(wxIdleEvent &event)
OpenGLRenderer * renderer
StructureSet * structureSet
void ProcessRedraws(void)
MsgFrame(const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
void OnCloseWindow(wxCloseEvent &event)
void AttachStructureSet(StructureSet *targetStructureSet)
AlignmentManager * alignmentManager
void SetPreferredFavoriteStyle(const std::string &s)
void SetupFileMessenger(const std::string &messageFilename, const std::string &messageApp, bool readOnly)
bool LoadData(const char *filename, bool force, bool noAlignmentWindow, ncbi::objects::CNcbi_mime_asn1 *mimeData=NULL)
static list< string > backLog
void DisplayDiagnostic(const SDiagMessage &diagMsg)
void SetDialogSevereErrors(bool status)
void RaiseLogWindow(void)
wxFrame * GlobalTopWindow(void)
static wxFrame * topWindow
static bool dialogSevereErrors
static MsgFrame * logFrame
bool IsWindowedMode(void)
CNcbi_mime_asn1 * LoadStructureViaCache(const std::string &uid, ncbi::objects::EModel_type modelType, int assemblyId)
Include a standard set of the NCBI C++ Toolkit most basic headers.
CNcbi_mime_asn1 * CreateMimeFromBiostruc(const string &filename, EModel_type model)
void Write(string &str, TDiagWriteFlags flags=fNone) const
Binary OR of "EDiagWriteFlags".
void SetDiagPostFlag(EDiagPostFlag flag)
Set the specified flag (globally).
EDiagSev m_Severity
Severity level.
void UnsetDiagTraceFlag(EDiagPostFlag flag)
EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)
Set the threshold severity for posting the messages.
void SetDiagHandler(CDiagHandler *handler, bool can_delete=true)
Set the diagnostic handler using the specified diagnostic handler class.
void SetDiagTrace(EDiagTrace how, EDiagTrace dflt=eDT_Default)
Set the diagnostic trace settings.
void SetDiagStream(CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")
Set diagnostic stream.
@ eDPF_Location
Include class and function if any.
@ eDPF_File
File name (not full path)
@ eDT_Default
Restores the default tracing context.
@ eDiag_Trace
Trace message.
@ eDiag_Info
Informational message.
@ eDiag_Error
Error message.
static void SetVerifyDataGlobal(ESerialVerifyData verify)
@ eSerialVerifyData_Always
always verify (even if set not to later on)
static void SetVerifyDataGlobal(ESerialVerifyData verify)
Set up default output data verification for streams created by the current process.
static void SetVerifyDataGlobal(ESerialVerifyData verify)
Set up default input data verification for streams created by the current process.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
EModel_type
Access to EModel_type's attributes (values, names) as defined in spec.
@ eModel_type_ncbi_all_atom
@ eModel_type_ncbi_backbone
if(yy_accept[yy_current_state])
Messenger * GlobalMessenger(void)
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines: CTimeFormat - storage class for time format.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4