CBiasGainGadget Class Reference

#include <biasgdgt.h>

List of all members.

Public Member Functions

 CBiasGainGadget ()
virtual ~CBiasGainGadget ()
virtual void Init (DialogOp *pOwningDialog, CGadgetID GadgetID, UINT32 BubbleID, UINT32 StatusID)
virtual void Enable (BOOL)
virtual void GetPresetBiasGainValue (WORD Index, CProfileBiasGain &Value) const
virtual INT32 FindPresetBiasGain (CProfileBiasGain const &Value) const
virtual void Message (DialogMsg *)
virtual void Message (DialogMsg *, CProfileBiasGain const &)
virtual void CloseDialog ()
virtual void DialogHasOpened ()
virtual void DialogHasClosed ()
virtual CGadgetID GetGadgetID () const
virtual void GetDialogTitle (String_256 &DlgTitle) const
void SetCBaisGainDlg (CBiasGainDlg *pMyDlg)
void SetInfobarGadgetID (CGadgetID gadg)
void ReInitialiseDialog (CProfileBiasGain *ReInitOn, BOOL bMany)
BOOL IsDialogOpen ()
void ToggleFillProfile ()
BOOL GetUseFillProfile ()
void ToggleTranspFillProfile ()
BOOL GetUseTranspFillProfile ()
CProfileBiasGain GetCurrentDialogProfile ()
void SetStartColour (DocColour *NewCol)
void SetEndColour (DocColour *NewCol)
void SetEndColour2 (DocColour *NewCol)
void SetEndColour3 (DocColour *NewCol)
void SetStartTransp (UINT32 *NewTransp)
void SetEndTransp (UINT32 *NewTransp)
void SetEndTransp2 (UINT32 *NewTransp)
void SetEndTransp3 (UINT32 *NewTransp)
void SetFillEffect (FillEffectAttribute *NewFillEffect)
DocColourGetStartColour ()
DocColourGetEndColour ()
DocColourGetEndColour2 ()
DocColourGetEndColour3 ()
UINT32GetStartTransp ()
UINT32GetEndTransp ()
UINT32GetEndTransp2 ()
UINT32GetEndTransp3 ()
FillEffectAttributeGetFillEffect ()

Private Types

enum  { eNumberOfPresets = 5 }

Private Member Functions

 CBiasGainGadget (const CBiasGainGadget &)
CBiasGainGadgetoperator= (const CBiasGainGadget &)

Private Attributes

DialogOppOwningDialog_m
CGadgetID GadgetID_m
CGadgetID InfobarGadgetID_m
UINT32 BubbleID_m
UINT32 StatusID_m
CBiasGainDlgpDialog_m
BOOL useFillProfile
BOOL useTranspFillProfile
DocColourStartColour
DocColourEndColour
DocColourEndColour2
DocColourEndColour3
FillEffectAttributeFillEffect
UINT32StartTransp
UINT32EndTransp
UINT32EndTransp2
UINT32EndTransp3

Static Private Attributes

static const INT32 kNumberOfPresets_s
static const double kBiasPresets_s [eNumberOfPresets] = { 0.0, 0.5, -0.5, 0.0, 0.0 }
static const double kGainPresets_s [eNumberOfPresets] = { 0.0, 0.0, 0.0, 0.5, -0.5 }


Detailed Description

Definition at line 147 of file biasgdgt.h.


Member Enumeration Documentation

anonymous enum [private]
 

Enumerator:
eNumberOfPresets 

Definition at line 259 of file biasgdgt.h.

00259 { eNumberOfPresets = 5 };


Constructor & Destructor Documentation

CBiasGainGadget::CBiasGainGadget  ) 
 

Definition at line 179 of file biasgdgt.cpp.

