NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
CStructuredCommentPanel Class Reference

Search Toolkit Book for CStructuredCommentPanel

#include "structuredcomment_panel.hpp"
(Private to src/gui/widgets/edit.)

+ Inheritance diagram for CStructuredCommentPanel:
+ Collaboration diagram for CStructuredCommentPanel:

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< CSerialObjectOnExport (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
 

Detailed Description

CStructuredCommentPanel class declaration

Definition at line 68 of file structuredcomment_panel.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Control identifiers.

Enumerator
ID_CSTRUCTUREDCOMMENTPANEL 
ID_CHOICE11 
ID_HYPERLINKCTRL 
ID_SCROLLEDWINDOW 

Definition at line 137 of file structuredcomment_panel.hpp.

Constructor & Destructor Documentation

◆ CStructuredCommentPanel() [1/2]

CStructuredCommentPanel::CStructuredCommentPanel ( )

Constructors.

CStructuredCommentPanel type definition

CStructuredCommentPanel event table definition

CStructuredCommentPanel constructors

Definition at line 88 of file structuredcomment_panel.cpp.

References Init().

◆ CStructuredCommentPanel() [2/2]

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::~CStructuredCommentPanel ( )

Destructor.

CStructuredCommentPanel destructor

Definition at line 128 of file structuredcomment_panel.cpp.

Member Function Documentation

◆ ChangeSeqdesc()

void CStructuredCommentPanel::ChangeSeqdesc ( const objects::CSeqdesc &  desc)
virtual

◆ Create()

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 
)

◆ CreateControls()

void CStructuredCommentPanel::CreateControls ( )

◆ GetBitmapResource()

wxBitmap CStructuredCommentPanel::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Get bitmap resources

Definition at line 482 of file structuredcomment_panel.cpp.

◆ GetIconResource()

wxIcon CStructuredCommentPanel::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Get icon resources

Definition at line 495 of file structuredcomment_panel.cpp.

◆ GetUser_object()

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

◆ Init()

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.

◆ IsExportEnabled()

bool CStructuredCommentPanel::IsExportEnabled ( void  )
virtual

Reimplemented from CImportExportAccess.

Definition at line 612 of file structuredcomment_panel.cpp.

References RunningInsideNCBI().

◆ IsImportEnabled()

bool CStructuredCommentPanel::IsImportEnabled ( void  )
virtual

Reimplemented from CImportExportAccess.

Definition at line 607 of file structuredcomment_panel.cpp.

References RunningInsideNCBI().

◆ OnChoice11Selected()

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

◆ OnDelete()

void CStructuredCommentPanel::OnDelete ( wxHyperlinkEvent &  event)
private

◆ OnExport()

CRef< CSerialObject > CStructuredCommentPanel::OnExport ( void  )
virtual

◆ OnHyperlinkctrlHyperlinkClicked()

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

◆ OnImport()

void CStructuredCommentPanel::OnImport ( CNcbiIfstream istr)
virtual

◆ OnTextEntered()

void CStructuredCommentPanel::OnTextEntered ( wxCommandEvent &  event)

Definition at line 583 of file structuredcomment_panel.cpp.

References s_ShouldPropagateEvent(), and TransferDataFromWindow().

Referenced by s_AddRow().

◆ s_AddPoundSigns()

void CStructuredCommentPanel::s_AddPoundSigns ( string str)
static

◆ s_AddRow()

void CStructuredCommentPanel::s_AddRow ( string  field_name,
string  field_value,
bool  static_fieldname = false,
bool  is_required = false 
)
private

◆ s_RemovePoundSigns()

void CStructuredCommentPanel::s_RemovePoundSigns ( string str)
static

◆ ShowToolTips()

bool CStructuredCommentPanel::ShowToolTips ( )
static

Should we show tooltips?

Should we show tooltips?

Definition at line 473 of file structuredcomment_panel.cpp.

◆ TransferDataFromWindow()

bool CStructuredCommentPanel::TransferDataFromWindow ( )
virtual

Definition at line 454 of file structuredcomment_panel.cpp.

References x_GetFields().

Referenced by OnExport(), and OnTextEntered().

◆ TransferDataToWindow()

bool CStructuredCommentPanel::TransferDataToWindow ( )
virtual

◆ UpdateSeqdesc()

void CStructuredCommentPanel::UpdateSeqdesc ( objects::CSeqdesc &  desc)
virtual

◆ x_FindRow()

int CStructuredCommentPanel::x_FindRow ( wxWindow *  wnd,
wxSizerItemList &  itemList 
)
private

Definition at line 517 of file structuredcomment_panel.cpp.

References NStr::IsBlank(), m_StandardCommentCtrl, NULL, and ToStdString().

Referenced by OnDelete().

◆ x_GetFields()

bool CStructuredCommentPanel::x_GetFields ( bool  keep_blanks = false)
private

Member Data Documentation

◆ m_FieldNameCtrls

vector<wxControl*> CStructuredCommentPanel::m_FieldNameCtrls
private

Definition at line 163 of file structuredcomment_panel.hpp.

Referenced by s_AddRow(), TransferDataToWindow(), and x_GetFields().

◆ m_FieldValueCtrls

vector<wxTextCtrl*> CStructuredCommentPanel::m_FieldValueCtrls
private

Definition at line 164 of file structuredcomment_panel.hpp.

Referenced by s_AddRow(), TransferDataToWindow(), and x_GetFields().

◆ m_ScrolledWindow

wxScrolledWindow* CStructuredCommentPanel::m_ScrolledWindow

Definition at line 134 of file structuredcomment_panel.hpp.

Referenced by CreateControls(), Init(), s_AddRow(), and TransferDataToWindow().

◆ m_ScrollRate

int CStructuredCommentPanel::m_ScrollRate
private

Definition at line 162 of file structuredcomment_panel.hpp.

Referenced by s_AddRow(), and TransferDataToWindow().

◆ m_Sizer

wxBoxSizer* CStructuredCommentPanel::m_Sizer

◆ m_StandardCommentCtrl

wxChoice* CStructuredCommentPanel::m_StandardCommentCtrl

◆ m_StandardCommentSizer

wxBoxSizer* CStructuredCommentPanel::m_StandardCommentSizer

Definition at line 131 of file structuredcomment_panel.hpp.

Referenced by CreateControls(), and Init().

◆ m_StandardCommentTypeLabel

wxStaticText* CStructuredCommentPanel::m_StandardCommentTypeLabel

Definition at line 132 of file structuredcomment_panel.hpp.

Referenced by CreateControls(), and Init().

◆ m_StructuredCommentRules

CConstRef<objects::CComment_set> CStructuredCommentPanel::m_StructuredCommentRules
private

Definition at line 166 of file structuredcomment_panel.hpp.

Referenced by CreateControls(), and TransferDataToWindow().

◆ m_TotalHeight

int CStructuredCommentPanel::m_TotalHeight
private

Definition at line 161 of file structuredcomment_panel.hpp.

Referenced by s_AddRow(), and TransferDataToWindow().

◆ m_User

CRef<objects::CUser_object> CStructuredCommentPanel::m_User
private

◆ sm_StructuredCommentPrefix

const string CStructuredCommentPanel::sm_StructuredCommentPrefix = "StructuredCommentPrefix"
static

◆ sm_StructuredCommentSuffix

const string CStructuredCommentPanel::sm_StructuredCommentSuffix = "StructuredCommentSuffix"
static

The documentation for this class was generated from the following files:
Modified on Sat Apr 27 11:21:58 2024 by modify_doxy.py rev. 669887