var searchIndex = {}; searchIndex["cursive"] = {"doc":"# Cursive","items":[[3,"XY","cursive","A generic structure with a value for each axis.",null,null],[12,"x","","X-axis value",0,null],[12,"y","","Y-axis value",0,null],[3,"Printer","","Convenient interface to draw on a subset of the screen.",null,null],[12,"offset","","Offset into the window this printer should start drawing at.",1,null],[12,"size","","Size of the area we are allowed to draw on.",1,null],[12,"focused","","Whether the view to draw is currently focused or not.",1,null],[12,"theme","","Currently used theme",1,null],[3,"Cursive","","Central part of the cursive library.",null,null],[0,"event","","User-input events and their effects.",null,null],[4,"EventResult","cursive::event","Answer to an event notification.\nThe event can be consumed or ignored.",null,null],[13,"Ignored","","The event was ignored. The parent can keep handling it.",2,null],[13,"Consumed","","The event was consumed. An optionnal callback to run is attached.",2,null],[4,"Key","","A non-character key on the keyboard",null,null],[13,"Enter","","Both Enter (or Return) and numpad Enter",3,null],[13,"Tab","","Tabulation key",3,null],[13,"Backspace","","Backspace key",3,null],[13,"Esc","","Escape key",3,null],[13,"Left","","Left arrow",3,null],[13,"Right","","Right arrow",3,null],[13,"Up","","Up arrow",3,null],[13,"Down","","Down arrow",3,null],[13,"Ins","","Insert key",3,null],[13,"Del","","Delete key",3,null],[13,"Home","","Home key",3,null],[13,"End","","End key",3,null],[13,"PageUp","","Page Up key",3,null],[13,"PageDown","","Page Down key",3,null],[13,"NumpadCenter","","The 5 in the center of the keypad, when numlock is disabled.",3,null],[13,"F1","","F1 key",3,null],[13,"F2","","F2 key",3,null],[13,"F3","","F3 key",3,null],[13,"F4","","F4 key",3,null],[13,"F5","","F5 key",3,null],[13,"F6","","F6 key",3,null],[13,"F7","","F7 key",3,null],[13,"F8","","F8 key",3,null],[13,"F9","","F9 key",3,null],[13,"F10","","F10 key",3,null],[13,"F11","","F11 key",3,null],[13,"F12","","F12 key",3,null],[4,"Event","","Represents an event as seen by the application.",null,null],[13,"WindowResize","","Event fired when the window is resized",4,null],[13,"Char","","A character was entered (includes numbers, punctuation, ...)",4,null],[13,"CtrlChar","","A character was entered with the Ctrl key pressed",4,null],[13,"AltChar","","A character was entered with the Alt key pressed",4,null],[13,"Key","","A non-character key was pressed",4,null],[13,"Shift","","A non-character key was pressed with the Shift key pressed",4,null],[13,"Alt","","A non-character key was pressed with the Alt key pressed",4,null],[13,"AltShift","","A non-character key was pressed with the Shift and Alt keys pressed",4,null],[13,"Ctrl","","A non-character key was pressed with the Ctrl key pressed",4,null],[13,"CtrlShift","","A non-character key was pressed with the Ctrl and Shift keys pressed",4,null],[13,"CtrlAlt","","A non-character key was pressed with the Ctrl and Alt keys pressed",4,null],[13,"Unknown","","An unknown event was received.",4,null],[6,"Callback","","Callback is a function that can be triggered by an event.\nIt has a mutable access to the cursive root.",null,null],[11,"with_cb","","Convenient method to create `Consumed(Some(f))`",2,{"inputs":[{"name":"f"}],"output":{"name":"self"}}],[11,"fmt","","",3,null],[11,"hash","","",3,null],[11,"clone","","",3,null],[11,"eq","","",3,null],[11,"from_f","","Returns the function key corresponding to the given number",3,{"inputs":[{"name":"u8"}],"output":{"name":"key"}}],[11,"fmt","","",4,null],[11,"hash","","",4,null],[11,"clone","","",4,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"from","","",4,{"inputs":[{"name":"char"}],"output":{"name":"event"}}],[11,"from","","",4,{"inputs":[{"name":"key"}],"output":{"name":"event"}}],[0,"view","cursive","Defines various views to use when creating the layout.",null,null],[3,"ScrollBase","cursive::view","Provide scrolling functionalities to a view.",null,null],[12,"start_line","","First line visible",5,null],[12,"content_height","","Content height",5,null],[12,"view_height","","Number of lines displayed",5,null],[12,"scrollbar_padding","","Padding for the scrollbar",5,null],[3,"IdView","","Wrapper view that allows to select its content with a fixed string id.",null,null],[3,"BoxView","","Wrapper around another view, with a fixed size.",null,null],[3,"Button","","Simple text label with a callback when ENTER is pressed.\nA button shows its content in a single line and has a fixed size.",null,null],[3,"Dialog","","Popup-like view with a main content, and optional buttons under it.",null,null],[3,"EditView","","Input box where the user can enter and edit text.",null,null],[3,"FullView","","Simple wrapper view that asks for all the space it can get.",null,null],[3,"KeyEventView","","A simple wrapper view that catches some ignored event from its child.",null,null],[3,"LinearLayout","","Arranges its children linearly according to its orientation.",null,null],[3,"MenuPopup","","Popup that shows a list of items.",null,null],[3,"ViewPath","","Represents a path to a single view in the layout.",null,null],[12,"path","","List of turns to make on decision nodes when descending the view tree.\nSimple nodes (with one fixed child) are skipped.",6,null],[3,"SelectView","","View to select an item among a list.",null,null],[3,"ShadowView","","Wrapper view that adds a shadow.",null,null],[3,"StackView","","Simple stack of views.\nOnly the top-most view is active and can receive input.",null,null],[3,"TextView","","A simple view showing a fixed text",null,null],[3,"TrackedView","","Wrapper around a view that remembers its position.",null,null],[12,"view","","Wrapped view.",7,null],[12,"offset","","Last position the view was located.",7,null],[3,"SizedView","","Wrapper around a view that remembers its size.",null,null],[12,"view","","Wrapped view.",8,null],[12,"size","","Cached size from the last layout() call.",8,null],[3,"SizeCache","","Cache around a one-dimensional layout result",null,null],[12,"value","","Cached value",9,null],[12,"constrained","","`true` if the last size was constrained.",9,null],[4,"Offset","","Single-dimensional offset policy.",null,null],[13,"Center","","In the center of the screen",10,null],[13,"Absolute","","Place top-left corner at the given absolute coordinates",10,null],[13,"Parent","","Offset from the previous layer's top-left corner.",10,null],[4,"Selector","","Selects a single view (if any) in the tree.",null,null],[13,"Id","","Selects a view from its ID",11,null],[13,"Path","","Selects a view from its path",11,null],[11,"clone","","",10,null],[11,"fmt","","",10,null],[11,"eq","","",10,null],[11,"ne","","",10,null],[11,"compute_offset","","Computes a single-dimension offset requred to draw a view.",10,null],[11,"default","","",6,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new empty path.",6,{"inputs":[],"output":{"name":"self"}}],[11,"from","","Creates a path from the given item.",6,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"default","","",5,{"inputs":[],"output":{"name":"scrollbase"}}],[11,"new","","Creates a new, uninitialized scrollbar.",5,{"inputs":[],"output":{"name":"self"}}],[11,"bar_padding","","Shifts the scrollbar toward the inside of the view.",5,null],[11,"set_heights","","Call this method whem the content or the view changes.",5,null],[11,"scrollable","","Returns `TRUE` if the view needs to scroll.",5,null],[11,"can_scroll_up","","Returns `TRUE` unless we are at the top.",5,null],[11,"can_scroll_down","","Returns `TRUE` unless we are at the bottom.",5,null],[11,"scroll_top","","Scroll to the top of the view.",5,null],[11,"scroll_to","","Makes sure that the given line is visible, scrolling if needed.",5,null],[11,"scroll_bottom","","Scroll to the bottom of the view.",5,null],[11,"scroll_down","","Scroll down by the given number of line.",5,null],[11,"scroll_up","","Scroll up by the given number of lines.",5,null],[11,"draw","","Draws the scroll bar and the content using the given drawer.",5,null],[11,"fixed_size","","Wraps `view` in a new `BoxView` with the given size.",12,{"inputs":[{"name":"s"},{"name":"t"}],"output":{"name":"self"}}],[11,"new","","Creates a new `BoxView` with the given width and height requirements.",12,{"inputs":[{"name":"option"},{"name":"option"},{"name":"t"}],"output":{"name":"self"}}],[11,"fixed_width","","Wraps `view` in a new `BoxView` with fixed width.",12,{"inputs":[{"name":"usize"},{"name":"t"}],"output":{"name":"self"}}],[11,"fixed_height","","Wraps `view` in a new `BoxView` with fixed height.",12,{"inputs":[{"name":"usize"},{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",12,null],[11,"get_view_mut","","",12,null],[11,"wrap_get_min_size","","",12,null],[11,"new","","Creates a new button with the given content and callback.",13,{"inputs":[{"name":"str"},{"name":"f"}],"output":{"name":"self"}}],[11,"draw","","",13,null],[11,"get_min_size","","",13,null],[11,"on_event","","",13,null],[11,"take_focus","","",13,null],[11,"new","","Creates a new Dialog with the given content.",14,{"inputs":[{"name":"v"}],"output":{"name":"self"}}],[11,"info","","Convenient method to create an infobox.",14,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"button","","Adds a button to the dialog with the given label and callback.",14,null],[11,"h_align","","Sets the horizontal alignment for the buttons, if any.\nOnly works if the buttons are as a row at the bottom of the dialog.",14,null],[11,"v_align","","Sets the vertical alignment for the buttons, if any.\nOnly works if the buttons are as a column to the right of the dialog.",14,null],[11,"dismiss_button","","Shortcut method to add a button that will dismiss the dialog.",14,null],[11,"title","","Sets the title of the dialog.\nIf not empty, it will be visible at the top.",14,null],[11,"padding","","Sets the padding in the dialog (around content and buttons).",14,null],[11,"draw","","",14,null],[11,"get_min_size","","",14,null],[11,"layout","","",14,null],[11,"on_event","","",14,null],[11,"take_focus","","",14,null],[11,"find","","",14,null],[11,"default","","",15,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new, empty edit view.",15,{"inputs":[],"output":{"name":"self"}}],[11,"set_content","","Replace the entire content of the view with the given one.",15,null],[11,"get_content","","Get the current text.",15,null],[11,"content","","Sets the current content to the given value.",15,null],[11,"min_length","","Sets the minimum length for this view.\n(This applies to the layout, not the content.)",15,null],[11,"with_id","","Wraps this view into an IdView with the given id.",15,null],[11,"draw","","",15,null],[11,"layout","","",15,null],[11,"get_min_size","","",15,null],[11,"take_focus","","",15,null],[11,"on_event","","",15,null],[11,"new","","Wraps the given view into a new FullView.",16,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"full_width","","Creates a new wrapper around `view` with full width.",16,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"full_height","","Creates a new wrapper around `view` with full height.",16,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",16,null],[11,"get_view_mut","","",16,null],[11,"wrap_get_min_size","","",16,null],[11,"new","","Wraps the given view. It will be selectable with the given id.",17,{"inputs":[{"name":"str"},{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",17,null],[11,"get_view_mut","","",17,null],[11,"wrap_find","","",17,null],[11,"new","","Wraps the given view in a new KeyEventView.",18,{"inputs":[{"name":"v"}],"output":{"name":"self"}}],[11,"register","","Registers a callback when the given key is ignored by the child.",18,null],[11,"get_view","","",18,null],[11,"get_view_mut","","",18,null],[11,"wrap_on_event","","",18,null],[11,"new","","Creates a new layout with the given orientation.",19,{"inputs":[{"name":"orientation"}],"output":{"name":"self"}}],[11,"weight","","Modifies the weight of the last child added.",19,null],[11,"child","","Adds a child to the layout.",19,null],[11,"vertical","","Creates a new vertical layout.",19,{"inputs":[],"output":{"name":"self"}}],[11,"horizontal","","Creates a new horizontal layout.",19,{"inputs":[],"output":{"name":"self"}}],[11,"draw","","",19,null],[11,"needs_relayout","","",19,null],[11,"layout","","",19,null],[11,"get_min_size","","",19,null],[11,"take_focus","","",19,null],[11,"on_event","","",19,null],[11,"new","","Creates a new `MenuPopup` using the given menu tree.",20,{"inputs":[{"name":"rc"}],"output":{"name":"self"}}],[11,"align","","Sets the alignment for this view.",20,null],[11,"on_dismiss","","Sets a callback to be used when this view is actively dismissed.",20,null],[11,"on_action","","Sets a callback to be used when a leaf is activated.",20,null],[11,"draw","","",20,null],[11,"get_min_size","","",20,null],[11,"on_event","","",20,null],[11,"layout","","",20,null],[11,"new","","Wraps the given view.",21,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"left_padding","","If set, adds an empty column to the left of the view.",21,null],[11,"top_padding","","If set, adds an empty row at the top of the view.",21,null],[11,"get_view","","",21,null],[11,"get_view_mut","","",21,null],[11,"wrap_get_min_size","","",21,null],[11,"wrap_layout","","",21,null],[11,"wrap_draw","","",21,null],[11,"new","","Creates a new empty SelectView.",22,{"inputs":[],"output":{"name":"self"}}],[11,"set_on_select","","Sets a callback to be used when an item is selected.",22,null],[11,"on_select","","Sets a callback to be used when an item is selected.",22,null],[11,"align","","Sets the alignment for this view.",22,null],[11,"v_align","","Sets the vertical alignment for this view.\n(If the view is given too much space vertically.)",22,null],[11,"h_align","","Sets the horizontal alignment for this view.",22,null],[11,"selection","","Returns the value of the currently selected item.",22,null],[11,"add_item","","Adds a item to the list, with given label and value.",22,null],[11,"item","","Chainable variant of add_item",22,null],[11,"with_id","","Wraps this view into an IdView with the given id.",22,null],[11,"add_item_str","","Convenient method to use the label as value.",22,null],[11,"item_str","","Chainable variant of add_item_str",22,null],[11,"draw","","",22,null],[11,"get_min_size","","",22,null],[11,"on_event","","",22,null],[11,"take_focus","","",22,null],[11,"layout","","",22,null],[11,"new","","Wraps the given view.",8,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",8,null],[11,"get_view_mut","","",8,null],[11,"wrap_layout","","",8,null],[11,"default","","",23,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new empty StackView",23,{"inputs":[],"output":{"name":"self"}}],[11,"add_layer","","Adds new view on top of the stack in the center of the screen.",23,null],[11,"add_layer_at","","Adds a view on top of the stack.",23,null],[11,"pop_layer","","Remove the top-most layer.",23,null],[11,"draw","","",23,null],[11,"on_event","","",23,null],[11,"layout","","",23,null],[11,"get_min_size","","",23,null],[11,"take_focus","","",23,null],[11,"find","","",23,null],[11,"new","","Creates a new TextView with the given content.",24,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"h_align","","Sets the horizontal alignment for this view.",24,null],[11,"v_align","","Sets the vertical alignment for this view.",24,null],[11,"align","","Sets the alignment for this view.",24,null],[11,"set_content","","Replace the text in this view.",24,null],[11,"get_content","","Returns the current text in this view.",24,null],[11,"draw","","",24,null],[11,"on_event","","",24,null],[11,"needs_relayout","","",24,null],[11,"get_min_size","","",24,null],[11,"take_focus","","",24,null],[11,"layout","","",24,null],[11,"new","","Creates a new `TrackedView` around `view`.",7,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"with_id","","Wraps itself in a `IdView` for easy retrieval.",7,null],[11,"get_view","","",7,null],[11,"get_view_mut","","",7,null],[11,"wrap_draw","","",7,null],[6,"Position","","Location of the view on screen",null,null],[8,"ViewWrapper","","Generic wrapper around a view.",null,null],[10,"get_view","","Get an immutable reference to the wrapped view.",25,null],[10,"get_view_mut","","Get a mutable reference to the wrapped view.",25,null],[11,"wrap_draw","","Wraps the `draw` method.",25,null],[11,"wrap_get_min_size","","Wraps the `get_min_size` method.",25,null],[11,"wrap_on_event","","Wraps the `on_event` method.",25,null],[11,"wrap_layout","","Wraps the `layout` method.",25,null],[11,"wrap_take_focus","","Wraps the `take_focus` method.",25,null],[11,"wrap_find","","Wraps the `find` method.",25,null],[11,"wrap_needs_relayout","","Wraps the `needs_relayout` method.",25,null],[8,"View","","Main trait defining a view behaviour.",null,null],[11,"on_event","","Called when a key was pressed. Default implementation just ignores it.",26,null],[11,"get_min_size","","Returns the minimum size the view requires with the given restrictions.",26,null],[11,"needs_relayout","","Returns `true` if the view content changed since last layout phase.",26,null],[11,"layout","","Called once the size for this view has been decided,",26,null],[10,"draw","","Draws the view with the given printer (includes bounds) and focus.",26,null],[11,"find","","Finds the view pointed to by the given path.",26,null],[11,"take_focus","","This view is offered focus. Will it take it?",26,null],[11,"clone","","",9,null],[11,"fmt","","",9,null],[11,"eq","","",9,null],[11,"ne","","",9,null],[11,"new","","Creates a new sized cache",9,{"inputs":[{"name":"usize"},{"name":"bool"}],"output":{"name":"self"}}],[11,"accept","","Returns `true` if `self` is still valid for the given `request`.",9,null],[0,"vec","cursive","Points on the 2D character grid.",null,null],[3,"Vec4","cursive::vec","Four values representing each direction.",null,null],[12,"left","","Left margin",27,null],[12,"right","","Right margin",27,null],[12,"top","","Top margin",27,null],[12,"bottom","","Bottom margin",27,null],[6,"Vec2","","Simple 2D size, in cells.",null,null],[11,"partial_cmp","cursive","`a < b` <=> `a.x < b.x && a.y < b.y`",0,null],[11,"max","","Returns a new Vec2 that is a maximum per coordinate.",0,{"inputs":[{"name":"a"},{"name":"b"}],"output":{"name":"self"}}],[11,"min","","Returns a new Vec2 that is no larger than any input in both dimensions.",0,{"inputs":[{"name":"a"},{"name":"b"}],"output":{"name":"self"}}],[11,"or_min","","Returns the minimum of `self` and `other`.",0,null],[11,"or_max","","Returns the maximum of `self` and `other`.",0,null],[11,"keep_x","","Returns a vector with the X component of self, and y=0.",0,null],[11,"keep_y","","Returns a vector with the Y component of self, and x=0.",0,null],[11,"zero","","Alias for Vec::new(0,0).",0,{"inputs":[],"output":{"name":"self"}}],[11,"stack_vertical","","Returns (max(self.x,other.x), self.y+other.y)",0,null],[11,"stack_horizontal","","Returns (self.x+other.x, max(self.y,other.y))",0,null],[11,"fits_in","","Returns `true` if `self` could fit inside `other`.",0,null],[11,"with","","Returns a new `Vec2` with the axis `o` set to `value`.",0,null],[11,"from","","",0,null],[11,"from","","",0,null],[11,"add","","",0,null],[11,"sub","","",0,null],[11,"div","","",0,null],[11,"mul","","",0,null],[11,"clone","cursive::vec","",27,null],[11,"new","","Creates a new Vec4.",27,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"}],"output":{"name":"self"}}],[11,"horizontal","","Returns left + right.",27,null],[11,"vertical","","Returns top + bottom.",27,null],[11,"combined","","Returns (left+right, top+bottom).",27,null],[11,"top_left","","Returns (left, top).",27,null],[11,"bot_right","","Returns (right, bottom).",27,null],[11,"from","","",27,null],[11,"from","","",27,null],[11,"add","","",27,null],[11,"sub","","",27,null],[11,"div","","",27,null],[11,"mul","","",27,null],[0,"theme","cursive","Module to handle colors and themes in the UI.",null,null],[3,"Theme","cursive::theme","Represents the style a Cursive application will use.",null,null],[12,"shadow","","Wheter views in a StackView should have shadows.",28,null],[12,"borders","","How view borders should be drawn.",28,null],[12,"colors","","What colors should be used through the application?",28,null],[3,"Palette","","Color configuration for the application.",null,null],[12,"background","","Color used for the application background.",29,null],[12,"shadow","","Color used for View shadows.",29,null],[12,"view","","Color used for View backgrounds.",29,null],[12,"primary","","Primary color used for the text.",29,null],[12,"secondary","","Secondary color used for the text.",29,null],[12,"tertiary","","Tertiary color used for the text.",29,null],[12,"title_primary","","Primary color used for title text.",29,null],[12,"title_secondary","","Secondary color used for title text.",29,null],[12,"highlight","","Color used for highlighting text.",29,null],[12,"highlight_inactive","","Color used for highlighting inactive text.",29,null],[4,"Effect","","Text effect",null,null],[13,"Simple","","No effect",30,null],[13,"Reverse","","Reverses foreground and background colors",30,null],[4,"ColorStyle","","Possible color style for a cell.",null,null],[13,"Background","","Application background, where no view is present.",31,null],[13,"Shadow","","Color used by view shadows. Only background matters.",31,null],[13,"Primary","","Main text with default background.",31,null],[13,"Secondary","","Secondary text color, with default background.",31,null],[13,"Tertiary","","Tertiary text color, with default background.",31,null],[13,"TitlePrimary","","Title text color with default background.",31,null],[13,"TitleSecondary","","Alternative color for a title.",31,null],[13,"Highlight","","Alternate text with highlight background.",31,null],[13,"HighlightInactive","","Highlight color for inactive views (not in focus).",31,null],[4,"BorderStyle","","Specifies how some borders should be drawn.",null,null],[13,"NoBorder","","Don't draw any border.",32,null],[13,"Simple","","Simple borders.",32,null],[13,"Outset","","Outset borders with a simple 3d effect.",32,null],[4,"Color","","Represents a color used by the theme.",null,null],[13,"Black","","Black color",33,null],[13,"Red","","Red color",33,null],[13,"Green","","Green color",33,null],[13,"Yellow","","Yellow color (Red + Green)",33,null],[13,"Blue","","Blue color",33,null],[13,"Magenta","","Magenta color (Red + Blue)",33,null],[13,"Cyan","","Cyan color (Green + Blue)",33,null],[13,"White","","White color (Red + Green + Blue)",33,null],[13,"Rgb","","True-color, 24-bit.",33,null],[13,"RgbLowRes","","Low-resolution",33,null],[4,"Error","","Possible error returned when loading a theme.",null,null],[13,"Io","","An error occured when reading the file.",34,null],[13,"Parse","","An error occured when parsing the toml content.",34,null],[5,"load_theme","","Loads a theme file, and returns its representation.",null,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[5,"load_default","","Loads the default theme, and returns its representation.",null,{"inputs":[],"output":{"name":"theme"}}],[11,"clone","","",31,null],[11,"id","","Returns the ncurses pair ID associated with this color pair.",31,null],[11,"fmt","","",28,null],[11,"clone","","",28,null],[11,"default","","",28,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",32,null],[11,"clone","","",32,null],[11,"fmt","","",29,null],[11,"clone","","",29,null],[11,"fmt","","",33,null],[11,"clone","","",33,null],[11,"fmt","","",34,null],[11,"from","","",34,{"inputs":[{"name":"error"}],"output":{"name":"self"}}],[0,"align","cursive","Tools to control view alignment",null,null],[3,"Align","cursive::align","Specifies the alignment along both horizontal and vertical directions.",null,null],[12,"h","","Horizontal alignment policy",35,null],[12,"v","","Vertical alignment policy",35,null],[4,"HAlign","","Horizontal alignment",null,null],[13,"Left","","Place the element to the left of available space",36,null],[13,"Center","","Place the element horizontally in the center of available space",36,null],[13,"Right","","Place the element to the right of available space",36,null],[4,"VAlign","","Vertical alignment",null,null],[13,"Top","","Place the element at the top of available space",37,null],[13,"Center","","Place the element vertically in the center of available space",37,null],[13,"Bottom","","Place the element at the bottom of available space",37,null],[11,"new","","Creates a new Align object from the given alignments.",35,{"inputs":[{"name":"halign"},{"name":"valign"}],"output":{"name":"self"}}],[11,"top_left","","Creates a top-left alignment.",35,{"inputs":[],"output":{"name":"self"}}],[11,"top_right","","Creates a top-right alignment.",35,{"inputs":[],"output":{"name":"self"}}],[11,"bot_left","","Creates a bottom-left alignment.",35,{"inputs":[],"output":{"name":"self"}}],[11,"bot_right","","Creates a bottom-right alignment.",35,{"inputs":[],"output":{"name":"self"}}],[11,"center","","Creates an alignment centered both horizontally and vertically.",35,{"inputs":[],"output":{"name":"self"}}],[11,"get_offset","","Returns the offset required to position a view.",36,null],[11,"get_offset","","Returns the offset required to position a view.",37,null],[0,"menu","cursive","Module to build menus.",null,null],[3,"MenuTree","cursive::menu","Root of a menu tree.",null,null],[12,"children","","Menu items",38,null],[4,"MenuItem","","Node in the menu tree.",null,null],[13,"Leaf","","Actionnable button with a label.",39,null],[13,"Subtree","","Sub-menu with a label.",39,null],[13,"Delimiter","","Delimiter without a label.",39,null],[11,"default","","",38,{"inputs":[],"output":{"name":"menutree"}}],[11,"label","","Returns the label for this item.",39,null],[11,"is_delimiter","","Returns `true` if `self` is a delimiter.",39,null],[11,"is_subtree","","Returns `true` if `self` is a subtree.",39,null],[11,"new","","Creates a new, empty tree.",38,{"inputs":[],"output":{"name":"self"}}],[11,"len","","Returns the number of children, including delimiters.",38,null],[11,"clear","","Remove every children from this tree.",38,null],[11,"is_empty","","Returns `true` if this tree has no children.",38,null],[11,"add_delimiter","","Adds a delimiter to the end of this tree.",38,null],[11,"delimiter","","Adds a delimiter to the end of this tree - chainable variant.",38,null],[11,"add_leaf","","Adds a actionnable leaf to the end of this tree.",38,null],[11,"leaf","","Adds a actionnable leaf to the end of this tree - chainable variant.",38,null],[11,"add_subtree","","Adds a submenu to the end of this tree.",38,null],[11,"subtree","","Adds a submenu to the end of this tree - chainable variant.",38,null],[11,"with","","Calls the given closure on `self`.",38,null],[0,"direction","cursive","Direction-related structures.",null,null],[4,"Orientation","cursive::direction","Describes a vertical or horizontal orientation for a view.",null,null],[13,"Horizontal","","Horizontal orientation",40,null],[13,"Vertical","","Vertical orientation",40,null],[4,"Direction","","Represents a direction, either absolute or orientation-dependent.",null,null],[13,"Abs","","An absolute direction.",41,null],[13,"Rel","","A direction relative to the current orientation.",41,null],[4,"Relative","","Direction relative to an orientation.",null,null],[13,"Front","","Front relative direction.",42,null],[13,"Back","","Back relative direction.",42,null],[4,"Absolute","","Absolute direction (up, down, left, right).",null,null],[13,"Left","","Left",43,null],[13,"Up","","Up",43,null],[13,"Right","","Right",43,null],[13,"Down","","Down",43,null],[13,"None","","No real direction",43,null],[11,"eq","","",40,null],[11,"fmt","","",40,null],[11,"clone","","",40,null],[11,"get","","Returns the component of `v` corresponding to this orientation.",40,null],[11,"swap","","Returns the other orientation.",40,null],[11,"get_ref","","Returns a mutable reference to the component of the given vector\ncorresponding to this orientation.",40,null],[11,"stack","","Takes an iterator on sizes, and stack them in the current orientation,\nreturning the size of the required bounding box.",40,null],[11,"make_vec","","Creates a new `Vec2` with `value` in `self`'s axis.",40,null],[11,"eq","","",41,null],[11,"ne","","",41,null],[11,"clone","","",41,null],[11,"fmt","","",41,null],[11,"relative","","Returns the relative direction for the given orientation.",41,null],[11,"absolute","","Returns the absolute direction in the given `orientation`.",41,null],[11,"back","","Shortcut to create `Direction::Rel(Relative::Back)`",41,{"inputs":[],"output":{"name":"self"}}],[11,"front","","Shortcut to create `Direction::Rel(Relative::Front)`",41,{"inputs":[],"output":{"name":"self"}}],[11,"left","","Shortcut to create `Direction::Abs(Absolute::Left)`",41,{"inputs":[],"output":{"name":"self"}}],[11,"right","","Shortcut to create `Direction::Abs(Absolute::Right)`",41,{"inputs":[],"output":{"name":"self"}}],[11,"up","","Shortcut to create `Direction::Abs(Absolute::Up)`",41,{"inputs":[],"output":{"name":"self"}}],[11,"down","","Shortcut to create `Direction::Abs(Absolute::Down)`",41,{"inputs":[],"output":{"name":"self"}}],[11,"none","","Shortcut to create `Direction::Abs(Absolute::None)`",41,{"inputs":[],"output":{"name":"self"}}],[11,"eq","","",42,null],[11,"clone","","",42,null],[11,"fmt","","",42,null],[11,"absolute","","Returns the absolute direction in the given `orientation`.",42,null],[11,"eq","","",43,null],[11,"clone","","",43,null],[11,"fmt","","",43,null],[11,"relative","","Returns the relative direction for the given orientation.",43,null],[11,"clone","cursive","",1,null],[11,"new","","Creates a new printer on the given window.",1,{"inputs":[{"name":"t"},{"name":"theme"}],"output":{"name":"self"}}],[11,"print","","Prints some text at the given position relative to the window.",1,null],[11,"print_vline","","Prints a vertical line using the given character.",1,null],[11,"print_hline","","Prints a horizontal line using the given character.",1,null],[11,"with_color","","Call the given closure with a colored printer,\nthat will apply the given color on prints.",1,null],[11,"with_effect","","Same as `with_color`, but apply a ncurses style instead,\nlike `ncurses::A_BOLD()` or `ncurses::A_REVERSE()`.",1,null],[11,"print_box","","Prints a rectangular box.",1,null],[11,"with_selection","","Apply a selection style and call the given function.",1,null],[11,"print_hdelim","","Prints a horizontal delimiter with side border `├` and `┤`.",1,null],[11,"sub_printer","","Returns a printer on a subset of this one's area.",1,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"new","","Creates a new `XY` from the given values.",0,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"self"}}],[11,"map","","Creates a new `XY` by applying `f` to `x` and `y`.",0,null],[11,"pair","","Destructure self into a pair.",0,null],[11,"as_ref","","Return a XY with references to this one's values.",0,null],[11,"iter","","Creates an iterator that returns references to `x`, then `y`.",0,null],[11,"get","","Returns a reference to the value on the given axis.",0,null],[11,"zip_map","","Returns a new XY by calling `f` on `self` and `other` for each axis.",0,null],[11,"unwrap_or","","Returns a new XY by calling `unwrap_or` on each axis.",0,null],[11,"any","","Returns `true` if any of `x` or `y` is `true`.",0,null],[11,"both","","Returns `true` if both `x` and `y` are `true`.",0,null],[11,"both_from","","Creates a `XY` with both `x` and `y` set to `value`.",0,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"from","","",0,null],[6,"ScreenId","","Identifies a screen in the cursive ROOT.",null,null],[11,"default","","",44,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new Cursive root, and initialize ncurses.",44,{"inputs":[],"output":{"name":"self"}}],[11,"select_menubar","","Selects the menubar",44,null],[11,"set_autohide_menu","","Sets the menubar autohide_menubar feature.",44,null],[11,"menubar","","Retrieve the menu tree used by the menubar.",44,null],[11,"current_theme","","Returns the currently used theme",44,null],[11,"load_theme","","Loads a theme from the given file.",44,null],[11,"set_fps","","Sets the refresh rate, in frames per second.",44,null],[11,"screen_mut","","Returns a mutable reference to the currently active screen.",44,null],[11,"add_screen","","Adds a new screen, and returns its ID.",44,null],[11,"add_active_screen","","Convenient method to create a new screen, and set it as active.",44,null],[11,"set_screen","","Sets the active screen. Panics if no such screen exist.",44,null],[11,"find","","Tries to find the view pointed to by the given path.\nIf the view is not found, or if it is not of the asked type,\nit returns None.",44,null],[11,"find_id","","Convenient method to use `find` with a `Selector::Id`.",44,null],[11,"add_global_callback","","Adds a global callback.",44,null],[11,"add_layer","","Convenient method to add a layer to the current screen.",44,null],[11,"pop_layer","","Convenient method to remove a layer from the current screen.",44,null],[11,"screen_size","","Returns the size of the screen, in characters.",44,null],[11,"run","","Runs the event loop.",44,null],[11,"quit","","Stops the event loop.",44,null],[11,"drop","","",44,null],[14,"wrap_impl!","","Convenient macro to implement the ViewWrapper trait.",null,null],[11,"wrap_draw","cursive::view","Wraps the `draw` method.",25,null],[11,"wrap_get_min_size","","Wraps the `get_min_size` method.",25,null],[11,"wrap_on_event","","Wraps the `on_event` method.",25,null],[11,"wrap_layout","","Wraps the `layout` method.",25,null],[11,"wrap_take_focus","","Wraps the `take_focus` method.",25,null],[11,"wrap_find","","Wraps the `find` method.",25,null],[11,"wrap_needs_relayout","","Wraps the `needs_relayout` method.",25,null],[11,"center","","Returns a position centered on both axis.",45,{"inputs":[],"output":{"name":"self"}}],[11,"absolute","","Returns a position absolute on both axis.",45,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"parent","","Returns a position relative to the parent on both axis.",45,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"compute_offset","","Computes the offset required to draw a view.",45,null]],"paths":[[3,"XY"],[3,"Printer"],[4,"EventResult"],[4,"Key"],[4,"Event"],[3,"ScrollBase"],[3,"ViewPath"],[3,"TrackedView"],[3,"SizedView"],[3,"SizeCache"],[4,"Offset"],[4,"Selector"],[3,"BoxView"],[3,"Button"],[3,"Dialog"],[3,"EditView"],[3,"FullView"],[3,"IdView"],[3,"KeyEventView"],[3,"LinearLayout"],[3,"MenuPopup"],[3,"ShadowView"],[3,"SelectView"],[3,"StackView"],[3,"TextView"],[8,"ViewWrapper"],[8,"View"],[3,"Vec4"],[3,"Theme"],[3,"Palette"],[4,"Effect"],[4,"ColorStyle"],[4,"BorderStyle"],[4,"Color"],[4,"Error"],[3,"Align"],[4,"HAlign"],[4,"VAlign"],[3,"MenuTree"],[4,"MenuItem"],[4,"Orientation"],[4,"Direction"],[4,"Relative"],[4,"Absolute"],[3,"Cursive"],[6,"Position"]]}; initSearch(searchIndex);