Struct TaskDialogConfig

Source
pub struct TaskDialogConfig {
Show 23 fields pub parent: HWND, pub instance: HMODULE, pub flags: TASKDIALOG_FLAGS, pub common_buttons: TASKDIALOG_COMMON_BUTTON_FLAGS, pub window_title: String, pub main_instruction: String, pub content: String, pub verification_text: String, pub expanded_information: String, pub expanded_control_text: String, pub collapsed_control_text: String, pub footer: String, pub buttons: Vec<TaskDialogButton>, pub default_button: i32, pub radio_buttons: Vec<TaskDialogButton>, pub default_radio_buttons: i32, pub main_icon: PCWSTR, pub footer_icon: PCWSTR, pub dialog_hwnd: HWND, pub is_destroyed: bool, pub hyperlink_callback: TaskDialogHyperlinkCallback, pub callback: TaskDialogWndProcCallback, pub cx_width: u32,
}

Fields§

§parent: HWND§instance: HMODULE§flags: TASKDIALOG_FLAGS§common_buttons: TASKDIALOG_COMMON_BUTTON_FLAGS§window_title: String§main_instruction: String§content: String§verification_text: String§expanded_information: String§expanded_control_text: String§collapsed_control_text: String§footer: String§buttons: Vec<TaskDialogButton>§default_button: i32§radio_buttons: Vec<TaskDialogButton>§default_radio_buttons: i32§main_icon: PCWSTR§footer_icon: PCWSTR§dialog_hwnd: HWND

When created dialog, the value set to HWND.

§is_destroyed: bool

When close the dialog, the value set to true, default is false.

§hyperlink_callback: TaskDialogHyperlinkCallback§callback: TaskDialogWndProcCallback§cx_width: u32

Implementations§

Source§

impl TaskDialogConfig

Source

pub fn enable_process_bar(&mut self, marquee: bool)

Add TDF_SHOW_PROGRESS_BAR flag on marquee is false, otherwise TDF_SHOW_MARQUEE_PROGRESS_BAR.

https://docs.microsoft.com/en-us/windows/win32/controls/progress-bar-control

Source

pub fn disable_process_bar(&mut self, marquee: bool)

Disables progresss bar

Source

pub fn set_process_bar_marquee(&mut self, enable: bool, time: isize)

Set status or animation time of marquee progress bar

Source

pub fn set_process_bar(&mut self, percentage: usize)

Set the percentage of the progress bar

Source

pub fn set_content(&mut self, content: &str)

Set the content text

Source

pub fn set_main_instruction(&mut self, main_instruction: &str)

Set the main instruction text

Set the footer text

Source

pub fn set_expanded_information(&mut self, expanded_information: &str)

Set the expanded information text

Source

pub fn set_button_elevation_required_state( &mut self, button_id: usize, enable: bool, )

Set the button elevation state

Source

pub fn navigate_page(&mut self, conf: &mut TaskDialogConfig)

Navigate to new page

Trait Implementations§

Source§

impl Default for TaskDialogConfig

Source§

fn default() -> Self

Returns the “default value” for a type. 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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

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.