MCPcopy Create free account

hub / github.com/audulus/rui / functions

Functions680 in github.com/audulus/rui

↓ 80 callersFunctionrectangle
Renders a rectangle which expands to fill available space.
src/views/shapes.rs:134
↓ 69 callersMethodview_id
(&mut self, path: &IdPath)
src/context.rs:346
↓ 65 callersMethodpadding
Adds space around a view. Can be either `Auto` or `Px(number_of_pixels)`
src/modifiers.rs:128
↓ 59 callersMethodsize
(&mut self, sz: LocalSize)
src/view.rs:17
↓ 49 callersFunctionstate
State allows you to associate some state with a view. This is what you'll use for a data model, as well as per-view state. Your state should be effici
src/views/state.rs:205
↓ 36 callersMethodrun
(self)
src/winit_event_loop.rs:548
↓ 34 callersMethodcolor
(self, color: Color)
src/views/text.rs:20
↓ 31 callersMethodlen
(&self)
src/views/command.rs:120
↓ 30 callersMethodclone
(&self)
src/views/state.rs:16
↓ 29 callersMethodclone
(&self)
src/binding.rs:35
↓ 26 callersMethodtap
Simulate a tap (touch begin + end) at the given position.
src/test_harness.rs:70
↓ 25 callersFunctionhstack
Horizontal stack of up to 128 Views in a tuple. Each item can be a different view type.
src/views/stack.rs:340
↓ 25 callersFunctionvstack
Vertical stack of up to 128 Views in a tuple. Each item can be a different view type.
src/views/stack.rs:345
↓ 19 callersMethodbutton_view
(&self, s: StateHandle<CalculatorState>, button: Button, id: usize)
examples/calculator/src/calculator.rs:304
↓ 19 callersFunctionmake_state
(cursor: usize, text_len: usize)
src/views/text_editor.rs:253
↓ 18 callersFunctioncircle
Renders a circle which expands to fill available space.
src/views/shapes.rs:61
↓ 17 callersFunctionbutton
Calls a function when the button is tapped.
src/views/button.rs:13
↓ 16 callersMethodget_layout
(&self, path: &IdPath)
src/context.rs:358
↓ 16 callersMethodset_env
(&mut self, value: &S)
src/context.rs:440
↓ 15 callersMethodcorner_radius
Sets the rectangle's corner radius.
src/views/shapes.rs:88
↓ 15 callersMethodkey
(&mut self, k: &Key, text: String, shift_pressed: bool)
src/views/text_editor.rs:153
↓ 15 callersFunctionrect
(origin: A, size: B)
src/align.rs:59
↓ 14 callersFunctionlist
Displays a list of items all of which are represented by the same View. See `examples/list.rs`. `ids` is a Vec of items that implement Hash. `f` is
src/views/list.rs:239
↓ 14 callersFunctiontext
Shows a string as a label (not editable).
src/views/text.rs:93
↓ 13 callersMethodoffset
(&self, offset: LocalOffset)
src/event.rs:47
↓ 12 callersFunctionhh
(index: &H)
src/viewid.rs:26
↓ 11 callersMethodis_empty
Returns `true` if this region is empty.
src/region.rs:54
↓ 10 callersMethodbutton_action
Processes button presses and updates calculator state accordingly.
examples/calculator/src/calculator.rs:512
↓ 10 callersMethodlayout
Run layout, computing sizes and positions for all views.
src/test_harness.rs:38
↓ 10 callersMethodsend_event
Send a single event to the view tree (no re-layout).
src/test_harness.rs:56
↓ 9 callersMethodfont_size
(self, size: u32)
src/views/text.rs:64
↓ 9 callersMethodget
(&self, cx: &'a Context)
src/views/state.rs:36
↓ 9 callersFunctionscreenshot_test
Render a view, compare against reference PNG. If no reference exists, create it. Returns true if the test passed (reference matched or was created).
src/screenshot_tests.rs:205
↓ 8 callersMethodget_mut
(&mut self, id: StateHandle<S>)
src/context.rs:457
↓ 8 callersMethodid_hash
(&self)
src/views/anyview.rs:27
↓ 8 callersMethodinit_env
(&mut self, func: &D)
src/context.rs:431
↓ 8 callersMethodinit_state
(&mut self, id: ViewId, func: &D)
src/context.rs:424
↓ 8 callersMethodkey
Simulate a key press.
src/test_harness.rs:99
↓ 8 callersMethodselection_range
Returns the current selection range (start, end) with start <= end
src/views/text_editor.rs:26
↓ 8 callersMethodset_state
(&mut self, id: ViewId, value: S)
src/context.rs:410
↓ 8 callersFunctionzstack
Stack of up to 128 overlaid Views in a tuple. Each item can be a different view type.
src/views/stack.rs:350
↓ 7 callersFunctioncanvas
Canvas for GPU drawing with Vger. See https://github.com/audulus/vger-rs.
src/views/canvas.rs:48
↓ 7 callersMethodclear_selection
Clears the current selection
src/views/text_editor.rs:40
↓ 7 callersMethodfwd
(&mut self, len: usize, extend_selection: bool)
src/views/text_editor.rs:65
↓ 7 callersMethodheight
(mut self, height: f32)
src/views/toggle.rs:43
↓ 7 callersFunctionmy_rectangle
()
examples/nested.rs:3
↓ 7 callersMethodwidth
(mut self, width: f32)
src/views/toggle.rs:38
↓ 6 callersMethodaccess_id
Returns the corresponding AccessKit ID. We're assuming the underlying u64 isn't zero.
src/viewid.rs:15
↓ 6 callersFunctionany_view
Switches between views according to a boolean.
src/views/anyview.rs:103
↓ 6 callersMethodback
(&mut self, extend_selection: bool)
src/views/text_editor.rs:77
↓ 6 callersFunctioncond
Switches between views according to a boolean.
src/views/cond.rs:122
↓ 6 callersMethodcursor_pos
Returns the position of the cursor in local coordinates.
src/views/text_editor.rs:13
↓ 6 callersMethoddelete_selection
Deletes the selected text and returns the new text
src/views/text_editor.rs:52
↓ 6 callersMethoddrag
Simulate a drag from one position to another.
src/test_harness.rs:78
↓ 6 callersMethodlayout
(&self, path: &mut IdPath, args: &mut LayoutArgs)
src/views/shapes.rs:32
↓ 6 callersFunctionmake_multiline_state
(cursor: usize, line_lengths: &[usize])
src/views/text_editor.rs:271
↓ 6 callersMethodprocess
Process a UI event.
src/context.rs:323
↓ 6 callersMethodstart_selection
Starts or extends a selection
src/views/text_editor.rs:45
↓ 6 callersMethodupdate_layout
(&mut self, path: &IdPath, layout_box: LayoutBox)
src/context.rs:365
↓ 5 callersFunctionalign_h
(child: LocalRect, parent: LocalRect, align: HAlignment)
src/align.rs:9
↓ 5 callersFunctionalign_v
(child: LocalRect, parent: LocalRect, align: VAlignment)
src/align.rs:24
↓ 5 callersFunctioncaption
(s: &'static str)
examples/gallery.rs:14
↓ 5 callersMethodcommand
Adds a menu command.
src/modifiers.rs:18
↓ 5 callersMethodget_mut
(&self, cx: &'a mut Context)
src/views/state.rs:39
↓ 5 callersFunctionhlist
( ids: Vec<ID>, f: F, )
src/views/list.rs:250
↓ 5 callersMethodlayout
(&self, path: &mut IdPath, args: &mut LayoutArgs)
src/views/list.rs:56
↓ 5 callersMethodset_dirty
(&mut self)
src/context.rs:397
↓ 5 callersFunctionstack_layout
1-D stack layout to make the algorithm clear. Returns length used to express the layout. If there are any flexible items, will return `total`, since
src/views/stack_layout.rs:11
↓ 4 callersMethodbackground
Puts a view behind another. The background view inherits the size of the view.
src/modifiers.rs:13
↓ 4 callersMethodgeom
(&self, path: &IdPath, cx: &mut Context)
src/views/shapes.rs:10
↓ 4 callersMethodgeom
(&self, path: &IdPath, cx: &mut Context)
src/views/clip.rs:13
↓ 4 callersMethodget
(&self, id: StateHandle<S>)
src/context.rs:450
↓ 4 callersFunctionhslider
Horizontal slider built from other Views.
src/views/slider.rs:24
↓ 4 callersFunctionknob
Knob for controlling a 0 to 1 floating point parameter.
src/views/knob.rs:11
↓ 4 callersFunctionprocess_event
(cx: &mut Context, view: &impl View, event: &Event, window: &Window)
src/winit_event_loop.rs:133
↓ 4 callersFunctionredux
( initial: D, reducer: R, f: F, )
src/views/redux.rs:3
↓ 4 callersMethodset_layout_offset
(&mut self, path: &IdPath, offset: LocalOffset)
src/context.rs:374
↓ 4 callersMethodshow
Renders and displays the MIDI keyboard
examples/synth/src/midi_keyboard.rs:227
↓ 4 callersFunctiontext_editor
A multi-line text editor. This shows how a complex View with internal state can be created from more atomic Views.
src/views/text_editor.rs:548
↓ 4 callersFunctiontoggle
A toggle switch with default configuration.
src/views/toggle.rs:118
↓ 4 callersFunctionwith_cx
Convenience to get the context.
src/views/state.rs:221
↓ 4 callersMethodwith_mut
(&self, cx: &mut Context, f: impl FnOnce(&mut S) -> T)
src/binding.rs:12
↓ 3 callersMethodanim
Calls a closure after rendering with context and delta time.
src/modifiers.rs:8
↓ 3 callersFunctionbind
(binding: impl Binding<S>, lens: impl Lens<S, T>)
src/binding.rs:66
↓ 3 callersFunctionbutton_a
Version of button which emits an action directly instead of taking a callback.
src/views/button.rs:54
↓ 3 callersMethodcall
( &self, cx: &mut Context, _pt: LocalPoint, delta: LocalOffset, state:
src/views/drag.rs:34
↓ 3 callersMethodclear
Sets this region to the empty region.
src/region.rs:33
↓ 3 callersMethoddown
(&mut self, extend_selection: bool)
src/views/text_editor.rs:119
↓ 3 callersMethoddrag_s
Calls a function in response to a drag. Version which passes in a binding.
src/modifiers.rs:53
↓ 3 callersMethodedge
(mut self, edge: f32)
src/views/toggle.rs:48
↓ 3 callersFunctionfocus
Calls calls a function with true if the view subtree returned by the function has the keyboard focus.
src/views/focus.rs:105
↓ 3 callersMethodhover
Calls a function in response to a mouse hovering.
src/modifiers.rs:73
↓ 3 callersMethodid
Returns the MIDI note identifier (0-127)
examples/synth/src/midi_keyboard.rs:131
↓ 3 callersMethodkey
Handles keyboard input, mapping keys to calculator functions.
examples/calculator/src/calculator.rs:575
↓ 3 callersMethodlayout
(&self, path: &mut IdPath, args: &mut LayoutArgs)
src/views/padding.rs:37
↓ 3 callersMethodlayout
(&self, path: &mut IdPath, args: &mut LayoutArgs)
src/views/key.rs:82
↓ 3 callersFunctionmodview
Passes a value to a function. Value can be updated by modifiers.
src/views/modview.rs:88
↓ 3 callersMethodnext
(&mut self)
examples/synth/src/synth/oscillator.rs:225
↓ 3 callersMethodprocess
( &self, event: &Event, path: &mut IdPath, cx: &mut Context, actions:
src/views/key.rs:47
↓ 3 callersMethodrelease_key
(&mut self, index: MidiNoteId)
examples/synth/src/midi_keyboard.rs:331
next →1–100 of 680, ranked by callers