00180     : pOwningBar_m( 0 ),
00181     : GadgetID_m( 0 ),
00182       BubbleID_m( 0 ),
00183       StatusID_m( 0 ),
00184       pDialog_m( 0 )
00185 {
00186     useFillProfile = FALSE;
00187     useTranspFillProfile = FALSE;
00188 
00189     StartColour = NULL;
00190     EndColour = NULL;
00191     EndColour2 = NULL;
00192     EndColour3 = NULL;
00193     FillEffect = NULL;
00194     StartTransp = NULL;
00195     EndTransp = NULL;
00196     EndTransp2 = NULL;
00197     EndTransp3 = NULL;
00198 }

CBiasGainGadget::~CBiasGainGadget  )  [virtual]
 

Definition at line 220 of file biasgdgt.cpp.

00221 {
00222 
00223     if (FillEffect) delete (FillEffect);
00224     
00225     delete  pDialog_m;
00226 
00227 }

CBiasGainGadget::CBiasGainGadget const CBiasGainGadget  )  [private]
 


Member Function Documentation

void CBiasGainGadget::CloseDialog  )  [virtual]
 

Function : CBiasGainGadget::CloseDialog Author : Mikhail Tatarnikov Purpose : Close the related dialog Returns : void Exceptions: Parameters: None Notes :

Definition at line 401 of file biasgdgt.cpp.

00402 {
00403     if( pDialog_m != 0 )
00404     {
00405         DialogMsg  MessageCancel( 0, DIM_CANCEL, GadgetID_m );
00406 
00407         pDialog_m->Message( &MessageCancel );
00408     }
00409 }

void CBiasGainGadget::DialogHasClosed  )  [virtual]
 

Function : CBiasGainGadget::DialogHasClosed() Author : Mikhail Tatarnikov Purpose : Handling the dialog closing event Returns : void Exceptions: Parameters: None Notes :

Definition at line 443 of file biasgdgt.cpp.

00444 {
00445     delete  pDialog_m;
00446     pDialog_m  =  0;
00447 
00448     // Unpush the gadget.
00449     pOwningDialog_m->SetLongGadgetValue(GadgetID_m, 0);
00450 }

void CBiasGainGadget::DialogHasOpened  )  [virtual]
 

Function : CBiasGainGadget::DialogHasOpened Author : Mikhail Tatarnikov Purpose : Handling the dialog opening event Returns : void Exceptions: Parameters: None Notes :

Definition at line 427 of file biasgdgt.cpp.

00428 {
00429     // Put the gadet into the pushed state.
00430     pOwningDialog_m->SetLongGadgetValue(GadgetID_m, 1);
00431 }

void CBiasGainGadget::Enable BOOL  Enable  )  [virtual]
 

Function : CBiasGainGadget::Enable Author : Mikhail Tatarnikov Purpose : Enables/disables the gadget. Returns : void Exceptions: Parameters: [in] BOOL Enable - TRUE for enabling, FALSE for disabling. Notes :

Definition at line 272 of file biasgdgt.cpp.

00273 {
00274     pOwningDialog_m->EnableGadget(GadgetID_m, Enable);
00275 }

INT32 CBiasGainGadget::FindPresetBiasGain CProfileBiasGain const &  Value  )  const [virtual]
 

Function : CBiasGainGadget::FindPresetBiasGain Author : Mikhail Tatarnikov Purpose : Finds a preset index based on the value, or -1 if couldn't find (custom preset). Returns : INT32 - the found preset index. Exceptions: Parameters: [in] CProfileBiasGain const& Value - the preset we'll search for. Notes : Reverse operation for GetPresetBiasGainValue().

Definition at line 310 of file biasgdgt.cpp.

00311 {
00312     CProfileBiasGain preset;
00313     for (INT32 i = 0; i < (INT32)eNumberOfPresets; i++)
00314     {
00315         GetPresetBiasGainValue (i, preset);
00316         if (Value == preset)
00317             return i;                   // is a preset
00318     }
00319     
00320     return -1;      // is a custom
00321 }

CProfileBiasGain CBiasGainGadget::GetCurrentDialogProfile  ) 
 

Function : CBiasGainGadget::GetCurrentDialogProfile Author : Mikhail Tatarnikov Purpose : Reads the dialog profile value Returns : CProfileBiasGain - the value currently displayed in the dialog. Exceptions: Parameters: None Notes : The linked dialog MUST be open

