/// Adds a new child control to the internal list, so this control will have
/// its position and size rearranged when requested.

Adds a new child control to the internal list, so this control will have
its position and size rearranged when requested.
Adds a new child control to the internal list so this control will have its position and size rearranged when requested .
pub(in crate::gui) fn add(&self,
		hparent: HWND, hchild: HWND, horz: Horz, vert: Vert)
	{
		if hparent.is_null() || hchild.is_null() {
			panic!("Cannot add resizer entries before window/control creation.");
		}
		if horz == Horz::None && vert == Vert::None {
			return; // nothing to do, don't even add it
		}
		if self.0.ctrls.is_empty() { // first control being added?
			let rc_parent = hparent.GetClientRect().unwrap();
			*self.0.sz_parent_orig.as_mut() =
				SIZE::new(rc_parent.right, rc_parent.bottom); // save original parent size
		}
		let mut rc_orig = hchild.GetWindowRect().unwrap();
		hparent.ScreenToClientRc(&mut rc_orig).unwrap(); // control client coordinates relative to parent
		self.0.ctrls.as_mut().push(ChildInfo { hchild, rc_orig, horz, vert });
	}
pub ( in crate :: gui ) fn add ( & self , hparent : HWND , hchild : HWND , horz : Horz , vert : Vert ) { if hparent . is_null ( ) || hchild . is_null ( ) { panic ! ( " " ) ; } if horz == Horz :: None && vert == Vert :: None { return ; // nothing to do, don't even add it
 } if self . 0 . ctrls . is_empty ( ) { // first control being added?
 let rc_parent = hparent . GetClientRect ( ) . unwrap ( ) ; * self . 0 . sz_parent_orig . as_mut ( ) = SIZE :: new ( rc_parent . right , rc_parent . bottom ) ; // save original parent size
 } let mut rc_orig = hchild . GetWindowRect ( ) . unwrap ( ) ; hparent . ScreenToClientRc ( & mut rc_orig ) . unwrap ( ) ; // control client coordinates relative to parent
 self . 0 . ctrls . as_mut ( ) . push ( ChildInfo { hchild , rc_orig , horz , vert } ) ; }
Adds a new child control to the internal list, so this control will have
its position and size rearranged when requested.
Adds a new child control to the internal list so this control will have its position and size rearranged when requested .
&self
hparent
HWND
hchild
HWND
horz
Horz
vert
Vert