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/select__feature__dlg_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/edit/demo/select_feature_dlg.cpp Source File

57 #include <wx/stattext.h> 58 #include <wx/choice.h> 59 #include <wx/bitmap.h> 61 #include <wx/msgdlg.h> 62 #include <wx/filedlg.h> 114  Create

(parent,

id

, caption, pos,

size

, style);

125 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

126

wxDialog::Create( parent,

id

, caption, pos,

size

, style );

131

GetSizer()->SetSizeHints(

this

);

182

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

183

itemDialog1->SetSizer(itemBoxSizer2);

185

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

186

itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_RIGHT|wxALL, 2);

188

wxStaticText* itemStaticText4 =

new

wxStaticText( itemDialog1, wxID_STATIC,

_

(

"Feature type"

), wxDefaultPosition, wxDefaultSize, 0 );

189

itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

191

wxArrayString itemChoice5Strings;

192

itemChoice5Strings.Add(

_

(

"Gene"

));

193

itemChoice5Strings.Add(

_

(

"RNA"

));

194

itemChoice5Strings.Add(

_

(

"mRNA"

));

195

itemChoice5Strings.Add(

_

(

"CD region"

));

196

wxChoice* itemChoice5 =

new

wxChoice( itemDialog1,

ID_CHOICE5

, wxDefaultPosition, wxDefaultSize, itemChoice5Strings, 0 );

197

itemChoice5->SetStringSelection(

_

(

"Gene"

));

198

