declaration_list
{ "{"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Creates a new `TestAppContext`. Usually you can rely on `#["...
function_item (+283 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Skip all drawing operations for the duration of this test.\n"
function_item (+46 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Create a single TestAppContext, for non-multi-client tests\n"
function_item (+38 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The name of the test function that created this `TestAppCon"...
function_item (+30 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Checks whether there have been any new path prompts receive"...
function_item (+27 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " returns a new `TestAppContext` re-using the same executors "...
function_item (+40 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Called by the test helper to end the test.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " public so the macro can call it.\n"
function_item (+73 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Register cleanup to run when the test ends.\n"
function_item (+60 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Schedules all windows to be redrawn on the next effect cycl"...
function_item (+59 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns an executor (for running tasks in the background)\n"
function_item (+27 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns an executor (for running tasks on the main thread)\n"
function_item (+24 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "expect"
token_tree
( "("
identifier "clippy"
:: "::"
identifier "wrong_self_convention"
) ")"
] "]"
function_item (+78 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Gives you an `&mut App` for the duration of the closure\n"
function_item (+64 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Gives you an `&App` for the duration of the closure\n"
function_item (+61 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Adds a new window. The Window will always be backed by a `T"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " can be retrieved with `self.test_window(handle)`\n"
function_item (+188 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Opens a new window with a specific size.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Unlike `add_window` which uses maximized bounds, this allow"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the window dimensions, which is important for layout-sensit"...
function_item
visibility_modifier
pub "pub"
fn "fn"
identifier "open_window"
type_parameters
< "<"
type_parameter
type_identifier "F"
, ","
type_parameter
type_identifier "V"
> ">"
parameters
( "("
self_parameter
& "&"
mutable_specifier "mut"
self "self"
, ","
parameter
identifier "window_size"
: ":"
generic_type
type_identifier "Size"
type_arguments
< "<"
type_identifier "Pixels"
> ">"
, ","
parameter
identifier "build_window"
: ":"
type_identifier "F"
, ","
) ")"
-> "->"
generic_type
type_identifier "WindowHandle"
type_arguments
< "<"
type_identifier "V"
> ">"
where_clause
where "where"
where_predicate
type_identifier "F"
trait_bounds
: ":"
function_type
type_identifier "FnOnce"
parameters
( "("
reference_type
& "&"
mutable_specifier "mut"
type_identifier "Window"
, ","
reference_type
& "&"
mutable_specifier "mut"
generic_type
type_identifier "Context"
type_arguments
< "<"
type_identifier "V"
> ">"
) ")"
-> "->"
type_identifier "V"
, ","
where_predicate
type_identifier "V"
trait_bounds
: ":"
lifetime
' "'"
identifier "static"
+ "+"
type_identifier "Render"
, ","
block
{ "{"
let_declaration
let "let"
mutable_specifier "mut"
identifier "cx"
= "="
call_expression
field_expression
field_expression
self "self"
. "."
field_identifier "app"
. "."
field_identifier "borrow_mut"
arguments
( "("
) ")"
; ";"
call_expression
field_expression
call_expression
field_expression
identifier "cx"
. "."
field_identifier "open_window"
arguments
( "("
struct_expression
type_identifier "WindowOptions"
field_initializer_list
{ "{"
field_initializer
field_identifier "window_bounds"
: ":"
call_expression
identifier "Some"
arguments
( "("
call_expression
scoped_identifier
identifier "WindowBounds"
:: "::"
identifier "Windowed"
arguments
( "("
struct_expression
type_identifier "Bounds"
field_initializer_list
{ "{"
field_initializer
field_identifier "origin"
: ":"
call_expression
scoped_identifier
identifier "Point"
:: "::"
identifier "default"
arguments
( "("
) ")"
, ","
field_initializer
field_identifier "size"
: ":"
identifier "window_size"
, ","
} "}"
) ")"
) ")"
, ","
base_field_initializer
.. ".."
call_expression
scoped_identifier
identifier "Default"
:: "::"
identifier "default"
arguments
( "("
) ")"
} "}"
, ","
closure_expression
closure_parameters
| "|"
identifier "window"
, ","
identifier "cx"
| "|"
call_expression
field_expression
identifier "cx"
. "."
field_identifier "new"
arguments
( "("
closure_expression
closure_parameters
| "|"
identifier "cx"
| "|"
call_expression
identifier "build_window"
arguments
( "("
identifier "window"
, ","
identifier "cx"
) ")"
) ")"
, ","
) ")"
. "."
field_identifier "unwrap"
arguments
( "("
) ")"
} "}"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Adds a new window with no content.\n"
function_item (+182 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Adds a new window, and returns its root view and a `VisualT"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " as a `Window` and `App` for the rest of the test. Typically"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " the returned one. `let (view, cx) = cx.add_window_view(...)"...
function_item (+279 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " returns the TextSystem\n"
function_item (+29 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Simulates writing to the platform clipboard\n"
function_item (+31 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Simulates reading from the platform clipboard.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " This will return the most recent value from `write_to_clipb"...
function_item (+32 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Simulates choosing a File in the platform's \"Open\" dialog.\n"
function_item (+62 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Simulates clicking a button in an platform-level alert dial"...
attribute_item
# "#"
[ "["
attribute
identifier "track_caller"
] "]"
function_item (+35 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns true if there's an alert dialog open.\n"
function_item (+27 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns true if there's an alert dialog open.\n"
function_item (+37 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " All the urls that have been opened with cx.open_url() durin"...
function_item (+42 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Simulates the user resizing the window to the new size.\n"
function_item (+48 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns true if there's an alert dialog open.\n"
function_item (+78 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Causes the given sources to be returned if the application "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " capture sources.\n"
function_item (+38 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns all windows open in the test.\n"
function_item (+39 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Run the given task on the main thread.\n"
attribute_item
# "#"
[ "["
attribute
identifier "track_caller"
] "]"
function_item (+95 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " true if the given global is defined\n"
function_item (+54 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " runs the given closure with a reference to the global\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " panics if `has_global` would return false.\n"
function_item (+80 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " runs the given closure with a reference to the global (if s"...
function_item (+92 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " sets the global in this context.\n"
function_item (+67 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " updates the global in this context. (panics if `has_global`"...
function_item (+89 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns an `AsyncApp` which can be used to run tasks that e"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " thread on the current thread in tests.\n"
function_item (+69 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Wait until there are no more pending tasks.\n"
function_item (+27 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Simulate dispatching an action to the currently focused nod"...
function_item (+98 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " simulate_keystrokes takes a space-separated list of keys to"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " cx.simulate_keystrokes(\"cmd-shift-p b k s p enter\")\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " in Zed, this will run backspace on the current editor throu"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " This will also run the background executor until it's parke"...
function_item (+90 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " simulate_input takes a string of text to type.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " cx.simulate_input(\"abc\")\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " will type abc into your current editor\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " This will also run the background executor until it's parke"...
function_item (+92 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " dispatches a single Keystroke (see also `simulate_keystroke"...
function_item (+67 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns the `TestWindow` backing the given handle.\n"
function_item (+94 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns a stream of notifications whenever the Entity is up"...
function_item (+197 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns a stream of events emitted by the given Entity.\n"
function_item (+187 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Runs until the given condition becomes true. (Prefer `run_u"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " don't need to jump in at a specific time).\n"
function_item (+264 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Set a name for this App.\n"
attribute_item (+21 nodes collapsed)
function_item (+50 nodes collapsed)
} "}"