Definition at line 355 of file biasgdgt.cpp.

00356 {
00357     ERROR3IF (!IsDialogOpen (), "The dialogue isn't open - something is seriously wrong!");
00358     return (pDialog_m->GetCurrentDialogProfile ());
00359 }

void CBiasGainGadget::GetDialogTitle String_256 DlgTitle  )  const [virtual]
 

Function : CBiasGainGadget::GetDialogTitle Author : Mikhail Tatarnikov Purpose : Returns the dialog title Returns : void Exceptions: Parameters: [out] String_256& DlgTitle - the dialog title. Notes :

Definition at line 477 of file biasgdgt.cpp.

00478 {
00479     DlgTitle.Load( BubbleID_m );
00480 }

DocColour* CBiasGainGadget::GetEndColour  )  [inline]
 

Definition at line 214 of file biasgdgt.h.

00214 { return (EndColour); }

DocColour* CBiasGainGadget::GetEndColour2  )  [inline]
 

Definition at line 215 of file biasgdgt.h.

00215 { return (EndColour2); }

DocColour* CBiasGainGadget::GetEndColour3  )  [inline]
 

Definition at line 216 of file biasgdgt.h.

00216 { return (EndColour3); }

UINT32* CBiasGainGadget::GetEndTransp  )  [inline]
 

Definition at line 218 of file biasgdgt.h.

00218 { return (EndTransp); }

UINT32* CBiasGainGadget::GetEndTransp2  )  [inline]
 

Definition at line 219 of file biasgdgt.h.

00219 { return (EndTransp2); }

UINT32* CBiasGainGadget::GetEndTransp3  )  [inline]
 

Definition at line 220 of file biasgdgt.h.

00220 { return (EndTransp3); }

FillEffectAttribute* CBiasGainGadget::GetFillEffect  )  [inline]
 

Definition at line 221 of file biasgdgt.h.

00221 { return (FillEffect); }

CGadgetID CBiasGainGadget::GetGadgetID  )  const [virtual]
 

Function : CBiasGainGadget::GetGadgetID Author : Mikhail Tatarnikov Purpose : Returns ID of the attached adget Returns : CGadgetID - the attached gadget ID Exceptions: Parameters: None Notes :

Definition at line 462 of file biasgdgt.cpp.

00463 {
00464     return  GadgetID_m;
00465 }

void CBiasGainGadget::GetPresetBiasGainValue WORD  Index,
CProfileBiasGain Value
const [virtual]
 

Function : CBiasGainGadget::GetPresetBiasGainValue Author : Mikhail Tatarnikov Purpose : Obtains the preset value based on its index Returns : void Exceptions: Parameters: [in] WORD Index - the index of preset to obtain; [out] CProfileBiasGain& Value - preset value for the index. Notes : Reverse operation for FindPresetBiasGain().

Definition at line 290 of file biasgdgt.cpp.

00291 {
00292     // check preconditions
00293     if( Index <= WORD(eNumberOfPresets) )
00294     {
00295         Value.SetBiasGain( AFp( kBiasPresets_s[ Index ] ),  AFp( kGainPresets_s[ Index ] ) );
00296     }
00297 }

DocColour* CBiasGainGadget::GetStartColour  )  [inline]
 

Definition at line 213 of file biasgdgt.h.

00213 { return (StartColour); }

UINT32* CBiasGainGadget::GetStartTransp  )  [inline]
 

Definition at line 217 of file biasgdgt.h.

00217 { return (StartTransp); }

BOOL CBiasGainGadget::GetUseFillProfile  )  [inline]
 

Definition at line 194 of file biasgdgt.h.

00194 { return (useFillProfile); }

BOOL CBiasGainGadget::GetUseTranspFillProfile  )  [inline]
 

Definition at line 199 of file biasgdgt.h.

00199 { return (useTranspFillProfile); }

