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,"prelude","","Commonly used imports, conveniently grouped.",null,null],[3,"Printer","cursive::prelude","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,"BoxView","","Wrapper around another view, with a fixed size.",null,null],[3,"Button","","Simple text label with a callback when <Enter> is pressed.",null,null],[3,"Checkbox","","Checkable box.",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,"IdView","","Wrapper view that allows to select its content with a fixed string id.",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,"ListView","","Displays a scrollable list of elements.",null,null],[3,"SelectView","","View to select an item among a list.",null,null],[3,"TextView","","A simple view showing a fixed text",null,null],[8,"With","","Generic trait to enable chainable API",null,null],[11,"with","","Calls the given closure on `self`.",2,null],[0,"event","cursive","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.",3,null],[13,"Consumed","","The event was consumed. An optionnal callback to run is attached.",3,null],[4,"Key","","A non-character key on the keyboard",null,null],[13,"Enter","","Both Enter (or Return) and numpad Enter",4,null],[13,"Tab","","Tabulation key",4,null],[13,"Backspace","","Backspace key",4,null],[13,"Esc","","Escape key",4,null],[13,"Left","","Left arrow",4,null],[13,"Right","","Right arrow",4,null],[13,"Up","","Up arrow",4,null],[13,"Down","","Down arrow",4,null],[13,"Ins","","Insert key",4,null],[13,"Del","","Delete key",4,null],[13,"Home","","Home key",4,null],[13,"End","","End key",4,null],[13,"PageUp","","Page Up key",4,null],[13,"PageDown","","Page Down key",4,null],[13,"NumpadCenter","","The 5 in the center of the keypad, when numlock is disabled.",4,null],[13,"F1","","F1 key",4,null],[13,"F2","","F2 key",4,null],[13,"F3","","F3 key",4,null],[13,"F4","","F4 key",4,null],[13,"F5","","F5 key",4,null],[13,"F6","","F6 key",4,null],[13,"F7","","F7 key",4,null],[13,"F8","","F8 key",4,null],[13,"F9","","F9 key",4,null],[13,"F10","","F10 key",4,null],[13,"F11","","F11 key",4,null],[13,"F12","","F12 key",4,null],[4,"Event","","Represents an event as seen by the application.",null,null],[13,"WindowResize","","Event fired when the window is resized",5,null],[13,"Char","","A character was entered (includes numbers, punctuation, ...)",5,null],[13,"CtrlChar","","A character was entered with the Ctrl key pressed",5,null],[13,"AltChar","","A character was entered with the Alt key pressed",5,null],[13,"Key","","A non-character key was pressed",5,null],[13,"Shift","","A non-character key was pressed with the Shift key pressed",5,null],[13,"Alt","","A non-character key was pressed with the Alt key pressed",5,null],[13,"AltShift","","A non-character key was pressed with the Shift and Alt keys pressed",5,null],[13,"Ctrl","","A non-character key was pressed with the Ctrl key pressed",5,null],[13,"CtrlShift","","A non-character key was pressed with the Ctrl and Shift keys pressed",5,null],[13,"CtrlAlt","","A non-character key was pressed with the Ctrl and Alt keys pressed",5,null],[13,"Unknown","","An unknown event was received.",5,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))`",3,{"inputs":[{"name":"f"}],"output":{"name":"self"}}],[11,"is_consumed","","Returns `true` if `self` is `EventResult::Consumed`.",3,null],[11,"fmt","","",4,null],[11,"hash","","",4,null],[11,"clone","","",4,null],[11,"eq","","",4,null],[11,"from_f","","Returns the function key corresponding to the given number",4,{"inputs":[{"name":"u8"}],"output":{"name":"key"}}],[11,"fmt","","",5,null],[11,"hash","","",5,null],[11,"clone","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"from","","",5,{"inputs":[{"name":"char"}],"output":{"name":"event"}}],[11,"from","","",5,{"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",6,null],[12,"content_height","","Content height",6,null],[12,"view_height","","Number of lines displayed",6,null],[12,"scrollbar_padding","","Padding for the scrollbar",6,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.",null,null],[3,"Checkbox","","Checkable box.",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,"ListView","","Displays a scrollable list of elements.",null,null],[3,"Menubar","","Shows a single-line list of items, with pop-up menus when one is selected.",null,null],[12,"menus","","Menu items in this menubar.",7,null],[12,"autohide","","TODO: move this out of this view.",7,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.",8,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.",9,null],[3,"SizedView","","Wrapper around a view that remembers its size.",null,null],[12,"view","","Wrapped view.",10,null],[12,"size","","Cached size from the last layout() call.",10,null],[3,"SizeCache","","Cache around a one-dimensional layout result.",null,null],[12,"value","","Cached value",11,null],[12,"constrained","","`true` if the last size was constrained.",11,null],[4,"Offset","","Single-dimensional offset policy.",null,null],[13,"Center","","In the center of the screen",12,null],[13,"Absolute","","Place top-left corner at the given absolute coordinates",12,null],[13,"Parent","","Offset from the previous layer's top-left corner.",12,null],[4,"Selector","","Selects a single view (if any) in the tree.",null,null],[13,"Id","","Selects a view from its ID.",13,null],[13,"Path","","Selects a view from its path.",13,null],[11,"clone","","",12,null],[11,"fmt","","",12,null],[11,"eq","","",12,null],[11,"ne","","",12,null],[11,"compute_offset","","Computes a single-dimension offset requred to draw a view.",12,null],[11,"default","","",8,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new empty path.",8,{"inputs":[],"output":{"name":"self"}}],[11,"from","","Creates a path from the given item.",8,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"default","","",6,{"inputs":[],"output":{"name":"scrollbase"}}],[11,"new","","Creates a new, uninitialized scrollbar.",6,{"inputs":[],"output":{"name":"self"}}],[11,"bar_padding","","Shifts the scrollbar toward the inside of the view.",6,null],[11,"set_heights","","Call this method whem the content or the view changes.",6,null],[11,"scrollable","","Returns `TRUE` if the view needs to scroll.",6,null],[11,"can_scroll_up","","Returns `TRUE` unless we are at the top.",6,null],[11,"can_scroll_down","","Returns `TRUE` unless we are at the bottom.",6,null],[11,"scroll_top","","Scroll to the top of the view.",6,null],[11,"scroll_to","","Makes sure that the given line is visible, scrolling if needed.",6,null],[11,"scroll_bottom","","Scroll to the bottom of the view.",6,null],[11,"scroll_down","","Scroll down by the given number of line.",6,null],[11,"scroll_up","","Scroll up by the given number of lines.",6,null],[11,"draw","","Draws the scroll bar and the content using the given drawer.",6,null],[11,"fixed_size","cursive::prelude","Wraps `view` in a new `BoxView` with the given size.",14,{"inputs":[{"name":"s"},{"name":"t"}],"output":{"name":"self"}}],[11,"new","","Creates a new `BoxView` with the given width and height requirements.",14,{"inputs":[{"name":"option"},{"name":"option"},{"name":"t"}],"output":{"name":"self"}}],[11,"fixed_width","","Wraps `view` in a new `BoxView` with fixed width.",14,{"inputs":[{"name":"usize"},{"name":"t"}],"output":{"name":"self"}}],[11,"fixed_height","","Wraps `view` in a new `BoxView` with fixed height.",14,{"inputs":[{"name":"usize"},{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",14,null],[11,"get_view_mut","","",14,null],[11,"wrap_get_min_size","","",14,null],[11,"new","","Creates a new button with the given content and callback.",15,{"inputs":[{"name":"str"},{"name":"f"}],"output":{"name":"self"}}],[11,"disable","","Disables this view.",15,null],[11,"disabled","","Disables this view.",15,null],[11,"enable","","Re-enables this view.",15,null],[11,"set_enabled","","Enable or disable this view.",15,null],[11,"is_enabled","","Returns `true` if this view is enabled.",15,null],[11,"draw","","",15,null],[11,"get_min_size","","",15,null],[11,"on_event","","",15,null],[11,"take_focus","","",15,null],[11,"default","","",16,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new, unchecked checkbox.",16,{"inputs":[],"output":{"name":"self"}}],[11,"disable","","Disables this view.",16,null],[11,"disabled","","Disables this view.",16,null],[11,"enable","","Re-enables this view.",16,null],[11,"set_enabled","","Enable or disable this view.",16,null],[11,"is_enabled","","Returns `true` if this view is enabled.",16,null],[11,"set_on_change","","Sets a callback to be used when the state changes.",16,null],[11,"on_change","","Sets a callback to be used when the state changes.",16,null],[11,"toggle","","Toggles the checkbox state.",16,null],[11,"check","","Check the checkbox.",16,null],[11,"checked","","Check the checkbox.",16,null],[11,"is_checked","","Returns `true` if the checkbox is checked.",16,null],[11,"uncheck","","Uncheck the checkbox.",16,null],[11,"unchecked","","Uncheck the checkbox.",16,null],[11,"set_checked","","Sets the checkbox state.",16,null],[11,"get_min_size","","",16,null],[11,"take_focus","","",16,null],[11,"draw","","",16,null],[11,"on_event","","",16,null],[11,"new","","Creates a new Dialog with the given content.",17,{"inputs":[{"name":"v"}],"output":{"name":"self"}}],[11,"info","","Convenient method to create an infobox.",17,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"button","","Adds a button to the dialog with the given label and callback.",17,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.",17,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.",17,null],[11,"dismiss_button","","Shortcut method to add a button that will dismiss the dialog.",17,null],[11,"title","","Sets the title of the dialog.\nIf not empty, it will be visible at the top.",17,null],[11,"padding","","Sets the padding in the dialog (around content and buttons).",17,null],[11,"draw","","",17,null],[11,"get_min_size","","",17,null],[11,"layout","","",17,null],[11,"on_event","","",17,null],[11,"take_focus","","",17,null],[11,"find","","",17,null],[11,"default","","",18,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new, empty edit view.",18,{"inputs":[],"output":{"name":"self"}}],[11,"disable","","Disables this view.",18,null],[11,"disabled","","Disables this view.",18,null],[11,"enable","","Re-enables this view.",18,null],[11,"set_enabled","","Enable or disable this view.",18,null],[11,"is_enabled","","Returns `true` if this view is enabled.",18,null],[11,"set_content","","Replace the entire content of the view with the given one.",18,null],[11,"get_content","","Get the current text.",18,null],[11,"content","","Sets the current content to the given value.",18,null],[11,"min_length","","Sets the minimum length for this view.\n(This applies to the layout, not the content.)",18,null],[11,"with_id","","Wraps this view into an IdView with the given id.",18,null],[11,"draw","","",18,null],[11,"layout","","",18,null],[11,"get_min_size","","",18,null],[11,"take_focus","","",18,null],[11,"on_event","","",18,null],[11,"new","","Wraps the given view into a new FullView.",19,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"full_width","","Creates a new wrapper around `view` with full width.",19,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"full_height","","Creates a new wrapper around `view` with full height.",19,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",19,null],[11,"get_view_mut","","",19,null],[11,"wrap_get_min_size","","",19,null],[11,"new","","Wraps the given view. It will be selectable with the given id.",20,{"inputs":[{"name":"str"},{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",20,null],[11,"get_view_mut","","",20,null],[11,"wrap_find","","",20,null],[11,"new","","Wraps the given view in a new KeyEventView.",21,{"inputs":[{"name":"v"}],"output":{"name":"self"}}],[11,"register","","Registers a callback when the given key is ignored by the child.",21,null],[11,"get_view","","",21,null],[11,"get_view_mut","","",21,null],[11,"wrap_on_event","","",21,null],[11,"new","","Creates a new layout with the given orientation.",22,{"inputs":[{"name":"orientation"}],"output":{"name":"self"}}],[11,"weight","","Modifies the weight of the last child added.",22,null],[11,"child","","Adds a child to the layout.",22,null],[11,"vertical","","Creates a new vertical layout.",22,{"inputs":[],"output":{"name":"self"}}],[11,"horizontal","","Creates a new horizontal layout.",22,{"inputs":[],"output":{"name":"self"}}],[11,"draw","","",22,null],[11,"needs_relayout","","",22,null],[11,"layout","","",22,null],[11,"get_min_size","","",22,null],[11,"take_focus","","",22,null],[11,"on_event","","",22,null],[11,"find","","",22,null],[11,"default","","",23,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new, empty `ListView`.",23,{"inputs":[],"output":{"name":"self"}}],[11,"add_child","","Adds a view to the end of the list.",23,null],[11,"child","","Adds a view to the end of the list.",23,null],[11,"add_delimiter","","Adds a delimiter to the end of the list.",23,null],[11,"delimiter","","Adds a delimiter to the end of the list.",23,null],[11,"draw","","",23,null],[11,"get_min_size","","",23,null],[11,"layout","","",23,null],[11,"on_event","","",23,null],[11,"take_focus","","",23,null],[11,"find","","",23,null],[11,"default","cursive::view","",7,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new, empty menubar.",7,{"inputs":[],"output":{"name":"self"}}],[11,"receive_events","","True if we should be receiving events.",7,null],[11,"visible","","Returns `true` if we should be drawn.",7,null],[11,"add","","Adds a new item to the menubar.",7,null],[11,"draw","","",7,null],[11,"on_event","","",7,null],[11,"take_focus","","",7,null],[11,"get_min_size","","",7,null],[11,"new","","Creates a new `MenuPopup` using the given menu tree.",24,{"inputs":[{"name":"rc"}],"output":{"name":"self"}}],[11,"set_focus","","Sets the currently focused element.",24,null],[11,"focus","","Sets the currently focused element.",24,null],[11,"align","","Sets the alignment for this view.",24,null],[11,"on_dismiss","","Sets a callback to be used when this view is actively dismissed.",24,null],[11,"on_action","","Sets a callback to be used when a leaf is activated.",24,null],[11,"draw","","",24,null],[11,"get_min_size","","",24,null],[11,"on_event","","",24,null],[11,"layout","","",24,null],[11,"new","","Wraps the given view.",25,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"left_padding","","If set, adds an empty column to the left of the view.",25,null],[11,"top_padding","","If set, adds an empty row at the top of the view.",25,null],[11,"get_view","","",25,null],[11,"get_view_mut","","",25,null],[11,"wrap_get_min_size","","",25,null],[11,"wrap_layout","","",25,null],[11,"wrap_draw","","",25,null],[11,"new","cursive::prelude","Creates a new empty SelectView.",26,{"inputs":[],"output":{"name":"self"}}],[11,"popup","","Turns `self` into a popup select view.",26,null],[11,"set_popup","","Turns `self` into a popup select view.",26,null],[11,"disable","","Disables this view.",26,null],[11,"disabled","","Disables this view.",26,null],[11,"enable","","Re-enables this view.",26,null],[11,"set_enabled","","Enable or disable this view.",26,null],[11,"is_enabled","","Returns `true` if this view is enabled.",26,null],[11,"set_on_select","","Sets a callback to be used when an item is selected.",26,null],[11,"on_select","","Sets a callback to be used when an item is selected.",26,null],[11,"align","","Sets the alignment for this view.",26,null],[11,"v_align","","Sets the vertical alignment for this view.\n(If the view is given too much space vertically.)",26,null],[11,"h_align","","Sets the horizontal alignment for this view.",26,null],[11,"selection","","Returns the value of the currently selected item.",26,null],[11,"add_item","","Adds a item to the list, with given label and value.",26,null],[11,"item","","Chainable variant of add_item",26,null],[11,"with_id","","Wraps this view into an IdView with the given id.",26,null],[11,"add_item_str","","Convenient method to use the label as value.",26,null],[11,"item_str","","Chainable variant of add_item_str",26,null],[11,"draw","","",26,null],[11,"get_min_size","","",26,null],[11,"on_event","","",26,null],[11,"take_focus","","",26,null],[11,"layout","","",26,null],[11,"new","cursive::view","Wraps the given view.",10,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",10,null],[11,"get_view_mut","","",10,null],[11,"wrap_layout","","",10,null],[11,"default","","",27,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new empty StackView",27,{"inputs":[],"output":{"name":"self"}}],[11,"add_layer","","Adds new view on top of the stack in the center of the screen.",27,null],[11,"add_layer_at","","Adds a view on top of the stack.",27,null],[11,"pop_layer","","Remove the top-most layer.",27,null],[11,"offset","","Computes the offset of the current top view.",27,null],[11,"draw","","",27,null],[11,"on_event","","",27,null],[11,"layout","","",27,null],[11,"get_min_size","","",27,null],[11,"take_focus","","",27,null],[11,"find","","",27,null],[11,"new","cursive::prelude","Creates a new TextView with the given content.",28,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"set_scrollable","","Enable or disable the view's scrolling capabilities.",28,null],[11,"scrollable","","Enable or disable the view's scrolling capabilities.",28,null],[11,"h_align","","Sets the horizontal alignment for this view.",28,null],[11,"v_align","","Sets the vertical alignment for this view.",28,null],[11,"align","","Sets the alignment for this view.",28,null],[11,"set_content","","Replace the text in this view.",28,null],[11,"get_content","","Returns the current text in this view.",28,null],[11,"draw","","",28,null],[11,"on_event","","",28,null],[11,"needs_relayout","","",28,null],[11,"get_min_size","","",28,null],[11,"take_focus","","",28,null],[11,"layout","","",28,null],[11,"offset","cursive::view","Return the last offset at which the view was drawn.",9,null],[11,"new","","Creates a new `TrackedView` around `view`.",9,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"with_id","","Wraps itself in a `IdView` for easy retrieval.",9,null],[11,"get_view","","",9,null],[11,"get_view_mut","","",9,null],[11,"wrap_draw","","",9,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.",29,null],[10,"get_view_mut","","Get a mutable reference to the wrapped view.",29,null],[11,"wrap_draw","","Wraps the `draw` method.",29,null],[11,"wrap_get_min_size","","Wraps the `get_min_size` method.",29,null],[11,"wrap_on_event","","Wraps the `on_event` method.",29,null],[11,"wrap_layout","","Wraps the `layout` method.",29,null],[11,"wrap_take_focus","","Wraps the `take_focus` method.",29,null],[11,"wrap_find","","Wraps the `find` method.",29,null],[11,"wrap_needs_relayout","","Wraps the `needs_relayout` method.",29,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.",30,null],[11,"get_min_size","","Returns the minimum size the view requires with the given restrictions.",30,null],[11,"needs_relayout","","Returns `true` if the view content changed since last layout phase.",30,null],[11,"layout","","Called once the size for this view has been decided,",30,null],[10,"draw","","Draws the view with the given printer (includes bounds) and focus.",30,null],[11,"find","","Finds the view pointed to by the given path.",30,null],[11,"take_focus","","This view is offered focus. Will it take it?",30,null],[11,"clone","","",11,null],[11,"fmt","","",11,null],[11,"eq","","",11,null],[11,"ne","","",11,null],[11,"new","","Creates a new sized cache",11,{"inputs":[{"name":"usize"},{"name":"bool"}],"output":{"name":"self"}}],[11,"accept","","Returns `true` if `self` is still valid for the given `request`.",11,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",31,null],[12,"right","","Right margin",31,null],[12,"top","","Top margin",31,null],[12,"bottom","","Bottom margin",31,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 `Vec2::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","",31,null],[11,"new","","Creates a new Vec4.",31,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"}],"output":{"name":"self"}}],[11,"horizontal","","Returns left + right.",31,null],[11,"vertical","","Returns top + bottom.",31,null],[11,"combined","","Returns (left+right, top+bottom).",31,null],[11,"top_left","","Returns (left, top).",31,null],[11,"bot_right","","Returns (right, bottom).",31,null],[11,"from","","",31,null],[11,"from","","",31,null],[11,"add","","",31,null],[11,"sub","","",31,null],[11,"div","","",31,null],[11,"mul","","",31,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.",32,null],[12,"borders","","How view borders should be drawn.",32,null],[12,"colors","","What colors should be used through the application?",32,null],[3,"Palette","","Color configuration for the application.",null,null],[12,"background","","Color used for the application background.",33,null],[12,"shadow","","Color used for View shadows.",33,null],[12,"view","","Color used for View backgrounds.",33,null],[12,"primary","","Primary color used for the text.",33,null],[12,"secondary","","Secondary color used for the text.",33,null],[12,"tertiary","","Tertiary color used for the text.",33,null],[12,"title_primary","","Primary color used for title text.",33,null],[12,"title_secondary","","Secondary color used for title text.",33,null],[12,"highlight","","Color used for highlighting text.",33,null],[12,"highlight_inactive","","Color used for highlighting inactive text.",33,null],[4,"Effect","","Text effect",null,null],[13,"Simple","","No effect",34,null],[13,"Reverse","","Reverses foreground and background colors",34,null],[4,"ColorStyle","","Possible color style for a cell.",null,null],[13,"Background","","Application background, where no view is present.",35,null],[13,"Shadow","","Color used by view shadows. Only background matters.",35,null],[13,"Primary","","Main text with default background.",35,null],[13,"Secondary","","Secondary text color, with default background.",35,null],[13,"Tertiary","","Tertiary text color, with default background.",35,null],[13,"TitlePrimary","","Title text color with default background.",35,null],[13,"TitleSecondary","","Alternative color for a title.",35,null],[13,"Highlight","","Alternate text with highlight background.",35,null],[13,"HighlightInactive","","Highlight color for inactive views (not in focus).",35,null],[4,"BorderStyle","","Specifies how some borders should be drawn.",null,null],[13,"NoBorder","","Don't draw any border.",36,null],[13,"Simple","","Simple borders.",36,null],[13,"Outset","","Outset borders with a simple 3d effect.",36,null],[4,"Color","","Represents a color used by the theme.",null,null],[13,"Black","","Black color",37,null],[13,"Red","","Red color",37,null],[13,"Green","","Green color",37,null],[13,"Yellow","","Yellow color (Red + Green)",37,null],[13,"Blue","","Blue color",37,null],[13,"Magenta","","Magenta color (Red + Blue)",37,null],[13,"Cyan","","Cyan color (Green + Blue)",37,null],[13,"White","","White color (Red + Green + Blue)",37,null],[13,"Rgb","","True-color, 24-bit.",37,null],[13,"RgbLowRes","","Low-resolution",37,null],[4,"Error","","Possible error returned when loading a theme.",null,null],[13,"Io","","An error occured when reading the file.",38,null],[13,"Parse","","An error occured when parsing the toml content.",38,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","","",35,null],[11,"id","","Returns the ncurses pair ID associated with this color pair.",35,null],[11,"fmt","","",32,null],[11,"clone","","",32,null],[11,"default","","",32,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",36,null],[11,"clone","","",36,null],[11,"fmt","","",33,null],[11,"clone","","",33,null],[11,"fmt","","",37,null],[11,"clone","","",37,null],[11,"fmt","","",38,null],[11,"from","","",38,{"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",39,null],[12,"v","","Vertical alignment policy",39,null],[4,"HAlign","","Horizontal alignment",null,null],[13,"Left","","Place the element to the left of available space",40,null],[13,"Center","","Place the element horizontally in the center of available space",40,null],[13,"Right","","Place the element to the right of available space",40,null],[4,"VAlign","","Vertical alignment",null,null],[13,"Top","","Place the element at the top of available space",41,null],[13,"Center","","Place the element vertically in the center of available space",41,null],[13,"Bottom","","Place the element at the bottom of available space",41,null],[11,"new","","Creates a new Align object from the given alignments.",39,{"inputs":[{"name":"halign"},{"name":"valign"}],"output":{"name":"self"}}],[11,"top_left","","Creates a top-left alignment.",39,{"inputs":[],"output":{"name":"self"}}],[11,"top_right","","Creates a top-right alignment.",39,{"inputs":[],"output":{"name":"self"}}],[11,"bot_left","","Creates a bottom-left alignment.",39,{"inputs":[],"output":{"name":"self"}}],[11,"bot_right","","Creates a bottom-right alignment.",39,{"inputs":[],"output":{"name":"self"}}],[11,"center","","Creates an alignment centered both horizontally and vertically.",39,{"inputs":[],"output":{"name":"self"}}],[11,"get_offset","","Returns the offset required to position a view.",40,null],[11,"get_offset","","Returns the offset required to position a view.",41,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",42,null],[4,"MenuItem","","Node in the menu tree.",null,null],[13,"Leaf","","Actionnable button with a label.",43,null],[13,"Subtree","","Sub-menu with a label.",43,null],[13,"Delimiter","","Delimiter without a label.",43,null],[11,"default","","",42,{"inputs":[],"output":{"name":"menutree"}}],[11,"label","","Returns the label for this item.",43,null],[11,"is_delimiter","","Returns `true` if `self` is a delimiter.",43,null],[11,"is_subtree","","Returns `true` if `self` is a subtree.",43,null],[11,"new","","Creates a new, empty tree.",42,{"inputs":[],"output":{"name":"self"}}],[11,"len","","Returns the number of children, including delimiters.",42,null],[11,"clear","","Remove every children from this tree.",42,null],[11,"is_empty","","Returns `true` if this tree has no children.",42,null],[11,"add_delimiter","","Adds a delimiter to the end of this tree.",42,null],[11,"delimiter","","Adds a delimiter to the end of this tree - chainable variant.",42,null],[11,"add_leaf","","Adds a actionnable leaf to the end of this tree.",42,null],[11,"leaf","","Adds a actionnable leaf to the end of this tree - chainable variant.",42,null],[11,"add_subtree","","Adds a submenu to the end of this tree.",42,null],[11,"subtree","","Adds a submenu to the end of this tree - chainable variant.",42,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",44,null],[13,"Vertical","","Vertical orientation",44,null],[4,"Direction","","Represents a direction, either absolute or orientation-dependent.",null,null],[13,"Abs","","An absolute direction.",45,null],[13,"Rel","","A direction relative to the current orientation.",45,null],[4,"Relative","","Direction relative to an orientation.",null,null],[13,"Front","","Front relative direction.",46,null],[13,"Back","","Back relative direction.",46,null],[4,"Absolute","","Absolute direction (up, down, left, right).",null,null],[13,"Left","","Left",47,null],[13,"Up","","Up",47,null],[13,"Right","","Right",47,null],[13,"Down","","Down",47,null],[13,"None","","No real direction.",47,null],[11,"eq","","",44,null],[11,"fmt","","",44,null],[11,"clone","","",44,null],[11,"get","","Returns the component of `v` corresponding to this orientation.",44,null],[11,"swap","","Returns the other orientation.",44,null],[11,"get_ref","","Returns a mutable reference to the component of the given vector\ncorresponding to this orientation.",44,null],[11,"stack","","Takes an iterator on sizes, and stack them in the current orientation,\nreturning the size of the required bounding box.",44,null],[11,"make_vec","","Creates a new `Vec2` with `value` in `self`'s axis.",44,null],[11,"eq","","",45,null],[11,"ne","","",45,null],[11,"clone","","",45,null],[11,"fmt","","",45,null],[11,"relative","","Returns the relative direction for the given orientation.",45,null],[11,"absolute","","Returns the absolute direction in the given `orientation`.",45,null],[11,"back","","Shortcut to create `Direction::Rel(Relative::Back)`",45,{"inputs":[],"output":{"name":"self"}}],[11,"front","","Shortcut to create `Direction::Rel(Relative::Front)`",45,{"inputs":[],"output":{"name":"self"}}],[11,"left","","Shortcut to create `Direction::Abs(Absolute::Left)`",45,{"inputs":[],"output":{"name":"self"}}],[11,"right","","Shortcut to create `Direction::Abs(Absolute::Right)`",45,{"inputs":[],"output":{"name":"self"}}],[11,"up","","Shortcut to create `Direction::Abs(Absolute::Up)`",45,{"inputs":[],"output":{"name":"self"}}],[11,"down","","Shortcut to create `Direction::Abs(Absolute::Down)`",45,{"inputs":[],"output":{"name":"self"}}],[11,"none","","Shortcut to create `Direction::Abs(Absolute::None)`",45,{"inputs":[],"output":{"name":"self"}}],[11,"eq","","",46,null],[11,"clone","","",46,null],[11,"fmt","","",46,null],[11,"absolute","","Returns the absolute direction in the given `orientation`.",46,null],[11,"eq","","",47,null],[11,"clone","","",47,null],[11,"fmt","","",47,null],[11,"relative","","Returns the relative direction for the given orientation.",47,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,"offset","","Returns a sub-printer with the given offset.",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],[11,"with","cursive::prelude","Calls the given closure on `self`.",2,null],[6,"ScreenId","cursive","Identifies a screen in the cursive ROOT.",null,null],[8,"With","","Generic trait to enable chainable API",null,null],[11,"with","cursive::prelude","Calls the given closure on `self`.",2,null],[11,"default","cursive","",48,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Creates a new Cursive root, and initialize ncurses.",48,{"inputs":[],"output":{"name":"self"}}],[11,"select_menubar","","Selects the menubar",48,null],[11,"set_autohide_menu","","Sets the menubar autohide_menubar feature.",48,null],[11,"menubar","","Retrieve the menu tree used by the menubar.",48,null],[11,"current_theme","","Returns the currently used theme",48,null],[11,"load_theme","","Loads a theme from the given file.",48,null],[11,"set_fps","","Sets the refresh rate, in frames per second.",48,null],[11,"screen","","Returns a reference to the currently active screen.",48,null],[11,"screen_mut","","Returns a mutable reference to the currently active screen.",48,null],[11,"add_screen","","Adds a new screen, and returns its ID.",48,null],[11,"add_active_screen","","Convenient method to create a new screen, and set it as active.",48,null],[11,"set_screen","","Sets the active screen. Panics if no such screen exist.",48,null],[11,"find","","Tries to find the view pointed to by the given path.",48,null],[11,"find_id","","Convenient method to use `find` with a `Selector::Id`.",48,null],[11,"add_global_callback","","Adds a global callback.",48,null],[11,"add_layer","","Convenient method to add a layer to the current screen.",48,null],[11,"pop_layer","","Convenient method to remove a layer from the current screen.",48,null],[11,"screen_size","","Returns the size of the screen, in characters.",48,null],[11,"run","","Runs the event loop.",48,null],[11,"quit","","Stops the event loop.",48,null],[11,"drop","","",48,null],[14,"wrap_impl!","","Convenient macro to implement the ViewWrapper trait.",null,null],[11,"wrap_draw","cursive::view","Wraps the `draw` method.",29,null],[11,"wrap_get_min_size","","Wraps the `get_min_size` method.",29,null],[11,"wrap_on_event","","Wraps the `on_event` method.",29,null],[11,"wrap_layout","","Wraps the `layout` method.",29,null],[11,"wrap_take_focus","","Wraps the `take_focus` method.",29,null],[11,"wrap_find","","Wraps the `find` method.",29,null],[11,"wrap_needs_relayout","","Wraps the `needs_relayout` method.",29,null],[11,"center","","Returns a position centered on both axis.",49,{"inputs":[],"output":{"name":"self"}}],[11,"absolute","","Returns a position absolute on both axis.",49,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"parent","","Returns a position relative to the parent on both axis.",49,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"compute_offset","","Computes the offset required to draw a view.",49,null]],"paths":[[3,"XY"],[3,"Printer"],[8,"With"],[4,"EventResult"],[4,"Key"],[4,"Event"],[3,"ScrollBase"],[3,"Menubar"],[3,"ViewPath"],[3,"TrackedView"],[3,"SizedView"],[3,"SizeCache"],[4,"Offset"],[4,"Selector"],[3,"BoxView"],[3,"Button"],[3,"Checkbox"],[3,"Dialog"],[3,"EditView"],[3,"FullView"],[3,"IdView"],[3,"KeyEventView"],[3,"LinearLayout"],[3,"ListView"],[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);