Popuplib.Popup list

From EventScripts Community Encyclopedia

Example

import popuplib
def createEasylist(userid,sequence):
    p = popuplib.easylist('example_easylist')
    p.settitle('this is an example')
    blah = map(lambda x: p.additem(x),sequence)
    p.send(userid)

Class Information

i_help popuplib.Popup_list
class Popup_list(Popup_easymenu)
 |  Easymenu like structure that shows 10 non-selectable numbered items per page
 |
 |  Method resolution order:
 |      Popup_list
 |      Popup_easymenu
 |      Popup_base
 |      __builtin__.object
 |
 |  Methods defined here:
 |
 |  __init__(self, pPopupid, options=10)
 |      Initialize easylist
 |
 |  additem(self, text, value=None, state=None, lang=None)
 |      Add an item to the easylist
 |
 |  i_recacheVGUI(self, pages, userlang, maxindex, totalpages)
 |      INTERNAL
 |      recache VGUI easylist (overrides easymenu method)
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from Popup_easymenu:
 |
 |  __repr__(self)
 |      Representation
 |
 |  addoption(self, item, text, state=None, lang=None)
 |      Add a new option to the menu
 |
 |  checkCache(self, userid)
 |      INTERNAL (semi)
 |      check the cache status and recache as necessary
 |
 |  checklang(self, lang=None)
 |      INTERNAL
 |      Checks if the current language exists and create it as necessary
 |
 |  findOption(self, item, lang=None)
 |      INTERNAL
 |      Find option by its value
 |
 |  getPage(self, userid)
 |      Returns the page number the user has active
 |
 |  getPageCount(self, userlang=None)
 |      Returns the number of pages
 |
 |  getPageNumber(self, option, language)
 |      INTERNAL
 |      Returns the page number on which the option is present in
 |
 |  handleChoice(self, choice, userid)
 |      handle menu choice as a result of client command
 |
 |  i_recache(self, pages, userlang)
 |      INTERNAL
 |      do the actual construction
 |
 |  i_recacheRadio(self, pages, userlang, maxindex, totalpages)
 |      INTERNAL
 |      Recache RADIO style easymenu
 |
 |  information(self, listlevel)
 |      Print out some information to server console
 |
 |  pageformatend(self, page, total, language)
 |      INTERNAL
 |      Formats the end of a page
 |
 |  pageformatstart(self, page, total, language)
 |      INTERNAL
 |      Formats the start of a page
 |
 |  recache(self, users=[], pages=None)
 |      recache the popup
 |
 |  sendPage(self, users, pagenumber)
 |      Sets active page and sends the menu to users
 |
 |  setdescription(self, desc, lang=None)
 |      Set the description for the easymenu
 |
 |  setoption(self, item, text=None, state=None, lang=None)
 |      Edit an existing option
 |
 |  settitle(self, desc, pagenumbers=30, lang=None)
 |      Set the title for the easymenu
 |
 |  submenu(self, item, menuname=None)
 |      set a submenu for menuselect 10
 |
 |  unsendPage(self, users, pagenumber)
 |      Unsends the easymenu from users that have the specified page active
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from Popup_base:
 |
 |  delete(self)
 |      delete this popup, calls global delete function
 |
 |  i_endlang(self, userid)
 |      INTERNAL
 |      User wrapper for i_endlangg
 |
 |  i_endlangg(self, userlang)
 |      INTERNAL
 |      Returns usable language code for constructable strings,
 |      tries to conform to the language passed in
 |
 |  i_userlang(self, userid)
 |      INTERNAL
 |      Returns a usable language code from cache,
 |      tries to conform to the language the user itself is using
 |
 |  isRadioMenu(self)
 |      Performs prioritized checking on whether the menu is to be displayed
 |      as radio menu or VGUI dialog
 |
 |  send(self, pUsers, prio=False)
 |      send this popup to users queue
 |
 |  timeout(self, mode, time)
 |      set send/view timeout
 |
 |  unsend(self, pUsers)
 |      remove this popup from users queue and display
 |
 |  update(self, pUsers)
 |      redisplay this popup if its the visible one
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from Popup_base:
 |
 |  __dict__
 |      dictionary for instance variables (if defined)
 |
 |  __weakref__
 |      list of weak references to the object (if defined)

This article is a stub. Please help by adding to it.
blog comments powered by Disqus