Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/audulus/rui
/ functions
Functions
680 in github.com/audulus/rui
⨍
Functions
680
◇
Types & classes
159
↓ 80 callers
Function
rectangle
Renders a rectangle which expands to fill available space.
src/views/shapes.rs:134
↓ 69 callers
Method
view_id
(&mut self, path: &IdPath)
src/context.rs:346
↓ 65 callers
Method
padding
Adds space around a view. Can be either `Auto` or `Px(number_of_pixels)`
src/modifiers.rs:128
↓ 59 callers
Method
size
(&mut self, sz: LocalSize)
src/view.rs:17
↓ 49 callers
Function
state
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 callers
Method
run
(self)
src/winit_event_loop.rs:548
↓ 34 callers
Method
color
(self, color: Color)
src/views/text.rs:20
↓ 31 callers
Method
len
(&self)
src/views/command.rs:120
↓ 30 callers
Method
clone
(&self)
src/views/state.rs:16
↓ 29 callers
Method
clone
(&self)
src/binding.rs:35
↓ 26 callers
Method
tap
Simulate a tap (touch begin + end) at the given position.
src/test_harness.rs:70
↓ 25 callers
Function
hstack
Horizontal stack of up to 128 Views in a tuple. Each item can be a different view type.
src/views/stack.rs:340
↓ 25 callers
Function
vstack
Vertical stack of up to 128 Views in a tuple. Each item can be a different view type.
src/views/stack.rs:345
↓ 19 callers
Method
button_view
(&self, s: StateHandle<CalculatorState>, button: Button, id: usize)
examples/calculator/src/calculator.rs:304
↓ 19 callers
Function
make_state
(cursor: usize, text_len: usize)
src/views/text_editor.rs:253
↓ 18 callers
Function
circle
Renders a circle which expands to fill available space.
src/views/shapes.rs:61
↓ 17 callers
Function
button
Calls a function when the button is tapped.
src/views/button.rs:13
↓ 16 callers
Method
get_layout
(&self, path: &IdPath)
src/context.rs:358
↓ 16 callers
Method
set_env
(&mut self, value: &S)
src/context.rs:440
↓ 15 callers
Method
corner_radius
Sets the rectangle's corner radius.
src/views/shapes.rs:88
↓ 15 callers
Method
key
(&mut self, k: &Key, text: String, shift_pressed: bool)
src/views/text_editor.rs:153
↓ 15 callers
Function
rect
(origin: A, size: B)
src/align.rs:59
↓ 14 callers
Function
list
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 callers
Function
text
Shows a string as a label (not editable).
src/views/text.rs:93
↓ 13 callers
Method
offset
(&self, offset: LocalOffset)
src/event.rs:47
↓ 12 callers
Function
hh
(index: &H)
src/viewid.rs:26
↓ 11 callers
Method
is_empty
Returns `true` if this region is empty.
src/region.rs:54
↓ 10 callers
Method
button_action
Processes button presses and updates calculator state accordingly.
examples/calculator/src/calculator.rs:512
↓ 10 callers
Method
layout
Run layout, computing sizes and positions for all views.
src/test_harness.rs:38
↓ 10 callers
Method
send_event
Send a single event to the view tree (no re-layout).
src/test_harness.rs:56
↓ 9 callers
Method
font_size
(self, size: u32)
src/views/text.rs:64
↓ 9 callers
Method
get
(&self, cx: &'a Context)
src/views/state.rs:36
↓ 9 callers
Function
screenshot_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 callers
Method
get_mut
(&mut self, id: StateHandle<S>)
src/context.rs:457
↓ 8 callers
Method
id_hash
(&self)
src/views/anyview.rs:27
↓ 8 callers
Method
init_env
(&mut self, func: &D)
src/context.rs:431
↓ 8 callers
Method
init_state
(&mut self, id: ViewId, func: &D)
src/context.rs:424
↓ 8 callers
Method
key
Simulate a key press.
src/test_harness.rs:99
↓ 8 callers
Method
selection_range
Returns the current selection range (start, end) with start <= end
src/views/text_editor.rs:26
↓ 8 callers
Method
set_state
(&mut self, id: ViewId, value: S)
src/context.rs:410
↓ 8 callers
Function
zstack
Stack of up to 128 overlaid Views in a tuple. Each item can be a different view type.
src/views/stack.rs:350
↓ 7 callers
Function
canvas
Canvas for GPU drawing with Vger. See https://github.com/audulus/vger-rs.
src/views/canvas.rs:48
↓ 7 callers
Method
clear_selection
Clears the current selection
src/views/text_editor.rs:40
↓ 7 callers
Method
fwd
(&mut self, len: usize, extend_selection: bool)
src/views/text_editor.rs:65
↓ 7 callers
Method
height
(mut self, height: f32)
src/views/toggle.rs:43
↓ 7 callers
Function
my_rectangle
()
examples/nested.rs:3
↓ 7 callers
Method
width
(mut self, width: f32)
src/views/toggle.rs:38
↓ 6 callers
Method
access_id
Returns the corresponding AccessKit ID. We're assuming the underlying u64 isn't zero.
src/viewid.rs:15
↓ 6 callers
Function
any_view
Switches between views according to a boolean.
src/views/anyview.rs:103
↓ 6 callers
Method
back
(&mut self, extend_selection: bool)
src/views/text_editor.rs:77
↓ 6 callers
Function
cond
Switches between views according to a boolean.
src/views/cond.rs:122
↓ 6 callers
Method
cursor_pos
Returns the position of the cursor in local coordinates.
src/views/text_editor.rs:13
↓ 6 callers
Method
delete_selection
Deletes the selected text and returns the new text
src/views/text_editor.rs:52
↓ 6 callers
Method
drag
Simulate a drag from one position to another.
src/test_harness.rs:78
↓ 6 callers
Method
layout
(&self, path: &mut IdPath, args: &mut LayoutArgs)
src/views/shapes.rs:32
↓ 6 callers
Function
make_multiline_state
(cursor: usize, line_lengths: &[usize])
src/views/text_editor.rs:271
↓ 6 callers
Method
process
Process a UI event.
src/context.rs:323
↓ 6 callers
Method
start_selection
Starts or extends a selection
src/views/text_editor.rs:45
↓ 6 callers
Method
update_layout
(&mut self, path: &IdPath, layout_box: LayoutBox)
src/context.rs:365
↓ 5 callers
Function
align_h
(child: LocalRect, parent: LocalRect, align: HAlignment)
src/align.rs:9
↓ 5 callers
Function
align_v
(child: LocalRect, parent: LocalRect, align: VAlignment)
src/align.rs:24
↓ 5 callers
Function
caption
(s: &'static str)
examples/gallery.rs:14
↓ 5 callers
Method
command
Adds a menu command.
src/modifiers.rs:18
↓ 5 callers
Method
get_mut
(&self, cx: &'a mut Context)
src/views/state.rs:39
↓ 5 callers
Function
hlist
( ids: Vec<ID>, f: F, )
src/views/list.rs:250
↓ 5 callers
Method
layout
(&self, path: &mut IdPath, args: &mut LayoutArgs)
src/views/list.rs:56
↓ 5 callers
Method
set_dirty
(&mut self)
src/context.rs:397
↓ 5 callers
Function
stack_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 callers
Method
background
Puts a view behind another. The background view inherits the size of the view.
src/modifiers.rs:13
↓ 4 callers
Method
geom
(&self, path: &IdPath, cx: &mut Context)
src/views/shapes.rs:10
↓ 4 callers
Method
geom
(&self, path: &IdPath, cx: &mut Context)
src/views/clip.rs:13
↓ 4 callers
Method
get
(&self, id: StateHandle<S>)
src/context.rs:450
↓ 4 callers
Function
hslider
Horizontal slider built from other Views.
src/views/slider.rs:24
↓ 4 callers
Function
knob
Knob for controlling a 0 to 1 floating point parameter.
src/views/knob.rs:11
↓ 4 callers
Function
process_event
(cx: &mut Context, view: &impl View, event: &Event, window: &Window)
src/winit_event_loop.rs:133
↓ 4 callers
Function
redux
( initial: D, reducer: R, f: F, )
src/views/redux.rs:3
↓ 4 callers
Method
set_layout_offset
(&mut self, path: &IdPath, offset: LocalOffset)
src/context.rs:374
↓ 4 callers
Method
show
Renders and displays the MIDI keyboard
examples/synth/src/midi_keyboard.rs:227
↓ 4 callers
Function
text_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 callers
Function
toggle
A toggle switch with default configuration.
src/views/toggle.rs:118
↓ 4 callers
Function
with_cx
Convenience to get the context.
src/views/state.rs:221
↓ 4 callers
Method
with_mut
(&self, cx: &mut Context, f: impl FnOnce(&mut S) -> T)
src/binding.rs:12
↓ 3 callers
Method
anim
Calls a closure after rendering with context and delta time.
src/modifiers.rs:8
↓ 3 callers
Function
bind
(binding: impl Binding<S>, lens: impl Lens<S, T>)
src/binding.rs:66
↓ 3 callers
Function
button_a
Version of button which emits an action directly instead of taking a callback.
src/views/button.rs:54
↓ 3 callers
Method
call
( &self, cx: &mut Context, _pt: LocalPoint, delta: LocalOffset, state:
src/views/drag.rs:34
↓ 3 callers
Method
clear
Sets this region to the empty region.
src/region.rs:33
↓ 3 callers
Method
down
(&mut self, extend_selection: bool)
src/views/text_editor.rs:119
↓ 3 callers
Method
drag_s
Calls a function in response to a drag. Version which passes in a binding.
src/modifiers.rs:53
↓ 3 callers
Method
edge
(mut self, edge: f32)
src/views/toggle.rs:48
↓ 3 callers
Function
focus
Calls calls a function with true if the view subtree returned by the function has the keyboard focus.
src/views/focus.rs:105
↓ 3 callers
Method
hover
Calls a function in response to a mouse hovering.
src/modifiers.rs:73
↓ 3 callers
Method
id
Returns the MIDI note identifier (0-127)
examples/synth/src/midi_keyboard.rs:131
↓ 3 callers
Method
key
Handles keyboard input, mapping keys to calculator functions.
examples/calculator/src/calculator.rs:575
↓ 3 callers
Method
layout
(&self, path: &mut IdPath, args: &mut LayoutArgs)
src/views/padding.rs:37
↓ 3 callers
Method
layout
(&self, path: &mut IdPath, args: &mut LayoutArgs)
src/views/key.rs:82
↓ 3 callers
Function
modview
Passes a value to a function. Value can be updated by modifiers.
src/views/modview.rs:88
↓ 3 callers
Method
next
(&mut self)
examples/synth/src/synth/oscillator.rs:225
↓ 3 callers
Method
process
( &self, event: &Event, path: &mut IdPath, cx: &mut Context, actions:
src/views/key.rs:47
↓ 3 callers
Method
release_key
(&mut self, index: MidiNoteId)
examples/synth/src/midi_keyboard.rs:331
next →
1–100 of 680, ranked by callers