[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1415
Date : Thu Jul 6 11:51:31 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/opfeathr.cpp
M /Trunk/XaraLX/Kernel/opfeathr.h
M /Trunk/XaraLX/Scripts/barconverter
M /Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc
Fix feather profiling from Mikhail Tatarnikov
Diff:
Index: Trunk/XaraLX/Kernel/opfeathr.h
===================================================================
--- Trunk/XaraLX/Kernel/opfeathr.h (revision 1414)
+++ Trunk/XaraLX/Kernel/opfeathr.h (revision 1415)
@@ -329,16 +329,16 @@
// Function to initialise the profile gadget
virtual void OnControlCreate(OpDescControlCreateMsg* CreateMsg);
// Function to handle a selection from the profile gadgets dropdown/edit boxes
+ virtual MsgResult Message(Msg* Msg);
+
+
virtual void OnSelectionChange(OpDescControlMsg* SelChangedMsg, List* GadgetList);
// Function to handle profile gadget when changed by sliders
virtual void OnSliderSet(OpDescControlMsg* SelChangedMsg);
// Function to handle profile gadget when changed by sliders
virtual void OnSliderChanging(OpDescControlMsg* SliderChangingMsg);
-PORTNOTE("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
static CBiasGainGadget m_BiasGainGadget;
-#endif
static void SetBoolGadgetSelected (CGadgetID Gadget, BOOL IsSelected);
Index: Trunk/XaraLX/Kernel/opfeathr.cpp
===================================================================
--- Trunk/XaraLX/Kernel/opfeathr.cpp (revision 1414)
+++ Trunk/XaraLX/Kernel/opfeathr.cpp (revision 1415)
@@ -150,10 +150,7 @@
#define new CAM_DEBUG_NEW
-PORTNOTE("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
CBiasGainGadget ChangeFeatherProfileOpDesc::m_BiasGainGadget;
-#endif
const MILLIPOINT MaxFeatherSize = ((const MILLIPOINT)(MAX_FEATHERSIZE_MP));
const MILLIPOINT ChangeFeatherSizeSliderOpDesc::MinSlider = 0;
@@ -1421,17 +1418,36 @@
void ChangeFeatherProfileOpDesc::OnControlCreate(OpDescControlCreateMsg* CreateMsg)
{
-PORTNOTE("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
DialogOp* pDlg = CreateMsg->pDlgOp;
CGadgetID GadgetID = CreateMsg->SetGadgetID;
// link the profile gadget to its controlling button/infobar ....
- m_BiasGainGadget.LinkControlButton((InformationBarOp*) pDlg, GadgetID,_R(IDBBL_BIASGAIN),_R(IDS_BIASGAINDLG));
+ m_BiasGainGadget.Init(pDlg, GadgetID, _R(IDBBL_BIASGAIN), _R(IDS_BIASGAINDLG));
m_BiasGainGadget.ToggleFillProfile();
-#endif
}
+
+
+MsgResult ChangeFeatherProfileOpDesc::Message(Msg* pMessage)
+{
+ if (MESSAGE_IS_A(pMessage, OpDescControlMsg))
+ {
+ OpDescControlMsg* pOpDescCtrlMsg = reinterpret_cast<OpDescControlMsg*>(pMessage);
+ if (pOpDescCtrlMsg->DlgMsg == DIM_PROFILE_CHANGED || pOpDescCtrlMsg->DlgMsg == DIM_PROFILE_CHANGEIDLE ||
+ pOpDescCtrlMsg->DlgMsg == DIM_PROFILE_CHANGING)
+ {
+ CProfileBiasGain NewBiasGain = m_BiasGainGadget.GetCurrentDialogProfile();
+
+ FeatherProfileOpParam Param(NewBiasGain, OpChangeFeatherSize::GetEditContext());
+ OpChangeFeatherProfile* Op = new OpChangeFeatherProfile();
+ Op->DoWithParam(this, &Param);
+ }
+ }
+
+ return UndoableOpDescriptor::Message(pMessage);
+}
+
+
/********************************************************************************************
> void ChangeFeatherProfileOpDesc::OnSelectionChange(OpDescControlMsg* SelChangedMsg, List* GadgetList)
@@ -1450,8 +1466,6 @@
// profile is part of it (i.e. like how the other profiles work); it is not worth me doing
// this just to get the following working + it would also slow things down somewhat ....
-PORTNOTE("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
CProfileBiasGain NewBiasGain = m_BiasGainGadget.GetCurrentDialogProfile();
SliderChanging = FALSE;
@@ -1460,7 +1474,6 @@
FeatherProfileOpParam Param(NewBiasGain, OpChangeFeatherSize::GetEditContext());
OpChangeFeatherProfile* Op = new OpChangeFeatherProfile();
Op->DoWithParam(this, &Param);
-#endif
}
/********************************************************************************************
@@ -1480,9 +1493,7 @@
// ILAN: Although it is possible for me to ammend the SelChangedMsg message so that the new
// profile is part of it (i.e. like how the other profiles work); it is not worth me doing
// this just to get the following working + it would also slow things down somewhat ....
-
-PORTNOTE("effect", "Removed BiasGain usage")
-#ifndef EXCLUDE_FROM_XARALX
+
CProfileBiasGain NewBiasGain = m_BiasGainGadget.GetCurrentDialogProfile();
if (SliderChanging)
@@ -1501,7 +1512,6 @@
FeatherProfileOpParam Param(NewBiasGain, OpChangeFeatherSize::GetEditContext());
OpChangeFeatherProfile* Op = new OpChangeFeatherProfile();
Op->DoWithParam(this, &Param);
-#endif
}
/********************************************************************************************
@@ -1522,8 +1532,6 @@
// profile is part of it (i.e. like how the other profiles work); it is not worth me doing
// this just to get the following working + it would also slow things down somewhat ....
-PORTNOTE("effect", "Removed BiasGain usage")
-#ifndef EXCLUDE_FROM_XARALX
CProfileBiasGain NewBiasGain = m_BiasGainGadget.GetCurrentDialogProfile();
if (SliderChanging)
@@ -1543,7 +1551,6 @@
FeatherProfileOpParam Param(NewBiasGain, OpChangeFeatherSize::GetEditContext());
OpChangeFeatherProfile* Op = new OpChangeFeatherProfile();
Op->DoWithParam(this, &Param);
-#endif
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1623,8 +1630,6 @@
void OpChangeFeatherProfile::Do(OpDescriptor* pOp)
{
-PORTNOTE("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
if (!(ChangeFeatherProfileOpDesc::m_BiasGainGadget.IsDialogOpen ()))
{
CBiasGainDlg* pDialog_m = new CBiasGainDlg();
@@ -1678,7 +1683,6 @@
Gadgets.DeleteAll();
}
}*/
-#endif
}
@@ -1993,8 +1997,6 @@
BOOL OpChangeFeatherProfile::OnSelChangingMsg(SelChangingMsg::SelectionState State)
{
-PORTNOTE("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
if (ChangeFeatherProfileOpDesc::m_BiasGainGadget.IsDialogOpen ())
{
CProfileBiasGain CommonProfile;
@@ -2023,7 +2025,7 @@
ChangeFeatherProfileOpDesc::m_BiasGainGadget.ReInitialiseDialog(&CommonProfile, FALSE);
}
}
-#endif
+
return (TRUE);
}
@@ -2105,8 +2107,6 @@
UndoProf,
&pAction );
-PORTNOTE ("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
if (ChangeFeatherProfileOpDesc::m_BiasGainGadget.IsDialogOpen())
{
// only way I can think of to get the profile dialog to reinialise itself is
@@ -2114,7 +2114,6 @@
BROADCAST_TO_ALL(SelChangingMsg(SelChangingMsg::SELECTIONCHANGED, FALSE));
}
-#endif
return Act;
}
@@ -2235,8 +2234,6 @@
if (Act==AC_OK)
m_pFeatherEffect->SetProfile(m_LastProfile);
-PORTNOTE("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
if (ChangeFeatherProfileOpDesc::m_BiasGainGadget.IsDialogOpen())
{
// only way I can think of to get the profile dialog to reinialise itself is
@@ -2244,7 +2241,6 @@
BROADCAST_TO_ALL(SelChangingMsg(SelChangingMsg::SELECTIONCHANGED, FALSE));
}
-#endif
return Act;
}
@@ -2328,8 +2324,6 @@
m_pFeatherEffect->SetProfile(m_LastProfile);
}
-PORTNOTE("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
if (ChangeFeatherProfileOpDesc::m_BiasGainGadget.IsDialogOpen())
{
// only way I can think of to get the profile dialog to reinitialise itself is
@@ -2337,7 +2331,6 @@
BROADCAST_TO_ALL(SelChangingMsg(SelChangingMsg::SELECTIONCHANGED, FALSE));
// BROADCAST_TO_ALL(SelChangingMsg(SelChangingMsg::EFFECTSTACKCHANGED));
}
-#endif
return Act;
}
@@ -2390,8 +2383,6 @@
UndoPath,
&pAction );
-PORTNOTE("other", "Removed CBiasGainGadget usage")
-#ifndef EXCLUDE_FROM_XARALX
if (ChangeFeatherProfileOpDesc::m_BiasGainGadget.IsDialogOpen())
{
// only way I can think of to get the profile dialog to reinialise itself is
@@ -2399,7 +2390,6 @@
BROADCAST_TO_ALL(SelChangingMsg(SelChangingMsg::SELECTIONCHANGED, FALSE));
}
-#endif
return Act;
}
Index: Trunk/XaraLX/Scripts/barconverter
===================================================================
--- Trunk/XaraLX/Scripts/barconverter (revision 1414)
+++ Trunk/XaraLX/Scripts/barconverter (revision 1415)
@@ -197,7 +197,7 @@
sub IsToggle
{
my $name = shift @_;
- return ($name=~/^(IDC_BTN_MAKECURVE|IDC_BTN_MAKELINE|IDC_BTN_SMOOTHPOINT|IDC_BTN_CUSPPOINT|IDC_BTN_REGSHAPETOOL_RADIUS|IDC_BTN_REGSHAPETOOL_DIAMETER|IDC_BTN_REGSHAPETOOL_BOUNDBOX|IDC_BTN_REGSHAPETOOL_POLYGON|IDC_BTN_REGSHAPETOOL_ELLIPSE|IDC_BTN_REGSHAPETOOL_STELLATION|IDC_BTN_REGSHAPETOOL_CURVATURE|IDC_SEL_SHOWBOUNDSBLOBS|IDC_SEL_SHOWOBJECTBLOBS|IDC_SEL_SHOWFILLBLOBS|IDC_SEL_ROTATEBUTTON|IDC_SEL_SCALELINES|IDC_SEL_PADLOCK|IDC_BTN_MAGNET|IDC_BTN_BLENDDISTANCE|C_BTN_BLENDSTEPS|IDC_BTN_ONETOONE|IDC_BTN_BLENDANTIALIAS|IDC_BTN_DETACHMOULD|IDC_BTN_BEVELOUTER|IDC_BTN_BEVELINNER|IDC_BEVELJOINTYPEMITRE|IDC_BEVELJOINTYPEROUND|IDC_BEVELJOINTYPEBEVEL|IDC_BTN_CONTOURDISTANCE|IDC_BTN_CONTOURSTEPS|IDC_BTN_CONTOUROUTER|IDC_BTN_CONTOURINNER|IDC_CONTOURJOINTYPEMITRE|IDC_CONTOURJOINTYPEROUND|IDC_CONTOURJOINTYPEBEVEL|IDC_BOLDBUTTON|IDC_ITALICBUTTON|IDC_JUSTIFYLEFT|IDC_JUSTIFYCENTRE|IDC_JUSTIFYRIGHT|IDC_JUSTIFYFULL|IDC_SUPERSCRIPT|IDC_SUBSCRIPT|IDC_AUTOKERN|IDC_BTN_NOSHADOW|IDC_BTN_WALLSHADOW|IDC_BTN_FLOORSHADOW|IDC_BTN_GLOWSHADOW|IDC_BTN_ALLVISIBLE|IDC_BTN_MULTILAYER|IDC_COLOUREDITOR|IDC_BTN_SGCOLOUR|IDC_BTN_SGLAYER|IDC_BTN_SGFRAME|IDC_BTN_SGBITMAP|IDC_BTN_SGLINE|IDC_BTN_SGFONTS|IDC_BTN_SGCLIPART|IDC_BTN_SGFILLS|IDC_BTN_SGNAME|IDC_BIASGAIN|IDC_BLENDOBJECTBIASGAIN|IDC_BLENDATTRBIASGAIN|IDC_CONTOUROBJECTBIASGAIN|IDC_CONTOURATTRBIASGAIN)$/)?1:0;
+ return ($name=~/^(IDC_BTN_MAKECURVE|IDC_BTN_MAKELINE|IDC_BTN_SMOOTHPOINT|IDC_BTN_CUSPPOINT|IDC_BTN_REGSHAPETOOL_RADIUS|IDC_BTN_REGSHAPETOOL_DIAMETER|IDC_BTN_REGSHAPETOOL_BOUNDBOX|IDC_BTN_REGSHAPETOOL_POLYGON|IDC_BTN_REGSHAPETOOL_ELLIPSE|IDC_BTN_REGSHAPETOOL_STELLATION|IDC_BTN_REGSHAPETOOL_CURVATURE|IDC_SEL_SHOWBOUNDSBLOBS|IDC_SEL_SHOWOBJECTBLOBS|IDC_SEL_SHOWFILLBLOBS|IDC_SEL_ROTATEBUTTON|IDC_SEL_SCALELINES|IDC_SEL_PADLOCK|IDC_BTN_MAGNET|IDC_BTN_BLENDDISTANCE|C_BTN_BLENDSTEPS|IDC_BTN_ONETOONE|IDC_BTN_BLENDANTIALIAS|IDC_BTN_DETACHMOULD|IDC_BTN_BEVELOUTER|IDC_BTN_BEVELINNER|IDC_BEVELJOINTYPEMITRE|IDC_BEVELJOINTYPEROUND|IDC_BEVELJOINTYPEBEVEL|IDC_BTN_CONTOURDISTANCE|IDC_BTN_CONTOURSTEPS|IDC_BTN_CONTOUROUTER|IDC_BTN_CONTOURINNER|IDC_CONTOURJOINTYPEMITRE|IDC_CONTOURJOINTYPEROUND|IDC_CONTOURJOINTYPEBEVEL|IDC_BOLDBUTTON|IDC_ITALICBUTTON|IDC_JUSTIFYLEFT|IDC_JUSTIFYCENTRE|IDC_JUSTIFYRIGHT|IDC_JUSTIFYFULL|IDC_SUPERSCRIPT|IDC_SUBSCRIPT|IDC_AUTOKERN|IDC_BTN_NOSHADOW|IDC_BTN_WALLSHADOW|IDC_BTN_FLOORSHADOW|IDC_BTN_GLOWSHADOW|IDC_BTN_ALLVISIBLE|IDC_BTN_MULTILAYER|IDC_COLOUREDITOR|IDC_BTN_SGCOLOUR|IDC_BTN_SGLAYER|IDC_BTN_SGFRAME|IDC_BTN_SGBITMAP|IDC_BTN_SGLINE|IDC_BTN_SGFONTS|IDC_BTN_SGCLIPART|IDC_BTN_SGFILLS|IDC_BTN_SGNAME|IDC_BIASGAIN|IDC_BLENDOBJECTBIASGAIN|IDC_BLENDATTRBIASGAIN|IDC_CONTOUROBJECTBIASGAIN|IDC_CONTOURATTRBIASGAIN|IDC_FEATHERPROFILE_GDGT)$/)?1:0;
}
sub ConvertOptoken
Index: Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc (revision 1414)
+++ Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc (revision 1415)
@@ -1082,7 +1082,7 @@
<flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
<border>1</border>
<object class="wxCamArtControl" name="IDC_FEATHERPROFILE_GDGT">
- <camartstyle>wxCACS_PUSHBUTTON|wxCACS_ALLOWHOVER</camartstyle>
+ <camartstyle>wxCACS_PUSHBUTTON|wxCACS_ALLOWHOVER|wxCACS_TOGGLEBUTTON</camartstyle>
<optoken>FeatherProfile</optoken>
</object>
</object>
Xara