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

Search Toolkit Book for CMacroAuthorNamesPanel

#include <gui/widgets/edit/macro_authors_panel.hpp>

+ Inheritance diagram for CMacroAuthorNamesPanel:
+ Collaboration diagram for CMacroAuthorNamesPanel:

Public Types

enum  {
  ID_CMACROAUTHORNAMESPANEL = 10035 , ID_MACROAUTHORSSCROLLEDWND = 10036 , ID_ADDAUTHORBTN = 10037 , ID_IMPORTAUTHORSBTN = 10038 ,
  ID_MACROAUTHORDELETELINK = 10039
}
 @begin CMacroAuthorNamesPanel member variables More...
 
using TNameTuple = tuple< string, string, string, string >
 
using TAuthorsVec = vector< TNameTuple >
 

Public Member Functions

 CMacroAuthorNamesPanel ()
 Constructors. More...
 
 CMacroAuthorNamesPanel (wxWindow *parent, wxWindowID id=ID_CMACROAUTHORNAMESPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
 
bool Create (wxWindow *parent, wxWindowID id=ID_CMACROAUTHORNAMESPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
 Creation. More...
 
 ~CMacroAuthorNamesPanel ()
 Destructor. More...
 
void Init ()
 Initialises member variables. More...
 
void CreateControls ()
 Creates the controls and sizers. More...
 
void OnImportAuthorsClicked (wxCommandEvent &event)
 wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORTAUTHORSBTN More...
 
void OnDelete (wxHyperlinkEvent &event)
 
TAuthorsVec GetAuthorNames () const
 @end CMacroAuthorNamesPanel event handler declarations More...
 
wxBitmap GetBitmapResource (const wxString &name)
 Retrieves bitmap resources. More...
 
wxIcon GetIconResource (const wxString &name)
 Retrieves icon resources. More...
 
- Public Member Functions inherited from CAuthorNamesContainer
 ~CAuthorNamesContainer ()
 
void DeleteRow (wxWindow *wnd)
 
void ShiftAuthorUp (wxWindow *link)
 
void ShiftAuthorDown (wxWindow *link)
 
void ImportAuthorsFromFile ()
 
virtual void SetWorkDir (const wxString &workDir)
 
- Public Member Functions inherited from IWorkDirClient
virtual ~IWorkDirClient ()
 

Static Public Member Functions

static bool ShowToolTips ()
 Should we show tooltips? More...
 

Private Member Functions

void x_AddEmptyRow ()
 
void x_SetAuthors (objects::CAuth_list &auth_list)
 

Private Attributes

size_t m_Rows { 6 }
 
int m_RowHeight { 0 }
 

CAuthorNamesContainer implementation

virtual void AddLastAuthor (wxWindow *link)
 
virtual void InsertAuthorBefore (wxWindow *link)
 
virtual void InsertAuthorAfter (wxWindow *link)
 
virtual void SetAuthors (const objects::CAuth_list &auth_list)
 
virtual wxSizerItem * x_FindSingleAuthor (wxWindow *wnd, wxSizerItemList &itemList)
 
virtual void x_AddRowToWindow (wxWindow *row)
 
virtual void x_InsertRowtoWindow (wxWindow *row, size_t index)
 
virtual void x_MoveRowUp (int row_num)
 
virtual int x_FindRow (wxWindow *wnd, wxSizerItemList &itemList)
 

Additional Inherited Members

- Protected Member Functions inherited from CAuthorNamesContainer
 CAuthorNamesContainer ()
 
- Protected Attributes inherited from CAuthorNamesContainer
wxScrolledWindow * m_ScrolledWindow
 
wxFlexGridSizer * m_Sizer
 
wxString m_WorkDir
 

Detailed Description

CMacroAuthorNamesPanel class declaration

Definition at line 58 of file macro_authors_panel.hpp.

Member Typedef Documentation

◆ TAuthorsVec

Definition at line 66 of file macro_authors_panel.hpp.

◆ TNameTuple

Definition at line 65 of file macro_authors_panel.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

@begin CMacroAuthorNamesPanel member variables

Control identifiers

Enumerator
ID_CMACROAUTHORNAMESPANEL 
ID_MACROAUTHORSSCROLLEDWND 
ID_ADDAUTHORBTN 
ID_IMPORTAUTHORSBTN 
ID_MACROAUTHORDELETELINK 

Definition at line 125 of file macro_authors_panel.hpp.

Constructor & Destructor Documentation

◆ CMacroAuthorNamesPanel() [1/2]

CMacroAuthorNamesPanel::CMacroAuthorNamesPanel ( )

Constructors.

Definition at line 70 of file macro_authors_panel.cpp.

References Init().

◆ CMacroAuthorNamesPanel() [2/2]

CMacroAuthorNamesPanel::CMacroAuthorNamesPanel ( wxWindow *  parent,
wxWindowID  id = ID_CMACROAUTHORNAMESPANEL,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL 
)

◆ ~CMacroAuthorNamesPanel()

CMacroAuthorNamesPanel::~CMacroAuthorNamesPanel ( )

Destructor.

Definition at line 108 of file macro_authors_panel.cpp.

Member Function Documentation

◆ AddLastAuthor()

void CMacroAuthorNamesPanel::AddLastAuthor ( wxWindow *  link)
virtual

◆ Create()

bool CMacroAuthorNamesPanel::Create ( wxWindow *  parent,
wxWindowID  id = ID_CMACROAUTHORNAMESPANEL,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL 
)

Creation.

Definition at line 88 of file macro_authors_panel.cpp.

References CreateControls(), and ncbi::grid::netcache::search::fields::size.

Referenced by CMacroAuthorNamesPanel().

◆ CreateControls()

void CMacroAuthorNamesPanel::CreateControls ( )

◆ GetAuthorNames()

CMacroAuthorNamesPanel::TAuthorsVec CMacroAuthorNamesPanel::GetAuthorNames ( ) const

◆ GetBitmapResource()

wxBitmap CMacroAuthorNamesPanel::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Definition at line 267 of file macro_authors_panel.cpp.

◆ GetIconResource()

wxIcon CMacroAuthorNamesPanel::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Definition at line 280 of file macro_authors_panel.cpp.

◆ Init()

void CMacroAuthorNamesPanel::Init ( void  )

Initialises member variables.

Definition at line 119 of file macro_authors_panel.cpp.

References CAuthorNamesContainer::m_ScrolledWindow, and CAuthorNamesContainer::m_Sizer.

Referenced by CMacroAuthorNamesPanel().

◆ InsertAuthorAfter()

void CMacroAuthorNamesPanel::InsertAuthorAfter ( wxWindow *  link)
virtual

◆ InsertAuthorBefore()

void CMacroAuthorNamesPanel::InsertAuthorBefore ( wxWindow *  link)
virtual

◆ OnDelete()

void CMacroAuthorNamesPanel::OnDelete ( wxHyperlinkEvent &  event)

Definition at line 313 of file macro_authors_panel.cpp.

References CAuthorNamesContainer::DeleteRow(), and wxT.

◆ OnImportAuthorsClicked()

void CMacroAuthorNamesPanel::OnImportAuthorsClicked ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORTAUTHORSBTN

Definition at line 308 of file macro_authors_panel.cpp.

References CAuthorNamesContainer::ImportAuthorsFromFile().

◆ SetAuthors()

void CMacroAuthorNamesPanel::SetAuthors ( const objects::CAuth_list &  auth_list)
virtual

◆ ShowToolTips()

bool CMacroAuthorNamesPanel::ShowToolTips ( )
static

Should we show tooltips?

Definition at line 258 of file macro_authors_panel.cpp.

◆ x_AddEmptyRow()

void CMacroAuthorNamesPanel::x_AddEmptyRow ( )
private

◆ x_AddRowToWindow()

void CMacroAuthorNamesPanel::x_AddRowToWindow ( wxWindow *  row)
privatevirtual

◆ x_FindRow()

int CMacroAuthorNamesPanel::x_FindRow ( wxWindow *  wnd,
wxSizerItemList &  itemList 
)
privatevirtual

Implements CAuthorNamesContainer.

Definition at line 468 of file macro_authors_panel.cpp.

References NULL.

◆ x_FindSingleAuthor()

wxSizerItem * CMacroAuthorNamesPanel::x_FindSingleAuthor ( wxWindow *  wnd,
wxSizerItemList &  itemList 
)
privatevirtual

Implements CAuthorNamesContainer.

Definition at line 191 of file macro_authors_panel.cpp.

◆ x_InsertRowtoWindow()

void CMacroAuthorNamesPanel::x_InsertRowtoWindow ( wxWindow *  row,
size_t  index 
)
privatevirtual

◆ x_MoveRowUp()

void CMacroAuthorNamesPanel::x_MoveRowUp ( int  row_num)
privatevirtual

◆ x_SetAuthors()

void CMacroAuthorNamesPanel::x_SetAuthors ( objects::CAuth_list &  auth_list)
private

Member Data Documentation

◆ m_RowHeight

int CMacroAuthorNamesPanel::m_RowHeight { 0 }
private

Definition at line 148 of file macro_authors_panel.hpp.

Referenced by x_AddEmptyRow(), and x_AddRowToWindow().

◆ m_Rows

size_t CMacroAuthorNamesPanel::m_Rows { 6 }
private

Definition at line 147 of file macro_authors_panel.hpp.

Referenced by CreateControls().


The documentation for this class was generated from the following files:
Modified on Fri May 24 14:50:12 2024 by modify_doxy.py rev. 669887