A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/annotate__dialog_8cpp_source.html below:

NCBI C++ ToolKit: src/app/cn3d/annotate_dialog.cpp Source File

53 #include <wx/statline.h> 54 #include <wx/spinbutt.h> 55 #include <wx/spinctrl.h> 56 #include <wx/splitter.h> 57 #include <wx/listctrl.h> 58 #include <wx/treectrl.h> 59 #include <wx/notebook.h> 64 #define ID_L_AVAILABLE 10001 65 #define ID_B_TURN_ON 10002 66 #define ID_B_TURN_OFF 10003 67 #define ID_B_MOVE_UP 10004 68 #define ID_B_MOVE_DOWN 10005 69 #define ID_L_DISPLAYED 10006 71 #define ID_ST_NAME 10008 72 #define ID_B_NEW 10009 73 #define ID_ST_DESCR 10010 74 #define ID_B_SHOW 10011 75 #define ID_B_EDIT 10012 76 #define ID_B_MOVE 10013 77 #define ID_B_DELETE 10014 78 #define ID_B_DONE 10015 81 #define ID_T_NAME 10016 82 #define ID_B_EDIT_STYLE 10017 83 #define ID_T_DESCR 10018 84 #define ID_B_EDIT_DONE 10019 85 #define ID_B_EDIT_CANCEL 10020 95 #define DECLARE_AND_FIND_WINDOW_RETURN_ON_ERR(var, id, type) \ 97  var = wxDynamicCast(FindWindow(id), type); \ 99  ERRORMSG("Can't find window with id "

<< id); \

103 #define ANNOT_FROM_CLIENT_DATA(listbox) \ 104  (reinterpret_cast < StyleManager::UserAnnotation * > \ 105  ((listbox)->GetClientData((listbox)->GetSelection()))) 114

wxDialog(parent, -1, "User Annotations", wxPoint(400, 100), wxDefaultSize, wxDEFAULT_DIALOG_STYLE),

115

styleManager(manager), structureSet(

set

)

130

topSizer->Fit(

this

);

131

topSizer->SetSizeHints(

this

);

142  switch

