NCBI C++ ToolKit
|
Search Toolkit Book for CStructuredCommentPanel
#include "structuredcomment_panel.hpp"
(Private to src/gui/widgets/edit
.)
Public Types | |
enum | { ID_CSTRUCTUREDCOMMENTPANEL = 10073 , ID_CHOICE11 = 10075 , ID_HYPERLINKCTRL = 10074 , ID_SCROLLEDWINDOW = 10045 } |
Control identifiers. More... | |
Public Member Functions | |
CStructuredCommentPanel () | |
Constructors. More... | |
CStructuredCommentPanel (wxWindow *parent, CRef< objects::CUser_object > user, wxWindowID id=ID_CSTRUCTUREDCOMMENTPANEL, const wxString &caption=_("StructuredCommentPanel"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxTAB_TRAVERSAL) | |
bool | Create (wxWindow *parent, wxWindowID id=ID_CSTRUCTUREDCOMMENTPANEL, const wxString &caption=_("StructuredCommentPanel"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxTAB_TRAVERSAL) |
Creation. More... | |
~CStructuredCommentPanel () | |
Destructor. More... | |
void | Init () |
Initialises member variables. More... | |
void | CreateControls () |
Creates the controls and sizers. More... | |
virtual bool | TransferDataToWindow () |
virtual bool | TransferDataFromWindow () |
CRef< objects::CUser_object > | GetUser_object () const |
void | OnChoice11Selected (wxCommandEvent &event) |
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE11 More... | |
void | OnHyperlinkctrlHyperlinkClicked (wxHyperlinkEvent &event) |
wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL More... | |
void | OnTextEntered (wxCommandEvent &event) |
wxBitmap | GetBitmapResource (const wxString &name) |
Retrieves bitmap resources. More... | |
wxIcon | GetIconResource (const wxString &name) |
Retrieves icon resources. More... | |
virtual void | ChangeSeqdesc (const objects::CSeqdesc &desc) |
virtual void | UpdateSeqdesc (objects::CSeqdesc &desc) |
virtual bool | IsImportEnabled (void) |
virtual bool | IsExportEnabled (void) |
virtual CRef< CSerialObject > | OnExport (void) |
virtual void | OnImport (CNcbiIfstream &istr) |
Public Member Functions inherited from IDescEditorPanel | |
virtual void | UpdateTaxname () |
Static Public Member Functions | |
static bool | ShowToolTips () |
Should we show tooltips? More... | |
static void | s_RemovePoundSigns (string &str) |
static void | s_AddPoundSigns (string &str) |
Public Attributes | |
wxBoxSizer * | m_StandardCommentSizer |
wxStaticText * | m_StandardCommentTypeLabel |
wxChoice * | m_StandardCommentCtrl |
wxScrolledWindow * | m_ScrolledWindow |
wxBoxSizer * | m_Sizer |
Static Public Attributes | |
static const string | sm_StructuredCommentPrefix = "StructuredCommentPrefix" |
static const string | sm_StructuredCommentSuffix = "StructuredCommentSuffix" |
Private Member Functions | |
void | s_AddRow (string field_name, string field_value, bool static_fieldname=false, bool is_required=false) |
bool | x_GetFields (bool keep_blanks=false) |
int | x_FindRow (wxWindow *wnd, wxSizerItemList &itemList) |
void | OnDelete (wxHyperlinkEvent &event) |
Private Attributes | |
CRef< objects::CUser_object > | m_User |
int | m_TotalHeight |
int | m_ScrollRate |
vector< wxControl * > | m_FieldNameCtrls |
vector< wxTextCtrl * > | m_FieldValueCtrls |
CConstRef< objects::CComment_set > | m_StructuredCommentRules |
CStructuredCommentPanel class declaration
Definition at line 68 of file structuredcomment_panel.hpp.
anonymous enum |
Control identifiers.
Enumerator | |
---|---|
ID_CSTRUCTUREDCOMMENTPANEL | |
ID_CHOICE11 | |
ID_HYPERLINKCTRL | |
ID_SCROLLEDWINDOW |
Definition at line 137 of file structuredcomment_panel.hpp.
CStructuredCommentPanel::CStructuredCommentPanel | ( | ) |
Constructors.
CStructuredCommentPanel type definition
CStructuredCommentPanel event table definition
CStructuredCommentPanel constructors
Definition at line 88 of file structuredcomment_panel.cpp.
References Init().
CStructuredCommentPanel::CStructuredCommentPanel | ( | wxWindow * | parent, |
CRef< objects::CUser_object > | user, | ||
wxWindowID | id = ID_CSTRUCTUREDCOMMENTPANEL , |
||
const wxString & | caption = _("StructuredCommentPanel") , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxCAPTION|wxTAB_TRAVERSAL |
||
) |
CStructuredCommentPanel::~CStructuredCommentPanel | ( | ) |
Destructor.
CStructuredCommentPanel destructor
Definition at line 128 of file structuredcomment_panel.cpp.
|
virtual |
Implements IDescEditorPanel.
Definition at line 592 of file structuredcomment_panel.cpp.
References m_User, CRef< C, Locker >::Reset(), and TransferDataToWindow().
Referenced by CApplyStructCommentTreeItemData::SetData().
bool CStructuredCommentPanel::Create | ( | wxWindow * | parent, |
wxWindowID | id = ID_CSTRUCTUREDCOMMENTPANEL , |
||
const wxString & | caption = _("StructuredCommentPanel") , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxCAPTION|wxTAB_TRAVERSAL |
||
) |
Creation.
CStructuredCommentPanel creator
Definition at line 108 of file structuredcomment_panel.cpp.
References CreateControls(), and ncbi::grid::netcache::search::fields::size.
void CStructuredCommentPanel::CreateControls | ( | ) |
Creates the controls and sizers.
Control creation for CStructuredCommentPanel
Definition at line 193 of file structuredcomment_panel.cpp.
References _, CComment_set::GetCommentRules(), CComment_rule_Base::GetPrefix(), ID_CHOICE11, ID_HYPERLINKCTRL, ID_SCROLLEDWINDOW, ITERATE, m_ScrolledWindow, m_Sizer, m_StandardCommentCtrl, m_StandardCommentSizer, m_StandardCommentTypeLabel, m_StructuredCommentRules, prefix, s_RemovePoundSigns(), and ToWxString().
Referenced by Create().
wxBitmap CStructuredCommentPanel::GetBitmapResource | ( | const wxString & | name | ) |
Retrieves bitmap resources.
Get bitmap resources
Definition at line 482 of file structuredcomment_panel.cpp.
wxIcon CStructuredCommentPanel::GetIconResource | ( | const wxString & | name | ) |
Retrieves icon resources.
Get icon resources
Definition at line 495 of file structuredcomment_panel.cpp.
CRef< objects::CUser_object > CStructuredCommentPanel::GetUser_object | ( | ) | const |
Definition at line 460 of file structuredcomment_panel.cpp.
References m_User.
Referenced by OnExport(), and UpdateSeqdesc().
void CStructuredCommentPanel::Init | ( | void | ) |
Initialises member variables.
Member initialisation
Definition at line 139 of file structuredcomment_panel.cpp.
References m_ScrolledWindow, m_Sizer, m_StandardCommentCtrl, m_StandardCommentSizer, m_StandardCommentTypeLabel, and NULL.
|
virtual |
Reimplemented from CImportExportAccess.
Definition at line 612 of file structuredcomment_panel.cpp.
References RunningInsideNCBI().
|
virtual |
Reimplemented from CImportExportAccess.
Definition at line 607 of file structuredcomment_panel.cpp.
References RunningInsideNCBI().
void CStructuredCommentPanel::OnChoice11Selected | ( | wxCommandEvent & | event | ) |
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE11
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE11
Definition at line 575 of file structuredcomment_panel.cpp.
References s_ShouldPropagateEvent(), TransferDataToWindow(), and x_GetFields().
|
private |
Definition at line 549 of file structuredcomment_panel.cpp.
References m_Sizer, m_User, NON_CONST_ITERATE, row, s_ShouldPropagateEvent(), TransferDataToWindow(), x_FindRow(), and x_GetFields().
|
virtual |
Reimplemented from CImportExportAccess.
Definition at line 617 of file structuredcomment_panel.cpp.
References CUser_object::AddField(), CSerialObject::Assign(), CCleanup::CleanupUserObject(), CUser_object_Base::GetData(), CRef< C, Locker >::GetPointer(), GetUser_object(), CUser_object_Base::IsSetData(), sm_StructuredCommentPrefix, and TransferDataFromWindow().
void CStructuredCommentPanel::OnHyperlinkctrlHyperlinkClicked | ( | wxHyperlinkEvent & | event | ) |
wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL
wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL
Definition at line 509 of file structuredcomment_panel.cpp.
References m_User, TransferDataToWindow(), and x_GetFields().
|
virtual |
Reimplemented from CImportExportAccess.
Definition at line 631 of file structuredcomment_panel.cpp.
References m_User, MSerial_AsnText, CRef< C, Locker >::Reset(), and TransferDataToWindow().
void CStructuredCommentPanel::OnTextEntered | ( | wxCommandEvent & | event | ) |
Definition at line 583 of file structuredcomment_panel.cpp.
References s_ShouldPropagateEvent(), and TransferDataFromWindow().
Referenced by s_AddRow().
|
static |
Definition at line 165 of file structuredcomment_panel.cpp.
References NStr::EndsWith(), NStr::StartsWith(), and str().
Referenced by CApplyStructCommentTreeItemData::SetData(), CSequencingTechnologyPanel::TransferDataFromWindow(), and x_GetFields().
|
private |
Definition at line 253 of file structuredcomment_panel.cpp.
References m_FieldNameCtrls, m_FieldValueCtrls, m_ScrolledWindow, m_ScrollRate, m_Sizer, m_TotalHeight, OnTextEntered(), ToWxString(), wxID_ANY, and wxT.
Referenced by TransferDataToWindow().
|
static |
Definition at line 154 of file structuredcomment_panel.cpp.
References NStr::EndsWith(), NStr::StartsWith(), and str().
Referenced by CSequencingTechnologyPanel::CreateControls(), CreateControls(), and TransferDataToWindow().
|
static |
Should we show tooltips?
Should we show tooltips?
Definition at line 473 of file structuredcomment_panel.cpp.
|
virtual |
Definition at line 454 of file structuredcomment_panel.cpp.
References x_GetFields().
Referenced by OnExport(), and OnTextEntered().
|
virtual |
Definition at line 290 of file structuredcomment_panel.cpp.
References NStr::EqualNocase(), CField_set_Base::Get(), CComment_rule_Base::GetFields(), CObject_id_Base::GetStr(), i, NStr::IntToString(), CObject_id_Base::IsStr(), ITERATE, m_FieldNameCtrls, m_FieldValueCtrls, m_ScrolledWindow, m_ScrollRate, m_Sizer, m_StandardCommentCtrl, m_StructuredCommentRules, m_TotalHeight, m_User, prefix, s_AddRow(), s_RemovePoundSigns(), sm_StructuredCommentPrefix, sm_StructuredCommentSuffix, suffix, ToWxString(), and rapidjson::value.
Referenced by ChangeSeqdesc(), OnChoice11Selected(), OnDelete(), OnHyperlinkctrlHyperlinkClicked(), and OnImport().
|
virtual |
Implements IDescEditorPanel.
Definition at line 600 of file structuredcomment_panel.cpp.
References CCleanup::CleanupUserObject(), and GetUser_object().
Referenced by CApplyStructCommentTreeItemData::GetMacroDescription(), and CApplyStructCommentTreeItemData::GetVariables().
|
private |
Definition at line 517 of file structuredcomment_panel.cpp.
References NStr::IsBlank(), m_StandardCommentCtrl, NULL, and ToStdString().
Referenced by OnDelete().
Definition at line 397 of file structuredcomment_panel.cpp.
References NStr::EqualNocase(), i, NStr::IsBlank(), m_FieldNameCtrls, m_FieldValueCtrls, m_StandardCommentCtrl, m_User, prefix, NStr::ReplaceInPlace(), s_AddPoundSigns(), sm_StructuredCommentPrefix, sm_StructuredCommentSuffix, and ToStdString().
Referenced by OnChoice11Selected(), OnDelete(), OnHyperlinkctrlHyperlinkClicked(), and TransferDataFromWindow().
|
private |
Definition at line 163 of file structuredcomment_panel.hpp.
Referenced by s_AddRow(), TransferDataToWindow(), and x_GetFields().
|
private |
Definition at line 164 of file structuredcomment_panel.hpp.
Referenced by s_AddRow(), TransferDataToWindow(), and x_GetFields().
wxScrolledWindow* CStructuredCommentPanel::m_ScrolledWindow |
Definition at line 134 of file structuredcomment_panel.hpp.
Referenced by CreateControls(), Init(), s_AddRow(), and TransferDataToWindow().
|
private |
Definition at line 162 of file structuredcomment_panel.hpp.
Referenced by s_AddRow(), and TransferDataToWindow().
wxBoxSizer* CStructuredCommentPanel::m_Sizer |
Definition at line 135 of file structuredcomment_panel.hpp.
Referenced by CreateControls(), Init(), OnDelete(), s_AddRow(), and TransferDataToWindow().
wxChoice* CStructuredCommentPanel::m_StandardCommentCtrl |
Definition at line 133 of file structuredcomment_panel.hpp.
Referenced by CreateControls(), Init(), TransferDataToWindow(), x_FindRow(), and x_GetFields().
wxBoxSizer* CStructuredCommentPanel::m_StandardCommentSizer |
Definition at line 131 of file structuredcomment_panel.hpp.
Referenced by CreateControls(), and Init().
wxStaticText* CStructuredCommentPanel::m_StandardCommentTypeLabel |
Definition at line 132 of file structuredcomment_panel.hpp.
Referenced by CreateControls(), and Init().
|
private |
Definition at line 166 of file structuredcomment_panel.hpp.
Referenced by CreateControls(), and TransferDataToWindow().
|
private |
Definition at line 161 of file structuredcomment_panel.hpp.
Referenced by s_AddRow(), and TransferDataToWindow().
|
private |
Definition at line 160 of file structuredcomment_panel.hpp.
Referenced by ChangeSeqdesc(), GetUser_object(), OnDelete(), OnHyperlinkctrlHyperlinkClicked(), OnImport(), TransferDataToWindow(), and x_GetFields().
Definition at line 157 of file structuredcomment_panel.hpp.
Referenced by CApplyStructCommentTreeItemData::GetVariables(), OnExport(), CApplyStructCommentTreeItemData::SetData(), TransferDataToWindow(), and x_GetFields().
Definition at line 158 of file structuredcomment_panel.hpp.
Referenced by CApplyStructCommentTreeItemData::GetVariables(), CApplyStructCommentTreeItemData::SetData(), TransferDataToWindow(), and x_GetFields().