pub unsafe fn new(view: &Arc<PackedFileTextView>, app_ui: &Rc<AppUI>, pack_file_contents_ui: &Rc<PackFileContentsUI>) -> Self {

        let modified = SlotNoArgs::new(&view.editor, clone!(
            app_ui,
            pack_file_contents_ui,
            view => move || {
                info!("Triggering `Modified Text File` By Slot");
                if let Some(ref packed_file_path) = view.packed_file_path {
                    if let DataSource::PackFile = *view.data_source.read().unwrap() {

                        // TODO: calculate a checksum of the file to also detect when it has gone back to its "unmodified" state.
                        set_modified(true, &packed_file_path.read().unwrap(), &app_ui, &pack_file_contents_ui);
                    }
                }
            }
        ));

        // Return the slots, so we can keep them alive for the duration of the view.
        Self {
            modified,
        }
    }
/// This function creates the entire slot pack for Texts.
This function creates the entire slot pack for Texts.
This function creates the entire slot pack for Texts .
pub unsafe fn new(view: &Arc<PackedFileTextView>, app_ui: &Rc<AppUI>, pack_file_contents_ui: &Rc<PackFileContentsUI>) -> Self {
        let modified = SlotNoArgs::new(&view.editor, clone!(
            app_ui,
            pack_file_contents_ui,
            view => move || {
                info!("Triggering `Modified Text File` By Slot");
                if let Some(ref packed_file_path) = view.packed_file_path {
                    if let DataSource::PackFile = *view.data_source.read().unwrap() {
                        // TODO: calculate a checksum of the file to also detect when it has gone back to its "unmodified" state.
                        set_modified(true, &packed_file_path.read().unwrap(), &app_ui, &pack_file_contents_ui);
                    }
                }
            }
        ));
        // Return the slots, so we can keep them alive for the duration of the view.
        Self {
            modified,
        }
    }
pub unsafe fn new ( view : & Arc < PackedFileTextView > , app_ui : & Rc < AppUI > , pack_file_contents_ui : & Rc < PackFileContentsUI > ) -> Self { let modified = SlotNoArgs :: new ( & view . editor , clone ! ( app_ui pack_file_contents_ui view move { info ( " " ) if let Some ( ref packed_file_path ) view packed_file_path { if let DataSource PackFile view data_source read ( ) unwrap ( ) { // TODO: calculate a checksum of the file to also detect when it has gone back to its "unmodified" state. set_modified ( true packed_file_path read ( ) unwrap ( ) app_ui pack_file_contents_ui ) } } } ) ) ; // Return the slots, so we can keep them alive for the duration of the view. Self { modified , } }
This function creates the entire slot pack for Texts.
This function creates the entire slot pack for Texts .
view
&Arc<PackedFileTextView>
app_ui
&Rc<AppUI>
pack_file_contents_ui
&Rc<PackFileContentsUI>
view
&Arc<PackedFileTextView>
app_ui
&Rc<AppUI>
pack_file_contents_ui
&Rc<PackFileContentsUI>