[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1228
Date : Wed May 31 16:41:10 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/Makefile.am
M /Trunk/XaraLX/Kernel/la_base.cpp
M /Trunk/XaraLX/Kernel/sgbrush.cpp
M /Trunk/XaraLX/Kernel/sginit.cpp
M /Trunk/XaraLX/Kernel/sgline.cpp
M /Trunk/XaraLX/Kernel/sgline.h
M /Trunk/XaraLX/Kernel/sgmenu.h
M /Trunk/XaraLX/Kernel/sgstroke.cpp
M /Trunk/XaraLX/Scripts/barconverter
M /Trunk/XaraLX/wxOil/Makefile.am
M /Trunk/XaraLX/wxOil/sgldrag.cpp
M /Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc
Some initial line gallery work
Diff:
Index: Trunk/XaraLX/Kernel/la_base.cpp
===================================================================
--- Trunk/XaraLX/Kernel/la_base.cpp (revision 1227)
+++ Trunk/XaraLX/Kernel/la_base.cpp (revision 1228)
@@ -187,8 +187,8 @@
pGadgetItem = (GadgetListItem*) pGadgetList->GetNext(pGadgetItem))
{
// Set each control to display the text.
- pGadgetItem->pDialogBarOp->SetStringGadgetValue(pGadgetItem->gidGadgetID,
- &((String&) strGadgetText),
+ pGadgetItem->pDialogOp->SetStringGadgetValue(pGadgetItem->gidGadgetID,
+ ((String&) strGadgetText),
FALSE, -1);
}
@@ -234,7 +234,7 @@
"::SetCurrentSelectedAttrib
");
*/
// There is no document so blank all gadgets.
- SetGadgetText(String(""));
+ SetGadgetText(String(_T("")));
return TRUE;
}
@@ -318,7 +318,7 @@
{
UINT32 nStringID = GetItemStringID(i);
if (nStringID == 0) break;
- pDlg->SetStringGadgetValue(SetGadgetID, &String(nStringID));
+ pDlg->SetStringGadgetValue(SetGadgetID, String(nStringID));
}
// Update the current selection within the combo etc.
@@ -363,8 +363,9 @@
return;
}
+ INT32 nItemIndex;
// Compare the string to each item that was placed in the combo list.
- for (INT32 nItemIndex = 0; ; nItemIndex++)
+ for (nItemIndex = 0; ; nItemIndex++)
{
// Ask the derived class to provide the string at the given index position.
UINT32 nTxtID = GetItemStringID(nItemIndex);
Index: Trunk/XaraLX/Kernel/sgline.cpp
===================================================================
--- Trunk/XaraLX/Kernel/sgline.cpp (revision 1227)
+++ Trunk/XaraLX/Kernel/sgline.cpp (revision 1228)
@@ -2910,6 +2910,9 @@
{
SuperGallery *pSuperGallery = FindGallery();
+ if (!pSuperGallery)
+ pSuperGallery = new LineGallery();
+
if (pSuperGallery != NULL)
{
// Toggle the visible state of the gallery window
@@ -2949,10 +2952,6 @@
ERROR3("Got the line gallery but it's not of the LineGallery class?");
}
- else
- {
- ERROR3("Can't find the Line gallery in bars.ini!
");
- }
return(NULL);
}
Index: Trunk/XaraLX/Kernel/sgline.h
===================================================================
--- Trunk/XaraLX/Kernel/sgline.h (revision 1227)
+++ Trunk/XaraLX/Kernel/sgline.h (revision 1228)
@@ -299,7 +299,11 @@
BOOL DeleteBrushItem(BrushHandle Handle);
// delete the item with the handle supplied
+PORTNOTE("other", "Removed CBrushGadget")
+#ifndef EXCLUDE_FROM_XARALX
CBrushGadget* GetBrushGadget() { return &BrushGadget;}
+#endif
+
// Overridden Command interface (for Ops and menu support)
public:
virtual BOOL InitMenuCommands(void);
@@ -377,7 +381,10 @@
// restored when the brush is deselcted
MILLIPOINT m_PreviousLineWidth;
+PORTNOTE("other", "Removed CBrushGadget")
+#ifndef EXCLUDE_FROM_XARALX
CBrushGadget BrushGadget;
+#endif
static String_256* m_pFileNameArray; // stores the filenames of the default brush files loaded on startup
static UINT32 m_NumDefaultFiles;
Index: Trunk/XaraLX/Kernel/Makefile.am
===================================================================
--- Trunk/XaraLX/Kernel/Makefile.am (revision 1227)
+++ Trunk/XaraLX/Kernel/Makefile.am (revision 1228)
@@ -68,6 +68,7 @@
optspage.cpp optsundo.cpp optsscal.cpp optsunit.cpp pagesize.cpp radio.cpp \
xpfcaps.cpp xpfilter.cpp xpfrgn.cpp layerprp.cpp prpsgds.cpp prpslyrs.cpp \
aprps.cpp prevwdlg.cpp frameops.cpp newcol.cpp tracedlg.cpp tracectl.cpp \
- tracergn.cpp bfxbase.cpp coldlog.cpp colmenu.cpp
+ tracergn.cpp bfxbase.cpp coldlog.cpp colmenu.cpp sgline.cpp sgline2.cpp \
+ sgstroke.cpp sgbrush.cpp lattrops.cpp la_base.cpp
AM_CXXFLAGS = $(XARAFLAGS)
Index: Trunk/XaraLX/Kernel/sgmenu.h
===================================================================
--- Trunk/XaraLX/Kernel/sgmenu.h (revision 1227)
+++ Trunk/XaraLX/Kernel/sgmenu.h (revision 1228)
@@ -165,7 +165,7 @@
// Line Gallery commands
const String_32 SGCmd_ExportBrush( _T("ExportBrush") ); // exports brush to clipboard
-const String_32 SGCmd_RenameBrush( _T("Change brush name") );
+const String_32 SGCmd_RenameBrush( _T("RenameBrush") );
// + Standard commands that are handled by the base class (all you need to do is add a menu
// command of this name, and the base class will handle it for you)
Index: Trunk/XaraLX/Kernel/sgbrush.cpp
===================================================================
--- Trunk/XaraLX/Kernel/sgbrush.cpp (revision 1227)
+++ Trunk/XaraLX/Kernel/sgbrush.cpp (revision 1228)
@@ -139,7 +139,6 @@
{
ERROR3IF(pBrush == NULL, "Illegal NULL param");
m_pBrushAttrVal = pBrush;
- INT32 i = 2;
}
@@ -282,7 +281,6 @@
if (pAttr != NULL)
{
- INT32 i = 1;
BrushAttrValue *pOther = (BrushAttrValue *) pAttr->GetAttributeValue();
//return((*m_pBrushAttrVal) == (*pOther));
@@ -311,14 +309,14 @@
BrushDefinition *BrushAttrItem::GetBrushDefinition()
{
BrushHandle Handle = GetBrushHandle();
- if(Handle != -1)
+ if(Handle != BrushHandle(-1))
{
// get the brush component
Document* pDoc = Document::GetCurrent();
ERROR2IF(pDoc == NULL, NULL, "Wheres the document?");
BrushComponent* pBrushComp = (BrushComponent*)pDoc->GetDocComponent(CC_RUNTIME_CLASS(BrushComponent));
ERROR2IF(pBrushComp == NULL, NULL, "No brush component");
- return pBrushComp->FindDefinition(Handle);
+ return (BrushDefinition *)(pBrushComp->FindDefinition(Handle));
}
return NULL;
Index: Trunk/XaraLX/Kernel/sgstroke.cpp
===================================================================
--- Trunk/XaraLX/Kernel/sgstroke.cpp (revision 1227)
+++ Trunk/XaraLX/Kernel/sgstroke.cpp (revision 1228)
@@ -430,7 +430,7 @@
StrokeDefinition *StrokeTypeItem::GetStrokeDefinition()
{
StrokeHandle Handle = GetStrokeHandle();
- if(Handle != -1)
+ if(Handle != StrokeHandle(-1))
return StrokeComponent::FindStroke(Handle);
return NULL;
Index: Trunk/XaraLX/Kernel/sginit.cpp
===================================================================
--- Trunk/XaraLX/Kernel/sginit.cpp (revision 1227)
+++ Trunk/XaraLX/Kernel/sginit.cpp (revision 1228)
@@ -95,7 +95,7 @@
=================================XARAHEADEREND============================
*/
-// sginit.cpp - Centralised initialisation for galleries
+// init.cpp - Centralised initialisation for galleries
#include "camtypes.h"
#include "sginit.h"
@@ -176,9 +176,7 @@
LayerNameDlg::Init() &&
LayerPropertyTabsDlg::Init() &&
-#ifndef EXCLUDE_FROM_XARALX
OpDisplayLineGallery::Init() &&
-#endif // EXCLUDE_FROM_XARALX
#ifdef _DEBUG // For now name gallery only on debug builds
OpDisplayNameGallery::Init() &&
#endif
@@ -187,8 +185,8 @@
#ifndef EXCLUDE_FROM_XARALX
#ifdef VECTOR_STROKING
SGalleryLinePropertiesDlg::Init() &&
-#endif // VECTOR_STROKING
-#endif
+#endif // VECTOR_STROKING
+#endif
ColourSGallery::Init() &&
OpDisplayColourGallery::Init() &&
ColourNameDlg::Init() &&
Index: Trunk/XaraLX/Scripts/barconverter
===================================================================
--- Trunk/XaraLX/Scripts/barconverter (revision 1227)
+++ Trunk/XaraLX/Scripts/barconverter (revision 1228)
@@ -571,7 +571,7 @@
my $name = shift @_;
my $optoken = shift @_;
# print ">>> $name $optoken <<<
";
- if ($name =~ /^(IDCB_ZOOM_COMBO_BOX|IDCB_LINEWIDTH_COMBO_BOX|IDC_EDIT_REGSHAPETOOL_POS|IDC_EDIT_REGSHAPETOOL_SIDES|IDC_GEOMETRY|IDC_MAPPING|IDC_EFFECT|IDC_BITMAPEFFECT|IDC_TRANSPTYPE|IDC_MAPPING|IDC_BITMAPEFFECT|IDC_BRUSHTYPE|IDC_STROKETYPE|IDC_EFFECT|IDC_BEVEL_TYPE_COMBO|IDC_BEVEL_SLIDER_COMBO|IDC_FONT_COMBO|IDC_POINT_COMBO|IDC_NAMEGAL_PROP_IDX)$/)
+ if ($name =~ /^(IDCB_ZOOM_COMBO_BOX|IDCB_LINEWIDTH_COMBO_BOX|IDC_EDIT_REGSHAPETOOL_POS|IDC_EDIT_REGSHAPETOOL_SIDES|IDC_GEOMETRY|IDC_MAPPING|IDC_EFFECT|IDC_BITMAPEFFECT|IDC_TRANSPTYPE|IDC_MAPPING|IDC_BITMAPEFFECT|IDC_BRUSHTYPE|IDC_STROKETYPE|IDC_EFFECT|IDC_BEVEL_TYPE_COMBO|IDC_BEVEL_SLIDER_COMBO|IDC_FONT_COMBO|IDC_POINT_COMBO|IDC_NAMEGAL_PROP_IDX|IDLB_JOINTYPE_LIST_BOX|IDLB_LINECAP_LIST_BOX)$/)
{
WriteCombo($name,$optoken);
}
Index: Trunk/XaraLX/wxOil/Makefile.am
===================================================================
--- Trunk/XaraLX/wxOil/Makefile.am (revision 1227)
+++ Trunk/XaraLX/wxOil/Makefile.am (revision 1228)
@@ -32,7 +32,7 @@
outptdib.cpp outptpng.cpp outptgif.cpp gpalopt.cpp bmpfiltr.cpp giffiltr.cpp \
fontbase.cpp ftfonts.cpp textfuns.cpp dragbmp.cpp xpoilflt.cpp xmlutils.cpp \
camprocess.cpp dropdown.cpp coldrop.cpp fontdrop.cpp bfxalu.cpp bfxpixop.cpp \
- binreloc.c exceptio.cpp colpick.cpp dragpick.cpp \
+ binreloc.c exceptio.cpp colpick.cpp dragpick.cpp sgldrag.cpp \
resources.cpp
# Keep resources.cpp on a separate line as it is odd
Index: Trunk/XaraLX/wxOil/sgldrag.cpp
===================================================================
--- Trunk/XaraLX/wxOil/sgldrag.cpp (revision 1227)
+++ Trunk/XaraLX/wxOil/sgldrag.cpp (revision 1228)
@@ -106,7 +106,6 @@
//#include "resource.h"
#include "docview.h"
-#include "scrcamvw.h"
#include "spread.h"
#include "attrmgr.h"
#include "grndbmp.h"
@@ -201,6 +200,8 @@
// Call a subroutine to work out and set our current cursor shape
return(DetermineCursorShape((SuperGallery *) TargetDialog,
DraggedNode, pMousePos));
+ default:
+ break;
}
}
@@ -361,6 +362,8 @@
case NO_TARGET:
return _R(IDC_CANDROPONPAGE);
+ default:
+ break;
};
return _R(IDC_CANDROPONPAGE);
@@ -434,6 +437,8 @@
case NO_TARGET:
DragString += String_64(_R(IDS_SGLDRAG_DROP_CURRENT_ATTRIBUTE)); // "Drop to set the Current Attribute";
break;
+ default:
+ break;
};
*TheText = DragString;
@@ -540,6 +545,8 @@
KernelBitmap* GalleryLineDragInfo::GetSolidDragMask()
{
+PORTNOTE("other", "Disabled line gallery drag code")
+#ifndef EXCLUDE_FROM_XARALX
if (DragMask == NULL)
{
DocView *View = DocView::GetCurrent();
@@ -584,6 +591,9 @@
}
return DragMask;
+#else
+ return NULL;
+#endif
}
/********************************************************************************************
@@ -598,8 +608,10 @@
********************************************************************************************/
-BOOL OnDrawSolidDrag(wxPoint Origin, wxDC * TheDC, DragTarget* pDragTarget)
+BOOL GalleryLineDragInfo::OnDrawSolidDrag(wxPoint Origin, wxDC * TheDC, DragTarget* pDragTarget)
{
+PORTNOTE("other", "Disabled line gallery drag code")
+#ifndef EXCLUDE_FROM_XARALX
if (TheBitmap == NULL)
{
DocView *View = DocView::GetCurrent();
@@ -645,9 +657,9 @@
delete pRegion;
}
-
+#endif
// Call base class to do the actual drawing
- return BitmapDragInformation::OnDrawSolidDrag(Origin, TheDC);
+ return BitmapDragInformation::OnDrawSolidDrag(Origin, TheDC, pDragTarget);
}
/********************************************************************************************
Index: Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc (revision 1227)
+++ Trunk/XaraLX/wxOil/xrc/EN/xaralx-bars.xrc (revision 1228)
@@ -2394,9 +2394,14 @@
</object>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
- <border>1</border>
- <object class="wxCamArtControl" name="IDLB_JOINTYPE_LIST_BOX">
- <camartstyle>wxCACS_PUSHBUTTON|wxCACS_ALLOWHOVER</camartstyle>
+ <border>0</border>
+ <object class="wxOwnerDrawnComboBox" name="IDLB_JOINTYPE_LIST_BOX">
+ <size>80,-1</size>
+ <font>
+ <size>8</size>
+ </font>
+ <style>wxCB_DROPDOWN</style>
+ <buttonsize>17,-1</buttonsize>
<optoken>ChangeLineJoin</optoken>
</object>
</object>
@@ -2407,9 +2412,14 @@
</object>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
- <border>1</border>
- <object class="wxCamArtControl" name="IDLB_LINECAP_LIST_BOX">
- <camartstyle>wxCACS_PUSHBUTTON|wxCACS_ALLOWHOVER</camartstyle>
+ <border>0</border>
+ <object class="wxOwnerDrawnComboBox" name="IDLB_LINECAP_LIST_BOX">
+ <size>80,-1</size>
+ <font>
+ <size>8</size>
+ </font>
+ <style>wxCB_DROPDOWN</style>
+ <buttonsize>17,-1</buttonsize>
<optoken>ChangeLineCap</optoken>
</object>
</object>
Xara