{
    "mode": "pydoc",
    "parameter": "snack",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/snack/json",
    "generated": "2026-06-02T15:03:59Z",
    "sections": {
        "NAME": {
            "content": "snack\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module provides the NEWT Windowing toolkit API for Python\nThis is a lightweight text-mode windowing library, based on slang.\n\nClasses:\n\n- Widget\n- Button\n- CompactButton\n- Checkbox\n- SingleRadioButton\n- Listbox\n- Textbox\n- TextboxReflowed\n- Label\n- Scale\n- Entry\n- Form\n- Grid\n- SnackScreen\n- RadioGroup\n- RadioBar\n- ButtonBar\n- GridFormHelp\n- GridForm\n- CheckboxTree\n- Clistbox\n\nFunctions:\n\n- ListboxChoiceWindow\n- ButtonChoiceWindow\n- EntryWindow\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.object\nForm\nGrid\nButtonBar\nCListbox\nGridFormHelp\nGridForm\nRadioBar\nSnackScreen\nWidget\nButton\nCheckbox\nCheckboxTree\nCompactButton\nEntry\nLabel\nListbox\nRadioGroup\nScale\nSingleRadioButton\nTextbox\nTextboxReflowed\n",
            "subsections": [
                {
                    "name": "class Button",
                    "content": "|  Button(text)\n|\n|  Basic button class, takes button text as parameter\n|\n|  method:\n|\n|   - Button(self, text): returns a button\n|\n|  Method resolution order:\n|      Button\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, text)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class ButtonBar",
                    "content": "|  ButtonBar(screen, buttonlist, compact=0)\n|\n|  Bar of buttons, based on grid.\n|\n|  methods:\n|\n|   - ButtonBar(screen, buttonlist,buttonlist, compact = 0):\n|   - buttonPressed(self, result):  Takes the widget returned by Form.run and looks to see\n|                   if it was one of the widgets in the ButtonBar.\n|\n|  Method resolution order:\n|      ButtonBar\n|      Grid\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, screen, buttonlist, compact=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  buttonPressed(self, result)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Grid:\n|\n|  place(self, x, y)\n|\n|  setField(self, what, col, row, padding=(0, 0, 0, 0), anchorLeft=0, anchorTop=0, anchorRight=0, anchorBottom=0, growx=0, growy=0)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Grid:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class CListbox",
                    "content": "|  CListbox(height, cols, colwidths, scroll=0, returnExit=0, width=0, colpad=1, coltextalign=None, collabels=None, collabelalign=None, adjustwidth=0)\n|\n|  Clistbox convenience class.\n|\n|  methods:\n|\n|   - Clistbox(self, height, cols, colswidths, scroll = 0)       : constructor\n|   - colFormText(self, coltext, align = None, adjustwidth = 0) : column text.\n|   - append(self, coltext, item, coltextalign = None)         :\n|   - insert(self, coltext, item, before, coltextalign = None)\n|   - delete(self, item)\n|   - replace(self, coltext, item, coltextalign = None)\n|   - current(self) : returns current item\n|   - setCurrent(self, item): sets an item as current\n|   - clear(self): clear the listbox\n|\n|   Alignments may be LEFT, RIGHT, CENTER, None\n|\n|  Method resolution order:\n|      CListbox\n|      Grid\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, height, cols, colwidths, scroll=0, returnExit=0, width=0, colpad=1, coltextalign=None, collabels=None, collabelalign=None, adjustwidth=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  append(self, coltext, item, coltextalign=None)\n|\n|  clear(self)\n|\n|  colFormText(self, coltext, align=None, adjustwidth=0)\n|\n|  current(self)\n|\n|  delete(self, item)\n|\n|  insert(self, coltext, item, before, coltextalign=None)\n|\n|  replace(self, coltext, item, coltextalign=None)\n|\n|  setCurrent(self, item)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Grid:\n|\n|  place(self, x, y)\n|\n|  setField(self, what, col, row, padding=(0, 0, 0, 0), anchorLeft=0, anchorTop=0, anchorRight=0, anchorBottom=0, growx=0, growy=0)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Grid:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Checkbox",
                    "content": "|  Checkbox(text, isOn=0)\n|\n|  A checkbox.\n|\n|  methods:\n|\n|    - Checkbox(self, text, isOn = 0) : text, and boolean as to default value\n|    - setValue(self)                 : set value\n|    - value(self, value)             : return checkbox value\n|    - selected(self)                 : returns boolean\n|    - setFlags(self, flag, sense)    : set flags\n|\n|    flags:  FLAGDISABLED, FLAGSSET, FLAGSRESET\n|\n|  Method resolution order:\n|      Checkbox\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, text, isOn=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  selected(self)\n|\n|  setFlags(self, flag, sense)\n|\n|  setValue(self, value)\n|\n|  value(self)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class CheckboxTree",
                    "content": "|  CheckboxTree(height, scroll=0, width=None, hidecheckbox=0, unselectable=0)\n|\n|  CheckboxTree combo widget,\n|\n|  methods:\n|\n|   - CheckboxTree(self, height, scroll = 0, width = None, hidecheckbox = 0, unselectable = 0)\n|                  constructor.\n|   - append(self, text, item = None, selected = 0):\n|   - addItem(self, text, path, item = None, selected = 0):\n|   - getCurrent(self):\n|   - getSelection(self):\n|   - setEntry(self, item, text):\n|   - setCurrent(self, item):\n|   - setEntryValue(self, item, selected = 1):\n|   - getEntryValue(self, item):\n|\n|  Method resolution order:\n|      CheckboxTree\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, height, scroll=0, width=None, hidecheckbox=0, unselectable=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  addItem(self, text, path, item=None, selected=0)\n|\n|  append(self, text, item=None, selected=0)\n|\n|  getCurrent(self)\n|\n|  getEntryValue(self, item)\n|\n|  getSelection(self)\n|\n|  setCurrent(self, item)\n|\n|  setEntry(self, item, text)\n|\n|  setEntryValue(self, item, selected=1)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class CompactButton",
                    "content": "|  CompactButton(text)\n|\n|  Compact Button class (less frilly button decoration).\n|\n|  methods:\n|\n|   - CompactButton(self,text) : create button, with text.\n|\n|  Method resolution order:\n|      CompactButton\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, text)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Entry",
                    "content": "|  Entry(width, text='', hidden=0, password=0, scroll=1, returnExit=0)\n|\n|  Entry widget.\n|\n|  methods:\n|\n|   - Entry(self, width, text = \"\", hidden = 0, password = 0, scroll = 1, returnExit = 0)\n|        constructor. hidden doesn't show text, password stars it out,\n|        scroll includes scroll bars;\n|        if returnExit is set, return from Form when exiting this element, else\n|         proceed to next entry widget.\n|   - value(self): return value.\n|   - set(text, cursorAtEnd = 1) : set the text\n|   - setFlags (flag, sense) : flags can be FLAGDISABLED, FLAGSSET, FLAGSRESET, FLAGSTOGGLE\n|\n|  Method resolution order:\n|      Entry\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, width, text='', hidden=0, password=0, scroll=1, returnExit=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  set(self, text, cursorAtEnd=1)\n|\n|  setFlags(self, flag, sense)\n|\n|  value(self)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Form",
                    "content": "|  Form(helpArg=None)\n|\n|  Base Form class, from which Grid, etc. inherit\n|\n|  methods:\n|\n|   - Form(self, helpArg = None) : constructor.\n|   - addHotKey(self, keyname) : keynames of form \"F1\" through \"F12\", \"ESC\"\n|   - add(self, widget) : Add a widget\n|   - run(self): run a  form, expecting input\n|   - draw(self): draw form.\n|   - setTimer(self, timer) : add a timer\n|   - watchFile(self, file, flags) : watch a named file\n|   - setCurrent (self, co): Set a given widget as the current focus\n|\n|  Methods defined here:\n|\n|  init(self, helpArg=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  add(self, widget)\n|\n|  addHotKey(self, keyname)\n|\n|  draw(self)\n|\n|  run(self)\n|\n|  setCurrent(self, co)\n|\n|  setTimer(self, timer)\n|\n|  watchFile(self, file, flags)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Grid",
                    "content": "|  Grid(*args)\n|\n|  Grid class.\n|\n|  methods:\n|\n|   - place(self,x,y): Return what is placed at (x,y)\n|   - setField(self, what, col, row, padding = (0, 0, 0, 0),\n|              anchorLeft = 0, anchorTop = 0, anchorRight = 0,\n|              anchorBottom = 0, growx = 0, growy = 0):\n|              used to add widget 'what' to grid.\n|   - Grid(self, *args): eg. g = Grid(2,3) for 2x3 grid\n|\n|  Methods defined here:\n|\n|  init(self, *args)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  place(self, x, y)\n|\n|  setField(self, what, col, row, padding=(0, 0, 0, 0), anchorLeft=0, anchorTop=0, anchorRight=0, anchorBottom=0, growx=0, growy=0)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class GridForm",
                    "content": "|  GridForm(screen, title, *args)\n|\n|  GridForm class (extends GridFormHelp):\n|\n|  methods:\n|\n|   - GridForm(self, screen, title, *args):\n|\n|  Method resolution order:\n|      GridForm\n|      GridFormHelp\n|      Grid\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, screen, title, *args)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from GridFormHelp:\n|\n|  add(self, widget, col, row, padding=(0, 0, 0, 0), anchorLeft=0, anchorTop=0, anchorRight=0, anchorBottom=0, growx=0, growy=0)\n|\n|  addHotKey(self, keyname)\n|\n|  create(self, x=None, y=None)\n|\n|  draw(self)\n|\n|  run(self, x=None, y=None)\n|\n|  runOnce(self, x=None, y=None)\n|\n|  runPopup(self)\n|\n|  setCurrent(self, co)\n|\n|  setTimer(self, keyname)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Grid:\n|\n|  place(self, x, y)\n|\n|  setField(self, what, col, row, padding=(0, 0, 0, 0), anchorLeft=0, anchorTop=0, anchorRight=0, anchorBottom=0, growx=0, growy=0)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Grid:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class GridFormHelp",
                    "content": "|  GridFormHelp(screen, title, help, *args)\n|\n|  Subclass of Grid, for the help form text.\n|\n|  methods:\n|\n|   - GridFormHelp(self, screen, title, help, *args) :\n|   - add (self, widget, col, row, padding = (0, 0, 0, 0),\n|          anchorLeft = 0, anchorTop = 0, anchorRight = 0,\n|          anchorBottom = 0, growx = 0, growy = 0):\n|   - runOnce(self, x = None, y = None):  pop up the help window\n|   - addHotKey(self, keyname):\n|   - setTimer(self, keyname):\n|   - create(self, x = None, y = None):\n|   - run(self, x = None, y = None):\n|   - draw(self):\n|   - runPopup(self):\n|   - setCurrent (self, co):\n|\n|  Method resolution order:\n|      GridFormHelp\n|      Grid\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, screen, title, help, *args)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  add(self, widget, col, row, padding=(0, 0, 0, 0), anchorLeft=0, anchorTop=0, anchorRight=0, anchorBottom=0, growx=0, growy=0)\n|\n|  addHotKey(self, keyname)\n|\n|  create(self, x=None, y=None)\n|\n|  draw(self)\n|\n|  run(self, x=None, y=None)\n|\n|  runOnce(self, x=None, y=None)\n|\n|  runPopup(self)\n|\n|  setCurrent(self, co)\n|\n|  setTimer(self, keyname)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Grid:\n|\n|  place(self, x, y)\n|\n|  setField(self, what, col, row, padding=(0, 0, 0, 0), anchorLeft=0, anchorTop=0, anchorRight=0, anchorBottom=0, growx=0, growy=0)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Grid:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Label",
                    "content": "|  Label(text)\n|\n|  A Label (simple text).\n|\n|  methods:\n|\n|   - Label(self,text)   : create label\n|   - setText(self,text) : change text.\n|   - setColors(self, colorset) : change individual colors\n|\n|  Method resolution order:\n|      Label\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, text)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  setColors(self, colorset)\n|\n|  setText(self, text)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Listbox",
                    "content": "|  Listbox(height, scroll=0, returnExit=0, width=0, showCursor=0, multiple=0, border=0)\n|\n|  Listbox class.\n|\n|  methods:\n|\n|   - Listbox(self, height, scroll = 0, returnExit = 0, width = 0, showCursor = 0, multiple = 0, border = 0)\n|   - insert(self, text, item, before) : insert element; before = key to item to insert before, or None.\n|   - delete(self, item)               : delete item from list.\n|   - replace(self, text,item)         : Replace a given item's text\n|   - current(self)                    : returns currently selected item\n|   - getSelection(self)               : returns a list of selected items\n|   - setCurrent(self,i tem)           : select current.\n|   - clear(self)                      : clear listbox\n|\n|  Method resolution order:\n|      Listbox\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, height, scroll=0, returnExit=0, width=0, showCursor=0, multiple=0, border=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  append(self, text, item)\n|\n|  clear(self)\n|\n|  current(self)\n|\n|  delete(self, item)\n|\n|  getSelection(self)\n|\n|  insert(self, text, item, before)\n|\n|  replace(self, text, item)\n|\n|  setCurrent(self, item)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class RadioBar",
                    "content": "|  RadioBar(screen, buttonlist)\n|\n|  Bar of Radio buttons, based on Grid.\n|\n|  methods:\n|\n|  - RadioBar(self, screen, buttonlist) : constructor.\n|  - getSelection(self): return value of selected button\n|\n|  Method resolution order:\n|      RadioBar\n|      Grid\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, screen, buttonlist)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  getSelection(self)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Grid:\n|\n|  place(self, x, y)\n|\n|  setField(self, what, col, row, padding=(0, 0, 0, 0), anchorLeft=0, anchorTop=0, anchorRight=0, anchorBottom=0, growx=0, growy=0)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Grid:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class RadioGroup",
                    "content": "|  Combo widget: Group of Radio buttons\n|\n|  methods:\n|\n|   - RadioGroup(self): constructor.\n|   - add(self,title, value, default = None): add a button. Returns button.\n|   - getSelection(self) : returns value of selected button | None\n|\n|  Method resolution order:\n|      RadioGroup\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  add(self, title, value, default=None)\n|\n|  getSelection(self)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Scale",
                    "content": "|  Scale(width, total)\n|\n|  A Scale (progress bar).\n|\n|  methods:\n|\n|   - Scale(self,width, total) : create scale; width: size on screen, fullamount: integer.\n|   - set(self,amount)         : set amount to integer.\n|\n|  Method resolution order:\n|      Scale\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, width, total)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  set(self, amount)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class SingleRadioButton",
                    "content": "|  SingleRadioButton(text, group, isOn=0)\n|\n|  Single Radio Button.\n|\n|  methods:\n|\n|   -  SingleRadioButton(text, group, isOn = 0)  : create button\n|   -  selected(self)                            : returns bool, whether or not is selected.\n|\n|  Method resolution order:\n|      SingleRadioButton\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, text, group, isOn=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  selected(self)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class SnackScreen",
                    "content": "|  A Screen;\n|\n|  methods:\n|\n|  - Screen(self) : constructor\n|  - finish(self)\n|  - resume(self)\n|  - suspend(self)\n|  - doHelpCallback(self,arg) call callback with arg\n|  - helpCallback(self,cb): Set help callback\n|  - suspendcallback(self,cb, data=None) : set callback. data=data to pass to cb.\n|  - openWindow(self,left, top, width, height, title): Open a window.\n|  - pushHelpLine(self,text): put help line on screen. Returns current help line if text=None\n|  - setColor(self, colorset, fg, bg): Set foreground and background colors;\n|          colorset = key from snack.colorsets,\n|          fg & bg = english color names defined by S-Lang\n|              (ref: S-Lang Library C Programmer's Guide section:\n|              8.4.4.  Setting Character Attributes)\n|\n|  Methods defined here:\n|\n|  init(self)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  centeredWindow(self, width, height, title)\n|\n|  doHelpCallback(self, arg)\n|\n|  drawRootText(self, left, top, text)\n|\n|  finish(self)\n|\n|  gridWrappedWindow(self, grid, title, x=None, y=None)\n|\n|  helpCallback(self, cb)\n|\n|  openWindow(self, left, top, width, height, title)\n|\n|  popHelpLine(self)\n|\n|  popWindow(self, refresh=True)\n|\n|  pushHelpLine(self, text)\n|\n|  refresh(self)\n|\n|  resume(self)\n|\n|  setColor(self, colorset, fg, bg)\n|\n|  suspend(self)\n|\n|  suspendCallback(self, cb, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Textbox",
                    "content": "|  Textbox(width, height, text, scroll=0, wrap=0)\n|\n|  Textbox, container for text.\n|\n|  methods:\n|\n|   - Textbox(self, width, height, scroll = 0, wrap = 0): scroll, wrap are flags\n|                                 include scroll bars, or text wrap.\n|   - setText(text) : set text.\n|   - setHeight(height): set height.\n|\n|  Method resolution order:\n|      Textbox\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, width, height, text, scroll=0, wrap=0)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  setHeight(self, height)\n|\n|  setText(self, text)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class TextboxReflowed",
                    "content": "|  TextboxReflowed(width, text, flexDown=5, flexUp=10, maxHeight=-1)\n|\n|  Method resolution order:\n|      TextboxReflowed\n|      Textbox\n|      Widget\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, width, text, flexDown=5, flexUp=10, maxHeight=-1)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Textbox:\n|\n|  setHeight(self, height)\n|\n|  setText(self, text)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Widget:\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Widget:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Widget",
                    "content": "|  Base class for NEWT toolkit - Do not use directly\n|\n|  methods:\n|\n|   - Widget(self)\n|   - setCallback(self, obj, data = None) :\n|        The callback for when object activated.\n|        data is passed to obj.\n|\n|  Methods defined here:\n|\n|  init(self)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  setCallback(self, obj, data=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "ButtonChoiceWindow(screen, title, text, buttons=['Ok', 'Cancel'], width=40, x=None, y=None, help=None)\n- ButtonChoiceWindow(screen, title, text,\nbuttons = [ 'Ok', 'Cancel' ],\nwidth = 40, x = None, y = None, help = None):\n\nEntryWindow(screen, title, text, prompts, allowCancel=1, width=40, entryWidth=20, buttons=['Ok', 'Cancel'], help=None)\nEntryWindow(screen, title, text, prompts, allowCancel = 1, width = 40,\nentryWidth = 20, buttons = [ 'Ok', 'Cancel' ], help = None):\n\nListboxChoiceWindow(screen, title, text, items, buttons=('Ok', 'Cancel'), width=40, scroll=0, height=-1, default=None, help=None)\n- ListboxChoiceWindow(screen, title, text, items,\nbuttons = ('Ok', 'Cancel'),\nwidth = 40, scroll = 0, height = -1, default = None,\nhelp = None):\n",
            "subsections": [
                {
                    "name": "customColorset",
                    "content": ""
                },
                {
                    "name": "reflow",
                    "content": "returns a tuple of the wrapped text, the actual width, and the actual height\n"
                }
            ]
        },
        "DATA": {
            "content": "CENTER = (0, 0)\nDOWN = (-1, -1)\nFDEXCEPT = 4\nFDREAD = 1\nFDWRITE = 2\nFLAGSRESET = 1\nFLAGSSET = 0\nFLAGSTOGGLE = 2\nFLAGDISABLED = 8\nLEFT = (-1, 0)\nRIGHT = (1, 0)\nUP = (1, 1)\nabsoluteimport = Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0...\nc = '9'\ncolorsets = {'ACTBUTTON': 8, 'ACTCHECKBOX': 10, 'ACTLISTBOX': 14, 'ACT...\nhotkeys = {'F1': 32869, 'F2': 32870, 'F3': 32871, 'F4': 32872, 'F5': 3...\nn = ' '\no = 57\nprintfunction = Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0)...\nsnackArgs = {'append': -1}\nunicodeliterals = Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', ...\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3/dist-packages/snack.py\n\n",
            "subsections": []
        }
    },
    "summary": "snack",
    "flags": [],
    "examples": [],
    "see_also": []
}