void CBiasGainGadget::Init DialogOp pOwningDialog,
CGadgetID  GadgetID,
UINT32  BubbleID,
UINT32  StatusID
[virtual]
 

Function : CBiasGainGadget::Init Author : Mikhail Tatarnikov Purpose : Initializes the gadget Returns : void Exceptions: Parameters: [in] DialogOp* pOwningDialog - the parent dialog; [in] CGadgetID GadgetID - the gadget ID; [in] UINT32 BubbleID - tooltip help string ID; [in] UINT32 StatusID - status bar string ID. Notes :

Definition at line 248 of file biasgdgt.cpp.

00249 {
00250     // check preconditions
00251     if( ( pOwningDialog != 0 ) && ( GadgetID != 0 ) && ( BubbleID != 0 ) && ( StatusID != 0 ) )
00252     {
00253         // set members
00254         pOwningDialog_m   = pOwningDialog;
00255         GadgetID_m        = GadgetID;
00256         InfobarGadgetID_m = (CGadgetID)-1;
00257         BubbleID_m        = BubbleID;
00258         StatusID_m        = StatusID;
00259     }
00260 }

BOOL CBiasGainGadget::IsDialogOpen  )  [inline]
 

Definition at line 189 of file biasgdgt.h.

00189 { if (pDialog_m != NULL) { return (TRUE); } else { return (FALSE); } }

void CBiasGainGadget::Message DialogMsg pMessage,
CProfileBiasGain const &  BiasGain
[virtual]
 

Function : CBiasGainGadget::Message Author : Mikhail Tatarnikov Purpose : Message handling routing Returns : void Exceptions: Parameters: [in] DialogMsg* pMessage - an incoming message; [in] CProfileBiasGain const& BiasGain - Notes :

Definition at line 387 of file biasgdgt.cpp.

00388 {
00389 }

void CBiasGainGadget::Message DialogMsg pMessage  )  [virtual]
 

Function : CBiasGainGadget::Message Author : Mikhail Tatarnikov Purpose : Message handling routine Returns : void Exceptions: Parameters: [in] DialogMsg* pMessage - a message to handle Notes :

Definition at line 371 of file biasgdgt.cpp.

00372 {
00373     Message( pMessage,  CProfileBiasGain() );
00374 }

CBiasGainGadget& CBiasGainGadget::operator= const CBiasGainGadget  )  [private]
 

void CBiasGainGadget::ReInitialiseDialog CProfileBiasGain ReInitOn,
BOOL  bMany
 

Function : CBiasGainGadget::ReInitialiseDialog Author : Mikhail Tatarnikov Purpose : Updates the dialog with a profile value Returns : void Exceptions: Parameters: [in] CProfileBiasGain* ReInitOn - the new value to display in the dialog; [in] BOOL bMany - Notes :

Definition at line 334 of file biasgdgt.cpp.

00335 {
00336     if (/*(ReInitOn != NULL) &&*/ (pDialog_m != NULL))
00337     {
00338         if ((ReInitOn != NULL) || (bMany == TRUE))
00339         {
00340             pDialog_m->ReInitialiseDialog (ReInitOn, bMany);
00341         }
00342     }
00343 }

void CBiasGainGadget::SetCBaisGainDlg CBiasGainDlg pMyDlg  )  [inline]
 

Definition at line 182 of file biasgdgt.h.

00182 { pDialog_m = pMyDlg; }

void CBiasGainGadget::SetEndColour DocColour NewCol  ) 
 

Definition at line 145 of file biasgdgt.cpp.

00146 {
00147     EndColour = NewCol;
00148 }

void CBiasGainGadget::SetEndColour2 DocColour NewCol  ) 
 

void CBiasGainGadget::SetEndColour3 DocColour NewCol  ) 
 

void CBiasGainGadget::SetEndTransp UINT32 NewTransp  ) 
 

Definition at line 155 of file biasgdgt.cpp.

00156 {
00157     EndTransp = NewTransp;
00158 }

void CBiasGainGadget::SetEndTransp2 UINT32 NewTransp  ) 
 