(event.GetId()) {

164  ERRORMSG

(

"AnnotateDialog::OnButton() - error highlighting annotation #" 174

MoveUserAnnotation(annotation, (event.GetId() ==

ID_B_MOVE_UP

)))

177  ERRORMSG

(

"AnnotateDialog::OnButton() - error reprioritizing annotation #" 185  if

(listBox->GetSelection() >= 0) {

188

DisplayUserAnnotation(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)) {

221

otherBox->SetSelection(o,

true

);

248  bool

availableSelected = (

available

->GetSelection() >= 0);

249  bool

displayedSelected = (displayed->GetSelection() >= 0);

250

bTurnOn->Enable(availableSelected && !displayedSelected);

251

bTurnOff->Enable(displayedSelected);

252

bMoveUp->Enable(availableSelected &&

available

->GetSelection() > 0);

253

bMoveDown->Enable(availableSelected &&

available

->GetSelection() < (

int

)

available

->GetCount() - 1);

256

bEdit->Enable(availableSelected);

258

bDelete->Enable(availableSelected);

260

bShow->Enable(availableSelected);

262  if

(availableSelected) {

265  ERRORMSG

(

"AnnotateDialog::SetButtonStates() - NULL annotation pointer"

);

267

tName->SetLabel(annotation ? annotation->

name

.c_str() :

""

);

268

tDescr->SetLabel(annotation ? annotation->

description

.c_str() :

""

);

277

StyleManager::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) {

286

selection =

l

->GetPointer();

291

selection = 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) {

303

displayed->Append((*l)->name.c_str(),

l

->GetPointer());

304  if

(selection ==

l

->GetPointer())

305

displayed->SetSelection(

id

,

true

);

315  if

(!newAnnotation)

return

;

316

newAnnotation->

name

=

"(new)"

;

321  ERRORMSG

(

"AnnotateDialog::NewAnnotation() - error setting up new annotation"

);

331  int result

= dialog.ShowModal();

337

newAnnotation->

name

= tName->GetValue().c_str();

339

newAnnotation->

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();

372

annotation->

name

= tName->GetValue().c_str();

374

annotation->

description

= tDescr->GetValue().c_str();

387  if

(

available

->GetSelection() < 0)

return

;

390  ERRORMSG

(

"AnnotateDialog::MoveAnnotation() - NULL annotation pointer"

);

396

message.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"

);

421

message.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

);

442

wxDialog(parent, -1, "Edit Annotation", wxPoint(450, 200), wxDefaultSize, wxDEFAULT_DIALOG_STYLE),

443

styleSettings(settings), structureSet(

set

)

450

tName->SetValue(initialText.name.c_str());

452

tDescr->SetValue(initialText.description.c_str());

455

topSizer->Fit(

this

);

456

topSizer->SetSizeHints(

this

);

460

tName->SetSelection(0, initialText.name.size());

471  switch

(event.GetId()) {

479  if

(tName->GetValue().size() == 0)

480

wxMessageBox(

"The annotation must have a name!"

,

481  "Input Error"

, wxOK | wxCENTRE | wxICON_ERROR,

this

);

504

wxBoxSizer *item0 =

new

wxBoxSizer( wxVERTICAL );

506

wxStaticBox *item2 =

new

wxStaticBox( parent, -1,

"Annotation Control"

);

507

wxStaticBoxSizer *item1 =

new

wxStaticBoxSizer( item2, wxVERTICAL );

509

wxFlexGridSizer *item3 =

new

wxFlexGridSizer( 2, 0, 0, 0 );

510

item3->AddGrowableCol( 0 );

511

item3->AddGrowableCol( 2 );

513

wxStaticText *item4 =

new

wxStaticText( parent,

ID_TEXT

,

"Available"

, wxDefaultPosition, wxDefaultSize, 0 );

514

item3->Add( item4, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );

516

item3->Add( 5, 5, 0, wxALIGN_CENTRE|wxALL, 5 );

518

wxStaticText *item5 =

new

wxStaticText( parent,

ID_TEXT

,

"Displayed"

, wxDefaultPosition, wxDefaultSize, 0 );

519

item3->Add( item5, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 );

521

wxString *strs6 = (wxString*)

NULL

;

522

wxListBox *item6 =

new

wxListBox( parent,

ID_L_AVAILABLE

, wxDefaultPosition, wxSize(120,-1), 0, strs6, wxLB_SINGLE );

523

item3->Add( item6, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );

525

wxFlexGridSizer *item7 =

new

wxFlexGridSizer( 1, 0, 0 );

527

wxButton *item8 =

new

wxButton( parent,

ID_B_TURN_ON

,

"Turn On"

, wxDefaultPosition, wxDefaultSize, 0 );

528

item8->SetToolTip(

"Display the selected annotation"

);

529

item8->Enable(

FALSE

);

530

item7->Add( item8, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

532

wxButton *item9 =

new

wxButton( parent,

ID_B_TURN_OFF

,

"Turn Off"

, wxDefaultPosition, wxDefaultSize, 0 );

533

item9->SetToolTip(

"Hide the selected annotation"

);

534

item9->Enable(

FALSE

);

535

item7->Add( item9, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

537

item7->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );

539

wxButton *item10 =

new

wxButton( parent,

ID_B_MOVE_UP

,

"Move Up"

, wxDefaultPosition, wxDefaultSize, 0 );

540

item10->SetToolTip(

"Move annotation up in priority"

);

541

item10->Enable(

FALSE

);

542

item7->Add( item10, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

544

wxButton *item11 =

new

wxButton( parent,

ID_B_MOVE_DOWN

,

"Move Down"

, wxDefaultPosition, wxDefaultSize, 0 );

545

item11->SetToolTip(

"Move annotation down in priority"

);

546

item11->Enable(

FALSE

);

547

item7->Add( item11, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

549

item3->Add( item7, 0, wxALIGN_CENTRE, 5 );

551

wxString *strs12 = (wxString*)

NULL

;

552

wxListBox *item12 =

new

wxListBox( parent,

ID_L_DISPLAYED

, wxDefaultPosition, wxSize(120,-1), 0, strs12, wxLB_SINGLE );

553

item3->Add( item12, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );

555

item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

557

wxStaticLine *item13 =

new

wxStaticLine( parent,

ID_LINE

, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );

558

item1->Add( item13, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

560

wxFlexGridSizer *item14 =

new

wxFlexGridSizer( 2, 0, 0, 0 );

561

item14->AddGrowableCol( 1 );

563

wxStaticText *item15 =

new

wxStaticText( parent,

ID_TEXT

,

"Selection:"

, wxDefaultPosition, wxDefaultSize, 0 );

564

item14->Add( item15, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

566

wxFlexGridSizer *item16 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

567

item16->AddGrowableCol( 0 );

569

wxStaticText *item17 =

new

wxStaticText( parent,

ID_ST_NAME

,

""

, wxDefaultPosition, wxSize(120,-1), 0 );

570

item16->Add( item17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );

572

wxButton *item18 =

new

wxButton( parent,

ID_B_NEW

,

"New"

, wxDefaultPosition, wxDefaultSize, 0 );

573

item16->Add( item18, 0, wxALIGN_CENTRE|wxALL, 5 );

575

item14->Add( item16, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );

577

wxStaticText *item19 =

new

wxStaticText( parent,

ID_TEXT

,

"Description:"

, wxDefaultPosition, wxDefaultSize, 0 );

578

item14->Add( item19, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

580

wxStaticText *item20 =

new

wxStaticText( parent,

ID_ST_DESCR

,

""

, wxDefaultPosition, wxDefaultSize, 0 );

581

item14->Add( item20, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

583

item1->Add( item14, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

585

wxStaticLine *item21 =

new

wxStaticLine( parent,

ID_LINE

, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );

586

item1->Add( item21, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

588

wxBoxSizer *item22 =

new

wxBoxSizer( wxHORIZONTAL );

590

wxButton *item23 =

new

wxButton( parent,

ID_B_SHOW

,

"Show"

, wxDefaultPosition, wxDefaultSize, 0 );

591

item22->Add( item23, 0, wxALIGN_CENTRE|wxALL, 5 );

593

wxButton *item24 =

new

wxButton( parent,

ID_B_EDIT

,

"Edit"

, wxDefaultPosition, wxDefaultSize, 0 );

594

item24->Enable(

FALSE

);

595

item22->Add( item24, 0, wxALIGN_CENTRE|wxALL, 5 );

597

wxButton *item25 =

new

wxButton( parent,

ID_B_MOVE

,

"Move"

, wxDefaultPosition, wxDefaultSize, 0 );

598

item25->Enable(

FALSE

);

599

item22->Add( item25, 0, wxALIGN_CENTRE|wxALL, 5 );

601

wxButton *item26 =

new

wxButton( parent,

ID_B_DELETE

,

"Delete"

, wxDefaultPosition, wxDefaultSize, 0 );

602

item26->Enable(

FALSE

);

603

item22->Add( item26, 0, wxALIGN_CENTRE|wxALL, 5 );

605

item1->Add( item22, 0, wxALIGN_CENTRE|wxALL, 5 );

607

item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

609

wxBoxSizer *item27 =

new

wxBoxSizer( wxHORIZONTAL );

611

wxButton *item28 =

new

wxButton( parent,

ID_B_DONE

,

"Done"

, wxDefaultPosition, wxDefaultSize, 0 );

612

item28->SetDefault();

613

item27->Add( item28, 0, wxALIGN_CENTRE|wxALL, 5 );

615

item0->Add( item27, 0, wxALIGN_CENTRE|wxALL, 5 );

619

parent->SetAutoLayout(

TRUE

);

620

parent->SetSizer( item0 );

623

item0->Fit( parent );

624

item0->SetSizeHints( parent );

633

wxBoxSizer *item0 =

new

wxBoxSizer( wxVERTICAL );

635

wxStaticBox *item2 =

new

wxStaticBox( parent, -1,

"Edit Annotation"

);

636

wxStaticBoxSizer *item1 =

new

wxStaticBoxSizer( item2, wxVERTICAL );

638

wxFlexGridSizer *item3 =

new

wxFlexGridSizer( 2, 0, 0, 0 );

639

item3->AddGrowableCol( 1 );

640

item3->AddGrowableRow( 1 );

642

wxStaticText *item4 =

new

wxStaticText( parent,

ID_TEXT

,

"Name:"

, wxDefaultPosition, wxDefaultSize, 0 );

643

item4->SetToolTip(

"cool!"

);

644

item3->Add( item4, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5 );

646

wxFlexGridSizer *item5 =

new

wxFlexGridSizer( 1, 0, 0, 0 );

647

item5->AddGrowableCol( 1 );

649

wxTextCtrl *item6 =

new

wxTextCtrl( parent,

ID_T_NAME

,

""

, wxDefaultPosition, wxSize(120,-1), 0 );

650

item5->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 );

652

item5->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );

654

wxButton *item7 =

new

wxButton( parent,

ID_B_EDIT_STYLE

,

"Edit Style"

, wxDefaultPosition, wxDefaultSize, 0 );

655

item5->Add( item7, 0, wxALIGN_CENTRE|wxALL, 5 );

657

item3->Add( item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );

659

wxStaticText *item8 =

new

wxStaticText( parent,

ID_TEXT

,

"Description:"

, wxDefaultPosition, wxDefaultSize, 0 );

660

item3->Add( item8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5 );

662

wxTextCtrl *item9 =

new

wxTextCtrl( parent,

ID_T_DESCR

,

""

, wxDefaultPosition, wxDefaultSize, 0 );

663

item3->Add( item9, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

665

item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

667

item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

669

wxBoxSizer *item10 =

new

wxBoxSizer( wxHORIZONTAL );

671

wxButton *item11 =

new

wxButton( parent,

ID_B_EDIT_DONE

,

"OK"

, wxDefaultPosition, wxDefaultSize, 0 );

672

item10->Add( item11, 0, wxALIGN_CENTRE|wxALL, 5 );

674

item10->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );

676

wxButton *item12 =

new

wxButton( parent,

ID_B_EDIT_CANCEL

,

"Cancel"

, wxDefaultPosition, wxDefaultSize, 0 );

677

item10->Add( item12, 0, wxALIGN_CENTRE|wxALL, 5 );

679

item0->Add( item10, 0, wxALIGN_CENTRE|wxALL, 5 );

683

parent->SetAutoLayout(

TRUE

);

684

parent->SetSizer( item0 );

687

item0->Fit( parent );

688

item0->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