<< id); \
103 #define ANNOT_FROM_CLIENT_DATA(listbox) \ 104 (reinterpret_cast < StyleManager::UserAnnotation * > \ 105 ((listbox)->GetClientData((listbox)->GetSelection()))) 114wxDialog(parent, -1, "User Annotations", wxPoint(400, 100), wxDefaultSize, wxDEFAULT_DIALOG_STYLE),
115styleManager(manager), structureSet(
set)
130topSizer->Fit(
this);
131topSizer->SetSizeHints(
this);
142 switch(event.GetId()) {
164 ERRORMSG(
"AnnotateDialog::OnButton() - error highlighting annotation #" 174MoveUserAnnotation(annotation, (event.GetId() ==
ID_B_MOVE_UP)))
177 ERRORMSG(
"AnnotateDialog::OnButton() - error reprioritizing annotation #" 185 if(listBox->GetSelection() >= 0) {
188DisplayUserAnnotation(annotation, (event.GetId() ==
ID_B_TURN_ON)))
191 ERRORMSG(
"AnnotateDialog::OnButton() - error toggling annotation #" 192<< listBox->GetSelection());
214 for(o=0; o<otherBox->GetCount(); ++o) otherBox->SetSelection(o,
false);
217 for(e=0; e<eventBox->GetCount(); ++e) {
218 if(eventBox->IsSelected(e)) {
219 for(o=0; o<otherBox->GetCount(); ++o) {
220 if(otherBox->GetClientData(o) == eventBox->GetClientData(e)) {
221otherBox->SetSelection(o,
true);
248 boolavailableSelected = (
available->GetSelection() >= 0);
249 booldisplayedSelected = (displayed->GetSelection() >= 0);
250bTurnOn->Enable(availableSelected && !displayedSelected);
251bTurnOff->Enable(displayedSelected);
252bMoveUp->Enable(availableSelected &&
available->GetSelection() > 0);
253bMoveDown->Enable(availableSelected &&
available->GetSelection() < (
int)
available->GetCount() - 1);
256bEdit->Enable(availableSelected);
258bDelete->Enable(availableSelected);
260bShow->Enable(availableSelected);
262 if(availableSelected) {
265 ERRORMSG(
"AnnotateDialog::SetButtonStates() - NULL annotation pointer");
267tName->SetLabel(annotation ? annotation->
name.c_str() :
"");
268tDescr->SetLabel(annotation ? annotation->
description.c_str() :
"");
277StyleManager::UserAnnotationList::iterator
l,
le= annotations.end();
280 void*selection =
NULL;
283 else if(annotations.size() > 0) {
284 for(
l=annotations.begin();
l!=
le; ++
l) {
285 if((*l)->isDisplayed) {
286selection =
l->GetPointer();
291selection = annotations.front().GetPointer();
298 for(
i=0,
l=annotations.begin();
l!=
le; ++
i, ++
l) {
299 available->Append((*l)->name.c_str(),
l->GetPointer());
300 if(selection ==
l->GetPointer())
302 if((*l)->isDisplayed) {
303displayed->Append((*l)->name.c_str(),
l->GetPointer());
304 if(selection ==
l->GetPointer())
305displayed->SetSelection(
id,
true);
315 if(!newAnnotation)
return;
316newAnnotation->
name=
"(new)";
321 ERRORMSG(
"AnnotateDialog::NewAnnotation() - error setting up new annotation");
331 int result= dialog.ShowModal();
337newAnnotation->
name= tName->GetValue().c_str();
339newAnnotation->
description= tDescr->GetValue().c_str();
347 ERRORMSG(
"AnnotateDialog::NewAnnotation() - error removing new annotation");
356 if(
available->GetSelection() < 0)
return;
360 ERRORMSG(
"AnnotateDialog::EditAnnotation() - error getting annotation and style");
367 int result= dialog.ShowModal();
372annotation->
name= tName->GetValue().c_str();
374annotation->
description= tDescr->GetValue().c_str();
387 if(
available->GetSelection() < 0)
return;
390 ERRORMSG(
"AnnotateDialog::MoveAnnotation() - NULL annotation pointer");
396message.Printf(
"This will move the coverage of annotation '%s'\n" 397 "to the currently highlighted region. Is this correct?",
available->GetStringSelection().c_str());
398 int result= wxMessageBox(message,
"Confirmation", wxOK | wxCANCEL | wxCENTRE,
this);
412 if(
available->GetSelection() < 0)
return;
415 ERRORMSG(
"AnnotateDialog::DeleteAnnotation() - NULL annotation pointer");
421message.Printf(
"This will permanently remove the annotation\n" 422 "'%s'. Is this correct?",
available->GetStringSelection().c_str());
423 int result= wxMessageBox(message,
"Confirmation", wxOK | wxCANCEL | wxCENTRE,
this);
442wxDialog(parent, -1, "Edit Annotation", wxPoint(450, 200), wxDefaultSize, wxDEFAULT_DIALOG_STYLE),
443styleSettings(settings), structureSet(
set)
450tName->SetValue(initialText.name.c_str());
452tDescr->SetValue(initialText.description.c_str());
455topSizer->Fit(
this);
456topSizer->SetSizeHints(
this);
460tName->SetSelection(0, initialText.name.size());
471 switch(event.GetId()) {
479 if(tName->GetValue().size() == 0)
480wxMessageBox(
"The annotation must have a name!",
481 "Input Error", wxOK | wxCENTRE | wxICON_ERROR,
this);
504wxBoxSizer *item0 =
newwxBoxSizer( wxVERTICAL );
506wxStaticBox *item2 =
newwxStaticBox( parent, -1,
"Annotation Control");
507wxStaticBoxSizer *item1 =
newwxStaticBoxSizer( item2, wxVERTICAL );
509wxFlexGridSizer *item3 =
newwxFlexGridSizer( 2, 0, 0, 0 );
510item3->AddGrowableCol( 0 );
511item3->AddGrowableCol( 2 );
513wxStaticText *item4 =
newwxStaticText( parent,
ID_TEXT,
"Available", wxDefaultPosition, wxDefaultSize, 0 );
514item3->Add( item4, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );
516item3->Add( 5, 5, 0, wxALIGN_CENTRE|wxALL, 5 );
518wxStaticText *item5 =
newwxStaticText( parent,
ID_TEXT,
"Displayed", wxDefaultPosition, wxDefaultSize, 0 );
519item3->Add( item5, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );
521wxString *strs6 = (wxString*)
NULL;
522wxListBox *item6 =
newwxListBox( parent,
ID_L_AVAILABLE, wxDefaultPosition, wxSize(120,-1), 0, strs6, wxLB_SINGLE );
523item3->Add( item6, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
525wxFlexGridSizer *item7 =
newwxFlexGridSizer( 1, 0, 0 );
527wxButton *item8 =
newwxButton( parent,
ID_B_TURN_ON,
"Turn On", wxDefaultPosition, wxDefaultSize, 0 );
528item8->SetToolTip(
"Display the selected annotation");
529item8->Enable(
FALSE);
530item7->Add( item8, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
532wxButton *item9 =
newwxButton( parent,
ID_B_TURN_OFF,
"Turn Off", wxDefaultPosition, wxDefaultSize, 0 );
533item9->SetToolTip(
"Hide the selected annotation");
534item9->Enable(
FALSE);
535item7->Add( item9, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
537item7->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );
539wxButton *item10 =
newwxButton( parent,
ID_B_MOVE_UP,
"Move Up", wxDefaultPosition, wxDefaultSize, 0 );
540item10->SetToolTip(
"Move annotation up in priority");
541item10->Enable(
FALSE);
542item7->Add( item10, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
544wxButton *item11 =
newwxButton( parent,
ID_B_MOVE_DOWN,
"Move Down", wxDefaultPosition, wxDefaultSize, 0 );
545item11->SetToolTip(
"Move annotation down in priority");
546item11->Enable(
FALSE);
547item7->Add( item11, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
549item3->Add( item7, 0, wxALIGN_CENTRE, 5 );
551wxString *strs12 = (wxString*)
NULL;
552wxListBox *item12 =
newwxListBox( parent,
ID_L_DISPLAYED, wxDefaultPosition, wxSize(120,-1), 0, strs12, wxLB_SINGLE );
553item3->Add( item12, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
555item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
557wxStaticLine *item13 =
newwxStaticLine( parent,
ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
558item1->Add( item13, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
560wxFlexGridSizer *item14 =
newwxFlexGridSizer( 2, 0, 0, 0 );
561item14->AddGrowableCol( 1 );
563wxStaticText *item15 =
newwxStaticText( parent,
ID_TEXT,
"Selection:", wxDefaultPosition, wxDefaultSize, 0 );
564item14->Add( item15, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
566wxFlexGridSizer *item16 =
newwxFlexGridSizer( 1, 0, 0, 0 );
567item16->AddGrowableCol( 0 );
569wxStaticText *item17 =
newwxStaticText( parent,
ID_ST_NAME,
"", wxDefaultPosition, wxSize(120,-1), 0 );
570item16->Add( item17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
572wxButton *item18 =
newwxButton( parent,
ID_B_NEW,
"New", wxDefaultPosition, wxDefaultSize, 0 );
573item16->Add( item18, 0, wxALIGN_CENTRE|wxALL, 5 );
575item14->Add( item16, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
577wxStaticText *item19 =
newwxStaticText( parent,
ID_TEXT,
"Description:", wxDefaultPosition, wxDefaultSize, 0 );
578item14->Add( item19, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
580wxStaticText *item20 =
newwxStaticText( parent,
ID_ST_DESCR,
"", wxDefaultPosition, wxDefaultSize, 0 );
581item14->Add( item20, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
583item1->Add( item14, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
585wxStaticLine *item21 =
newwxStaticLine( parent,
ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
586item1->Add( item21, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
588wxBoxSizer *item22 =
newwxBoxSizer( wxHORIZONTAL );
590wxButton *item23 =
newwxButton( parent,
ID_B_SHOW,
"Show", wxDefaultPosition, wxDefaultSize, 0 );
591item22->Add( item23, 0, wxALIGN_CENTRE|wxALL, 5 );
593wxButton *item24 =
newwxButton( parent,
ID_B_EDIT,
"Edit", wxDefaultPosition, wxDefaultSize, 0 );
594item24->Enable(
FALSE);
595item22->Add( item24, 0, wxALIGN_CENTRE|wxALL, 5 );
597wxButton *item25 =
newwxButton( parent,
ID_B_MOVE,
"Move", wxDefaultPosition, wxDefaultSize, 0 );
598item25->Enable(
FALSE);
599item22->Add( item25, 0, wxALIGN_CENTRE|wxALL, 5 );
601wxButton *item26 =
newwxButton( parent,
ID_B_DELETE,
"Delete", wxDefaultPosition, wxDefaultSize, 0 );
602item26->Enable(
FALSE);
603item22->Add( item26, 0, wxALIGN_CENTRE|wxALL, 5 );
605item1->Add( item22, 0, wxALIGN_CENTRE|wxALL, 5 );
607item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
609wxBoxSizer *item27 =
newwxBoxSizer( wxHORIZONTAL );
611wxButton *item28 =
newwxButton( parent,
ID_B_DONE,
"Done", wxDefaultPosition, wxDefaultSize, 0 );
612item28->SetDefault();
613item27->Add( item28, 0, wxALIGN_CENTRE|wxALL, 5 );
615item0->Add( item27, 0, wxALIGN_CENTRE|wxALL, 5 );
619parent->SetAutoLayout(
TRUE);
620parent->SetSizer( item0 );
623item0->Fit( parent );
624item0->SetSizeHints( parent );
633wxBoxSizer *item0 =
newwxBoxSizer( wxVERTICAL );
635wxStaticBox *item2 =
newwxStaticBox( parent, -1,
"Edit Annotation");
636wxStaticBoxSizer *item1 =
newwxStaticBoxSizer( item2, wxVERTICAL );
638wxFlexGridSizer *item3 =
newwxFlexGridSizer( 2, 0, 0, 0 );
639item3->AddGrowableCol( 1 );
640item3->AddGrowableRow( 1 );
642wxStaticText *item4 =
newwxStaticText( parent,
ID_TEXT,
"Name:", wxDefaultPosition, wxDefaultSize, 0 );
643item4->SetToolTip(
"cool!");
644item3->Add( item4, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5 );
646wxFlexGridSizer *item5 =
newwxFlexGridSizer( 1, 0, 0, 0 );
647item5->AddGrowableCol( 1 );
649wxTextCtrl *item6 =
newwxTextCtrl( parent,
ID_T_NAME,
"", wxDefaultPosition, wxSize(120,-1), 0 );
650item5->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 );
652item5->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );
654wxButton *item7 =
newwxButton( parent,
ID_B_EDIT_STYLE,
"Edit Style", wxDefaultPosition, wxDefaultSize, 0 );
655item5->Add( item7, 0, wxALIGN_CENTRE|wxALL, 5 );
657item3->Add( item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
659wxStaticText *item8 =
newwxStaticText( parent,
ID_TEXT,
"Description:", wxDefaultPosition, wxDefaultSize, 0 );
660item3->Add( item8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5 );
662wxTextCtrl *item9 =
newwxTextCtrl( parent,
ID_T_DESCR,
"", wxDefaultPosition, wxDefaultSize, 0 );
663item3->Add( item9, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
665item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
667item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
669wxBoxSizer *item10 =
newwxBoxSizer( wxHORIZONTAL );
671wxButton *item11 =
newwxButton( parent,
ID_B_EDIT_DONE,
"OK", wxDefaultPosition, wxDefaultSize, 0 );
672item10->Add( item11, 0, wxALIGN_CENTRE|wxALL, 5 );
674item10->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );
676wxButton *item12 =
newwxButton( parent,
ID_B_EDIT_CANCEL,
"Cancel", wxDefaultPosition, wxDefaultSize, 0 );
677item10->Add( item12, 0, wxALIGN_CENTRE|wxALL, 5 );
679item0->Add( item10, 0, wxALIGN_CENTRE|wxALL, 5 );
683parent->SetAutoLayout(
TRUE);
684parent->SetSizer( item0 );
687item0->Fit( parent );
688item0->SetSizeHints( parent );
#define DECLARE_AND_FIND_WINDOW_RETURN_ON_ERR(var, id, type)
#define ANNOT_FROM_CLIENT_DATA(listbox)
wxSizer * SetupAnnotationControlDialog(wxWindow *parent, bool call_fit=TRUE, bool set_sizer=TRUE)
wxSizer * SetupAnnotationEditorDialog(wxWindow *parent, bool call_fit=TRUE, bool set_sizer=TRUE)
void MoveAnnotation(void)
const StructureSet * structureSet
void ResetListBoxes(void)
void OnSelection(wxCommandEvent &event)
void DeleteAnnotation(void)
void SetButtonStates(void)
StyleManager * styleManager
void EditAnnotation(void)
ResidueMap highlightedResidues
void OnButton(wxCommandEvent &event)
void OnCloseWindow(wxCloseEvent &event)
bool HighlightsPresent(void) const
StyleSettings * styleSettings
const StructureSet * structureSet
void OnCloseWindow(wxCloseEvent &event)
void OnButton(wxCommandEvent &event)
bool GetHighlightedResiduesWithStructure(MoleculeHighlightMap *residues) const
void PostRedrawAllStructures(void)
void SuspendHighlighting(bool suspend)
void PostRedrawAllSequenceViewers(void)
void SetHighlights(const MoleculeHighlightMap &newHighlights)
void ShowDomainsWithHighlights(const StructureSet *set)
ShowHideManager * showHideManager
static const unsigned int eStyleData
void SetDataChanged(unsigned int what) const
UserAnnotation * AddUserAnnotation(void)
const StyleSettings & GetGlobalStyle(void) const
bool DisplayUserAnnotation(UserAnnotation *annotation, bool display)
bool RemoveUserAnnotation(UserAnnotation *annotation)
bool AddUserStyle(int *id, StyleSettings **newStyle)
UserAnnotationList & GetUserAnnotations(void)
const StyleSettings * GetUserStyle(int id) const
std::list< ncbi::CRef< UserAnnotation > > UserAnnotationList
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
unsigned int
A callback function used to compare two keys in a database.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is smart and slim</td> n<td> orig</td> n</tr> n<tr> n<td> last_modified</td> n<td> optional</td> n<td> Integer</td> n<td class=\"description\"> The blob last modification If provided then the exact match will be requested with n the Cassandra storage corresponding field value</td> n<td> Positive integer Not provided means that the most recent match will be selected</td> n<td></td> n</tr> n<tr> n<td> use_cache</td> n<td> optional</td> n<td> String</td> n<td class=\"description\"> The option controls if the Cassandra LMDB cache and or database should be used It n affects the seq id resolution step and the blob properties lookup step The following n options are available
Messenger * GlobalMessenger(void)
#define TRUE
bool replacment for C indicating true.
#define FALSE
bool replacment for C indicating false.
bool le(T x_, T y_, T round_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
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