IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Forms.ControlPropertyStore Class Reference

Stores properties of a specified control, and restores them to on arbitrary controls. More...

Public Member Functions

 ControlPropertyStore (Control c, bool saveProperties=true)
 Constructs a new storege object for control properties, and innitializes it with the specified control. More...
 
void SetControl (Control control, bool saveProperties=true)
 Sets the control that is taken care of by this object, and immediately saves its main properties if this is specified by the saveProperties parameter. More...
 
virtual void SaveProperties (Control c=null)
 Saves all main properties of the specified control. More...
 
virtual void restoreProperties (Control c=null)
 Restores all main properties of the specified control. More...
 
virtual void SaveAppearance (Control c=null)
 Saves main appearance related properties of the specified control. More...
 
virtual void RestoreAppearance (Control c=null)
 Restores main appearance related properties of the specified control. More...
 
void SavePosition (Control c=null)
 Saves main position related properties on the specified control (to the values stored in the current object). More...
 
void RestorePosition (Control c=null)
 Restores main position related properties on the specified control (to the values stored in the current object). More...
 

Protected Member Functions

 ControlPropertyStore ()
 

Properties

Control Control [get, set]
 Control that is manipulated. More...
 
Color BackColor [get, set]
 
Color ForeColor [get, set]
 
Font Font [get, set]
 
string Text [get, set]
 

Private Attributes

Control _control
 

Detailed Description

Stores properties of a specified control, and restores them to on arbitrary controls.

Can be used to copy properties from one to several controls, or to temporary store control properties for some manipulation that is performed on controls (such as blinking of control background, temporary moving and size changes).

This class operates in two main modes.

In the first mode, desired properties of the control are stored (i.e., partial snapshot of the specified control state is made), and are later restored to either the same control or to any number of specified controls.

In the second mode, the control reference is stored in the class, and the class is then used for saving and restoring properties of this particular control. Mixted modes are also possible.

Constructor & Destructor Documentation

IG.Forms.ControlPropertyStore.ControlPropertyStore ( Control  c,
bool  saveProperties = true 
)
inline

Constructs a new storege object for control properties, and innitializes it with the specified control.

Contol's main properties are saved immediately, if not specified differently by the saveProperties parameter.

Parameters
cControl whose properties are handled. If not null then properties are saved.
savePropertiesSpecifies whetherr control's properties are stored immediately. Default is true.
IG.Forms.ControlPropertyStore.ControlPropertyStore ( )
inlineprotected

Member Function Documentation

void IG.Forms.ControlPropertyStore.SetControl ( Control  control,
bool  saveProperties = true 
)
inline

Sets the control that is taken care of by this object, and immediately saves its main properties if this is specified by the saveProperties parameter.

Parameters
controlSontrol that is taken are of by this class.
savePropertiesIndicates whether control's properties should also be saved immediately.
virtual void IG.Forms.ControlPropertyStore.SaveProperties ( Control  c = null)
inlinevirtual

Saves all main properties of the specified control.

Parameters
cControl. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.

Referenced by IG.Forms.ControlManipulator.RestoreProperties(), and IG.Forms.ControlManipulator.SaveProperties().

virtual void IG.Forms.ControlPropertyStore.restoreProperties ( Control  c = null)
inlinevirtual

Restores all main properties of the specified control.

Parameters
cControl. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.
virtual void IG.Forms.ControlPropertyStore.SaveAppearance ( Control  c = null)
inlinevirtual

Saves main appearance related properties of the specified control.

Parameters
cControl. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.
virtual void IG.Forms.ControlPropertyStore.RestoreAppearance ( Control  c = null)
inlinevirtual

Restores main appearance related properties of the specified control.

Parameters
cControl. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.
void IG.Forms.ControlPropertyStore.SavePosition ( Control  c = null)
inline

Saves main position related properties on the specified control (to the values stored in the current object).

Parameters
cControl. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.
void IG.Forms.ControlPropertyStore.RestorePosition ( Control  c = null)
inline

Restores main position related properties on the specified control (to the values stored in the current object).

Parameters
cControl. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.

Member Data Documentation

Control IG.Forms.ControlPropertyStore._control
private

Property Documentation

Control IG.Forms.ControlPropertyStore.Control
getset

Control that is manipulated.

Setter also saves control's properties immediately.

Referenced by IG.Forms.ControlManipulator.ApplyNormalColor().

Color IG.Forms.ControlPropertyStore.BackColor
getset
Color IG.Forms.ControlPropertyStore.ForeColor
getset
Font IG.Forms.ControlPropertyStore.Font
getset
string IG.Forms.ControlPropertyStore.Text
getset

The documentation for this class was generated from the following file: