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: u32The unique ID of the tab hosting this universe panel instance.
selected_universe: u8Currently 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: boolControls whether the settings configuration window is visible.
min_pure_cell_width: f32Minimum width of an individual DMX channel cell in pixels.
cell_height: f32Height of an individual DMX channel cell in pixels.
show_device_properties: boolFlag 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
impl UniversePanel
Sourcepub fn new(tab_id: u32) -> Self
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.
Sourcepub fn ui(&mut self, ui: &mut Ui)
pub fn ui(&mut self, ui: &mut Ui)
Renders the main universe panel UI inside an egui container.
§Arguments
ui- Mutable reference to theegui::Uilayout context.
Sourcefn draw_settings_frame(&mut self, ui: &mut Ui)
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 theegui::Uicontext.
Sourcefn draw_dmx_cell_pane(&mut self, ui: &mut Ui)
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 theegui::Uicontext.
Sourcefn 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,
)
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 theegui::Uicontext.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.
Sourcefn draw_dmx_cell(
&mut self,
ui: &mut Ui,
channel_num: usize,
dmx_config: DMXConfigurationForClient,
val: u8,
width: f32,
) -> Response
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 theegui::Uicontext.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
impl Clone for UniversePanel
Source§fn clone(&self) -> UniversePanel
fn clone(&self) -> UniversePanel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for UniversePanel
impl RefUnwindSafe for UniversePanel
impl Send for UniversePanel
impl Sync for UniversePanel
impl Unpin for UniversePanel
impl UnsafeUnpin for UniversePanel
impl UnwindSafe for UniversePanel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.