CBrushGadget Class Reference

#include <brshgdgt.h>

List of all members.

Public Member Functions

 CBrushGadget ()
 ~CBrushGadget ()
void LinkControlButton (InformationBarOp *pOwner, CGadgetID GadgetID, UINT32 BubbleID, UINT32 StatusID)
void Message (DialogMsg *)
void CloseDialog ()
void DialogHasOpened ()
void DialogHasClosed ()
CGadgetID GetGadgetID () const
void GetDialogTitle (String_256 &DlgTitle) const
void HandleBrushButtonClick (BrushData *AppliedBrush, AttrBrushType *pBrush)
void HandleBrushButtonClick (BrushData *AppliedBrush, AttrBrushType *pBrush, AttrBrushType *pOrigBrush)
void HandleBrushButtonClick (BrushHandle Handle)
void SetCBrushEditDlg (CBrushEditDlg *pMyDlg)
BOOL IsDialogOpen ()
void DisableTimeStamping ()
BOOL GetDisableTimeStamping ()
void EnableEditingBrushDefinition ()
BOOL GetEditingBrushDefinition ()
void ReInitialiseDialog (BrushData *pData)
void SetBrushDialog (CBrushEditDlg *pDlg)

Private Attributes

InformationBarOppOwningBar_m
DialogOppOwningDialog_m
CGadgetID GadgetID_m
CGadgetID InfobarGadgetID_m
UINT32 BubbleID_m
UINT32 StatusID_m
CBrushEditDlgpDialog_m
BOOL DisableTimeStampingInDlg
BOOL EditingBrushDefinition


Detailed Description

Definition at line 108 of file brshgdgt.h.


Constructor & Destructor Documentation

CBrushGadget::CBrushGadget  ) 
 

Definition at line 107 of file brshgdgt.cpp.

00108     : pOwningBar_m( 0 ),
00109       GadgetID_m( 0 ),
00110       BubbleID_m( 0 ),
00111       StatusID_m( 0 ),
00112       pDialog_m( 0 )
00113 {
00114     DisableTimeStampingInDlg = FALSE;
00115     EditingBrushDefinition = FALSE;
00116     pDialog_m = NULL;
00117 }

CBrushGadget::~CBrushGadget  ) 
 

Definition at line 119 of file brshgdgt.cpp.

00120 {
00121     delete (pDialog_m);
00122 }


Member Function Documentation

void CBrushGadget::CloseDialog  ) 
 

Definition at line 160 of file brshgdgt.cpp.

00161 {
00162     if(pDialog_m != 0)
00163     {
00164         DialogMsg  MessageCancel (0, DIM_CANCEL, GadgetID_m);
00165 
00166         pDialog_m->Message (&MessageCancel);
00167 
00168         // the above also (indirectly) retoggles the controlling buttons state
00169         //pOwningBar_m->SetLongGadgetValue (GadgetID_m, 0);
00170     }
00171 }

void CBrushGadget::DialogHasClosed  ) 
 

Definition at line 178 of file brshgdgt.cpp.

00179 {
00180     if (pDialog_m != NULL)
00181         delete (pDialog_m);
00182     pDialog_m = NULL;
00183 
00184     // and retoggle the controlling button if we are launched from a bar
00185 //  if (pOwningBar_m != NULL)
00186 //      pOwningBar_m->SetLongGadgetValue (GadgetID_m, 0);
00187 }

void CBrushGadget::DialogHasOpened  ) 
 

Definition at line 173 of file brshgdgt.cpp.

00174 {
00175 }

void CBrushGadget::DisableTimeStamping  )  [inline]
 

Definition at line 150 of file brshgdgt.h.

void CBrushGadget::EnableEditingBrushDefinition  )  [inline]
 

Definition at line 153 of file brshgdgt.h.

void CBrushGadget::GetDialogTitle String_256 DlgTitle  )  const
 

Definition at line 196 of file brshgdgt.cpp.

00197 {
00198     DlgTitle.Load (BubbleID_m);
00199 }

BOOL CBrushGadget::GetDisableTimeStamping  )  [inline]
 

Definition at line 151 of file brshgdgt.h.

00151 { return (DisableTimeStampingInDlg); }

BOOL CBrushGadget::GetEditingBrushDefinition  )  [inline]
 

Definition at line 154 of file brshgdgt.h.

00154 { return (EditingBrushDefinition); }

CGadgetID CBrushGadget::GetGadgetID  )  const
 

Definition at line 190 of file brshgdgt.cpp.

00191 {
00192     return (GadgetID_m);
00193 }

void CBrushGadget::HandleBrushButtonClick BrushHandle  Handle  ) 
 

Definition at line 227 of file brshgdgt.cpp.

00228 {
00229     if (Handle == BrushHandle_NoBrush)
00230         return;
00231     if (!(IsDialogOpen ()))
00232     {
00233         pDialog_m = new CBrushEditDlg();
00234                         
00235         pDialog_m->InvokeVia (*(this), Handle);
00236     }
00237     else
00238     {
00239         CloseDialog ();
00240     }
00241 }

void CBrushGadget::HandleBrushButtonClick BrushData AppliedBrush,
AttrBrushType pBrush,
AttrBrushType pOrigBrush
 

Definition at line 243 of file brshgdgt.cpp.

