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

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

61 #include <wx/button.h> 62 #include <wx/filedlg.h> 63 #include <wx/msgdlg.h> 66 #include <wx/hyperlink.h> 118  Create

(parent,

id

, caption, pos,

size

, style);

132

parent = wxTheApp->GetTopWindow();

135 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

136

wxFrame::Create( parent,

id

, caption, pos,

size

, style );

141

GetSizer()->SetSizeHints(

this

);

190

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

191

itemCGuiWidgetDlg1->SetSizer(itemBoxSizer2);

196

wxBoxSizer* panel_sizer =

new

wxBoxSizer(wxVERTICAL);

202

wxStaticLine* itemStaticLine4 =

new

wxStaticLine(

m_ContainerPanel

, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);

203

panel_sizer->Add(itemStaticLine4, 0, wxGROW | wxALL, 5);

205

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

206

panel_sizer->Add(itemBoxSizer3, 0, wxGROW | wxALL, 5);

209

itemBoxSizer3->Add(

m_ButtonImport

, 0, wxALIGN_LEFT|wxALL|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);

213

itemBoxSizer3->Add(

m_ButtonExport

, 0, wxALIGN_LEFT|wxALL|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);

216

wxStdDialogButtonSizer* itemStdDialogButtonSizer5 =

new

wxStdDialogButtonSizer;

217

itemBoxSizer3->Add(itemStdDialogButtonSizer5, 1, wxALL, 5);

219

wxButton* itemButton6 =

new

wxButton(

m_ContainerPanel

, wxID_OK,

_

(

"&OK"

), wxDefaultPosition, wxDefaultSize, 0);

220

itemStdDialogButtonSizer5->AddButton(itemButton6);

222

wxButton* itemButton7 =

new

wxButton(

m_ContainerPanel

, wxID_CANCEL,

_

(

"&Cancel"

), wxDefaultPosition, wxDefaultSize, 0);

223

itemStdDialogButtonSizer5->AddButton(itemButton7);

225  m_ButtonHelp

=

new

wxHyperlinkCtrl(

m_ContainerPanel

, wxID_HELP,

_

(

"Help"

), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );

226  m_ButtonHelp

->SetForegroundColour(wxColour(192, 192, 192));

227

itemStdDialogButtonSizer5->Add(

m_ButtonHelp

, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);

230

itemStdDialogButtonSizer5->Realize();

290  for

(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)

316

GetSizer()->SetSizeHints(

this

);

317

Centre(wxBOTH|wxCENTRE_ON_SCREEN);

338

wxFileDialog asn_save_file(

this

,

wxT

(

"Export object to file"

),

m_WorkDir

, wxEmptyString,

341

wxFD_SAVE|wxFD_OVERWRITE_PROMPT);

343  if

(asn_save_file.ShowModal() == wxID_OK)

345

wxString path = asn_save_file.GetPath();

346  if

( !path.IsEmpty())

357

wxMessageBox(

wxT

(

"No export function found for object of this type"

),

wxT

(

"Error"

), wxOK|wxICON_ERROR);

367

wxFileDialog asn_open_file(

this

,

wxT

(

"Import object from file"

), wxEmptyString, wxEmptyString,

370

wxFD_OPEN|wxFD_FILE_MUST_EXIST);

372  if

(asn_open_file.ShowModal() == wxID_OK)

374

wxString path = asn_open_file.GetPath();

375  if

( !path.IsEmpty() )

384

wxMessageBox(

wxT

(

"Need Seq-feat object for import"

),

wxT

(

"Error"

), wxOK|wxICON_ERROR);

387  catch

(

const

exception&)

389

wxMessageBox(

wxT

(

"Need Seq-feat object for import"

),

wxT

(

"Error"

), wxOK|wxICON_ERROR);

419

wxTreebook *book =

dynamic_cast<

wxTreebook*

>

(

m_EditorWindow

);

429  for

(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)

477  Create

(parent,

id

, caption, pos,

size

, style);

488 

SetExtraStyle(wxWS_EX_BLOCK_EVENTS);

489

CGuiWidgetDlg::Create( parent,

id

, caption, pos,

size

, style );

494

