pub struct MyApp {Show 16 fields
pub(crate) tree: DockState<Tab>,
pub(crate) show_session_settings: bool,
pub(crate) show_connection_settings: bool,
pub(crate) server_address: String,
pub(crate) username: String,
pub(crate) next_tab_id: u32,
pub(crate) dmx_receiver: Receiver<(u8, [u8; 512])>,
pub(crate) tcp_listen_receiver: Option<Receiver<TcpServerMessage>>,
pub(crate) ui_event_sender: Sender<UiEvent>,
pub(crate) ui_event_receiver: Receiver<UiEvent>,
pub(crate) tcp_write_sender: Option<Sender<TcpClientMessage>>,
pub(crate) connection_state: ConnectionState,
pub(crate) role: UserRole,
pub(crate) password: String,
pub(crate) draft_username: String,
pub(crate) draft_role: UserRole,
}Expand description
The main GUI application state structure.
Holds the docking state tree, user session parameters, network connection states, and active communication channels between threads.
Fields§
§tree: DockState<Tab>The docking state tree holding all open tabs (Terminals, Universes, etc.).
show_session_settings: boolWhether the session settings modal window is currently open.
show_connection_settings: boolWhether the connection settings modal window is currently open.
server_address: StringThe IP address and port of the target kernel server.
username: StringThe currently authenticated username.
next_tab_id: u32Counter assigned as the unique ID for the next newly created tab.
dmx_receiver: Receiver<(u8, [u8; 512])>Receiver channel for incoming DMX Universe packet data.
tcp_listen_receiver: Option<Receiver<TcpServerMessage>>Receiver channel for incoming TCP server messages.
ui_event_sender: Sender<UiEvent>Sender channel for emitting UI events to the controller handler.
ui_event_receiver: Receiver<UiEvent>Receiver channel for consuming UI events in the main event loop.
tcp_write_sender: Option<Sender<TcpClientMessage>>Sender channel for transmitting TCP messages to the server.
connection_state: ConnectionStateThe current state of the TCP network connection.
role: UserRoleThe active user role (e.g. Programmer, Showrunner).
password: StringPassword input buffer for authentication (cleared after login attempts).
draft_username: StringTemporary draft username used in the session settings window.
draft_role: UserRoleTemporary draft role selection used in the session settings window.
Implementations§
Source§impl MyApp
impl MyApp
Sourcepub(crate) fn connect_to_server(&mut self)
pub(crate) fn connect_to_server(&mut self)
Spawns the TCP client background thread to connect to the configured server_address.
Sourcepub(crate) fn draw_top_bar(&mut self, ctx: &Context)
pub(crate) fn draw_top_bar(&mut self, ctx: &Context)
Renders the top menu bar containing connection options and window tab controls.
§Arguments
ctx- Theegui::Contextreference.
Sourcepub(crate) fn draw_central_panel(&mut self, ctx: &Context)
pub(crate) fn draw_central_panel(&mut self, ctx: &Context)
Renders the central docking area managing all active application tabs.
§Arguments
ctx- Theegui::Contextreference.
Sourcepub(crate) fn draw_connection_settings(&mut self, ctx: &Context)
pub(crate) fn draw_connection_settings(&mut self, ctx: &Context)
Renders the modal window for configuring server IP address and triggering connections.
§Arguments
ctx- Theegui::Contextreference.
Sourcepub(crate) fn draw_session_settings(&mut self, ctx: &Context)
pub(crate) fn draw_session_settings(&mut self, ctx: &Context)
Renders the modal window for user authentication and role selection.
§Arguments
ctx- Theegui::Contextreference.
Sourcepub(crate) fn draw_bottom_bar(&mut self, ctx: &Context)
pub(crate) fn draw_bottom_bar(&mut self, ctx: &Context)
Renders the bottom status bar displaying connection status indicator, username, role, and application version.
§Arguments
ctx- Theegui::Contextreference.
Trait Implementations§
Source§impl App for MyApp
impl App for MyApp
Source§fn update(&mut self, ctx: &Context, _frame: &mut Frame)
fn update(&mut self, ctx: &Context, _frame: &mut Frame)
Main frame update callback invoked on every UI render pass.
Processes queued DMX packets, network server messages, and UI events, then renders all UI components and panels.
Source§fn on_exit(&mut self, _gl: Option<&Context>)
fn on_exit(&mut self, _gl: Option<&Context>)
Application exit callback.
Sends logout and disconnect requests to clean up network connections cleanly before shutdown.
§fn save(&mut self, _storage: &mut dyn Storage)
fn save(&mut self, _storage: &mut dyn Storage)
§fn auto_save_interval(&self) -> Duration
fn auto_save_interval(&self) -> Duration
Self::save]§fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
gl.clearColor. Read more§fn persist_egui_memory(&self) -> bool
fn persist_egui_memory(&self) -> bool
§fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)
fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)
Self::update]. Read moreAuto Trait Implementations§
impl !Sync for MyApp
impl Freeze for MyApp
impl RefUnwindSafe for MyApp
impl Send for MyApp
impl Unpin for MyApp
impl UnsafeUnpin for MyApp
impl UnwindSafe for MyApp
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
§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.