00244 {
00245     if (AppliedBrush == NULL || pBrush == NULL)
00246     {
00247         ERROR3("Invalid input parameters");
00248         return;
00249     }
00250     
00251     if (!(IsDialogOpen ()))
00252     {
00253         pDialog_m = new CBrushEditDlg();
00254         BOOL bMany = FALSE, bAllSameType = TRUE;
00255                                 
00256         //CProfileBiasGain* appliedBiasGain = GetProfileFromSelection (ProfileGadgetID, &bMany, &bAllSameType);
00257 
00258         //if (bAllSameType != FALSE)
00259         //{
00260         pDialog_m->InvokeVia (*(this), AppliedBrush, pBrush, pOrigBrush, bMany);
00261         //}
00262     }
00263     else
00264     {
00265         CloseDialog ();
00266     }
00267 }

void CBrushGadget::HandleBrushButtonClick BrushData AppliedBrush,
AttrBrushType pBrush
 

Definition at line 201 of file brshgdgt.cpp.

00202 {
00203     if (AppliedBrush == NULL)
00204     {
00205         ERROR3("Invalid input parameters");
00206         return;
00207     }
00208     
00209     if (!(IsDialogOpen ()))
00210     {
00211         pDialog_m = new CBrushEditDlg();
00212         BOOL bMany = FALSE, bAllSameType = TRUE;
00213                                 
00214         //CProfileBiasGain* appliedBiasGain = GetProfileFromSelection (ProfileGadgetID, &bMany, &bAllSameType);
00215 
00216         //if (bAllSameType != FALSE)
00217         //{
00218         pDialog_m->InvokeVia (*(this), AppliedBrush, pBrush, bMany);
00219         //}
00220     }
00221     else
00222     {
00223         CloseDialog ();
00224     }
00225 }

BOOL CBrushGadget::IsDialogOpen  )  [inline]
 

Definition at line 148 of file brshgdgt.h.

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

void CBrushGadget::LinkControlButton InformationBarOp pOwningBar,
CGadgetID  GadgetID,
UINT32  BubbleID,
UINT32  StatusID
 

set members

Definition at line 125 of file brshgdgt.cpp.

00131 { 
00132     if((pOwningBar != 0) && (GadgetID != 0) && (BubbleID != 0) && (StatusID != 0))
00133     {
00135         {
00136             pOwningBar_m  =  pOwningBar;
00137             GadgetID_m    =  GadgetID;
00138             InfobarGadgetID_m = -1;             // set this to an (obviously) invalid value
00139                                                 // we use to route our data back to the relevant
00140                                                 // infobar button ....  (which originiates from
00141                                                 // within the CBiasGainGadget on the
00142                                                 // CBiasGainDlg
00143             BubbleID_m    =  BubbleID;
00144             StatusID_m    =  StatusID;
00145             //useFillProfile = FALSE;
00146             //useTranspFillProfile = FALSE;
00147         }
00148 
00149         HWND gadget = ::GetDlgItem (pOwningBar->WindowID, GadgetID);
00150         SendMessage (gadget, EM_SETREADONLY, FALSE, 0); // Clear the Read Only Flag
00151         pOwningBar->SetGadgetHelp (GadgetID, BubbleID, StatusID);
00152     }
00153 }

void CBrushGadget::Message DialogMsg  ) 
 

Definition at line 155 of file brshgdgt.cpp.

00156 {
00157 //  Message( pMessage,  CProfileBiasGain() );
00158 }

void CBrushGadget::ReInitialiseDialog BrushData pData  ) 
 

Definition at line 269 of file brshgdgt.cpp.

00270 {
00271     if (/*(ReInitOn != NULL) &&*/ (pDialog_m != NULL))
00272     {
00273         if (pData != NULL )
00274         {
00275             pDialog_m->ReInitialiseDialog (pData);
00276         }
00277     }
00278 }

void CBrushGadget::SetBrushDialog CBrushEditDlg pDlg  )  [inline]
 

Definition at line 158 of file brshgdgt.h.

00158 { pDialog_m = pDlg;}

void CBrushGadget::SetCBrushEditDlg CBrushEditDlg pMyDlg  )  [inline]
 

Definition at line 146 of file brshgdgt.h.

00146 { pDialog_m = pMyDlg; }


Member Data Documentation

UINT32 CBrushGadget::BubbleID_m [private]
 

Definition at line 115 of file brshgdgt.h.

BOOL CBrushGadget::DisableTimeStampingInDlg [private]
 

Definition at line 120 of file brshgdgt.h.

BOOL CBrushGadget::EditingBrushDefinition [private]
 

Definition at line 121 of file brshgdgt.h.

CGadgetID CBrushGadget::GadgetID_m [private]
 

Definition at line 113 of file brshgdgt.h.

CGadgetID CBrushGadget::InfobarGadgetID_m [private]
 

Definition at line 114 of file brshgdgt.h.

CBrushEditDlg* CBrushGadget::pDialog_m [private]
 

Definition at line 118 of file brshgdgt.h.

InformationBarOp* CBrushGadget::pOwningBar_m [private]
 

Definition at line 111 of file brshgdgt.h.

DialogOp* CBrushGadget::pOwningDialog_m [private]
 

Definition at line 112 of file brshgdgt.h.

UINT32 CBrushGadget::StatusID_m [private]
 

Definition at line 116 of file brshgdgt.h.


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