GetSizer()->SetSizeHints(

this

);

539

wxBoxSizer* itemBoxSizer2 =

new

wxBoxSizer(wxVERTICAL);

540

itemCGuiWidgetDlg1->SetSizer(itemBoxSizer2);

545

wxStaticLine* itemStaticLine4 =

new

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

546

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

548

wxBoxSizer* itemBoxSizer3 =

new

wxBoxSizer(wxHORIZONTAL);

549

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

552

itemBoxSizer3->Add(

m_ButtonImport

, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);

556

itemBoxSizer3->Add(

m_ButtonExport

, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);

559

wxStdDialogButtonSizer* itemStdDialogButtonSizer5 =

new

wxStdDialogButtonSizer;

560

itemBoxSizer3->Add(itemStdDialogButtonSizer5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);

562

wxButton* itemButton6 =

new

wxButton( itemCGuiWidgetDlg1, wxID_OK,

_

(

"&OK"

), wxDefaultPosition, wxDefaultSize, 0 );

563

itemStdDialogButtonSizer5->AddButton(itemButton6);

565

wxButton* itemButton7 =

new

wxButton( itemCGuiWidgetDlg1, wxID_CANCEL,

_

(

"&Cancel"

), wxDefaultPosition, wxDefaultSize, 0 );

566

itemStdDialogButtonSizer5->AddButton(itemButton7);

568  m_ButtonHelp

=

new

wxHyperlinkCtrl( itemCGuiWidgetDlg1, wxID_HELP,

_

(

"Help"

), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );

569  m_ButtonHelp

->SetForegroundColour(wxColour(192, 192, 192));

570

itemStdDialogButtonSizer5->Add(

m_ButtonHelp

, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);

573

itemStdDialogButtonSizer5->Realize();

624  return

wxDialog::Show(show);

631

EndModal(wxID_CANCEL);

646  for

(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)

688

editorWindow->Reparent(

this

);

692

GetSizer()->SetSizeHints(

this

);

693

Centre(wxBOTH|wxCENTRE_ON_SCREEN);

796

wxFileDialog asn_save_file(

this

,

wxT

(

"Export object to file"

), wxEmptyString, wxEmptyString,

799

wxFD_SAVE|wxFD_OVERWRITE_PROMPT);

801  if

(asn_save_file.ShowModal() == wxID_OK)

803

wxString path = asn_save_file.GetPath();

804  if

( !path.IsEmpty())

815

wxMessageBox(

wxT

(

"No export function found for object of this type"

),

wxT

(

"Error"

), wxOK|wxICON_ERROR);

825

wxFileDialog asn_open_file(

this

,

wxT

(

"Import object from file"

), wxEmptyString, wxEmptyString,

828

wxFD_OPEN|wxFD_FILE_MUST_EXIST);

830  if

(asn_open_file.ShowModal() == wxID_OK)

832

wxString path = asn_open_file.GetPath();

833  if

( !path.IsEmpty() )

842

wxMessageBox(

wxT

(

"Unable to import object"

),

wxT

(

"Error"

), wxOK|wxICON_ERROR);

845  catch

(

const

exception&)

847

wxMessageBox(

wxT

(

"Unable to import object"

),

wxT

(

"Error"

), wxOK|wxICON_ERROR);

877

wxTreebook *book =

dynamic_cast<

wxTreebook*

>

(

m_EditorWindow

);

887  for

(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)

CIRef< IEditObject > CreateEditorForObject(CConstRef< CObject > obj, objects::CSeq_entry_Handle seh, bool create)

virtual void SetHelpUrl(const wxString &url)

virtual void GetActiveObjects(vector< TConstScopedObjects > &objects)

wxHyperlinkCtrl * m_ButtonHelp

void SetEditorWindow(wxWindow *editorWindow)

@ CEDITOBJVIEWDLG_BUTTON_EXPORT

@ CEDITOBJVIEWDLG_BUTTON_IMPORT

