pub fn new_styled<'a, C, CSS, S1, S2, S3>(
    x: i32,
    y: i32,
    w: u32,
    h: u32,
    html: &str,
    classes: C,
    css: CSS,
) -> Result<DivHandle, DivError>
where
    C: IntoIterator<Item = &'a S1>,
    CSS: IntoIterator<Item = &'a (S2, S3)>,
    S1: AsRef<str> + 'a,
    S2: AsRef<str> + 'a,
    S3: AsRef<str> + 'a,
{
    let css_str = css
        .into_iter()
        .map(|(attr, val)| attr.as_ref().to_owned() + ": " + val.as_ref() + ";")
        .collect::<Vec<_>>()
        .join(" ");

    let classes_str = classes
        .into_iter()
        .map(AsRef::as_ref)
        .collect::<Vec<_>>()
        .join(" ");

    state::exec_mut(|state| state.new_pane(x, y, w, h, html, &classes_str, &css_str))
}
/// Creates a new div at the defined position with the given HTML as content and with CSS classes and inline styles.
///
/// Traditionally on the web, classes in combination with a style-sheet are the best way to apply CSS to HTML.
/// But sometimes, it can also be useful to add styles right on the top HTML element of a div.
/// With this function, both options are open and can even be combined.
///
/// This function has several generic parameters to maximize flexibility and allow for all combinations of &str and String.
/// When using empty iterators, sometimes the compiler gets irritated.
/// Use explicit type to help it.
/// # Example
/// ```
/// let html = "Some text";
/// let classes = ["my-class"];
/// let css: [(&str, &str);0] = [];
/// let div = div::new_styled(
///     0,0,1000,1000,
///     html,
///     &classes,
///     &css,
/// ).unwrap();
/// ```
Creates a new div at the defined position with the given HTML as content and with CSS classes and inline styles.
Traditionally on the web, classes in combination with a style-sheet are the best way to apply CSS to HTML.
But sometimes, it can also be useful to add styles right on the top HTML element of a div.
With this function, both options are open and can even be combined.

This function has several generic parameters to maximize flexibility and allow for all combinations of &str and String.
When using empty iterators, sometimes the compiler gets irritated.
Use explicit type to help it.
Creates a new div at the defined position with the given HTML as content and with CSS classes and inline styles . Traditionally on the web classes in combination with a style - sheet are the best way to apply CSS to HTML . But sometimes it can also be useful to add styles right on the top HTML element of a div . With this function both options are open and can even be combined . This function has several generic parameters to maximize flexibility and allow for all combinations of &str and String . When using empty iterators sometimes the compiler gets irritated . Use explicit type to help it .
pub fn new_styled<'a, C, CSS, S1, S2, S3>(
    x: i32,
    y: i32,
    w: u32,
    h: u32,
    html: &str,
    classes: C,
    css: CSS,
) -> Result<DivHandle, DivError>
where
    C: IntoIterator<Item = &'a S1>,
    CSS: IntoIterator<Item = &'a (S2, S3)>,
    S1: AsRef<str> + 'a,
    S2: AsRef<str> + 'a,
    S3: AsRef<str> + 'a,
{
    let css_str = css
        .into_iter()
        .map(|(attr, val)| attr.as_ref().to_owned() + ": " + val.as_ref() + ";")
        .collect::<Vec<_>>()
        .join(" ");
    let classes_str = classes
        .into_iter()
        .map(AsRef::as_ref)
        .collect::<Vec<_>>()
        .join(" ");
    state::exec_mut(|state| state.new_pane(x, y, w, h, html, &classes_str, &css_str))
}
pub fn new_styled < ' a , C , CSS , S1 , S2 , S3 > ( x : i32 , y : i32 , w : u32 , h : u32 , html : & str , classes : C , css : CSS , ) -> Result < DivHandle , DivError > where C : IntoIterator < Item = & ' a S1 > , CSS : IntoIterator < Item = & ' a ( S2 , S3 ) > , S1 : AsRef < str > + ' a , S2 : AsRef < str > + ' a , S3 : AsRef < str > + ' a , { let css_str = css . into_iter ( ) . map ( | ( attr , val ) | attr . as_ref ( ) . to_owned ( ) + " " + val . as_ref ( ) + " " ) . collect :: < Vec < _ > > ( ) . join ( " " ) ; let classes_str = classes . into_iter ( ) . map ( AsRef :: as_ref ) . collect :: < Vec < _ > > ( ) . join ( " " ) ; state :: exec_mut ( | state | state . new_pane ( x , y , w , h , html , & classes_str , & css_str ) ) }
Creates a new div at the defined position with the given HTML as content and with CSS classes and inline styles.
Creates a new div at the defined position with the given HTML as content and with CSS classes and inline styles .
x
i32
y
i32
w
u32
h
u32
html
&str
classes
C
css
CSS
x
i32
y
i32
w
u32
h
u32
html
&str
classes
C
css
CSS
example
None