[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1412
Date : Wed Jul 5 20:53:50 BST 2006
Changed paths:
M /Trunk/XaraLX/wxOil/bitmapdropdown.cpp
M /Trunk/XaraLX/wxOil/camelot.cpp
M /Trunk/XaraLX/wxOil/dlgevt.cpp
M /Trunk/XaraLX/wxOil/dlgmgr.cpp
M /Trunk/XaraLX/wxOil/dropdown.cpp
M /Trunk/XaraLX/wxOil/filedlgs.cpp
M /Trunk/XaraLX/wxOil/osrndrgn.cpp
M /Trunk/XaraLX/wxOil/prdlgctl.cpp
M /Trunk/XaraLX/wxOil/stdwx.h
M /Trunk/XaraLX/wxXtra/combo.cpp
M /Trunk/XaraLX/wxXtra/combo.h
M /Trunk/XaraLX/wxXtra/combog.cpp
M /Trunk/XaraLX/wxXtra/combog.h
M /Trunk/XaraLX/wxXtra/cwfrompoint.cpp
M /Trunk/XaraLX/wxXtra/dockart.h
M /Trunk/XaraLX/wxXtra/floatpane.h
M /Trunk/XaraLX/wxXtra/framemanager.h
M /Trunk/XaraLX/wxXtra/odcombo.cpp
M /Trunk/XaraLX/wxXtra/odcombo.h
Fix compilation on wxWidgets 2.7. It doesn't run yet.
Diff:
Index: Trunk/XaraLX/wxXtra/combo.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/combo.cpp (revision 1411)
+++ Trunk/XaraLX/wxXtra/combo.cpp (revision 1412)
@@ -25,7 +25,7 @@
#include <wx/wx.h>
#include "combo.h"
-#if wxXTRA_COMBOCONTROL
+#if wxXTRA_COMBOCTRL
#include <wx/renderer.h>
#include <wx/tooltip.h>
Index: Trunk/XaraLX/wxXtra/combo.h
===================================================================
--- Trunk/XaraLX/wxXtra/combo.h (revision 1411)
+++ Trunk/XaraLX/wxXtra/combo.h (revision 1412)
@@ -19,6 +19,12 @@
#include <wx/wx.h>
+#if wxUSE_COMBOCTRL
+#undef wxXTRA_COMBOCTRL
+#include <wx/combo.h>
+#else
+#define wxXTRA_COMBOCTRL 1
+
/*
A few words about all the classes defined in this file are probably in
order: why do we need extra wxComboControl and wxComboPopup classes?
@@ -43,11 +49,6 @@
instead it is just a mix-in.
*/
-#if wxUSE_COMBOCONTROL
-#undef wxXTRA_COMBOCONTROL
-#else
-#define wxXTRA_COMBOCONTROL 1
-
class WXDLLEXPORT wxComboPopup;
//
Index: Trunk/XaraLX/wxXtra/combog.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/combog.cpp (revision 1411)
+++ Trunk/XaraLX/wxXtra/combog.cpp (revision 1412)
@@ -24,7 +24,7 @@
#include "combog.h"
-#if wxXTRA_COMBOCONTROL
+#if wxXTRA_COMBOCTRL
#include <wx/dcbuffer.h>
Index: Trunk/XaraLX/wxXtra/cwfrompoint.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/cwfrompoint.cpp (revision 1411)
+++ Trunk/XaraLX/wxXtra/cwfrompoint.cpp (revision 1412)
@@ -8,6 +8,8 @@
#include "cwfrompoint.h"
+#include <wx/notebook.h>
+
// wxChildWindowFromPoint
//
// This is a routine derived from wxFindWindowAtPoint (the unexported variant thereof).
Index: Trunk/XaraLX/wxXtra/combog.h
===================================================================
--- Trunk/XaraLX/wxXtra/combog.h (revision 1411)
+++ Trunk/XaraLX/wxXtra/combog.h (revision 1412)
@@ -18,12 +18,13 @@
#define _WXXTRA_GENERIC_COMBOCONTROL_H_
#include <wx/wx.h>
-#include "wx/xrc/xmlres.h"
+#include <wx/xrc/xmlres.h>
-#if wxUSE_COMBOCONTROL
-#undef wxXTRA_COMBOCONTROL
+#if wxUSE_COMBOCTRL
+#undef wxXTRA_COMBOCTRL
#else
-#define wxXTRA_COMBOCONTROL 1
+#define wxXTRA_COMBOCTRL 1
+#define wxComboCtrl wxComboControl
#include "combo.h"
Index: Trunk/XaraLX/wxXtra/floatpane.h
===================================================================
--- Trunk/XaraLX/wxXtra/floatpane.h (revision 1411)
+++ Trunk/XaraLX/wxXtra/floatpane.h (revision 1412)
@@ -20,6 +20,7 @@
#if wxUSE_AUI
#undef wxXTRA_AUI
+#include <wx/aui/floatpane.h>
#else
#define wxXTRA_AUI 1
Index: Trunk/XaraLX/wxXtra/odcombo.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/odcombo.cpp (revision 1411)
+++ Trunk/XaraLX/wxXtra/odcombo.cpp (revision 1412)
@@ -26,7 +26,7 @@
#include "odcombo.h"
// Only compile stuff if this is not already in WX
-#if wxXTRA_OWNERDRAWNCOMBOBOX
+#if wxXTRA_ODCOMBOBOX
#include <wx/renderer.h>
@@ -101,7 +101,7 @@
m_combo->DrawFocusBackground(dc,rect,0);
if ( m_value >= 0 )
{
- OnDrawItem(dc,rect,m_value,wxCP_PAINTING_CONTROL);
+ OnDrawItem(dc,rect,m_value,wxODCB_PAINTING_CONTROL);
return;
}
}
@@ -152,7 +152,7 @@
// This is called from wxVListBoxComboPopup::OnDrawItem, with text colour and font prepared
void wxVListBoxComboPopup::OnDrawItem( wxDC& dc, const wxRect& rect, int item, int flags ) const
{
- if ( flags & wxCP_PAINTING_CONTROL )
+ if ( flags & wxODCB_PAINTING_CONTROL )
{
dc.DrawText( m_combo->GetValue(),
rect.x + m_combo->GetTextIndent(),
Index: Trunk/XaraLX/wxXtra/odcombo.h
===================================================================
--- Trunk/XaraLX/wxXtra/odcombo.h (revision 1411)
+++ Trunk/XaraLX/wxXtra/odcombo.h (revision 1412)
@@ -19,10 +19,11 @@
#include <wx/wx.h>
-#if wxUSE_OWNERDRAWNCOMBOBOX
-#undef wxXTRA_OWNERDRAWNCOMBOBOX
+#if wxUSE_ODCOMBOBOX
+#undef wxXTRA_ODCOMBOBOX
+#include <wx/odcombo.h>
#else
-#define wxXTRA_OWNERDRAWNCOMBOBOX 1
+#define wxXTRA_ODCOMBOBOX 1
#include <wx/ctrlsub.h>
#include <wx/vlbox.h>
@@ -50,7 +51,7 @@
{
// when set, we are painting the selected item in control,
// not in the popup
- wxCP_PAINTING_CONTROL = 0x0001
+ wxODCB_PAINTING_CONTROL = 0x0001
};
Index: Trunk/XaraLX/wxXtra/framemanager.h
===================================================================
--- Trunk/XaraLX/wxXtra/framemanager.h (revision 1411)
+++ Trunk/XaraLX/wxXtra/framemanager.h (revision 1412)
@@ -20,6 +20,7 @@
#if wxUSE_AUI
#undef wxXTRA_AUI
+#include <wx/aui/framemanager.h>
#else
#define wxXTRA_AUI 1
Index: Trunk/XaraLX/wxXtra/dockart.h
===================================================================
--- Trunk/XaraLX/wxXtra/dockart.h (revision 1411)
+++ Trunk/XaraLX/wxXtra/dockart.h (revision 1412)
@@ -22,6 +22,7 @@
#if wxUSE_AUI
#undef wxXTRA_AUI
+#include <wx/aui/dockart.h>
#else
#define wxXTRA_AUI 1
Index: Trunk/XaraLX/wxOil/dlgevt.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgevt.cpp (revision 1411)
+++ Trunk/XaraLX/wxOil/dlgevt.cpp (revision 1412)
@@ -572,7 +572,7 @@
if( pWnd->IsKindOf( CLASSINFO(wxTextCtrl) ) ||
pWnd->IsKindOf( CLASSINFO(wxComboBox) ) ||
pWnd->IsKindOf( CLASSINFO(wxOwnerDrawnComboBox) ) ||
- pWnd->IsKindOf( CLASSINFO(wxComboControl) ) )
+ pWnd->IsKindOf( CLASSINFO(wxComboCtrl) ) )
{
return;
}
@@ -829,7 +829,7 @@
HASHEVENTNAME(wxEVT_END_SESSION);
HASHEVENTNAME(wxEVT_QUERY_END_SESSION);
HASHEVENTNAME(wxEVT_ACTIVATE_APP);
- HASHEVENTNAME(wxEVT_POWER);
+// HASHEVENTNAME(wxEVT_POWER);
HASHEVENTNAME(wxEVT_ACTIVATE);
HASHEVENTNAME(wxEVT_CREATE);
HASHEVENTNAME(wxEVT_DESTROY);
Index: Trunk/XaraLX/wxOil/bitmapdropdown.cpp
===================================================================
--- Trunk/XaraLX/wxOil/bitmapdropdown.cpp (revision 1411)
+++ Trunk/XaraLX/wxOil/bitmapdropdown.cpp (revision 1412)
@@ -198,7 +198,7 @@
// m_combo->DrawFocusBackground(dc,rect,0);
// Draw the control regardless whether it has an item selected or not.
- OnDrawItem(dc, rect, m_value, wxCP_PAINTING_CONTROL);
+ OnDrawItem(dc, rect, m_value, wxODCB_PAINTING_CONTROL);
return;
}
@@ -256,8 +256,14 @@
height = 50;
// Take scrollbar into account in width calculations
+#if wxCHECK_VERSION(2,7,0)
+ // Oh dear, someone made the member private
+PORTNOTE("wx", "m_widestWidth not able to be read")
+ int iWidth = 50;
+#else
int iWidth = m_widestWidth;
- if (bNeedScrollbar)
+#endif
+ if (bNeedScrollbar)
iWidth += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
// int widestWidth = m_widestWidth + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
Index: Trunk/XaraLX/wxOil/prdlgctl.cpp
===================================================================
--- Trunk/XaraLX/wxOil/prdlgctl.cpp (revision 1411)
+++ Trunk/XaraLX/wxOil/prdlgctl.cpp (revision 1412)
@@ -2765,7 +2765,7 @@
//pPrgDlg->SetDocName(pDocument->GetTitle());
pPrgDlg->SetPrinterName(GetPrintData().GetPrinterName());
- pPrgDlg->SetPortName(GetPrintData().GetPrinterCommand());
+// pPrgDlg->SetPortName(GetPrintData().GetPrinterCommand());
pPrgDlg->SetSliderPos(0);
return TRUE;
Index: Trunk/XaraLX/wxOil/camelot.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camelot.cpp (revision 1411)
+++ Trunk/XaraLX/wxOil/camelot.cpp (revision 1412)
@@ -298,7 +298,7 @@
if( pClassInfo->IsKindOf( CLASSINFO(wxTextCtrl) ) ||
pClassInfo->IsKindOf( CLASSINFO(wxComboBox) ) ||
pClassInfo->IsKindOf( CLASSINFO(wxOwnerDrawnComboBox) ) ||
- pClassInfo->IsKindOf( CLASSINFO(wxComboControl) )
+ pClassInfo->IsKindOf( CLASSINFO(wxComboCtrl) )
)
{
TRACEUSER( "jlh92", _T("Control gets keys") );
Index: Trunk/XaraLX/wxOil/filedlgs.cpp
===================================================================
--- Trunk/XaraLX/wxOil/filedlgs.cpp (revision 1411)
+++ Trunk/XaraLX/wxOil/filedlgs.cpp (revision 1412)
@@ -2241,7 +2241,7 @@
********************************************************************************************/
OpenFileDialog::OpenFileDialog(LPCTSTR FilterString)
- : BaseFileDialog( TRUE, wxFILE_MUST_EXIST | wxHIDE_READONLY, FilterString )
+ : BaseFileDialog( TRUE, wxFILE_MUST_EXIST, FilterString )
{
// Set some defaults
NativeFilterPos = 0;
@@ -2549,7 +2549,7 @@
********************************************************************************************/
SaveFileDialog::SaveFileDialog(LPCTSTR FilterString, const String_256& DefPath, const String_256& DefName)
- : BaseFileDialog( FALSE, wxFILE_MUST_EXIST | wxHIDE_READONLY, FilterString )
+ : BaseFileDialog( FALSE, wxFILE_MUST_EXIST, FilterString )
// : BaseFileDialog(FALSE, OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, FilterString)
{
// Make a note of this lot
@@ -2589,7 +2589,7 @@
const String_256& DocumentName)
PORTNOTE("other", "Disabled template stuff" )
// : BaseFileDialog( FALSE, ((CCamApp::IsNewWindowsUI()) ? OFN_ENABLETEMPLATE : 0) | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, FilterString)
- : BaseFileDialog( FALSE, wxFILE_MUST_EXIST | wxHIDE_READONLY, FilterString )
+ : BaseFileDialog( FALSE, wxFILE_MUST_EXIST, FilterString )
{
// Make a note of this lot
DefaultName = DefName;
@@ -2998,7 +2998,7 @@
ImportFileDialog::ImportFileDialog(LPCTSTR lpszFilter)
// : BaseFileDialog(TRUE, ((CCamApp::IsNewWindowsUI()) ? OFN_ENABLETEMPLATE : 0) |
// OFN_FILEMUSTEXIST | OFN_HIDEREADONLY, lpszFilter, NULL)
- : BaseFileDialog( TRUE, wxFILE_MUST_EXIST | wxHIDE_READONLY, lpszFilter, NULL )
+ : BaseFileDialog( TRUE, wxFILE_MUST_EXIST, lpszFilter, NULL )
{
PORTNOTE("other", "Disabled template stuff" )
#if !defined(EXCLUDE_FROM_XARALX)
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp (revision 1411)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp (revision 1412)
@@ -461,7 +461,9 @@
// tool switch that deletes them deleting the window.
}
- wxString Title = pDialogWnd->GetTitle();
+ wxString Title = *wxEmptyString;
+ if (pDialogWnd->IsKindOf(CLASSINFO(wxDialog)))
+ Title=((wxDialog *)pDialogWnd)->GetTitle();
if (Title.IsEmpty()) Title = pDialogWnd->GetLabel(); // because wxPanel doesn't seem to support a title
if (Title.IsEmpty())
{
@@ -3033,7 +3035,7 @@
else
{
INT32 i;
- for (i=0; i<((wxListBox *)pGadget)->GetCount(); i++)
+ for (i=0; i<(INT32)((wxListBox *)pGadget)->GetCount(); i++)
{
if (SelectIt)
{
@@ -3137,10 +3139,10 @@
// it a go then..
INT32 i;
if (pGadget->IsKindOf(CLASSINFO(wxOwnerDrawnComboBox)))
- for (i=0; i<((wxOwnerDrawnComboBox *)pGadget)->GetCount(); i++)
+ for (i=0; i<(INT32)((wxOwnerDrawnComboBox *)pGadget)->GetCount(); i++)
((wxOwnerDrawnComboBox *)pGadget)->SetSelection(i);
else
- for (i=0; i<((wxControlWithItems *)pGadget)->GetCount(); i++)
+ for (i=0; i<(INT32)((wxControlWithItems *)pGadget)->GetCount(); i++)
((wxControlWithItems *)pGadget)->SetSelection(i);
}
else
@@ -4018,12 +4020,12 @@
{
if (pGadget->IsKindOf(CLASSINFO(wxOwnerDrawnComboBox)))
{
- if (ListPos>=((wxOwnerDrawnComboBox *)pGadget)->GetCount()) goto invalid;
+ if (ListPos>=(INT32)((wxOwnerDrawnComboBox *)pGadget)->GetCount()) goto invalid;
String = ((wxOwnerDrawnComboBox *)pGadget)->GetString(ListPos);
}
else
{
- if (ListPos>=((wxControlWithItems *)pGadget)->GetCount()) goto invalid;
+ if (ListPos>=(INT32)((wxControlWithItems *)pGadget)->GetCount()) goto invalid;
String = ((wxControlWithItems *)pGadget)->GetString(ListPos);
}
goto out;
@@ -6650,7 +6652,9 @@
// Just to be safe
ERROR1IF(pNewPage == NULL, FALSE, _R(IDS_OUT_OF_MEMORY));
- wxString Title = pNewPage->GetTitle();
+ wxString Title = *wxEmptyString;
+ if (pNewPage->IsKindOf(CLASSINFO(wxDialog)))
+ Title=((wxDialog *)pNewPage)->GetTitle();
if (Title.IsEmpty())
Title = pNewPage->GetLabel(); // because wxPanel doesn't seem to support a title
if( Title.IsEmpty() )
Index: Trunk/XaraLX/wxOil/dropdown.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dropdown.cpp (revision 1411)
+++ Trunk/XaraLX/wxOil/dropdown.cpp (revision 1412)
@@ -724,7 +724,7 @@
{
if (Draw)
{
- if ( (m_pPopup->wxVListBox::GetSelection() == (INT32)item) && !(flags & wxCP_PAINTING_CONTROL) )
+ if ( (m_pPopup->wxVListBox::GetSelection() == (INT32)item) && !(flags & wxODCB_PAINTING_CONTROL) )
dc.SetTextForeground( wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT) );
else
dc.SetTextForeground( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT) );
Index: Trunk/XaraLX/wxOil/osrndrgn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/osrndrgn.cpp (revision 1411)
+++ Trunk/XaraLX/wxOil/osrndrgn.cpp (revision 1412)
@@ -3461,7 +3461,7 @@
if (pwxImage)
{
- wxBitmap TheBitmap(pwxImage);
+ wxBitmap TheBitmap(*pwxImage);
RenderDC->DrawBitmap(TheBitmap, DestTopLeft.x, DestTopLeft.y, TRUE);
delete pwxImage;
}
Index: Trunk/XaraLX/wxOil/stdwx.h
===================================================================
--- Trunk/XaraLX/wxOil/stdwx.h (revision 1411)
+++ Trunk/XaraLX/wxOil/stdwx.h (revision 1412)
@@ -116,6 +116,7 @@
#include <wx/except.h>
#include <wx/fileconf.h>
#include <wx/file.h>
+#include <wx/filedlg.h>
#include <wx/filesys.h>
#include <wx/fontenum.h>
#include <wx/fs_mem.h>
Xara