43 #include <wx/dcclient.h>
44 #include <wx/txtstrm.h>
50 : m_Bioseq(h), m_From(from), m_Length(length)
78 static CTextStyle errStyle(255,0,0,255,255,255,wxTRANSPARENT,
false,
false);
79 static string err_msg_saved;
88 seq.append(
string(
m_Length - seq.length(),
'-'));
96 size_t i, from, length,
99 if (err_msg.empty()) {
104 ostream << seq.substr(from, length) <<
NewLine();
113 ostream << err_msg <<
NewLine();
118 if (err_msg_saved != err_msg) {
119 err_msg_saved = err_msg;
120 LOG_POST(
Error <<
"CException in CFastaSeqBlockItem::x_RenderText: " << err_msg);
virtual const CConstRef< CObject > GetAssosiatedObject() const
CRef< objects::CSeq_loc > m_Loc
virtual size_t GetLineCount() const
virtual void x_RenderText(CStyledTextOStream &ostream, CTextPanelContext *context) const
const objects::CBioseq_Handle m_Bioseq
virtual void CalcSize(wxDC &dc, CTextPanelContext *context)
CFastaSeqBlockItem(const objects::CBioseq_Handle &h, size_t from, size_t length)
Base class for all object manager exceptions.
virtual int GetLeftMargin() const
unsigned int TSeqPos
Type for sequence locations and lengths.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
void SetIupacCoding(void)
Set coding to either Iupacaa or Iupacna depending on molecule type.
TObjectType * GetPointerOrNull(void) THROWS_NONE
Get pointer value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const struct ncbi::grid::netcache::search::fields::SIZE size