ChangeFeatherProfileOpDesc Class Reference

#include <opfeathr.h>

Inheritance diagram for ChangeFeatherProfileOpDesc:

UndoableOpDescriptor OpDescriptor MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ChangeFeatherProfileOpDesc (UINT32 toolID, UINT32 txID, CCRuntimeClass *Op, TCHAR *tok, pfnGetState gs, UINT32 helpId=0, UINT32 bubbleID=0, UINT32 resourceID=0, UINT32 controlID=0, BOOL ReceiveMessages=TRUE, BOOL Smart=FALSE, BOOL Clean=FALSE, UINT32 AutoStateFlags=0)
virtual void OnControlCreate (OpDescControlCreateMsg *CreateMsg)
 This function is called after ChangeFeatherSizeSliderOpDesc::OnControlCreate () has been called. This function initialises the biasgain gadget that appears on our feathering bar. See Also: ChangeFeatherSizeSliderOpDesc::OnControlCreate.
virtual MsgResult Message (Msg *Msg)
 The default OpDescriptor message handler.
virtual void OnProfileChanged (OpDescControlMsg *SelChangedMsg)
 Process the profile chenged message (it's send from BiasGain dialog when the combobox is changed or when a slider is set (probably after dragging).
virtual void OnProfileChanging (OpDescControlMsg *SliderChangingMsg)
 Handles profile changing message. Usually sent by BiasGain dialog when user drags a slider (after the user finished dragging, DIM_PROFILE_CHANGED message is sent).

Static Public Member Functions

static void SetBoolGadgetSelected (CGadgetID Gadget, BOOL IsSelected)

Public Attributes

BOOL m_bProfileChanging
BOOL m_bProfileInitialChange

Static Public Attributes

static CBiasGainGadget m_BiasGainGadget

Detailed Description

Definition at line 305 of file opfeathr.h.


Constructor & Destructor Documentation

ChangeFeatherProfileOpDesc::ChangeFeatherProfileOpDesc UINT32  toolID,
UINT32  txID,
CCRuntimeClass Op,
TCHAR tok,
pfnGetState  gs,
UINT32  helpId = 0,
UINT32  bubbleID = 0,
UINT32  resourceID = 0,
UINT32  controlID = 0,
BOOL  ReceiveMessages = TRUE,
BOOL  Smart = FALSE,
BOOL  Clean = FALSE,
UINT32  AutoStateFlags = 0
 

Definition at line 1386 of file opfeathr.cpp.

01401     : UndoableOpDescriptor(toolID, txID, Op, tok, gs, helpId, bubbleID, 
01402                          resourceID, controlID, ReceiveMessages, Smart,
01403                          Clean, 0, AutoStateFlags )
01404 {
01405     m_bProfileChanging      = FALSE;
01406     m_bProfileInitialChange = TRUE;
01407 }


Member Function Documentation

MsgResult ChangeFeatherProfileOpDesc::Message Msg pMessage  )  [virtual]
 

The default OpDescriptor message handler.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/4/94
Parameters:
Msg,: The message to handle [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from OpDescriptor.

Definition at line 1435 of file opfeathr.cpp.

01436 {
01437     if (MESSAGE_IS_A(pMessage, OpDescControlMsg))
01438     {
01439         OpDescControlMsg* pOpDescCtrlMsg = reinterpret_cast<OpDescControlMsg*>(pMessage);
01440         
01441         if (pOpDescCtrlMsg->DlgMsg == DIM_PROFILE_CHANGED)
01442             OnProfileChanged(pOpDescCtrlMsg);
01443         else if (pOpDescCtrlMsg->DlgMsg == DIM_PROFILE_CHANGING)
01444             OnProfileChanging(pOpDescCtrlMsg);
01445     }
01446     
01447     return UndoableOpDescriptor::Message(pMessage);
01448 }

void ChangeFeatherProfileOpDesc::OnControlCreate OpDescControlCreateMsg CreateMsg  )  [virtual]
 

This function is called after ChangeFeatherSizeSliderOpDesc::OnControlCreate () has been called. This function initialises the biasgain gadget that appears on our feathering bar. See Also: ChangeFeatherSizeSliderOpDesc::OnControlCreate.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/3/2000

Reimplemented from OpDescriptor.

Definition at line 1423 of file opfeathr.cpp.

01424 {
01425     DialogOp* pDlg = CreateMsg->pDlgOp;
01426     CGadgetID GadgetID = CreateMsg->SetGadgetID;
01427 
01428     // link the profile gadget to its controlling button/infobar ....   
01429     m_BiasGainGadget.Init(pDlg, GadgetID, _R(IDBBL_BIASGAIN), _R(IDS_BIASGAINDLG));
01430     m_BiasGainGadget.ToggleFillProfile();
01431 }

