More deprecated class mods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-03-31 10:24:36 +00:00
parent f2638c97a5
commit 7c9955d147
103 changed files with 466 additions and 11735 deletions

View File

@@ -202,10 +202,10 @@ WXDLLEXPORT extern bool wxResourceAddIdentifier(const wxString& name, int value,
WXDLLEXPORT extern int wxResourceGetIdentifier(const wxString& name, wxResourceTable *table = (wxResourceTable *) NULL);
// Used to be wxWindowBase::LoadFromResource
bool wxLoadFromResource(wxWindow* thisWindow, wxWindow *parent, const wxString& resourceName, const wxResourceTable *table);
bool wxLoadFromResource(wxWindow* thisWindow, wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = (const wxResourceTable *) NULL);
// Used to be wxWindowBase::CreateItem
wxControl *wxCreateItem(wxWindow* thisWindow, const wxItemResource *resource, const wxItemResource* parentResource, const wxResourceTable *table);
wxControl *wxCreateItem(wxWindow* thisWindow, const wxItemResource *resource, const wxItemResource* parentResource, const wxResourceTable *table = (const wxResourceTable *) NULL);
#if defined(__WXPM__)
#include "wx/os2/wxrsc.h"

View File

@@ -16,6 +16,12 @@
#pragma interface "ogldiag.h"
#endif
#include <wx/deprecated/setup.h>
#if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h>
#endif
#include <wx/ogl/basic.h>
class wxDiagram: public wxObject

View File

@@ -2,7 +2,11 @@ WXDIR = $(WXWIN)
PROGRAM = anitest
OBJECTS = $(PROGRAM).obj
EXTRALIBS = $(WXDIR)\lib\anim$(LIBEXT).lib
!if "$(FINAL)" == "0"
EXTRALIBS=$(WXDIR)\lib\animd.lib
!else
EXTRALIBS=$(WXDIR)\lib\anim.lib
!endif
EXTRAINC = -I$(WXDIR)\contrib\include
!include $(WXDIR)\src\makeprog.vc

View File

@@ -10,6 +10,9 @@ PROGRAM=proplist
OBJECTS =$(PROGRAM).o
DEPFILES=$(PROGRAM).d
APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_wxdeprecated-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
include ../../../../src/makeprog.env
@IF_GNU_MAKE@-include $(DEPFILES)

View File

@@ -4,6 +4,7 @@
WXDIR = $(WXWIN)
TARGET=proplist
EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -5,6 +5,8 @@ WXDIR = ../../../..
TARGET=proplist
OBJECTS = $(TARGET).o
EXTRAINC = -I$(WXDIR)/contrib/include
EXTRALIBS = -lwxdeprecated
include $(WXDIR)/src/makeprog.g95

View File

@@ -5,6 +5,12 @@
WXDIR = $(WXWIN)
PROGRAM=proplist
FINAL=0
!if "$(FINAL)" == "0"
EXTRALIBS=$(WXDIR)\lib\wxdeprecatedd.lib
!else
EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
!endif
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -24,9 +24,10 @@
#include "wx/wx.h"
#endif
#include "wx/deprecated/setup.h"
#if !wxUSE_PROPSHEET
#error Please set wxUSE_PROPSHEET to 1 in include/wx/msw/setup.h and recompile.
#error Please set wxUSE_PROPSHEET to 1 in contrib/include/wx/deprecated/setup.h and recompile.
#endif
#include "proplist.h"

View File

@@ -11,13 +11,16 @@
top_srcdir = @top_srcdir@/..
top_builddir = ../../../..
program_dir = samples/resource
program_dir = contrib/samples/deprecated/resource
PROGRAM=resource
OBJECTS =$(PROGRAM).o
DEPFILES=$(PROGRAM).d
APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_wxdeprecated-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
include ../../../../src/makeprog.env
@IF_GNU_MAKE@-include $(DEPFILES)

View File

@@ -10,6 +10,7 @@
WXDIR = $(WXWIN)
TARGET=resource
EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -11,6 +11,8 @@ WXDIR = ../../../..
TARGET=resource
OBJECTS = $(TARGET).o
EXTRAINC = -I$(WXDIR)/contrib/include
EXTRALIBS = -lwxdeprecated
include $(WXDIR)/src/makeprog.g95

View File

@@ -10,8 +10,13 @@
# Set WXDIR for your system
WXDIR = $(WXWIN)
FINAL=0
PROGRAM=resource
!if "$(FINAL)" == "0"
EXTRALIBS=$(WXDIR)\lib\wxdeprecatedd.lib
!else
EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
!endif
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -24,6 +24,8 @@
#include "wx/wx.h"
#endif
#include "wx/deprecated/setup.h"
#if !wxUSE_RESOURCES
#error "You should set wxUSE_RESOURCES to 1 to compile this sample"
#endif
@@ -32,7 +34,7 @@
// #error "This sample can't be compiled in Unicode mode."
#endif // wxUSE_UNICODE
#include "wx/resource.h"
#include "wx/deprecated/resource.h"
#include <ctype.h>
#include "resource.h"
@@ -184,7 +186,7 @@ void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) )
{
MyDialog *dialog = new MyDialog;
if (dialog->LoadFromResource(this, wxT("dialog1")))
if (wxLoadFromResource(dialog, this, wxT("dialog1")))
{
wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName(wxT("multitext3"), dialog);
if (text)

View File

@@ -3,7 +3,7 @@
top_srcdir = @top_srcdir@/..
top_builddir = ../../../..
program_dir = samples/treelay
program_dir = contrib/samples/deprecated/treelay
PROGRAM=treelay
@@ -12,4 +12,7 @@ DEPFILES=$(PROGRAM).d
include ../../../../src/makeprog.env
APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_wxdeprecated-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
@IF_GNU_MAKE@-include $(DEPFILES)

View File

@@ -4,6 +4,7 @@
WXDIR = $(WXWIN)
TARGET=treelay
EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -5,6 +5,8 @@ WXDIR = ../../../..
TARGET=treelay
OBJECTS = $(TARGET).o
EXTRAINC = -I$(WXDIR)/contrib/include
EXTRALIBS = -lwxdeprecated
include $(WXDIR)/src/makeprog.g95

View File

@@ -5,6 +5,12 @@
WXDIR = $(WXWIN)
PROGRAM=treelay
FINAL=0
!if "$(FINAL)" == "0"
EXTRALIBS=$(WXDIR)\lib\wxdeprecatedd.lib
!else
EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
!endif
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -20,7 +20,13 @@
#include "wx/wx.h"
#endif
#include "wx/treelay.h"
#include "wx/deprecated/setup.h"
#if !wxUSE_TREELAYOUT
#error Please set wxUSE_TREELAYOUT to 1 in contrib/include/wx/deprecated/setup.h and recompile.
#endif
#include "wx/deprecated/treelay.h"
#include "treelay.h"

View File

@@ -28,7 +28,6 @@
#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
#endif
#include <wx/wxexpr.h>
#include "ogledit.h"
#include "doc.h"
#include "view.h"

View File

@@ -19,8 +19,9 @@
#include <wx/docview.h>
#include <wx/cmdproc.h>
#include <wx/string.h>
#include <wx/wxexpr.h>
#include <wx/deprecated/setup.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/ogl/ogl.h>
#if wxUSE_STD_IOSTREAM

View File

@@ -18,9 +18,9 @@ PROGRAM=ogledit
FINAL=0
!if "$(FINAL)" == "0"
EXTRALIBS=$(WXDIR)\lib\ogld.lib
EXTRALIBS=$(WXDIR)\lib\ogld.lib $(WXDIR)\lib\wxdeprecatedd.lib
!else
EXTRALIBS=$(WXDIR)\lib\ogl.lib
EXTRALIBS=$(WXDIR)\lib\ogl.lib $(WXDIR)\lib\wxdeprecated.lib
!endif
OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj

View File

@@ -24,7 +24,9 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/setup.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/clipbrd.h>
#ifdef __WXMSW__

View File

@@ -24,7 +24,8 @@
#include <wx/wx.h>
#endif
#include <wx/resource.h>
#include <wx/deprecated/setup.h>
#include <wx/deprecated/resource.h>
#include "dialogs.h"
#include "doc.h"
#include "view.h"
@@ -39,7 +40,7 @@ END_EVENT_TABLE()
csLabelEditingDialog::csLabelEditingDialog(wxWindow* parent)
{
LoadFromResource(parent, "shape_label_dialog");
wxLoadFromResource(this, parent, "shape_label_dialog");
// Accelerators
wxAcceleratorEntry entries[1];
@@ -99,13 +100,13 @@ csSettingsDialog::csSettingsDialog(wxWindow* parent):
m_generalSettings = new wxPanel;
bool success = m_generalSettings->LoadFromResource(m_notebook, "general_settings_dialog");
bool success = wxLoadFromResource(m_generalSettings, m_notebook, "general_settings_dialog");
wxASSERT_MSG( (success), "Could not load general settings panel.");
m_notebook->AddPage(m_generalSettings, "General", TRUE);
m_diagramSettings = new wxPanel;
success = m_diagramSettings->LoadFromResource(m_notebook, "diagram_settings_dialog");
success = wxLoadFromResource(m_diagramSettings, m_notebook, "diagram_settings_dialog");
wxASSERT_MSG( (success), "Could not load diagram settings panel.");
m_notebook->AddPage(m_diagramSettings, "Diagram");
@@ -258,11 +259,11 @@ csShapePropertiesDialog::csShapePropertiesDialog(wxWindow* parent, const wxStrin
wxPoint(2, 2), wxSize(SHAPE_PROPERTY_DIALOG_WIDTH - 4, SHAPE_PROPERTY_DIALOG_HEIGHT - 4));
m_generalPropertiesDialog = new csGeneralShapePropertiesDialog;
bool success = m_generalPropertiesDialog->LoadFromResource(m_notebook, "general_shape_properties_dialog");
bool success = wxLoadFromResource(m_generalPropertiesDialog, m_notebook, "general_shape_properties_dialog");
wxASSERT_MSG( (success), "Could not load general properties panel.");
m_notebook->AddPage(m_generalPropertiesDialog, "General");
success = m_attributeDialog->LoadFromResource(m_notebook, attributeDialogName);
success = wxLoadFromResource(m_attributeDialog, m_notebook, attributeDialogName);
if (!success)
{
wxMessageBox("Could not load the attribute dialog for this shape.", "Studio", wxICON_EXCLAMATION);
@@ -278,7 +279,7 @@ csShapePropertiesDialog::csShapePropertiesDialog(wxWindow* parent, const wxStrin
wxString str(attributeDialogName);
str += "1";
m_alternativeAttributeDialog = new wxPanel;
success = m_alternativeAttributeDialog->LoadFromResource(m_notebook, str);
success = wxLoadFromResource(m_alternativeAttributeDialog, m_notebook, str);
if (success)
{
m_notebook->AddPage(m_alternativeAttributeDialog, "Attributes (alternative)");

View File

@@ -24,8 +24,6 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include "studio.h"
#include "doc.h"
#include "view.h"

View File

@@ -19,7 +19,9 @@
#include <wx/docview.h>
#include <wx/cmdproc.h>
#include <wx/string.h>
#include <wx/wxexpr.h>
#include <wx/deprecated/setup.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/ogl/ogl.h>
#include "shapes.h"

View File

@@ -18,9 +18,9 @@ PROGRAM=studio
FINAL=0
!if "$(FINAL)" == "0"
EXTRALIBS=$(WXDIR)\lib\ogld.lib
EXTRALIBS=$(WXDIR)\lib\ogld.lib $(WXDIR)\lib\wxdeprecatedd.lib
!else
EXTRALIBS=$(WXDIR)\lib\ogl.lib
EXTRALIBS=$(WXDIR)\lib\ogl.lib $(WXDIR)\lib\wxdeprecated.lib
!endif
OBJECTS = $(PROGRAM).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\

View File

@@ -28,7 +28,8 @@
#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/setup.h>
#include <wx/deprecated/wxexpr.h>
#include "studio.h"
#include "doc.h"

View File

@@ -18,7 +18,8 @@
#include <wx/docview.h>
#include <wx/string.h>
#include <wx/wxexpr.h>
#include <wx/deprecated/setup.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/ogl/ogl.h>
#include <wx/ogl/basicp.h>

View File

@@ -21,7 +21,8 @@
#include "wx/mdi.h"
#endif
#include "wx/resource.h"
#include <wx/deprecated/setup.h>
#include <wx/deprecated/resource.h>
#include "wx/config.h"
#include "wx/laywin.h"

View File

@@ -24,7 +24,8 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/setup.h>
#include <wx/deprecated/wxexpr.h>
#include "studio.h"
#include "doc.h"

View File

@@ -4,7 +4,7 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/deprecated
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_deprecated-@WX_RELEASE@
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_wxdeprecated-@WX_RELEASE@
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
@@ -15,7 +15,7 @@ HEADER_SUBDIR=deprecated
HEADERS=prop.h propform.h proplist.h resource.h treelay.h wxexpr.h treelay.h
OBJECTS=prop.o propform.o proplist.o wxexpr.o parser.o treelay.cpp
OBJECTS=prop.o propform.o proplist.o wxexpr.o parser.o resource.o treelay.o
DEPFILES=$(OBJECTS:.o=.d)
APPEXTRADEFS=-I$(top_srcdir)/contrib/include

View File

@@ -11,7 +11,7 @@ WXDIR = $(WXWIN)
LIBTARGET=$(WXDIR)\lib\wxdeprecated.lib
OBJECTS = prop.obj propform.obj proplist.obj y_tab.obj resource.obj treelay.obj
OBJECTS = prop.obj propform.obj proplist.obj y_tab.obj wxexpr.obj resource.obj treelay.obj
!include $(WXDIR)\src\makelib.b32

View File

@@ -10,7 +10,7 @@
WXDIR = ../../..
LIBTARGET=$(WXDIR)/lib/libwxdeprecated.a
OBJECTS = prop.o propform.o proplist.o y_tab.o resource.o treelay.o
OBJECTS = prop.o propform.o proplist.o y_tab.o wxexpr.o resource.o treelay.o
include $(WXDIR)/src/makelib.g95

View File

@@ -32,7 +32,7 @@ LIBEXT=d
LIBTARGET=$(WXDIR)\lib\wxdeprecated$(LIBEXT).lib
EXTRATARGETS=$(D)
OBJECTS=$(D)\prop.obj $(D)\propform.obj $(D)\proplist.obj $(D)\y_tab.obj $(D)\resource.obj $(D)\treelay.obj
OBJECTS=$(D)\prop.obj $(D)\propform.obj $(D)\proplist.obj $(D)\y_tab.obj $(D)\wxexpr.obj $(D)\resource.obj $(D)\treelay.obj
!include $(WXDIR)\src\makelib.vc

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#ifdef new
#undef new
@@ -2040,9 +2040,9 @@ void wxShape::ReadAttributes(wxExpr *clause)
wxExpr *pointExpr = attachmentList->GetFirst();
while (pointExpr)
{
wxExpr *idExpr = pointExpr->Item(0);
wxExpr *xExpr = pointExpr->Item(1);
wxExpr *yExpr = pointExpr->Item(2);
wxExpr *idExpr = pointExpr->Nth(0);
wxExpr *xExpr = pointExpr->Nth(1);
wxExpr *yExpr = pointExpr->Nth(2);
if (idExpr && xExpr && yExpr)
{
wxAttachmentPoint *point = new wxAttachmentPoint;
@@ -2104,24 +2104,24 @@ void wxShape::ReadRegions(wxExpr *clause)
if (regionExpr->Type() == wxExprList)
{
wxExpr *nameExpr = regionExpr->Item(0);
wxExpr *textExpr = regionExpr->Item(1);
wxExpr *xExpr = regionExpr->Item(2);
wxExpr *yExpr = regionExpr->Item(3);
wxExpr *widthExpr = regionExpr->Item(4);
wxExpr *heightExpr = regionExpr->Item(5);
wxExpr *minWidthExpr = regionExpr->Item(6);
wxExpr *minHeightExpr = regionExpr->Item(7);
wxExpr *propXExpr = regionExpr->Item(8);
wxExpr *propYExpr = regionExpr->Item(9);
wxExpr *formatExpr = regionExpr->Item(10);
wxExpr *sizeExpr = regionExpr->Item(11);
wxExpr *familyExpr = regionExpr->Item(12);
wxExpr *styleExpr = regionExpr->Item(13);
wxExpr *weightExpr = regionExpr->Item(14);
wxExpr *colourExpr = regionExpr->Item(15);
wxExpr *penColourExpr = regionExpr->Item(16);
wxExpr *penStyleExpr = regionExpr->Item(17);
wxExpr *nameExpr = regionExpr->Nth(0);
wxExpr *textExpr = regionExpr->Nth(1);
wxExpr *xExpr = regionExpr->Nth(2);
wxExpr *yExpr = regionExpr->Nth(3);
wxExpr *widthExpr = regionExpr->Nth(4);
wxExpr *heightExpr = regionExpr->Nth(5);
wxExpr *minWidthExpr = regionExpr->Nth(6);
wxExpr *minHeightExpr = regionExpr->Nth(7);
wxExpr *propXExpr = regionExpr->Nth(8);
wxExpr *propYExpr = regionExpr->Nth(9);
wxExpr *formatExpr = regionExpr->Nth(10);
wxExpr *sizeExpr = regionExpr->Nth(11);
wxExpr *familyExpr = regionExpr->Nth(12);
wxExpr *styleExpr = regionExpr->Nth(13);
wxExpr *weightExpr = regionExpr->Nth(14);
wxExpr *colourExpr = regionExpr->Nth(15);
wxExpr *penColourExpr = regionExpr->Nth(16);
wxExpr *penStyleExpr = regionExpr->Nth(17);
regionName = nameExpr->StringValue();
regionText = textExpr->StringValue();

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#ifdef new
#undef new

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/ogl/basic.h>
#include <wx/ogl/basicp.h>

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#ifdef new
#undef new

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/ogl/basic.h>
#include <wx/ogl/basicp.h>
@@ -706,13 +706,13 @@ void wxCompositeShape::ReadConstraints(wxExpr *clause, wxExprDatabase *database)
// Each constraint is stored in the form
// (type name id xspacing yspacing m_constrainingObjectId constrainedObjectIdList)
wxExpr *typeExpr = constraintExpr->Item(0);
wxExpr *nameExpr = constraintExpr->Item(1);
wxExpr *idExpr = constraintExpr->Item(2);
wxExpr *xExpr = constraintExpr->Item(3);
wxExpr *yExpr = constraintExpr->Item(4);
wxExpr *constrainingExpr = constraintExpr->Item(5);
wxExpr *constrainedExpr = constraintExpr->Item(6);
wxExpr *typeExpr = constraintExpr->Nth(0);
wxExpr *nameExpr = constraintExpr->Nth(1);
wxExpr *idExpr = constraintExpr->Nth(2);
wxExpr *xExpr = constraintExpr->Nth(3);
wxExpr *yExpr = constraintExpr->Nth(4);
wxExpr *constrainingExpr = constraintExpr->Nth(5);
wxExpr *constrainedExpr = constraintExpr->Nth(6);
cType = (int)typeExpr->IntegerValue();
cXSpacing = xExpr->RealValue();
@@ -727,7 +727,7 @@ void wxCompositeShape::ReadConstraints(wxExpr *clause, wxExprDatabase *database)
wxLogFatalError(wxT("Object graphics error: Couldn't find constraining image of composite."));
int i = 0;
wxExpr *currentIdExpr = constrainedExpr->Item(i);
wxExpr *currentIdExpr = constrainedExpr->Nth(i);
while (currentIdExpr)
{
long currentId = currentIdExpr->IntegerValue();
@@ -742,7 +742,7 @@ void wxCompositeShape::ReadConstraints(wxExpr *clause, wxExprDatabase *database)
}
i ++;
currentIdExpr = constrainedExpr->Item(i);
currentIdExpr = constrainedExpr->Nth(i);
}
wxOGLConstraint *newConstraint = AddConstraint(cType, m_constrainingObject, m_constrainedObjects);
newConstraint->SetSpacing(cXSpacing, cYSpacing);

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/ogl/basic.h>
#include <wx/ogl/constrnt.h>

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/ogl/basic.h>
#include <wx/ogl/basicp.h>

View File

@@ -25,7 +25,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/ogl/basic.h>
#include <wx/ogl/basicp.h>
@@ -563,20 +563,20 @@ void wxOpSetGDI::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
case DRAWOP_SET_BRUSH:
case DRAWOP_SET_FONT:
{
m_gdiIndex = (int)expr->Item(1)->IntegerValue();
m_gdiIndex = (int)expr->Nth(1)->IntegerValue();
break;
}
case DRAWOP_SET_TEXT_COLOUR:
case DRAWOP_SET_BK_COLOUR:
{
m_r = (unsigned char)expr->Item(1)->IntegerValue();
m_g = (unsigned char)expr->Item(2)->IntegerValue();
m_b = (unsigned char)expr->Item(3)->IntegerValue();
m_r = (unsigned char)expr->Nth(1)->IntegerValue();
m_g = (unsigned char)expr->Nth(2)->IntegerValue();
m_b = (unsigned char)expr->Nth(3)->IntegerValue();
break;
}
case DRAWOP_SET_BK_MODE:
{
m_mode = (int)expr->Item(1)->IntegerValue();
m_mode = (int)expr->Nth(1)->IntegerValue();
break;
}
default:
@@ -665,10 +665,10 @@ void wxOpSetClipping::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
{
case DRAWOP_SET_CLIPPING_RECT:
{
m_x1 = expr->Item(1)->RealValue();
m_y1 = expr->Item(2)->RealValue();
m_x2 = expr->Item(3)->RealValue();
m_y2 = expr->Item(4)->RealValue();
m_x1 = expr->Nth(1)->RealValue();
m_y1 = expr->Nth(2)->RealValue();
m_x2 = expr->Nth(3)->RealValue();
m_y2 = expr->Nth(4)->RealValue();
break;
}
default:
@@ -950,44 +950,44 @@ void wxOpDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
case DRAWOP_DRAW_RECT:
case DRAWOP_DRAW_ELLIPSE:
{
m_x1 = expr->Item(1)->RealValue();
m_y1 = expr->Item(2)->RealValue();
m_x2 = expr->Item(3)->RealValue();
m_y2 = expr->Item(4)->RealValue();
m_x1 = expr->Nth(1)->RealValue();
m_y1 = expr->Nth(2)->RealValue();
m_x2 = expr->Nth(3)->RealValue();
m_y2 = expr->Nth(4)->RealValue();
break;
}
case DRAWOP_DRAW_ROUNDED_RECT:
{
m_x1 = expr->Item(1)->RealValue();
m_y1 = expr->Item(2)->RealValue();
m_x2 = expr->Item(3)->RealValue();
m_y2 = expr->Item(4)->RealValue();
m_radius = expr->Item(5)->RealValue();
m_x1 = expr->Nth(1)->RealValue();
m_y1 = expr->Nth(2)->RealValue();
m_x2 = expr->Nth(3)->RealValue();
m_y2 = expr->Nth(4)->RealValue();
m_radius = expr->Nth(5)->RealValue();
break;
}
case DRAWOP_DRAW_POINT:
{
m_x1 = expr->Item(1)->RealValue();
m_y1 = expr->Item(2)->RealValue();
m_x1 = expr->Nth(1)->RealValue();
m_y1 = expr->Nth(2)->RealValue();
break;
}
case DRAWOP_DRAW_TEXT:
{
m_x1 = expr->Item(1)->RealValue();
m_y1 = expr->Item(2)->RealValue();
wxString str(expr->Item(3)->StringValue());
m_x1 = expr->Nth(1)->RealValue();
m_y1 = expr->Nth(2)->RealValue();
wxString str(expr->Nth(3)->StringValue());
m_textString = copystring(str);
break;
}
case DRAWOP_DRAW_ARC:
case DRAWOP_DRAW_ELLIPTIC_ARC:
{
m_x1 = expr->Item(1)->RealValue();
m_y1 = expr->Item(2)->RealValue();
m_x2 = expr->Item(3)->RealValue();
m_y2 = expr->Item(4)->RealValue();
m_x3 = expr->Item(5)->RealValue();
m_y3 = expr->Item(6)->RealValue();
m_x1 = expr->Nth(1)->RealValue();
m_y1 = expr->Nth(2)->RealValue();
m_x2 = expr->Nth(3)->RealValue();
m_y2 = expr->Nth(4)->RealValue();
m_x3 = expr->Nth(5)->RealValue();
m_y3 = expr->Nth(6)->RealValue();
break;
}
default:
@@ -1156,7 +1156,7 @@ wxExpr *wxOpPolyDraw::WriteExpr(wxPseudoMetaFile *image)
void wxOpPolyDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
{
m_noPoints = (int)expr->Item(1)->IntegerValue();
m_noPoints = (int)expr->Nth(1)->IntegerValue();
char buf1[5];
char buf2[5];
@@ -1164,7 +1164,7 @@ void wxOpPolyDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
m_points = new wxRealPoint[m_noPoints];
int i = 0;
int bufPtr = 0;
wxString hexString = expr->Item(2)->StringValue();
wxString hexString = expr->Nth(2)->StringValue();
while (i < m_noPoints)
{
buf1[0] = hexString[(size_t)bufPtr];
@@ -1621,16 +1621,16 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle)
}
else
{
wxExpr *idExpr = expr->Item(0);
wxExpr *idExpr = expr->Nth(0);
switch (idExpr->IntegerValue())
{
case gyTYPE_PEN:
{
int penWidth = (int)expr->Item(1)->IntegerValue();
int penStyle = (int)expr->Item(2)->IntegerValue();
int penRed = (int)expr->Item(3)->IntegerValue();
int penGreen = (int)expr->Item(4)->IntegerValue();
int penBlue = (int)expr->Item(5)->IntegerValue();
int penWidth = (int)expr->Nth(1)->IntegerValue();
int penStyle = (int)expr->Nth(2)->IntegerValue();
int penRed = (int)expr->Nth(3)->IntegerValue();
int penGreen = (int)expr->Nth(4)->IntegerValue();
int penBlue = (int)expr->Nth(5)->IntegerValue();
wxColour col(penRed, penGreen, penBlue);
wxPen *p = wxThePenList->FindOrCreatePen(col, penWidth, penStyle);
if (!p)
@@ -1640,10 +1640,10 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle)
}
case gyTYPE_BRUSH:
{
int brushStyle = (int)expr->Item(1)->IntegerValue();
int brushRed = (int)expr->Item(2)->IntegerValue();
int brushGreen = (int)expr->Item(3)->IntegerValue();
int brushBlue = (int)expr->Item(4)->IntegerValue();
int brushStyle = (int)expr->Nth(1)->IntegerValue();
int brushRed = (int)expr->Nth(2)->IntegerValue();
int brushGreen = (int)expr->Nth(3)->IntegerValue();
int brushBlue = (int)expr->Nth(4)->IntegerValue();
wxColour col(brushRed, brushGreen, brushBlue);
wxBrush *b = wxTheBrushList->FindOrCreateBrush(col, brushStyle);
if (!b)
@@ -1653,11 +1653,11 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle)
}
case gyTYPE_FONT:
{
int fontPointSize = (int)expr->Item(1)->IntegerValue();
int fontFamily = (int)expr->Item(2)->IntegerValue();
int fontStyle = (int)expr->Item(3)->IntegerValue();
int fontWeight = (int)expr->Item(4)->IntegerValue();
int fontUnderlined = (int)expr->Item(5)->IntegerValue();
int fontPointSize = (int)expr->Nth(1)->IntegerValue();
int fontFamily = (int)expr->Nth(2)->IntegerValue();
int fontStyle = (int)expr->Nth(3)->IntegerValue();
int fontWeight = (int)expr->Nth(4)->IntegerValue();
int fontUnderlined = (int)expr->Nth(5)->IntegerValue();
m_gdiObjects.Append(wxTheFontList->FindOrCreateFont(fontPointSize,
fontFamily, fontStyle, fontWeight, (fontUnderlined != 0)));
break;
@@ -1687,7 +1687,7 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle)
}
else
{
wxExpr *idExpr = expr->Item(0);
wxExpr *idExpr = expr->Nth(0);
int opId = (int)idExpr->IntegerValue();
switch (opId)
{

View File

@@ -25,7 +25,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#ifdef new
#undef new
@@ -1541,16 +1541,16 @@ void wxLineShape::ReadAttributes(wxExpr *clause)
wxString arrowName;
long arrowId = -1;
wxExpr *type_expr = node->Item(0);
wxExpr *end_expr = node->Item(1);
wxExpr *dist_expr = node->Item(2);
wxExpr *size_expr = node->Item(3);
wxExpr *name_expr = node->Item(4);
wxExpr *id_expr = node->Item(5);
wxExpr *type_expr = node->Nth(0);
wxExpr *end_expr = node->Nth(1);
wxExpr *dist_expr = node->Nth(2);
wxExpr *size_expr = node->Nth(3);
wxExpr *name_expr = node->Nth(4);
wxExpr *id_expr = node->Nth(5);
// New members of wxArrowHead
wxExpr *yOffsetExpr = node->Item(6);
wxExpr *spacingExpr = node->Item(7);
wxExpr *yOffsetExpr = node->Nth(6);
wxExpr *spacingExpr = node->Nth(7);
if (type_expr)
arrowType = (int)type_expr->IntegerValue();

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/types.h>

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#ifdef new
#undef new
@@ -453,7 +453,7 @@ void wxDiagram::ReadContainerGeometry(wxExprDatabase& database)
if (divisionExpr)
{
int i = 0;
wxExpr *idExpr = divisionExpr->Item(i);
wxExpr *idExpr = divisionExpr->Nth(i);
while (idExpr)
{
long divisionId = idExpr->IntegerValue();
@@ -510,7 +510,7 @@ void wxDiagram::ReadContainerGeometry(wxExprDatabase& database)
}
}
i ++;
idExpr = divisionExpr->Item(i);
idExpr = divisionExpr->Nth(i);
}
}
}

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/wxexpr.h>
#include <wx/deprecated/wxexpr.h>
#include <wx/types.h>

View File

@@ -6,6 +6,9 @@ program_dir = contrib/utils/convertrc
PROGRAM=convert
APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_wxdeprecated-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
OBJECTS=convert.o rc2xml.o rc2wxr.o wxr2xml.o
include $(top_builddir)/src/makeprog.env

View File

@@ -24,7 +24,9 @@
#endif
#include <wx/image.h>
#include "wx/resource.h"
#include "wx/deprecated/setup.h"
#include "wx/deprecated/resource.h"
#include "convert.h"
#include "rc2wxr.h"
@@ -62,7 +64,7 @@ bool wxConvertApp::OnInit()
// Create the main frame window
m_pFrame = new wxMainFrame(NULL, -1, "wxConvertApp", wxPoint(0, 0), wxSize(500, 400),
wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL);
InitMenu();
m_pFrame->Show(TRUE);
SetTopWindow(m_pFrame);
@@ -104,12 +106,12 @@ END_EVENT_TABLE()
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
wxMainFrame::wxMainFrame(wxWindow* parent,wxWindowID id,
wxMainFrame::wxMainFrame(wxWindow* parent,wxWindowID id,
const wxString& title, const wxPoint& pos, const wxSize& size,
long style, const wxString& name)
:wxFrame(parent,id,title,pos,size,style,name)
{
}
wxMainFrame::~wxMainFrame()
@@ -163,7 +165,7 @@ void wxMainFrame::OnWXR2XML()
wxr2xml XMLCon;
XMLCon.Convert(f.GetPath(),xmlfile.GetPath());
}
void wxMainFrame::OnRC2XML()
@@ -189,18 +191,19 @@ void wxMainFrame::OnRC2XML()
bool wxConvertApp::HandleCommandLine()
{
if (argc != 2)
if (argc != 2)
return FALSE;
//Figure out kind of conversion
wxString source,target;
wxr2xml trans_wxr2xml;
rc2xml trans_rc2xml;
rc2wxr trans_rc2wxr;
source=argv[1];
target=argv[2];
if ((source.Find(".wxr")>0)&&(target.Find(".xml")>0))
{
@@ -217,6 +220,6 @@ bool wxConvertApp::HandleCommandLine()
trans_rc2xml.Convert(source,target);
return TRUE;
}
return FALSE;
return FALSE;
}

View File

@@ -8,7 +8,7 @@
# Makefile : Builds convert for 32-bit BC++
WXDIR = $(WXWIN)
EXTRALIBS=$(WXDIR)\lib\wxxrc.lib
EXTRALIBS=$(WXDIR)\lib\wxxrc.lib $(WXDIR)\lib\wxdeprecated.lib
TARGET=wxconvert

View File

@@ -10,7 +10,8 @@
WXDIR = ../../..
TARGET=wxconvert
EXTRALIBS=-lwxxrc
EXTRALIBS=-lwxxrc -lwxdeprecated
EXTRAINC = -I$(WXDIR)/contrib/include
OBJECTS=convert.o rc2xml.o rc2wxr.o wxr2xml.o
include $(WXDIR)/src/makeprog.g95

View File

@@ -18,9 +18,9 @@ PROGRAM=wxconvert
FINAL=0
!if "$(FINAL)" == "0"
EXTRALIBS=$(WXDIR)\lib\wxxrcd.lib
EXTRALIBS=$(WXDIR)\lib\wxxrcd.lib $(WXDIR)\lib\wxdeprecatedd.lib
!else
EXTRALIBS=$(WXDIR)\lib\wxxrc.lib
EXTRALIBS=$(WXDIR)\lib\wxxrc.lib $(WXDIR)\lib\wxdeprecated.lib
!endif
OBJECTS=convert.obj rc2xml.obj rc2wxr.obj wxr2xml.obj

View File

@@ -6,7 +6,7 @@
WXDIR = $(%WXWIN)
PROGRAM = wxconvert
EXTRALIBS = $(WXDIR)\lib\wxxrc.lib
EXTRALIBS = $(WXDIR)\lib\wxxrc.lib $(WXDIR)\lib\wxdeprecated.lib
OBJECTS=convert.obj rc2xml.obj rc2wxr.obj wxr2xml.obj
!include $(WXDIR)\src\makeprog.wat

View File

@@ -62,7 +62,8 @@ This code was used as a starting point for my rc2xml converter
#include "wx/image.h"
#include "wx/resource.h"
#include "wx/deprecated/setup.h"
#include "wx/deprecated/resource.h"
//////////////////////////////////////////////////////////////////////
@@ -138,7 +139,7 @@ ParseDialog(prevtok);
}
@@ -148,7 +149,7 @@ if (tok=="MENU")
ParseMenu(prevtok);
}
}
@@ -160,7 +161,7 @@ prevtok=tok;
fclose(m_wxr);
//fclose(m_rc);
//fclose(m_rc);
m_rc.Close();
@@ -174,7 +175,7 @@ m_rc.Close();
/*
Example .rc
Example .rc
Microsoft style as of v5.0
@@ -222,7 +223,7 @@ static int dlgid=999;
dlgid++;
/* Make sure that this really is a dialog
/* Make sure that this really is a dialog
microsoft reuses the keyword DIALOG for other things
@@ -328,7 +329,7 @@ BEGIN
EDITTEXT IDC_BANDS,36,83,22,14,ES_AUTOHSCROLL | ES_NUMBER | NOT
EDITTEXT IDC_BANDS,36,83,22,14,ES_AUTOHSCROLL | ES_NUMBER | NOT
WS_TABSTOP
@@ -642,7 +643,7 @@ m_done=TRUE;
}
@@ -692,7 +693,7 @@ while (ch!=34)
ReadChar(ch);
ReadChar(ch);
@@ -752,7 +753,7 @@ void rc2wxr::ParseComboBox()
{
/* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT |
/* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP */
@@ -794,7 +795,7 @@ static int menuid=0;
menuid++;
fprintf(m_wxr,"static char *MenuBar%i = \"menu(name = '%s',\\\n",menuid,name);
fprintf(m_wxr,"static char *MenuBar%i = \"menu(name = '%s',\\\n",menuid,name);
fprintf(m_wxr,"menu = \\\n");
@@ -904,7 +905,7 @@ fprintf(m_wxr," ['%s',%i,''],\\\n",tok,menuitem);
}
@@ -964,7 +965,7 @@ if (kindctrl=="BUTTON")
}
/* CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
/* CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,52,73,100,15
@@ -980,7 +981,7 @@ wxString tok;
while (ReadOrs(tok));
fprintf(m_wxr," control = [%i,wxSlider,'','wxSL_HORIZONTAL','%s',",m_controlid,varname);
fprintf(m_wxr," control = [%i,wxSlider,'','wxSL_HORIZONTAL','%s',",m_controlid,varname);
int x,y,width,height;
@@ -994,7 +995,7 @@ fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"
}
/*
/*
CONTROL "Progress1",CG_IDC_PROGDLG_PROGRESS,"msctls_progress32",
@@ -1010,7 +1011,7 @@ wxString tok;
while (ReadOrs(tok));
fprintf(m_wxr," control = [%i,wxGauge,'','wxGA_HORIZONTAL','%s',",m_controlid,varname);
fprintf(m_wxr," control = [%i,wxGauge,'','wxGA_HORIZONTAL','%s',",m_controlid,varname);
int x,y,width,height;
@@ -1068,9 +1069,9 @@ if (tok=="BS_AUTOCHECKBOX")
{
fprintf(m_wxr," control = [%i,wxCheckBox,'%s','0','%s',",m_controlid,label,varname);
fprintf(m_wxr," control = [%i,wxCheckBox,'%s','0','%s',",m_controlid,label,varname);
while (ReadOrs(tok));
while (ReadOrs(tok));
ReadRect(x,y,width,height);
@@ -1086,9 +1087,9 @@ if (tok=="BS_AUTORADIOBUTTON")
{
fprintf(m_wxr," control = [%i,wxRadioButton,'%s','0','%s',",m_controlid,label,varname);
fprintf(m_wxr," control = [%i,wxRadioButton,'%s','0','%s',",m_controlid,label,varname);
while(ReadOrs(tok));
while(ReadOrs(tok));
ReadRect(x,y,width,height);

View File

@@ -36,7 +36,8 @@ cross platform (wxGTK,etc)
#include "rc2xml.h"
#include "wx/image.h"
#include "wx/resource.h"
#include "wx/deprecated/setup.h"
#include "wx/deprecated/resource.h"
#include <wx/textfile.h>
#include <wx/tokenzr.h>
@@ -67,7 +68,7 @@ bool rc2xml::Convert(wxString rcfile, wxString xmlfile)
{
m_rc.Open(rcfile.c_str());
m_filesize=m_rc.Length();
m_workingpath=wxPathOnly(rcfile);
@@ -80,15 +81,15 @@ bool rc2xml::Convert(wxString rcfile, wxString xmlfile)
bool result;
result=m_xmlfile.Open(xmlfile.c_str(),"w+t");
wxASSERT_MSG(result,"Couldn't create XML file");
wxASSERT_MSG(result,"Couldn't create XML file");
if (!result)
return FALSE;
/* Write Basic header for XML file */
m_xmlfile.Write("<?xml version=\"1.0\" ?>\n");
m_xmlfile.Write("<resource>\n");
//Read resource.h
ParseResourceHeader();
//Gather all the resource we need for toolbars,menus, and etc
@@ -101,7 +102,7 @@ bool rc2xml::Convert(wxString rcfile, wxString xmlfile)
m_xmlfile.Write("</resource>\n");
m_xmlfile.Close();
m_rc.Close();
wxMessageBox(_("Conversion complete."), _("Done"),
wxMessageBox(_("Conversion complete."), _("Done"),
wxOK | wxICON_INFORMATION);
return TRUE;
@@ -113,7 +114,7 @@ void rc2xml::ParseDialog(wxString dlgname)
wxString token;
static int dlgid=999;
dlgid++;
/* Make sure that this really is a dialog
/* Make sure that this really is a dialog
microsoft reuses the keyword DIALOG for other things
*/
token=PeekToken();
@@ -135,13 +136,13 @@ microsoft reuses the keyword DIALOG for other things
token=GetToken();
wxString title;
wxString ptsize,face;
m_xmlfile.Write("\t<object class=\"wxDialog\"");
//Avoid duplicate names this way
dlgname.Replace("IDD_","DLG_");
WriteBasicInfo(x,y,width,height,dlgname);
WriteTitle(title);
while ((token!="BEGIN")&(token!="{"))
{
@@ -171,7 +172,7 @@ microsoft reuses the keyword DIALOG for other things
/*
BEGIN
EDITTEXT IDC_BANDS,36,83,22,14,ES_AUTOHSCROLL | ES_NUMBER | NOT
EDITTEXT IDC_BANDS,36,83,22,14,ES_AUTOHSCROLL | ES_NUMBER | NOT
WS_TABSTOP
LTEXT "Bands",IDC_STATIC,11,86,21,8
EDITTEXT IDC_NAME,10,3,75,14,ES_AUTOHSCROLL
@@ -353,7 +354,7 @@ bool rc2xml::Seperator(int ch)
m_done=TRUE;
return TRUE;
}
return FALSE;
}
@@ -416,7 +417,7 @@ wxString rc2xml::GetToken(bool *listseperator)
{
m_done=TRUE;
}
while (!Seperator(ch))
{
@@ -442,7 +443,7 @@ wxString rc2xml::GetQuoteField()
while (ch!=34)
ReadChar(ch);
ReadChar(ch);
while (ch!=34)
{
phrase+=(char)ch;
@@ -471,8 +472,8 @@ wxString rc2xml::GetStringQuote()
p=m_rc.Tell();
ReadChar(ch);
// RC supports "", for embedded quote, as well as \"
if (ch==34)
phrase+='\\';
if (ch==34)
phrase+='\\';
else
{
m_rc.Seek(p);
@@ -513,7 +514,7 @@ void rc2xml::ReadChar(int &ch)
void rc2xml::ParseComboBox(wxString varname)
{
/* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT |
/* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP */
wxString token,style;
int x,y,width,height;
@@ -592,7 +593,7 @@ void rc2xml::ParsePopupMenu()
if (token=="POPUP")
ParsePopupMenu();
if (token=="MENUITEM")
ParseMenuItem();
}
@@ -622,7 +623,7 @@ void rc2xml::ParseControlMS()
}
/* CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
/* CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,52,73,100,15
*/
@@ -644,7 +645,7 @@ void rc2xml::ParseSlider(wxString label, wxString varname)
m_xmlfile.Write("\n\t\t</object>\n");
}
/*
/*
CONTROL "Progress1",CG_IDC_PROGDLG_PROGRESS,"msctls_progress32",
WS_BORDER,15,52,154,13
*/
@@ -652,7 +653,7 @@ void rc2xml::ParseProgressBar(wxString label, wxString varname)
{
wxString token,style;
ReadOrs(token);
int x,y,width,height;
ReadRect(x,y,width,height);
@@ -674,7 +675,7 @@ bool rc2xml::ReadOrs(wxString & orstring)
while(PeekToken()==_T("|"))
{
//Grab |
//Grab |
orstring+=GetToken();
//Grab next token
orstring+=GetToken();
@@ -697,7 +698,7 @@ void rc2xml::ParseCtrlButton(wxString label, wxString varname)
(token.Find("BS_RADIOBUTTON")!=-1))
ParseRadioButton(label, varname);
else if (token.Find("BS_GROUPBOX")!=-1)
ParseGroupBox(label, varname);
ParseGroupBox(label, varname);
else // if ((token.Find("BS_PUSHBUTTON")!=-1)||
// (token.Find("BS_DEFPUSHBUTTON")!=-1))
ParsePushButton(label, varname); // make default case
@@ -726,7 +727,7 @@ void rc2xml::WriteTitle(wxString title)
void rc2xml::WriteName(wxString name)
{
//Try to convert any number ids into names
name=LookUpId(name);
//Replace common MS ids with wxWindows ids
@@ -796,7 +797,7 @@ void rc2xml::WriteStyle(wxString style)
m_xmlfile.Write("\t\t\t<style>"+style+"</style>\n");
}
/*
LISTBOX IDC_LIST1,16,89,48,40,LBS_SORT | LBS_MULTIPLESEL |
LISTBOX IDC_LIST1,16,89,48,40,LBS_SORT | LBS_MULTIPLESEL |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
*/
void rc2xml::ParseListBox(wxString varname)
@@ -817,7 +818,7 @@ void rc2xml::ParseListBox(wxString varname)
}
/*
CONTROL "",IDC_RICHEDIT1,"RICHEDIT",ES_AUTOHSCROLL | WS_BORDER |
CONTROL "",IDC_RICHEDIT1,"RICHEDIT",ES_AUTOHSCROLL | WS_BORDER |
WS_TABSTOP,103,110,40,14
*/
void rc2xml::ParseRichEdit(wxString label, wxString varname)
@@ -843,7 +844,7 @@ CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,209,72,
void rc2xml::ParseSpinCtrl(wxString label, wxString varname)
{
wxString token,style;
ReadOrs(token);
if (token.Find("UDS_HORZ")!=-1)
style="wxSP_HORIZONTAL";
@@ -872,7 +873,7 @@ void rc2xml::FirstPass()
ParseStringTable(prevtok);
else if (token=="ICON")
ParseIcon(prevtok);
prevtok=token;
}
}
@@ -880,7 +881,7 @@ void rc2xml::FirstPass()
void rc2xml::ParseBitmap(wxString varname)
{
wxString token,*bitmapfile;
token=PeekToken();
//Microsoft notation?
if (token=="DISCARDABLE")
@@ -907,7 +908,7 @@ void rc2xml::SecondPass()
ParseMenu(prevtok);
else if (token=="TOOLBAR")
ParseToolBar(prevtok);
prevtok=token;
}
@@ -915,7 +916,7 @@ void rc2xml::SecondPass()
void rc2xml::ParseToolBar(wxString varname)
{
wxString token;
wxString token;
token=GetToken();
wxASSERT_MSG(token=="DISCARDABLE","Error in toolbar parsing");
//Look up bitmap for toolbar and load
@@ -942,7 +943,7 @@ void rc2xml::ParseToolBar(wxString varname)
width=atoi(GetToken());
height=atoi(GetToken());
int c=0;
int c=0;
wxString buttonname,msg,tip,longhelp;
token=GetToken();
while ((token!="BEGIN")&(token!="{"))
@@ -1060,7 +1061,7 @@ void rc2xml::ParseMenuItem()
WriteLabel(token);
//Look up help if any listed in stringtable
//can't assume numbers correlate, restrict to string identifiers
if ((!name.IsNumber())&&(LookUpString(name,msg)))
if ((!name.IsNumber())&&(LookUpString(name,msg)))
{
SplitHelp(msg,tip,longhelp);
m_xmlfile.Write("\t\t\t<help>"
@@ -1081,11 +1082,11 @@ void rc2xml::ParseMenuItem()
else if (token=="GRAYED");
else
wxLogError("Unknown Menu Item token:"+token);
ptoken=PeekToken();
ptoken.MakeUpper();
}
m_xmlfile.Write("\t\t\t</object>\n");
m_xmlfile.Write("\t\t\t</object>\n");
}
@@ -1121,7 +1122,7 @@ void rc2xml::ParseIcon(wxString varname)
*iconfile=GetQuoteField();
m_iconlist->Append(varname,iconfile);
}
@@ -1234,7 +1235,7 @@ void rc2xml::ParseScrollBar()
wxString style;
ReadOrs(token);
if (token.Find("SBS_VERT")!=-1)
style=_T("wxSB_VERTICAL");
//Default MFC style is horizontal
@@ -1302,7 +1303,7 @@ void rc2xml::WriteBitmap(wxString bitmapname)
wxLogError("Unable to find bitmap:"+bitmapname);
return;
}
wxString *bitmappath;
bitmappath=(wxString *)node->Data();
@@ -1344,7 +1345,7 @@ wxNode *node=m_iconlist->Find(iconname);
m_xmlfile.Write("\t\t\t<bitmap>"+iconname+"</bitmap>\n");
bitmap.SaveFile(m_targetpath+iconname,wxBITMAP_TYPE_BMP);
}
/*Unfortunately sometimes the great MSVC Resource editor decides
to use numbers instead of the word id. I have no idea why they
@@ -1362,13 +1363,13 @@ wxTextFile r;
wxLogError("Warining Unable to load resource.h file");
return;
}
wxString str;
wxString id,v;
wxStringTokenizer tok;
wxString *varname;
long n;
//Read through entire file
@@ -1391,8 +1392,8 @@ wxTextFile r;
}
}
}

View File

@@ -1,4 +1,4 @@
// wxr2xml.h:
// wxr2xml.h:
// 8/30/00 Brian Gavin
//////////////////////////////////////////////////////////////////////
@@ -6,13 +6,14 @@
#define WXR2XML_H
#include <wx/ffile.h>
#include "wx/resource.h"
#include "wx/deprecated/setup.h"
#include "wx/deprecated/resource.h"
#if !wxUSE_WX_RESOURCES
#error "convertc requires wxUSE_WX_RESOURCES"
#endif // wxUSE_WX_RESOURCES
class wxr2xml : public wxObject
class wxr2xml : public wxObject
{
public:
bool Convert(wxString wxrfile,wxString xmlfile);
@@ -74,4 +75,4 @@ protected:
wxFFile m_xmlfile;
};
#endif
#endif