: m_PageSize(GetPageSize(request, defaultPageSize)),
56m_PageBlockSize(
max(1, pageBlockSize)),
57m_PageChanged(
false), m_view(view)
65 const string&
value=
i->second;
88 _TRACE(
"Exception in CPager::CPager: "<< e.what() );
100 _TRACE(
"Exception in CPager::IsPagerCommand: "<< e.what() );
109 if( !page || oldPageSize ==
entries.end() )
110 throwruntime_error(
"Error getting page params");
112 intoldFirstItem = page *
116 _TRACE(
"Exception in CPager::CPager: "<< e.what() );
136 const string&
value=
i->second.GetValue();
152 _TRACE(
"Exception in CPager::IsPagerCommand: "<< e.what() );
162 _TRACE(
"Exception in CPager::IsPagerCommand: "<< e.what() );
177 if( displayPage >= 0 )
179 _TRACE(
"Negative page start in CPager::GetDisplayedPage: "<<
182 _TRACE(
"Exception in CPager::GetDisplayedPage "<< e.what() );
202 stringdispMax = entry->second;
204 if( pageSize > 0 ) {
211 _TRACE(
"Nonpositive page size in CPager::GetPageSize: "<<
214 _TRACE(
"Exception in CPager::GetPageSize "<< e.what() );
218 returndefaultPageSize;
260CHTML_div* node =
newCHTML_div;
261node->SetClass(
"medium2");
268 if(firstItem != endItem) {
269snprintf(
buf,
kBufSize,
"Items %d - %d", firstItem, endItem);
285 const intimgX,
const intimgY,
286 const string& js_suffix
)
const 301 return new CPagerView(*
this, imgDir, imgX, imgY);
306 const intimgX,
const intimgY)
307: m_ImagesDir(imgDir), m_ImgSizeX(imgX), m_ImgSizeY(imgY), m_Pager(pager)
314 const string& prefix,
const string& suffix)
320 for(
size_t i= 0;
i< s.size(); ++
i) {
333 const string& prefix,
334 const string& suffix)
339 for(
size_t i= 0;
i< s.size(); ++
i) {
360 intfirstBlockPage = currentPage - currentPage % blockSize;
361 intlastPage =
max(0, (itemCount + pageSize - 1) / pageSize - 1);
362 intlastBlockPage =
min(firstBlockPage + blockSize - 1, lastPage);
364 if(firstBlockPage > 0) {
375 for(
int i= firstBlockPage;
i<= lastBlockPage ; ++
i) {
376 if(
i== currentPage) {
386 if(lastPage != lastBlockPage) {
400: m_Pager(pager), m_jssuffix(js_suffix)
410 intlastPage =
max(0, (itemCount + pageSize - 1) / pageSize - 1);
413 if(currentPage > 0) {
415 "document.frmQueryBox; "\
416 "frm.inputpage.value="+
418 "; Go('Pager');",
"Previous");
419 prev->SetClass(
"dblinks");
428 "form.cmd.value='';form."+
431 ".value;Go('Pager');");
445 "if(form.textpage"+ suffix +
"){form.textpage"+
446suffix +
".value="+
"this.value; " 452 "this.value;KeyPress('Pager',event);");
456CHTML_div* div =
newCHTML_div;
457div->SetClass(
"medium2");
458div->AppendChild(
newCHTML_nbsp);
460div->AppendChild(
newCHTML_nbsp);
471 if(currentPage < lastPage) {
473 "document.frmQueryBox;"\
474 "frm.inputpage.value="+
476 ";Go('Pager');",
"Next");
477 next->SetClass(
"dblinks");
485: m_Pager(pager), m_jssuffix(js_suffix)
495 if(item_count > 20) {
506 stringpage_no =
"1";
container_type::value_type value_type
Include a standard set of the NCBI C++ Toolkit most basic headers.
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static const char * column
TCgiEntries::iterator TCgiEntriesI
TCgiEntries::const_iterator TCgiEntriesCI
const TCgiEntries & GetEntries(void) const
Get a set of entries(decoded) received from the client.
CHTMLNode * SetId(const string &id)
void SetEventHandler(const EHTML_EH_Attribute event, const string &value)
CHTML_tc * Cell(TIndex row, TIndex column, ECellType type=eAnyCell)
CHTMLNode * SetClass(const string &class_name)
CHTMLNode * SetWidth(int width)
CHTMLNode * SetAlign(const string &align)
CHTML_table * SetCellSpacing(int spacing)
CHTML_tc * InsertNextCell(CNCBINode *node)
CNCBINode * AppendChild(CNCBINode *child)
CHTML_tc * InsertAt(TIndex row, TIndex column, CNCBINode *node)
void SetAttribute(const string &name, const string &value)
CHTMLNode * SetHeight(int height)
CHTML_table * SetCellPadding(int padding)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
const GenericPointer< typename T::ValueType > T2 value
static const streamsize kBufSize
static wxAcceleratorEntry entries[3]
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