Skip to main content

UniversePanel

Struct UniversePanel 

Source
pub struct UniversePanel {
    pub tab_id: u32,
    pub selected_universe: u8,
    pub dmx_data: [u8; 512],
    pub device_configuration: Option<DMXConfigForClientState>,
    settings_open: bool,
    min_pure_cell_width: f32,
    cell_height: f32,
    show_device_properties: bool,
    hovered_device: Option<String>,
}
Expand description

UI Panel representing a single DMX universe view in the docking interface.

Displays a responsive grid of 512 DMX channels (MAX_CHANNEL), supports switching between universes 1 through 16, and dynamically renders patched fixture overlays.

Fields§

§tab_id: u32

The unique ID of the tab hosting this universe panel instance.

§selected_universe: u8

Currently selected universe index (1-based, 1..=16).

§dmx_data: [u8; 512]

Live DMX byte values for all 512 channels of the active universe.

§device_configuration: Option<DMXConfigForClientState>

Configuration mapping fixtures to DMX channels received from the kernel server.

§settings_open: bool

Controls whether the settings configuration window is visible.

§min_pure_cell_width: f32

Minimum width of an individual DMX channel cell in pixels.

§cell_height: f32

Height of an individual DMX channel cell in pixels.

§show_device_properties: bool

Flag enabling or disabling the rendering of patched fixture properties on cells.

§hovered_device: Option<String>

Holds the name of the fixture currently hovered by the mouse cursor.

Implementations§

Source§

impl UniversePanel

Source

pub fn new(tab_id: u32) -> Self

Creates a new UniversePanel instance with default settings for a given tab ID.

§Arguments
  • tab_id - The unique identifier of the tab hosting this panel.
Source

pub fn ui(&mut self, ui: &mut Ui)

Renders the main universe panel UI inside an egui container.

§Arguments
  • ui - Mutable reference to the egui::Ui layout context.
Source

fn draw_settings_frame(&mut self, ui: &mut Ui)

Renders the pop-up settings window for configuring universe panel display options.

§Arguments
  • ui - Mutable reference to the egui::Ui context.
Source

fn draw_dmx_cell_pane(&mut self, ui: &mut Ui)

Renders the scrollable DMX channel grid and fixture overlays.

Dynamically calculates the optimal number of columns based on available UI width, populates all 512 channel cells, and paints fixture overlay banners across patched channels.

§Arguments
  • ui - Mutable reference to the egui::Ui context.
Source

fn draw_device_overlay( &self, ui: &mut Ui, start: usize, end: usize, fixture_name: &str, fixture_type_hash: u8, cell_rects: &[Option<Rect>], num_columns: usize, )

Paints a visual banner overlay spanning across consecutive DMX channels occupied by a single fixture device.

§Arguments
  • ui - Mutable reference to the egui::Ui context.
  • start - Starting DMX channel index (0-based).
  • end - Ending DMX channel index (0-based, inclusive).
  • fixture_name - Display name of the patched fixture device.
  • fixture_type_hash - Hash byte used to generate a unique fixture color.
  • cell_rects - Array of cell bounding rectangles for computing overlay spans.
  • num_columns - Current number of columns in the grid layout.
Source

fn draw_dmx_cell( &mut self, ui: &mut Ui, channel_num: usize, dmx_config: DMXConfigurationForClient, val: u8, width: f32, ) -> Response

Renders a single DMX channel cell inside the grid.

Displays channel number, live byte value, and optional patched property details.

§Arguments
  • ui - Mutable reference to the egui::Ui context.
  • channel_num - 1-based DMX channel number (1..=512).
  • dmx_config - Patched fixture configuration for this specific channel.
  • val - Live 8-bit DMX value (0..=255).
  • width - Target pixel width of the cell frame.
§Returns

An egui::Response representing user interaction with the cell frame.

Trait Implementations§

Source§

impl Clone for UniversePanel

Source§

fn clone(&self) -> UniversePanel

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more