void CBiasGainGadget::SetEndTransp3 UINT32 NewTransp  ) 
 

void CBiasGainGadget::SetFillEffect FillEffectAttribute NewFillEffect  ) 
 

Definition at line 160 of file biasgdgt.cpp.

00161 {
00162     if (FillEffect) delete (FillEffect);
00163     FillEffect = NewFillEffect;
00164 }

void CBiasGainGadget::SetInfobarGadgetID CGadgetID  gadg  )  [inline]
 

Definition at line 185 of file biasgdgt.h.

00185 { InfobarGadgetID_m = gadg; }

void CBiasGainGadget::SetStartColour DocColour NewCol  ) 
 

Definition at line 140 of file biasgdgt.cpp.

00141 {
00142     StartColour = NewCol;
00143 }

void CBiasGainGadget::SetStartTransp UINT32 NewTransp  ) 
 

Definition at line 150 of file biasgdgt.cpp.

00151 {
00152     StartTransp = NewTransp;
00153 }

void CBiasGainGadget::ToggleFillProfile  )  [inline]
 

Definition at line 192 of file biasgdgt.h.

00192 { useFillProfile = TRUE; }

void CBiasGainGadget::ToggleTranspFillProfile  )  [inline]
 

Definition at line 197 of file biasgdgt.h.


Member Data Documentation

UINT32 CBiasGainGadget::BubbleID_m [private]
 

Definition at line 238 of file biasgdgt.h.

DocColour* CBiasGainGadget::EndColour [private]
 

Definition at line 249 of file biasgdgt.h.

DocColour* CBiasGainGadget::EndColour2 [private]
 

Definition at line 250 of file biasgdgt.h.

DocColour* CBiasGainGadget::EndColour3 [private]
 

Definition at line 251 of file biasgdgt.h.

UINT32* CBiasGainGadget::EndTransp [private]
 

Definition at line 254 of file biasgdgt.h.

UINT32* CBiasGainGadget::EndTransp2 [private]
 

Definition at line 255 of file biasgdgt.h.

UINT32* CBiasGainGadget::EndTransp3 [private]
 

Definition at line 256 of file biasgdgt.h.

FillEffectAttribute* CBiasGainGadget::FillEffect [private]
 

Definition at line 252 of file biasgdgt.h.

CGadgetID CBiasGainGadget::GadgetID_m [private]
 

Definition at line 236 of file biasgdgt.h.

CGadgetID CBiasGainGadget::InfobarGadgetID_m [private]
 

Definition at line 237 of file biasgdgt.h.

const double CBiasGainGadget::kBiasPresets_s = { 0.0, 0.5, -0.5, 0.0, 0.0 } [static, private]
 

Definition at line 261 of file biasgdgt.h.

const double CBiasGainGadget::kGainPresets_s = { 0.0, 0.0, 0.0, 0.5, -0.5 } [static, private]
 

Definition at line 262 of file biasgdgt.h.

const INT32 CBiasGainGadget::kNumberOfPresets_s [static, private]
 

Definition at line 260 of file biasgdgt.h.

CBiasGainDlg* CBiasGainGadget::pDialog_m [private]
 

Definition at line 241 of file biasgdgt.h.

DialogOp* CBiasGainGadget::pOwningDialog_m [private]
 

Definition at line 235 of file biasgdgt.h.

DocColour* CBiasGainGadget::StartColour [private]
 

Definition at line 248 of file biasgdgt.h.

UINT32* CBiasGainGadget::StartTransp [private]
 

Definition at line 253 of file biasgdgt.h.

UINT32 CBiasGainGadget::StatusID_m [private]
 

Definition at line 239 of file biasgdgt.h.

BOOL CBiasGainGadget::useFillProfile [private]
 

Definition at line 243 of file biasgdgt.h.

BOOL CBiasGainGadget::useTranspFillProfile [private]
 

Definition at line 245 of file biasgdgt.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:51:56 2007 for Camelot by  doxygen 1.4.4