var searchIndex = {}; searchIndex["cursive"] = {"doc":"# Cursive","items":[[3,"Cursive","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.",0,null],[13,"Consumed","","The event was consumed. An optionnal callback to run is attached.",0,null],[4,"Key","","Represents a key, or a combination of keys.",null,null],[13,"Enter","","Both Enter and numpad Enter",1,null],[13,"Tab","","Tabulation key",1,null],[13,"ShiftTab","","",1,null],[13,"Backspace","","",1,null],[13,"Resize","","Indicates the window was resized",1,null],[13,"Esc","","Escape key.",1,null],[13,"NumpadCenter","","The 5 in the center of the keypad, when numlock is disabled.",1,null],[13,"Left","","",1,null],[13,"ShiftLeft","","Left arrow while shift is pressed.",1,null],[13,"AltLeft","","",1,null],[13,"AltShiftLeft","","",1,null],[13,"CtrlLeft","","",1,null],[13,"CtrlShiftLeft","","",1,null],[13,"CtrlAltLeft","","",1,null],[13,"Right","","",1,null],[13,"ShiftRight","","Right arrow while shift is pressed.",1,null],[13,"AltRight","","",1,null],[13,"AltShiftRight","","",1,null],[13,"CtrlRight","","",1,null],[13,"CtrlShiftRight","","",1,null],[13,"CtrlAltRight","","",1,null],[13,"Up","","",1,null],[13,"ShiftUp","","",1,null],[13,"AltUp","","",1,null],[13,"AltShiftUp","","",1,null],[13,"CtrlUp","","",1,null],[13,"CtrlShiftUp","","",1,null],[13,"CtrlAltUp","","",1,null],[13,"Down","","",1,null],[13,"ShiftDown","","",1,null],[13,"AltDown","","",1,null],[13,"AltShiftDown","","",1,null],[13,"CtrlDown","","",1,null],[13,"CtrlShiftDown","","",1,null],[13,"CtrlAltDown","","",1,null],[13,"PageUp","","",1,null],[13,"ShiftPageUp","","",1,null],[13,"AltPageUp","","",1,null],[13,"AltShiftPageUp","","",1,null],[13,"CtrlPageUp","","",1,null],[13,"CtrlShiftPageUp","","",1,null],[13,"CtrlAltPageUp","","",1,null],[13,"PageDown","","",1,null],[13,"ShiftPageDown","","",1,null],[13,"AltPageDown","","",1,null],[13,"AltShiftPageDown","","",1,null],[13,"CtrlPageDown","","",1,null],[13,"CtrlShiftPageDown","","",1,null],[13,"CtrlAltPageDown","","",1,null],[13,"Home","","",1,null],[13,"ShiftHome","","",1,null],[13,"AltHome","","",1,null],[13,"AltShiftHome","","",1,null],[13,"CtrlHome","","",1,null],[13,"CtrlShiftHome","","",1,null],[13,"CtrlAltHome","","",1,null],[13,"End","","",1,null],[13,"ShiftEnd","","",1,null],[13,"AltEnd","","",1,null],[13,"AltShiftEnd","","",1,null],[13,"CtrlEnd","","",1,null],[13,"CtrlShiftEnd","","",1,null],[13,"CtrlAltEnd","","",1,null],[13,"Del","","Delete key",1,null],[13,"ShiftDel","","",1,null],[13,"AltDel","","",1,null],[13,"AltShiftDel","","",1,null],[13,"CtrlDel","","",1,null],[13,"CtrlShiftDel","","",1,null],[13,"Ins","","Insert key.",1,null],[13,"CtrlIns","","Insert key while ctrl is pressed.",1,null],[13,"AltIns","","",1,null],[13,"CtrlAltIns","","",1,null],[13,"F","","",1,null],[13,"ShiftF","","",1,null],[13,"AltF","","",1,null],[13,"CtrlF","","",1,null],[13,"CtrlShiftF","","",1,null],[13,"CtrlChar","","",1,null],[13,"Unknown","","",1,null],[4,"Event","","Represents an event as seen by the application.",null,null],[13,"CharEvent","","A text character was entered.",2,null],[13,"KeyEvent","","A key was pressed.",2,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],[8,"ToEvent","","Generic trait to convert a value to an event.",null,null],[10,"to_event","","",3,null],[11,"hash","","",1,null],[11,"clone","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"from_ncurses","","Returns the Key enum corresponding to the given ncurses event.",1,{"inputs":[{"name":"i32"}],"output":{"name":"self"}}],[11,"fmt","","",1,null],[11,"hash","","",2,null],[11,"clone","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"to_event","","",1,null],[11,"to_event","","",2,null],[0,"view","cursive","Defines various views to use when creating the layout.",null,null],[3,"SizeRequest","cursive::view","Describes constraints on a view layout.",null,null],[12,"w","","Restriction on the view width",4,null],[12,"h","","Restriction on the view height",4,null],[3,"ScrollBase","","Provide scrolling functionalities to a view.",null,null],[12,"start_line","","",5,null],[12,"content_height","","",5,null],[12,"view_height","","",5,null],[3,"IdView","","Wrapper view that allows to select its content with a fixed string id.",null,null],[3,"BoxView","","BoxView is a wrapper around an other view, with a given minimum 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,"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,"SizedView","","Wrapper around a view that remembers its size.",null,null],[12,"view","","Wrapped view.",7,null],[12,"size","","Cached size from the last layout() call.",7,null],[4,"DimensionRequest","","Describe constraints on a view layout in one dimension.",null,null],[13,"Fixed","","The view must use exactly the attached size.",8,null],[13,"AtMost","","The view is free to choose its size if it stays under the limit.",8,null],[13,"Unknown","","No clear restriction apply.",8,null],[4,"Selector","","Selects a single view (if any) in the tree.",null,null],[13,"Id","","Selects a view from its ID",9,null],[13,"Path","","Selects a view from its path",9,null],[11,"new","","Creates a new BoxView with the given minimum size and content",10,{"inputs":[{"name":"s"},{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",10,null],[11,"get_view_mut","","",10,null],[11,"wrap_get_min_size","","",10,null],[11,"new","","Creates a new button with the given content and callback.",11,{"inputs":[{"name":"str"},{"name":"f"}],"output":{"name":"self"}}],[11,"draw","","",11,null],[11,"get_min_size","","",11,null],[11,"on_event","","",11,null],[11,"take_focus","","",11,null],[11,"new","","Creates a new Dialog with the given content.",12,{"inputs":[{"name":"v"}],"output":{"name":"self"}}],[11,"button","","Adds a button to the dialog with the given label and callback.",12,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.",12,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.",12,null],[11,"dismiss_button","","Shortcut method to add a button that will dismiss the dialog.",12,null],[11,"title","","Sets the title of the dialog.\nIf not empty, it will be visible at the top.",12,null],[11,"padding","","Sets the padding in the dialog (around content and buttons).",12,null],[11,"draw","","",12,null],[11,"get_min_size","","",12,null],[11,"layout","","",12,null],[11,"on_event","","",12,null],[11,"take_focus","","",12,null],[11,"find","","",12,null],[11,"new","","Creates a new, empty edit view.",13,{"inputs":[],"output":{"name":"self"}}],[11,"set_content","","Replace the entire content of the view with the given one.",13,null],[11,"get_content","","Get the current text.",13,null],[11,"content","","Sets the current content to the given value. Convenient chainable method.",13,null],[11,"min_length","","Sets the minimum length for this view.\n(This applies to the layout, not the content.)",13,null],[11,"with_id","","Wraps this view into an IdView with the given id.",13,null],[11,"draw","","",13,null],[11,"layout","","",13,null],[11,"get_min_size","","",13,null],[11,"take_focus","","",13,null],[11,"on_event","","",13,null],[11,"new","","Wraps the given view into a new FullView.",14,{"inputs":[{"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","","Wraps the given view. It will be selectable with the given id.",15,{"inputs":[{"name":"str"},{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",15,null],[11,"get_view_mut","","",15,null],[11,"wrap_find","","",15,null],[11,"new","","Wraps the given view in a new KeyEventView.",16,{"inputs":[{"name":"v"}],"output":{"name":"self"}}],[11,"register","","Registers a callback when the given key is ignored by the child.",16,null],[11,"get_view","","",16,null],[11,"get_view_mut","","",16,null],[11,"wrap_on_event","","",16,null],[11,"new","","Creates a new layout with the given orientation.",17,{"inputs":[{"name":"orientation"}],"output":{"name":"self"}}],[11,"weight","","Modifies the weight of the last child added.",17,null],[11,"child","","Adds a child to the layout.",17,null],[11,"vertical","","Creates a new vertical layout.",17,{"inputs":[],"output":{"name":"self"}}],[11,"horizontal","","Creates a new horizontal layout.",17,{"inputs":[],"output":{"name":"self"}}],[11,"draw","","",17,null],[11,"layout","","",17,null],[11,"get_min_size","","",17,null],[11,"on_event","","",17,null],[11,"clone","","",8,null],[11,"eq","","",8,null],[11,"ne","","",8,null],[11,"reduced","","Returns a new request, reduced from the original by the given offset.",8,null],[11,"clone","","",4,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"reduced","","Returns a new SizeRequest, reduced from the original by the given offset.",4,null],[11,"dummy","","Creates a new dummy request, with no restriction.",4,{"inputs":[],"output":{"name":"self"}}],[11,"new","","Wraps the given view.",18,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",18,null],[11,"get_view_mut","","",18,null],[11,"wrap_get_min_size","","",18,null],[11,"wrap_layout","","",18,null],[11,"wrap_draw","","",18,null],[11,"new","","",5,{"inputs":[],"output":{"name":"self"}}],[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, never going further than the bottom of the view.",5,null],[11,"scroll_up","","Scroll up by the given number of lines, never going above the top of the view.",5,null],[11,"draw","","Draws the scroll bar and the content using the given drawer.",5,null],[11,"new","","Creates a new empty SelectView.",19,{"inputs":[],"output":{"name":"self"}}],[11,"set_on_select","","",19,null],[11,"on_select","","Sets a function to be called when an item is selected (when ENTER is pressed).",19,null],[11,"align","","Sets the alignment for this view.",19,null],[11,"v_align","","Sets the vertical alignment for this view.\n(If the ciew is given too much space vertically.)",19,null],[11,"h_align","","Sets the horizontal alignment for this view.",19,null],[11,"selection","","Returns the value of the currently selected item. Panics if the list is empty.",19,null],[11,"add_item","","Adds a item to the list, with given label and value.",19,null],[11,"item","","Chainable variant of add_item",19,null],[11,"with_id","","Wraps this view into an IdView with the given id.",19,null],[11,"add_item_str","","For String-based SelectView, this is a convenient method to use the label as value.",19,null],[11,"item_str","","Chainable variant of add_item_str",19,null],[11,"draw","","",19,null],[11,"get_min_size","","",19,null],[11,"on_event","","",19,null],[11,"take_focus","","",19,null],[11,"layout","","",19,null],[11,"new","","Wraps the given view.",7,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[11,"get_view","","",7,null],[11,"get_view_mut","","",7,null],[11,"wrap_layout","","",7,null],[11,"new","","Creates a new empty StackView",20,{"inputs":[],"output":{"name":"self"}}],[11,"add_layer","","Add new view on top of the stack.",20,null],[11,"pop_layer","","Remove the top-most layer.",20,null],[11,"draw","","",20,null],[11,"on_event","","",20,null],[11,"layout","","",20,null],[11,"get_min_size","","",20,null],[11,"take_focus","","",20,null],[11,"find","","",20,null],[11,"new","","Creates a new TextView with the given content.",21,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"h_align","","Sets the horizontal alignment for this view.",21,null],[11,"v_align","","Sets the vertical alignment for this view.",21,null],[11,"align","","Sets the alignment for this view.",21,null],[11,"set_content","","Replace the text in this view.",21,null],[11,"get_content","","Returns the current text in this view.",21,null],[11,"draw","","",21,null],[11,"on_event","","",21,null],[11,"get_min_size","","",21,null],[11,"take_focus","","",21,null],[11,"layout","","",21,null],[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"}}],[8,"ViewWrapper","","Generic wrapper around a view.",null,null],[10,"get_view","","Get an immutable reference to the wrapped view, so that we can forward some calls to it.",22,null],[10,"get_view_mut","","Get a mutable reference to the wrapped view, for the mutable methods.",22,null],[11,"wrap_draw","","Wraps the draw method.",22,null],[11,"wrap_get_min_size","","Wraps the get_min_size method.",22,null],[11,"wrap_on_event","","Wraps the on_event method.",22,null],[11,"wrap_layout","","Wraps the layout method",22,null],[11,"wrap_take_focus","","Wraps the take_focus method",22,null],[11,"wrap_find","","",22,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.",23,null],[11,"get_min_size","","Returns the minimum size the view requires under the given restrictions.",23,null],[11,"layout","","Called once the size for this view has been decided, so it can\npropagate the information to its children.",23,null],[10,"draw","","Draws the view with the given printer (includes bounds) and focus.",23,null],[11,"find","","Finds the view pointed to by the given path.\nReturns None if the path doesn't lead to a view.",23,null],[11,"take_focus","","This view is offered focus. Will it take it?",23,null],[0,"printer","cursive","Makes drawing on ncurses windows easier.",null,null],[3,"Printer","cursive::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.",24,null],[12,"size","","Size of the area we are allowed to draw on.",24,null],[12,"focused","","Whether the view to draw is currently focused or not.",24,null],[12,"theme","","Currently used theme",24,null],[11,"new","","Creates a new printer on the given window.",24,{"inputs":[{"name":"t"},{"name":"theme"}],"output":{"name":"self"}}],[11,"print","","Prints some text at the given position relative to the window.",24,null],[11,"print_vline","","Prints a vertical line using the given character.",24,null],[11,"print_hline","","Prints a horizontal line using the given character.",24,null],[11,"with_color","","Call the given closure with a colored printer,\nthat will apply the given color on prints.",24,null],[11,"with_style","","Same as `with_color`, but apply a ncurses style instead,\nlike `ncurses::A_BOLD()` or `ncurses::A_REVERSE()`.",24,null],[11,"print_box","","Prints a rectangular box.",24,null],[11,"sub_printer","","Returns a printer on a subset of this one's area.",24,null],[0,"vec","cursive","Points on the 2D character grid.",null,null],[3,"Vec2","cursive::vec","Simple 2D size, in characters.",null,null],[12,"x","","X coordinate (column), from left to right.",25,null],[12,"y","","Y coordinate (row), from top to bottom.",25,null],[3,"Vec4","","Four values representing each direction.",null,null],[12,"left","","Left margin",26,null],[12,"right","","Right margin",26,null],[12,"top","","Top margin",26,null],[12,"bottom","","Bottom margin",26,null],[8,"ToVec2","","A generic trait for converting a value into a 2D vector.",null,null],[10,"to_vec2","","Converts self into a Vec2.",27,null],[8,"ToVec4","","Generic trait for converting a value into a Vec4.",null,null],[10,"to_vec4","","Converts self to a Vec4.",28,null],[11,"fmt","","",25,null],[11,"eq","","",25,null],[11,"ne","","",25,null],[11,"clone","","",25,null],[11,"partial_cmp","","",25,null],[11,"new","","Creates a new Vec2 from coordinates.",25,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"self"}}],[11,"max","","Returns a new Vec2 that is a maximum per coordinate.",25,{"inputs":[{"name":"self"},{"name":"self"}],"output":{"name":"self"}}],[11,"min","","Returns a new Vec2 that is no larger than any input in both dimensions.",25,{"inputs":[{"name":"self"},{"name":"self"}],"output":{"name":"self"}}],[11,"keep_x","","Returns a vector with the X component of self, and y=0.",25,null],[11,"keep_y","","Returns a vector with the Y component of self, and x=0.",25,null],[11,"zero","","Alias for Vec::new(0,0).",25,{"inputs":[],"output":{"name":"self"}}],[11,"stack_vertical","","Returns (max(self.x,other.x), self.y+other.y)",25,null],[11,"stack_horizontal","","Returns (self.x+other.x, max(self.y,other.y))",25,null],[11,"to_vec2","","",25,null],[11,"add","","",25,null],[11,"sub","","",25,null],[11,"div","","",25,null],[11,"mul","","",25,null],[11,"clone","","",26,null],[11,"new","","Creates a new Vec4.",26,{"inputs":[{"name":"usize"},{"name":"usize"},{"name":"usize"},{"name":"usize"}],"output":{"name":"self"}}],[11,"horizontal","","Returns left + right.",26,null],[11,"vertical","","Returns top + bottom.",26,null],[11,"combined","","Returns (left+right, top+bottom).",26,null],[11,"top_left","","Returns (left, top).",26,null],[11,"bot_right","","Returns (right, bottom).",26,null],[11,"to_vec4","","",26,null],[11,"add","","",26,null],[11,"sub","","",26,null],[11,"div","","",26,null],[11,"mul","","",26,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.",29,null],[12,"borders","","How view borders should be drawn.",29,null],[12,"colors","","What colors should be used through the application?",29,null],[3,"ColorStyle","","Represents the colors the application will use in various situations.",null,null],[12,"background","","Color used for the application background.",30,null],[12,"shadow","","Color used for View shadows.",30,null],[12,"view","","Color used for View backgrounds.",30,null],[12,"primary","","Primary color used for the text.",30,null],[12,"secondary","","Secondary color used for the text.",30,null],[12,"tertiary","","Tertiary color used for the text.",30,null],[12,"title_primary","","Primary color used for title text.",30,null],[12,"title_secondary","","Secondary color used for title text.",30,null],[12,"highlight","","Color used for highlighting text.",30,null],[12,"highlight_inactive","","Color used for highlighting inactive text.",30,null],[3,"Color","","Represents a color used by the theme.",null,null],[12,"id","","Color ID used by ncurses.",31,null],[4,"ColorPair","","Represents the color of a character and its background.",null,null],[13,"Background","","Application background, where no view is present.",32,null],[13,"Shadow","","Color used by view shadows. Only background matters.",32,null],[13,"Primary","","Main text with default background.",32,null],[13,"Secondary","","Secondary text color, with default background.",32,null],[13,"Tertiary","","Tertiary text color, with default background.",32,null],[13,"TitlePrimary","","Title text color with default background.",32,null],[13,"TitleSecondary","","Alternative color for a title.",32,null],[13,"Highlight","","Alternate text with highlight background.",32,null],[13,"HighlightInactive","","Highlight color for inactive views (not in focus).",32,null],[4,"BorderStyle","","Specifies how View borders should be drawn.",null,null],[13,"NoBorder","","Don't draw any border.",33,null],[13,"Simple","","Simple borders.",33,null],[13,"Outset","","Outset borders with a 3d effect.",33,null],[4,"Error","","Possible error returned when loading a theme.",null,null],[13,"IoError","","An error occured when reading the file.",34,null],[13,"ParseError","","An error occured when parsing the toml content.",34,null],[5,"load_theme","","Loads a theme file, and returns its representation if everything worked well.",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","","",32,null],[11,"ncurses_id","","Returns the ncurses pair ID associated with this color pair.",32,null],[11,"fmt","","",29,null],[11,"clone","","",29,null],[11,"fmt","","",33,null],[11,"clone","","",33,null],[11,"fmt","","",30,null],[11,"clone","","",30,null],[11,"fmt","","",31,null],[11,"clone","","",31,null],[11,"rgb","","Return the rgb values used by the color.",31,null],[11,"fmt","","",34,null],[11,"from","","",34,{"inputs":[{"name":"error"}],"output":{"name":"self"}}],[11,"black","","",31,{"inputs":[],"output":{"name":"self"}}],[11,"red","","",31,{"inputs":[],"output":{"name":"self"}}],[11,"green","","",31,{"inputs":[],"output":{"name":"self"}}],[11,"yellow","","",31,{"inputs":[],"output":{"name":"self"}}],[11,"blue","","",31,{"inputs":[],"output":{"name":"self"}}],[11,"magenta","","",31,{"inputs":[],"output":{"name":"self"}}],[11,"cyan","","",31,{"inputs":[],"output":{"name":"self"}}],[11,"white","","",31,{"inputs":[],"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","","",35,null],[12,"v","","",35,null],[4,"HAlign","","Horizontal alignment",null,null],[13,"Left","","",36,null],[13,"Center","","",36,null],[13,"Right","","",36,null],[4,"VAlign","","Vertical alignment",null,null],[13,"Top","","",37,null],[13,"Center","","",37,null],[13,"Bottom","","",37,null],[11,"new","","Creates a new Align object from the given horizontal and vertical 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","","To draw a view with size `content` in a printer with size `container`, this returns the\noffset to start printing the view at.",36,null],[11,"get_offset","","To draw a view with size `content` in a printer with size `container`, this returns the\noffset to start printing the view at.",37,null],[0,"orientation","cursive","Define an Orientation and associated methods.",null,null],[4,"Orientation","cursive::orientation","Describes a vertical or horizontal orientation for a view.",null,null],[13,"Horizontal","","Horizontal orientation",38,null],[13,"Vertical","","Vertical orientation",38,null],[11,"eq","","",38,null],[11,"clone","","",38,null],[11,"get","","Returns the component of the given vector corresponding to this orientation.\n(Horizontal will return the x value, and Vertical will return the y value.)",38,null],[11,"swap","","Returns the other orientation.",38,null],[11,"get_ref","","Returns a mutable reference to the component of the given vector\ncorresponding to this orientation.",38,null],[11,"stack","","Takes an iterator on sizes, and stack them in the current orientation,\nreturning the size of the required bounding box.",38,null],[6,"ScreenId","cursive","Identifies a screen in the cursive ROOT.",null,null],[11,"new","","Creates a new Cursive root, and initialize ncurses.",39,{"inputs":[],"output":{"name":"self"}}],[11,"current_theme","","Returns the currently used theme",39,null],[11,"load_theme","","Loads a theme from the given file.",39,null],[11,"set_fps","","Regularly redraws everything, even when no input is given. Between 0 and 1000.",39,null],[11,"screen_mut","","Returns a mutable reference to the currently active screen.",39,null],[11,"add_screen","","Adds a new screen, and returns its ID.",39,null],[11,"add_active_screen","","Convenient method to create a new screen, and set it as active.",39,null],[11,"set_screen","","Sets the active screen. Panics if no such screen exist.",39,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.",39,null],[11,"find_id","","Convenient method to use `find` with a `Selector::Id`.",39,null],[11,"add_global_callback","","Adds a global callback, triggered on the given key press when no view catches it.",39,null],[11,"add_layer","","Convenient method to add a layer to the current screen.",39,null],[11,"pop_layer","","Convenient method to remove a layer from the current screen.",39,null],[11,"screen_size","","Returns the size of the screen, in characters.",39,null],[11,"run","","Runs the event loop.\nIt will wait for user input (key presses) and trigger callbacks accordingly.\nBlocks until quit() is called.",39,null],[11,"quit","","Stops the event loop.",39,null],[11,"drop","","",39,null],[14,"wrap_impl!","","Convenient macro to implement to two methods required for the ViewWrapper trait.",null,null],[11,"wrap_draw","cursive::view","Wraps the draw method.",22,null],[11,"wrap_get_min_size","","Wraps the get_min_size method.",22,null],[11,"wrap_on_event","","Wraps the on_event method.",22,null],[11,"wrap_layout","","Wraps the layout method",22,null],[11,"wrap_take_focus","","Wraps the take_focus method",22,null],[11,"wrap_find","","",22,null]],"paths":[[4,"EventResult"],[4,"Key"],[4,"Event"],[8,"ToEvent"],[3,"SizeRequest"],[3,"ScrollBase"],[3,"ViewPath"],[3,"SizedView"],[4,"DimensionRequest"],[4,"Selector"],[3,"BoxView"],[3,"Button"],[3,"Dialog"],[3,"EditView"],[3,"FullView"],[3,"IdView"],[3,"KeyEventView"],[3,"LinearLayout"],[3,"ShadowView"],[3,"SelectView"],[3,"StackView"],[3,"TextView"],[8,"ViewWrapper"],[8,"View"],[3,"Printer"],[3,"Vec2"],[3,"Vec4"],[8,"ToVec2"],[8,"ToVec4"],[3,"Theme"],[3,"ColorStyle"],[3,"Color"],[4,"ColorPair"],[4,"BorderStyle"],[4,"Error"],[3,"Align"],[4,"HAlign"],[4,"VAlign"],[4,"Orientation"],[3,"Cursive"]]}; initSearch(searchIndex);