void ChangeFeatherProfileOpDesc::OnProfileChanged OpDescControlMsg SelChangedMsg  )  [virtual]
 

Process the profile chenged message (it's send from BiasGain dialog when the combobox is changed or when a slider is set (probably after dragging).

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/3/2000

Definition at line 1463 of file opfeathr.cpp.

01464 {
01465     // ILAN:  Although it is possible for me to ammend the SelChangedMsg message so that the new
01466     // profile is part of it (i.e.  like how the other profiles work); it is not worth me doing
01467     // this just to get the following working + it would also slow things down somewhat ....
01468 
01469     CProfileBiasGain NewBiasGain = m_BiasGainGadget.GetCurrentDialogProfile();
01470 
01471     if (m_bProfileChanging)
01472     {
01473         // expect SliderChanging to be true before a set is called. Already saved initial 
01474         // state in first Op initiated by OpSliderChanging()
01475         m_bProfileInitialChange = FALSE;
01476     }
01477     else
01478     {
01479         m_bProfileInitialChange = TRUE;
01480     }
01481     
01482     m_bProfileChanging = FALSE;
01483 
01484     FeatherProfileOpParam Param(NewBiasGain, OpChangeFeatherSize::GetEditContext());
01485     OpChangeFeatherProfile* Op = new OpChangeFeatherProfile();
01486     Op->DoWithParam(this, &Param);
01487 }

void ChangeFeatherProfileOpDesc::OnProfileChanging OpDescControlMsg SliderChangingMsg  )  [virtual]
 

Handles profile changing message. Usually sent by BiasGain dialog when user drags a slider (after the user finished dragging, DIM_PROFILE_CHANGED message is sent).

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/3/2000

Definition at line 1501 of file opfeathr.cpp.

01502 {
01503     // ILAN:  Although it is possible for me to ammend the SelChangedMsg message so that the new
01504     // profile is part of it (i.e.  like how the other profiles work); it is not worth me doing
01505     // this just to get the following working + it would also slow things down somewhat ....
01506     
01507     CProfileBiasGain NewBiasGain = m_BiasGainGadget.GetCurrentDialogProfile();
01508 
01509     if (m_bProfileChanging)
01510     {
01511         // Successive slider changing message
01512         // Don't add to undo history
01513         m_bProfileInitialChange = FALSE;
01514     }
01515     else
01516     {
01517         // Store selections initial feather states so that it can be saved in undo list
01518         // once all sliding has finished (ie. in OnProfileChanged())
01519         m_bProfileChanging      = TRUE;
01520         m_bProfileInitialChange = TRUE;
01521     }
01522 
01523     FeatherProfileOpParam Param(NewBiasGain, OpChangeFeatherSize::GetEditContext());
01524     OpChangeFeatherProfile* Op = new OpChangeFeatherProfile();
01525     Op->DoWithParam(this, &Param);
01526 }

void ChangeFeatherProfileOpDesc::SetBoolGadgetSelected CGadgetID  Gadget,
BOOL  IsSelected
[static]
 

Definition at line 1633 of file opfeathr.cpp.

01634 {
01635     /*OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_FEATHERPROFILE);
01636     if (pOpDesc!=NULL)
01637     {
01638         // Found the opdescriptor. Now find all the gadgets associated with it
01639         List Gadgets;
01640         if (pOpDesc->BuildGadgetList(&Gadgets))
01641         {
01642             // Found some. Set the controls accordingly
01643             GadgetListItem* pGadgetItem = (GadgetListItem*) Gadgets.GetHead();
01644 
01645             while (pGadgetItem != NULL)
01646             {
01647                 // Set the gadget
01648                 pGadgetItem->pDialogBarOp->SetBoolGadgetSelected(pGadgetItem->gidGadgetID,
01649                                                                     IsSelected);
01650                 // Find the next gadget
01651                 pGadgetItem = (GadgetListItem*) Gadgets.GetNext(pGadgetItem);
01652             }
01653     
01654             // Clean out the list
01655             Gadgets.DeleteAll();
01656         }
01657     }*/
01658 }


Member Data Documentation

CBiasGainGadget ChangeFeatherProfileOpDesc::m_BiasGainGadget [static]
 

Definition at line 344 of file opfeathr.h.

BOOL ChangeFeatherProfileOpDesc::m_bProfileChanging
 

Definition at line 349 of file opfeathr.h.

BOOL ChangeFeatherProfileOpDesc::m_bProfileInitialChange
 

Definition at line 351 of file opfeathr.h.


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