itemBoxSizer3->Add(itemChoice5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

200

wxBoxSizer* itemBoxSizer6 =

new

wxBoxSizer(wxHORIZONTAL);

201

itemBoxSizer2->Add(itemBoxSizer6, 1, wxGROW|wxALL, 2);

203

wxBoxSizer* itemBoxSizer7 =

new

wxBoxSizer(wxVERTICAL);

204

itemBoxSizer6->Add(itemBoxSizer7, 1, wxGROW|wxALL, 0);

206

wxArrayString m_FeatureListStrings;

207  m_FeatureList

=

new

wxListBox( itemDialog1,

ID_LISTBOX2

, wxDefaultPosition, wxSize(-1, itemDialog1->ConvertDialogToPixels(wxSize(-1, 150)).y), m_FeatureListStrings, wxLB_SINGLE|wxLB_HSCROLL );

210

wxBoxSizer* itemBoxSizer9 =

new

wxBoxSizer(wxHORIZONTAL);

211

itemBoxSizer7->Add(itemBoxSizer9, 0, wxGROW|wxALL, 0);

213  m_LoadedStatus

=

new

wxStaticText( itemDialog1, wxID_STATIC,

_

(

"Not loaded..."

), wxDefaultPosition, wxDefaultSize, 0 );

214

itemBoxSizer9->Add(

m_LoadedStatus

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

216

itemBoxSizer9->Add(7, 8, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);

220

itemBoxSizer9->Add(

m_EditFeatureBtn

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

222

wxStaticLine* itemStaticLine13 =

new

wxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );

223

itemBoxSizer2->Add(itemStaticLine13, 0, wxGROW|wxALL, 5);

225

wxBoxSizer* itemBoxSizer14 =

new

wxBoxSizer(wxVERTICAL);

226

itemBoxSizer2->Add(itemBoxSizer14, 0, wxALIGN_RIGHT|wxALL, 0);

228

wxBoxSizer* itemBoxSizer15 =

new

wxBoxSizer(wxHORIZONTAL);

229

itemBoxSizer14->Add(itemBoxSizer15, 0, wxALIGN_RIGHT|wxALL, 2);

231

wxButton* itemButton16 =

new

wxButton( itemDialog1,

ID_BUTTON3

,

_

(

"Load File..."

), wxDefaultPosition, wxDefaultSize, 0 );

232

itemBoxSizer15->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

234  m_SaveFileBtn

=

new

wxButton( itemDialog1,

ID_BUTTON4

,

_

(

"Save File..."

), wxDefaultPosition, wxDefaultSize, 0 );

236

itemBoxSizer15->Add(

m_SaveFileBtn

, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

238

wxBoxSizer* itemBoxSizer18 =

new

wxBoxSizer(wxHORIZONTAL);

239

itemBoxSizer14->Add(itemBoxSizer18, 0, wxALIGN_RIGHT|wxALL, 2);

241  m_AccInput

=

new

wxTextCtrl( itemDialog1,

ID_TEXTCTRL7

,

_

(

"NT_029998"

), wxDefaultPosition, wxDefaultSize, 0 );

242

itemBoxSizer18->Add(

m_AccInput

, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);

244

wxButton* itemButton20 =

new

wxButton( itemDialog1,

ID_BUTTON1

,

_

(

"Load Accession"

), wxDefaultPosition, wxDefaultSize, 0 );

245

itemBoxSizer18->Add(itemButton20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

247

wxButton* itemButton21 =

new

wxButton( itemDialog1, wxID_CANCEL,

_

(

"Close"

), wxDefaultPosition, wxDefaultSize, 0 );

248

itemBoxSizer18->Add(itemButton21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

285  string msg

(

"Accession '"

);

286  msg

+= acc +

" not recognized as a valid accession"

;

288

wxOK | wxICON_ERROR);

405

sel.SetResolveAll().SetNoMapping().SetSortOrder(sel.eSortOrder_None);

407  if

(mf->GetOriginalFeature().Equals(feat)) {

408  return

mf->GetSeq_feat_Handle();

418  if

(index == wxNOT_FOUND)

438  for

( ; it && index > 0; ++it, --index);

448

editor(CreateObjectInterface<IEditObject>(sso,

NULL

));

451

wxMessageBox(

wxT

(

"No editor found for object of type \'"

) +

454  wxT

(

"Error"

), wxOK|wxICON_ERROR);

459

wxWindow* editorWindow = editor->CreateWindow(&edit_dlg);

461  if

(edit_dlg.Show(

true

))

466

wxMessageBox(

wxT

(

"Editor returned no action!"

),

wxT

(

"Error"

), wxOK|wxICON_ERROR);

469

edit_command->Execute();

500

wxFileDialog dlg(

this

,

wxT

(

"Select a file"

), wxEmptyString,

502  wxT

(

"ASN files (*.asn)|*.asn|All files (*.*)|*.*"

),

503

wxFD_SAVE|wxFD_OVERWRITE_PROMPT);

505  if

(dlg.ShowModal() != wxID_OK)

509  if

(fileName.empty())

519

wxMessageBox(s,

wxT

(

"Error writing file."

), wxOK | wxICON_ERROR);

530

wxFileDialog dlg(

this

,

wxT

(

"Select a file"

), wxEmptyString, wxEmptyString,

531  wxT

(

"ASN files (*.asn)|*.asn|All files (*.*)|*.*"

),

534  if

(dlg.ShowModal() != wxID_OK)

537

wxString fileName = dlg.GetPath();

538  if

(fileName.empty())

551

wxMessageBox(s,

wxT

(

"Error loading file."

), wxOK | wxICON_ERROR);

const CSeq_id * GetFirstId() const

void SetEditorWindow(wxWindow *editorWindow)

static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)

void OnFeatureEdit(wxCommandEvent &event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2

void OnFeatureDoubleClicked(wxCommandEvent &event)

wxEVT_COMMAND_LISTBOX_DOUBLECLICKED event handler for ID_LISTBOX2

void OnButtonSaveFile(wxCommandEvent &event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON4

wxButton * m_EditFeatureBtn

void OnFeatureSelected(wxCommandEvent &event)

wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_LISTBOX2

CSelectFeatureDlg()

Constructors.

CRef< CObjectManager > m_ObjMgr

static bool ShowToolTips()

Should we show tooltips?

CBioseq_Handle m_BioseqHandle

bool Create(wxWindow *parent, wxWindowID id=10015, const wxString &caption=_("Select feature to edit"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)

Creation.

void OnFeatureTypeSelected(wxCommandEvent &event)

wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE5

void Init()

Initialises member variables.

wxListBox * m_FeatureList

void OnButtonLoadFile(wxCommandEvent &event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON3

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

~CSelectFeatureDlg()

Destructor.

wxStaticText * m_LoadedStatus

void CreateControls()

Creates the controls and sizers.

void OnLoadAccession(wxCommandEvent &event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1

ESubtype GetSubtype(void) const

namespace ncbi::objects::

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

string ReportAll(TDiagPostFlags flags=eDPF_Exception) const

Report all exceptions.

static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)

virtual const CTypeInfo * GetThisTypeInfo(void) const =0

@ eSerial_AsnText

ASN.1 text.

static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)

Create serial object writer and attach it to an output stream.

static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)

Create serial object reader and attach it to an input stream.

void ResetHistory(EActionIfLocked action=eKeepIfLocked)

Clean all unused TSEs from the scope's cache and release the memory.

CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri=kPriority_Default, EExist action=eExist_Throw)

Add bioseq, return bioseq handle.

static CRef< CObjectManager > GetInstance(void)

Return the existing object manager or create one.

CBioseq_Handle GetBioseqHandle(const CSeq_id &id)

Get bioseq handle by seq-id.

void AddDefaults(TPriority pri=kPriority_Default)

Add default data loaders from object manager.

CConstRef< CBioseq > GetCompleteBioseq(void) const

Get the complete bioseq.

void Reset(void)

Reset handle and make it not to point to any bioseq.

SAnnotSelector & SetFeatType(TFeatType type)

Set feature type (also set annotation type to feat)

const CSeq_feat & GetMappedFeature(void) const

Feature mapped to the master sequence.

SAnnotSelector & SetFeatSubtype(TFeatSubtype subtype)

Set feature subtype (also set annotation and feat type)

TObjectType * GetPointer(void) THROWS_NONE

Get pointer,.

void Reset(void)

Reset reference object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ifstream CNcbiIfstream

Portable alias for ifstream.

const string & GetName(void) const

Get name of this type.

static const char label[]

const TLocation & GetLocation(void) const

Get the Location member data.

const TData & GetData(void) const

Get the Data member data.

const struct ncbi::grid::netcache::search::fields::SIZE size

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

static const char * type_name(CS_INT value)

wxString ToWxString(const string &s)

string ToStdString(const wxString &s)


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