wxWindowID
id,
constwxPoint& pos,
constwxSize&
size,
longstyle ) :
124wxPanel::Create( parent,
id, pos,
size, style );
129GetSizer()->SetSizeHints(
this);
172wxFlexGridSizer* itemFlexGridSizer2 =
newwxFlexGridSizer(2, 7, 0, 0);
173itemPanel1->SetSizer(itemFlexGridSizer2);
176itemFlexGridSizer2->Add(
m_FirstNameCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 0);
179 m_MiddleInitial=
newwxTextCtrl( itemPanel1,
ID_AUTH_MI, wxEmptyString, wxDefaultPosition, wxSize(100, -1), wxTE_PROCESS_ENTER );
180itemFlexGridSizer2->Add(
m_MiddleInitial, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 0);
183 m_LastNameCtrl=
newwxTextCtrl( itemPanel1,
ID_AUTH_LAST, wxEmptyString, wxDefaultPosition, wxSize(100, -1), wxTE_PROCESS_ENTER );
184itemFlexGridSizer2->Add(
m_LastNameCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 0);
198itemFlexGridSizer2->Add(
m_Suffix, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 0);
199 m_Suffix->SetToolTip(wxEmptyString);
209itemFlexGridSizer2->Add(
m_InsertSpinCtrl, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 0);
213itemFlexGridSizer2->Add(
m_MoveSpinCtrl, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 0);
217itemFlexGridSizer2->Add(
m_SwapButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 0);
223 if(!wxPanel::TransferDataFromWindow())
236 if(
m_Author->GetName().GetName().IsSetFirst()) {
241 if(
m_Author->GetName().GetName().IsSetLast()) {
251 stringsuffix = (
m_Author->SetName().SetName().IsSetSuffix()) ?
m_Author->GetName().GetName().GetSuffix() :
kEmptyStr;
259 returnwxPanel::TransferDataToWindow();
276 stringfirst_init = (name.
IsSetFirst()) ? macro::CMacroFunction_AuthorFix::s_GetFirstNameInitials(name.
GetFirst()) :
kEmptyStr;
280middle_init = middle_init.substr(first_init.length());
283middle_init = middle_init.substr(0, middle_init.length() - 1);
291 if(
m_Author->GetName().IsName()) {
346GetSizer()->SetSizeHints(
this);
353 while(parent && !authlistpanel) {
354parent = parent->GetParent();
357 returnauthlistpanel;
381 switch(evt.GetId()) {
412 const auto& p = author.
GetName();
414 const auto& person = p.
GetName();
415 if(person.IsSetLast() && person.GetLast() ==
"?"&&
416(!person.IsSetFirst() ||
NStr::IsBlank(person.GetFirst())) &&
417(!person.IsSetInitials() ||
NStr::IsBlank(person.GetInitials())) &&
418(!person.IsSetSuffix() ||
NStr::IsBlank(person.GetSuffix()))) {
422 else if(p.IsStr() && p.GetStr() ==
"?") {
virtual void AddLastAuthor(wxWindow *link)=0
virtual void InsertAuthorBefore(wxWindow *link)=0
virtual void InsertAuthorAfter(wxWindow *link)=0
void ShiftAuthorUp(wxWindow *link)
void ShiftAuthorDown(wxWindow *link)
void UseImageSet(int set)
@Name_std.hpp User-defined methods of the data storage class.
bool Create(wxWindow *parent, wxWindowID id=10025, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
wxArrayString m_SuffixStrings
virtual bool TransferDataFromWindow()
wxTextCtrl * m_FirstNameCtrl
CRef< objects::CAuthor > GetAuthor() const
~CSingleAuthorPanel()
Destructor.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual bool TransferDataToWindow()
string x_ParseInitialsFromAuthor()
wxTextCtrl * m_MiddleInitial
CSingleAuthorPanel()
Constructors.
CNoTabBitmapButton * m_SwapButton
CLargeNoTabSpinControl * m_MoveSpinCtrl
void Init()
Initialises member variables.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void SetAuthor(const objects::CAuthor &author)
static bool ShowToolTips()
Should we show tooltips?
static string s_ParseInitialsFromName(const objects::CName_std &name)
void CreateControls()
Creates the controls and sizers.
void OnMoveAuthorUpdated(wxCommandEvent &evt)
void OnFirstNameKillFocus(wxFocusEvent &event)
wxTextCtrl * m_LastNameCtrl
CLargeNoTabSpinControl * m_InsertSpinCtrl
CRef< objects::CAuthor > m_Author
void OnSwapName(wxCommandEvent &evt)
static bool IsPlaceholder(const objects::CAuthor &author)
thread_local unique_ptr< FtaMsgPost > bmp
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
@ eNocase
Case insensitive compare.
const TName & GetName(void) const
Get the Name member data.
bool IsSetName(void) const
Author, Primary or Secondary Check if a value has been assigned to Name data member.
const TInitials & GetInitials(void) const
Get the Initials member data.
bool IsSetInitials(void) const
first + middle initials Check if a value has been assigned to Initials data member.
const TFirst & GetFirst(void) const
Get the First member data.
const TName & GetName(void) const
Get the variant data.
bool IsSetFirst(void) const
Check if a value has been assigned to First data member.
const struct ncbi::grid::netcache::search::fields::SIZE size
static const char * arrows_xpm[]
CAuthorNamesContainer * s_FindListPanel(wxWindow *parent)
#define ID_AUTH_SWAP_NAME
wxString ToWxString(const string &s)
string ToAsciiStdString(const wxString &input)
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