(parent,
id, caption, pos,
size, style);
132parent = wxTheApp->GetTopWindow();
135SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
136wxFrame::Create( parent,
id, caption, pos,
size, style );
141GetSizer()->SetSizeHints(
this);
190wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
191itemCGuiWidgetDlg1->SetSizer(itemBoxSizer2);
196wxBoxSizer* panel_sizer =
newwxBoxSizer(wxVERTICAL);
202wxStaticLine* itemStaticLine4 =
newwxStaticLine(
m_ContainerPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
203panel_sizer->Add(itemStaticLine4, 0, wxGROW | wxALL, 5);
205wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
206panel_sizer->Add(itemBoxSizer3, 0, wxGROW | wxALL, 5);
209itemBoxSizer3->Add(
m_ButtonImport, 0, wxALIGN_LEFT|wxALL|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);
213itemBoxSizer3->Add(
m_ButtonExport, 0, wxALIGN_LEFT|wxALL|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);
216wxStdDialogButtonSizer* itemStdDialogButtonSizer5 =
newwxStdDialogButtonSizer;
217itemBoxSizer3->Add(itemStdDialogButtonSizer5, 1, wxALL, 5);
219wxButton* itemButton6 =
newwxButton(
m_ContainerPanel, wxID_OK,
_(
"&OK"), wxDefaultPosition, wxDefaultSize, 0);
220itemStdDialogButtonSizer5->AddButton(itemButton6);
222wxButton* itemButton7 =
newwxButton(
m_ContainerPanel, wxID_CANCEL,
_(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0);
223itemStdDialogButtonSizer5->AddButton(itemButton7);
225 m_ButtonHelp=
newwxHyperlinkCtrl(
m_ContainerPanel, wxID_HELP,
_(
"Help"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
226 m_ButtonHelp->SetForegroundColour(wxColour(192, 192, 192));
227itemStdDialogButtonSizer5->Add(
m_ButtonHelp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
230itemStdDialogButtonSizer5->Realize();
290 for(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)
316GetSizer()->SetSizeHints(
this);
317Centre(wxBOTH|wxCENTRE_ON_SCREEN);
338wxFileDialog asn_save_file(
this,
wxT(
"Export object to file"),
m_WorkDir, wxEmptyString,
341wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
343 if(asn_save_file.ShowModal() == wxID_OK)
345wxString path = asn_save_file.GetPath();
346 if( !path.IsEmpty())
357wxMessageBox(
wxT(
"No export function found for object of this type"),
wxT(
"Error"), wxOK|wxICON_ERROR);
367wxFileDialog asn_open_file(
this,
wxT(
"Import object from file"), wxEmptyString, wxEmptyString,
370wxFD_OPEN|wxFD_FILE_MUST_EXIST);
372 if(asn_open_file.ShowModal() == wxID_OK)
374wxString path = asn_open_file.GetPath();
375 if( !path.IsEmpty() )
384wxMessageBox(
wxT(
"Need Seq-feat object for import"),
wxT(
"Error"), wxOK|wxICON_ERROR);
387 catch(
constexception&)
389wxMessageBox(
wxT(
"Need Seq-feat object for import"),
wxT(
"Error"), wxOK|wxICON_ERROR);
419wxTreebook *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);
488SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
489CGuiWidgetDlg::Create( parent,
id, caption, pos,
size, style );
494GetSizer()->SetSizeHints(
this);
539wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
540itemCGuiWidgetDlg1->SetSizer(itemBoxSizer2);
545wxStaticLine* itemStaticLine4 =
newwxStaticLine( itemCGuiWidgetDlg1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
546itemBoxSizer2->Add(itemStaticLine4, 0, wxGROW|wxALL, 5);
548wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
549itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);
552itemBoxSizer3->Add(
m_ButtonImport, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);
556itemBoxSizer3->Add(
m_ButtonExport, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);
559wxStdDialogButtonSizer* itemStdDialogButtonSizer5 =
newwxStdDialogButtonSizer;
560itemBoxSizer3->Add(itemStdDialogButtonSizer5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
562wxButton* itemButton6 =
newwxButton( itemCGuiWidgetDlg1, wxID_OK,
_(
"&OK"), wxDefaultPosition, wxDefaultSize, 0 );
563itemStdDialogButtonSizer5->AddButton(itemButton6);
565wxButton* itemButton7 =
newwxButton( itemCGuiWidgetDlg1, wxID_CANCEL,
_(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
566itemStdDialogButtonSizer5->AddButton(itemButton7);
568 m_ButtonHelp=
newwxHyperlinkCtrl( itemCGuiWidgetDlg1, wxID_HELP,
_(
"Help"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
569 m_ButtonHelp->SetForegroundColour(wxColour(192, 192, 192));
570itemStdDialogButtonSizer5->Add(
m_ButtonHelp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
573itemStdDialogButtonSizer5->Realize();
624 returnwxDialog::Show(show);
631EndModal(wxID_CANCEL);
646 for(wxWindowList::iterator child = children.begin(); child != children.end(); ++child)
688editorWindow->Reparent(
this);
692GetSizer()->SetSizeHints(
this);
693Centre(wxBOTH|wxCENTRE_ON_SCREEN);
796wxFileDialog asn_save_file(
this,
wxT(
"Export object to file"), wxEmptyString, wxEmptyString,
799wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
801 if(asn_save_file.ShowModal() == wxID_OK)
803wxString path = asn_save_file.GetPath();
804 if( !path.IsEmpty())
815wxMessageBox(
wxT(
"No export function found for object of this type"),
wxT(
"Error"), wxOK|wxICON_ERROR);
825wxFileDialog asn_open_file(
this,
wxT(
"Import object from file"), wxEmptyString, wxEmptyString,
828wxFD_OPEN|wxFD_FILE_MUST_EXIST);
830 if(asn_open_file.ShowModal() == wxID_OK)
832wxString path = asn_open_file.GetPath();
833 if( !path.IsEmpty() )
842wxMessageBox(
wxT(
"Unable to import object"),
wxT(
"Error"), wxOK|wxICON_ERROR);
845 catch(
constexception&)
847wxMessageBox(
wxT(
"Unable to import object"),
wxT(
"Error"), wxOK|wxICON_ERROR);
877wxTreebook *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