85 wxWindowID
id,
const wxPoint& pos,
const wxSize&
size,
long style )
102 wxPanel::Create( parent,
id, pos,
size, style );
107 GetSizer()->SetSizeHints(
this);
150 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
151 itemPanel1->SetSizer(itemBoxSizer2);
155 m_ScrolledWindow->SetToolTip(
_(
"The use of citations on features is discouraged. Use this to indicate citations that apply specifically to this feature."));
156 itemBoxSizer2->Add(
m_ScrolledWindow, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
158 m_Sizer =
new wxBoxSizer(wxVERTICAL);
167 int total_height = 0;
176 vector<TEntrezId> pmids;
177 vector<TEntrezId> muids;
179 vector<string> published_labels;
180 vector<string> unpublished_labels;
183 if (pmids.size() > 0) {
187 }
else if (muids.size() > 0) {
191 }
else if (serials.size() > 0) {
195 }
else if (published_labels.size() > 0) {
199 }
else if (unpublished_labels.size() > 0) {
216 int win_height, win_width;
217 checkbox->GetSize(&win_width, &win_height);
218 total_height += win_height;
219 scroll_rate = win_height;
220 if (total_width < win_width) {
221 total_width = win_width;
229 vector<TEntrezId> pmids;
230 vector<TEntrezId> muids;
232 vector<string> published_labels;
233 vector<string> unpublished_labels;
234 GetPubdescLabels(
fi->GetData().GetPub(), pmids, muids, serials, published_labels, unpublished_labels);
236 if (pmids.size() > 0) {
240 }
else if (muids.size() > 0) {
244 }
else if (serials.size() > 0) {
248 }
else if (published_labels.size() > 0) {
252 }
else if (unpublished_labels.size() > 0) {
262 fi->GetData().GetPub().GetPub().GetLabel(&
label);
269 int win_height, win_width;
270 checkbox->GetSize(&win_width, &win_height);
271 total_height += win_height;
272 scroll_rate = win_height;
273 if (total_width < win_width) {
274 total_width = win_width;
293 if (
a.IsSetSerial_number() &&
b.IsSetSerial_number()
294 &&
a.GetSerial_number() ==
b.GetSerial_number()) {
296 }
else if (
a.IsSetSerial_number() ||
b.IsSetSerial_number()) {
298 }
else if (
a.IsSetCit() &&
b.IsSetCit()) {
299 string x =
a.GetCit();
300 string y =
b.GetCit();
310 if (
a.IsGen() &&
b.IsGen()) {
312 }
else if (
a.IsPmid() &&
b.IsPmid()) {
313 return (
a.GetPmid().Get() ==
b.GetPmid().Get());
314 }
else if (
a.IsMuid() &&
b.IsMuid()) {
315 return (
a.GetMuid() ==
b.GetMuid());
324 if (!wxPanel::TransferDataToWindow())
348 if (!wxPanel::TransferDataFromWindow())
372 seq_feat.
SetCit().SetPub().push_back(cit);
static CRef< CScope > m_Scope
User-defined methods of the data storage class.
User-defined methods of the data storage class.
static bool s_DoPubsMatch(const CCit_gen &a, const CCit_gen &b)
virtual bool TransferDataFromWindow()
~CCitationsPanel()
Destructor.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void SetCitations(objects::CSeq_feat &seq_feat)
vector< wxCheckBox * > m_Checkboxes
wxScrolledWindow * m_ScrolledWindow
CCitationsPanel()
Constructors.
static bool ShowToolTips()
Should we show tooltips?
vector< CRef< objects::CPub > > m_PubList
virtual bool TransferDataToWindow()
void Init()
Initialises member variables.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
bool Create(wxWindow *parent, wxWindowID id=ID_CCITATIONSPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
void CreateControls()
Creates the controls and sizers.
objects::CScope * m_Scope
CRef< objects::CSeq_feat > m_EditedFeat
namespace ncbi::objects::
void GetLabel(string *const label, ELabelType label_type) const
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
objects::CBioseq_Handle GetBioseqForSeqFeat(const objects::CSeq_feat &f, objects::CScope &scope)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static const char label[]
void SetSerial_number(TSerial_number value)
Assign a value to Serial_number data member.
void SetCit(const TCit &value)
Assign a value to Cit data member.
TPmid & SetPmid(void)
Select the variant.
TMuid & SetMuid(void)
Select the variant.
list< CRef< CPub > > TPub
TGen & SetGen(void)
Select the variant.
void SetCit(TCit &value)
Assign a value to Cit data member.
void ResetCit(void)
Reset Cit data member.
@ e_Pub
publication applies to this seq
const TPub & GetPub(void) const
Get the variant data.
@ e_Pub
a reference to the publication
const struct ncbi::grid::netcache::search::fields::SIZE size
wxString ToWxString(const string &s)