void OnOkClick(wxCommandEvent &event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK

void OnImport(wxCommandEvent &event)

virtual bool Show(bool show=true)

virtual bool InitWidget(TConstScopedObjects &objects)

void OnExport(wxCommandEvent &event)

static bool ShowToolTips()

Should we show tooltips?

virtual void DataChanged()

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

~CEditObjViewDlgModal()

Destructor.

static wxWindow * CreateDialogEdit(wxWindow *parent)

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

CIRef< IEditObject > m_Editor

void CreateControls()

Creates the controls and sizers.

wxBoxSizer * m_EditWindowSizer

wxButton * m_ButtonImport

wxButton * m_ButtonExport

virtual void EnableImport(bool enable)

virtual void GetSelectedObjects(TConstObjects &objects) const

TConstScopedObjects m_Orig_Objects

virtual void SetHost(IGuiWidgetHost *host)

IGuiWidgetHost implementation.

virtual const CObject * GetOrigObject() const

wxWindow * m_EditorWindow

virtual void SetSelectedObjects(const TConstObjects &objects)

virtual void DataChanging()

virtual void EnableExport(bool enable)

CEditObjViewDlgModal()

Constructors.

void OnClose(wxCloseEvent &event)

bool Create(wxWindow *parent, wxWindowID id=ID_CEDITOBJVIEWDLG, const wxString &caption=_("EditObjViewDlg"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxCLOSE_BOX|wxTAB_TRAVERSAL)

Creation.

void Init()

Initialises member variables.

CImportExportAccess * GetImportExportWindow()

static wxWindow * CreateDialogNew(wxWindow *parent)

wxPanel * m_ContainerPanel

CIRef< IEditObject > m_Editor

wxHyperlinkCtrl * m_ButtonHelp

virtual void SetHelpUrl(const wxString &url)

bool Create(wxWindow *parent, wxWindowID id=ID_CEDITOBJVIEWDLG, const wxString &caption=_("EditObjViewDlg"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxCLOSE_BOX|wxTAB_TRAVERSAL)

Creation.

wxBoxSizer * m_EditWindowSizer

void Activate(wxIdleEvent &)

void OnCancelClick(wxCommandEvent &event)

void OnExport(wxCommandEvent &event)

ICommandProccessor * m_CmdProccessor

void OnImport(wxCommandEvent &event)

static bool ShowToolTips()

Should we show tooltips?

wxIcon GetIconResource(const wxString &name)

Retrieves icon resources.

@ CEDITOBJVIEWDLG_BUTTON_EXPORT

@ CEDITOBJVIEWDLG_BUTTON_IMPORT

wxButton * m_ButtonImport

wxButton * m_ButtonExport

void Init()

Initialises member variables.

~CEditObjViewDlg()

Destructor.

void OnOkClick(wxCommandEvent &event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK

void SetEditorWindow(wxWindow *editorWindow)

wxWindow * m_EditorWindow

virtual void EnableExport(bool enable)

wxBitmap GetBitmapResource(const wxString &name)

Retrieves bitmap resources.

virtual void EnableImport(bool enable)

void CreateControls()

Creates the controls and sizers.

CImportExportAccess * GetImportExportWindow()

CEditObjViewDlg()

Constructors.

static wxString GetDialogFilter(EFileType fileType)

virtual bool IsImportEnabled(void)

virtual CRef< CSerialObject > OnExport(void)

virtual bool IsExportEnabled(void)

virtual void OnImport(CNcbiIfstream &istr)

void SetFinalValidation(void)

virtual void Execute(IEditCommand *command, wxWindow *window=0)=0

std::ofstream out("events_result.xml")

main entry point for tests

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

objects::CSeq_entry_Handle GetTopSeqEntryFromScopedObject(SConstScopedObject &obj)

vector< CConstRef< CObject > > TConstObjects

vector< SConstScopedObject > TConstScopedObjects

#define MSerial_AsnText

I/O stream manipulators –.

vector< CSeq_entry_Handle > TTSE_Handles

@ fIncludeGivenEntry

Include the top (given) entry.

@ fRecursive

Iterate recursively.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ofstream CNcbiOfstream

Portable alias for ofstream.

IO_PREFIX::ifstream CNcbiIfstream

Portable alias for ifstream.

void ReportUsage(const wxString &dialog_name)

Report opening & accepting events in the editing package.

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


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