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:
parent
f2638c97a5
commit
7c9955d147
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -4,6 +4,7 @@
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=proplist
|
||||
EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
|
||||
OBJECTS = $(TARGET).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.b32
|
||||
|
@ -5,6 +5,8 @@ WXDIR = ../../../..
|
||||
|
||||
TARGET=proplist
|
||||
OBJECTS = $(TARGET).o
|
||||
EXTRAINC = -I$(WXDIR)/contrib/include
|
||||
EXTRALIBS = -lwxdeprecated
|
||||
|
||||
include $(WXDIR)/src/makeprog.g95
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
|
@ -10,6 +10,7 @@
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=resource
|
||||
EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
|
||||
OBJECTS = $(TARGET).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.b32
|
||||
|
@ -11,6 +11,8 @@ WXDIR = ../../../..
|
||||
|
||||
TARGET=resource
|
||||
OBJECTS = $(TARGET).o
|
||||
EXTRAINC = -I$(WXDIR)/contrib/include
|
||||
EXTRALIBS = -lwxdeprecated
|
||||
|
||||
include $(WXDIR)/src/makeprog.g95
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -4,6 +4,7 @@
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=treelay
|
||||
EXTRALIBS=$(WXDIR)\lib\wxdeprecated.lib
|
||||
OBJECTS = $(TARGET).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.b32
|
||||
|
@ -5,6 +5,8 @@ WXDIR = ../../../..
|
||||
|
||||
TARGET=treelay
|
||||
OBJECTS = $(TARGET).o
|
||||
EXTRAINC = -I$(WXDIR)/contrib/include
|
||||
EXTRALIBS = -lwxdeprecated
|
||||
|
||||
include $(WXDIR)/src/makeprog.g95
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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__
|
||||
|
@ -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)");
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#include <wx/wxexpr.h>
|
||||
|
||||
#include "studio.h"
|
||||
#include "doc.h"
|
||||
#include "view.h"
|
||||
|
@ -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"
|
||||
|
@ -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\
|
||||
|
@ -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"
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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();
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#include <wx/wxexpr.h>
|
||||
#include <wx/deprecated/wxexpr.h>
|
||||
|
||||
#ifdef new
|
||||
#undef new
|
||||
|
@ -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>
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#include <wx/wxexpr.h>
|
||||
#include <wx/deprecated/wxexpr.h>
|
||||
|
||||
#ifdef new
|
||||
#undef new
|
||||
|
@ -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);
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#include <wx/wxexpr.h>
|
||||
#include <wx/deprecated/wxexpr.h>
|
||||
|
||||
#include <wx/types.h>
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#include <wx/wxexpr.h>
|
||||
#include <wx/deprecated/wxexpr.h>
|
||||
|
||||
#include <wx/types.h>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include <wx/intl.h>
|
||||
#include <wx/laywin.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/resource.h> // wxResourceParsedata/File/String
|
||||
#include <wx/splitter.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/toolbar.h>
|
||||
|
@ -63,9 +63,7 @@ samples/opengl/*W7.xml
|
||||
samples/ownerdrw/*W7.xml
|
||||
samples/png/*W7.xml
|
||||
samples/printing/*W7.xml
|
||||
samples/proplist/*W7.xml
|
||||
samples/regtest/*W7.xml
|
||||
samples/resource/*W7.xml
|
||||
samples/rotate/*W7.xml
|
||||
samples/sashtest/*W7.xml
|
||||
samples/scroll/*W7.xml
|
||||
@ -80,7 +78,6 @@ samples/text/*W7.xml
|
||||
samples/thread/*W7.xml
|
||||
samples/toolbar/*W7.xml
|
||||
samples/treectrl/*W7.xml
|
||||
samples/treelay/*W7.xml
|
||||
samples/typetest/*W7.xml
|
||||
samples/validate/*W7.xml
|
||||
samples/widgets/*W7.xml
|
||||
@ -133,3 +130,8 @@ contrib/samples/fl/fl_sample2/*W7.xml
|
||||
contrib/samples/fl/fl_sample3/*W7.xml
|
||||
contrib/src/net/*W7.xml
|
||||
|
||||
contrib/src/deprecated/*W7.xml
|
||||
contrib/samples/deprecated/resource/*W7.xml
|
||||
contrib/samples/deprecated/proplist/*W7.xml
|
||||
contrib/samples/deprecated/treelay/*W7.xml
|
||||
|
||||
|
@ -113,12 +113,8 @@ samples/png/*M?.xml
|
||||
samples/png/*.mcp
|
||||
samples/printing/*M?.xml
|
||||
samples/printing/*.mcp
|
||||
samples/proplist/*M?.xml
|
||||
samples/proplist/*.mcp
|
||||
samples/regtest/*M?.xml
|
||||
samples/regtest/*.mcp
|
||||
samples/resource/*M?.xml
|
||||
samples/resource/*.mcp
|
||||
samples/rotate/*M?.xml
|
||||
samples/rotate/*.mcp
|
||||
samples/sashtest/*M?.xml
|
||||
@ -147,8 +143,6 @@ samples/toolbar/*M?.xml
|
||||
samples/toolbar/*.mcp
|
||||
samples/treectrl/*M?.xml
|
||||
samples/treectrl/*.mcp
|
||||
samples/treelay/*M?.xml
|
||||
samples/treelay/*.mcp
|
||||
samples/typetest/*M?.xml
|
||||
samples/typetest/*.mcp
|
||||
samples/validate/*M?.xml
|
||||
@ -271,3 +265,13 @@ contrib/samples/fl/fl_sample3/*.mcp
|
||||
contrib/src/net/*M?.xml
|
||||
contrib/src/net/*.mcp
|
||||
|
||||
contrib/src/deprecated/*M?.xml
|
||||
contrib/src/deprecated/*.mcp
|
||||
|
||||
contrib/samples/deprecated/proplist/*M?.xml
|
||||
contrib/samples/deprecated/proplist/*.mcp
|
||||
contrib/samples/deprecated/resource/*M?.xml
|
||||
contrib/samples/deprecated/resource/*.mcp
|
||||
contrib/samples/deprecated/treelay/*M?.xml
|
||||
contrib/samples/deprecated/treelay/*.mcp
|
||||
|
||||
|
@ -899,17 +899,6 @@ samples/printing/*.rc
|
||||
samples/printing/*.afm
|
||||
samples/printing/*.pro
|
||||
|
||||
samples/proplist/*.cpp
|
||||
samples/proplist/*.h
|
||||
samples/proplist/*.def
|
||||
samples/proplist/makefile*
|
||||
samples/proplist/*.xbm
|
||||
samples/proplist/*.xpm
|
||||
samples/proplist/*.ico
|
||||
samples/proplist/*.bmp
|
||||
samples/proplist/*.rc
|
||||
samples/proplist/*.pro
|
||||
|
||||
samples/propsize/*.cpp
|
||||
samples/propsize/*.h
|
||||
samples/propsize/*.def
|
||||
@ -921,18 +910,6 @@ samples/propsize/*.bmp
|
||||
samples/propsize/*.rc
|
||||
samples/propsize/*.pro
|
||||
|
||||
samples/resource/*.cpp
|
||||
samples/resource/*.h
|
||||
samples/resource/*.def
|
||||
samples/resource/*.rc
|
||||
samples/resource/*.txt
|
||||
samples/resource/*.wxr
|
||||
samples/resource/makefile*
|
||||
samples/resource/*.xbm
|
||||
samples/resource/*.xpm
|
||||
samples/resource/*.ico
|
||||
samples/resource/*.pro
|
||||
|
||||
samples/rotate/*.cpp
|
||||
samples/rotate/*.h
|
||||
samples/rotate/makefile*
|
||||
@ -1065,17 +1042,6 @@ samples/thread/*.ico
|
||||
samples/thread/*.txt
|
||||
samples/thread/*.pro
|
||||
|
||||
samples/treelay/*.cpp
|
||||
samples/treelay/*.h
|
||||
samples/treelay/makefile*
|
||||
samples/treelay/*.rc
|
||||
samples/treelay/*.def
|
||||
samples/treelay/*.ico
|
||||
samples/treelay/*.xpm
|
||||
samples/treelay/*.txt
|
||||
samples/treelay/*.bmp
|
||||
samples/treelay/*.pro
|
||||
|
||||
samples/typetest/*.cpp
|
||||
samples/typetest/*.h
|
||||
samples/typetest/*.def
|
||||
|
@ -27,7 +27,6 @@ samples/help/Makefile.in
|
||||
samples/internat/Makefile.in
|
||||
samples/ipc/Makefile.in
|
||||
samples/png/Makefile.in
|
||||
samples/resource/Makefile.in
|
||||
samples/sockets/Makefile.in
|
||||
samples/html/Makefile.in
|
||||
samples/html/about/Makefile.in
|
||||
@ -52,7 +51,6 @@ samples/mobile/styles/Makefile.in
|
||||
samples/multimon/Makefile.in
|
||||
samples/notebook/Makefile.in
|
||||
samples/printing/Makefile.in
|
||||
samples/proplist/Makefile.in
|
||||
samples/propsize/Makefile.in
|
||||
samples/rotate/Makefile.in
|
||||
samples/sashtest/Makefile.in
|
||||
@ -73,7 +71,6 @@ samples/display/Makefile.in
|
||||
samples/font/Makefile.in
|
||||
samples/menu/Makefile.in
|
||||
samples/memcheck/Makefile.in
|
||||
samples/treelay/Makefile.in
|
||||
samples/opengl/Makefile.in
|
||||
samples/opengl/cube/Makefile.in
|
||||
samples/opengl/penguin/Makefile.in
|
||||
@ -141,6 +138,11 @@ contrib/samples/fl/fl_sample3/Makefile.in
|
||||
contrib/samples/svg/Makefile.in
|
||||
contrib/src/svg/Makefile.in
|
||||
|
||||
contrib/src/deprecated/Makefile.in
|
||||
contrib/samples/deprecated/proplist/Makefile.in
|
||||
contrib/samples/deprecated/treelay/Makefile.in
|
||||
contrib/samples/deprecated/resource/Makefile.in
|
||||
|
||||
contrib/utils/Makefile.in
|
||||
|
||||
descrip.mms
|
||||
|
@ -70,7 +70,7 @@ dospinwxgtk()
|
||||
echo Tarring wxGTK...
|
||||
|
||||
cd $WXSRC
|
||||
cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxgtk_in.txt
|
||||
cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxgtk_in.txt
|
||||
expandlines /tmp/wxgtk_in.txt /tmp/wxgtk.txt
|
||||
$TAR cf $WXDEST/wxGTK-${WXVER}.tar -T /tmp/wxgtk.txt
|
||||
|
||||
@ -91,7 +91,7 @@ dospinwxmotif()
|
||||
echo Tarring wxMotif...
|
||||
|
||||
cd $WXSRC
|
||||
cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmotif_in.txt
|
||||
cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmotif_in.txt
|
||||
expandlines /tmp/wxmotif_in.txt /tmp/wxmotif.txt
|
||||
$TAR cf $WXDEST/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt
|
||||
|
||||
@ -113,7 +113,7 @@ echo Tarring wxX11...
|
||||
|
||||
### wxX11: combined wxMotif and wxX11 distributions
|
||||
cd $WXSRC
|
||||
cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
|
||||
cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
|
||||
expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt
|
||||
$TAR cf $WXDEST/wxX11-${WXVER}.tar -T /tmp/wxx11.txt
|
||||
|
||||
@ -131,7 +131,7 @@ gzip $WXDEST/wxX11-${WXVER}.tar
|
||||
|
||||
### wxMSW
|
||||
# cd $WXSRC
|
||||
# cat $WXSRC/distrib/msw/msw.rsp $WXSRC/distrib/msw/vc.rsp $WXSRC/distrib/msw/bc.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmsw_in.txt
|
||||
# cat $WXSRC/distrib/msw/msw.rsp $WXSRC/distrib/msw/vc.rsp $WXSRC/distrib/msw/bc.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmsw_in.txt
|
||||
# expandlines /tmp/wxmsw_in.txt /tmp/wxmsw.txt
|
||||
# $TAR cf $WXDEST/wxMSW-${WXVER}.tar -T /tmp/wxmsw.txt
|
||||
# gzip $WXDEST/wxMSW-${WXVER}.tar
|
||||
@ -142,7 +142,7 @@ echo Tarring wxMac...
|
||||
### wxMac
|
||||
cp $WXSRC/include/wx/mac/setup0.h $WXSRC/include/wx/setup.h
|
||||
cd $WXSRC
|
||||
cat $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
|
||||
cat $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
|
||||
expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
|
||||
$TAR cf $WXDEST/wxMac-${WXVER}.tar -T /tmp/wxmac.txt
|
||||
|
||||
@ -193,7 +193,7 @@ echo Tarring wxAll...
|
||||
|
||||
### wxAll: all distributions in one giant archive
|
||||
cd $WXSRC
|
||||
cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/msw.rsp $WXSRC/distrib/msw/vc.rsp $WXSRC/distrib/msw/cw.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/os2.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/mgl.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/utilmake.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/mmedia.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp $WXSRC/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt
|
||||
cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/msw.rsp $WXSRC/distrib/msw/vc.rsp $WXSRC/distrib/msw/cw.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/os2.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/mgl.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/deprecated.rsp $WXSRC/distrib/msw/utilmake.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/mmedia.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp $WXSRC/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt
|
||||
expandlines /tmp/wxall_in.txt /tmp/wxall.txt
|
||||
$TAR cf $WXDEST/wxAll-${WXVER}.tar -T /tmp/wxall.txt
|
||||
|
||||
|
@ -66,7 +66,7 @@ rm -f $2/wxAll-${WXVER}*.tar.gz
|
||||
|
||||
### wxAll: all distributions in one giant archive
|
||||
cd $1
|
||||
cat $1/distrib/msw/generic.rsp $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/cw.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/mac.rsp $1/distrib/msw/os2.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/mgl.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/mmedia.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp $1/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt
|
||||
cat $1/distrib/msw/generic.rsp $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/cw.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/mac.rsp $1/distrib/msw/os2.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/mgl.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/mmedia.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp $1/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt
|
||||
expandlines /tmp/wxall_in.txt /tmp/wxall.txt
|
||||
$TAR cf $2/wxAll-${WXVER}.tar -T /tmp/wxall.txt
|
||||
|
||||
|
@ -70,7 +70,7 @@ cp $1/include/wx/mac/setup0.h $1/include/wx/setup.h
|
||||
echo Tarring...
|
||||
|
||||
### wxMac
|
||||
cat $1/distrib/msw/mac.rsp $1/distrib/msw/generic.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
|
||||
cat $1/distrib/msw/mac.rsp $1/distrib/msw/generic.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
|
||||
expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
|
||||
$TAR cf $2/wxMac-${WXVER}.tar -T /tmp/wxmac.txt
|
||||
|
||||
|
@ -67,7 +67,7 @@ rm -f $2/wxX11-${WXVER}
|
||||
|
||||
### wxX11: combined wxMotif and wxX11 distributions
|
||||
cd $1
|
||||
cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
|
||||
cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/deprecated.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
|
||||
expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt
|
||||
$TAR cf $2/wxX11-${WXVER}.tar -T /tmp/wxx11.txt
|
||||
|
||||
|
@ -185,18 +185,12 @@ samples/png/png.dsw
|
||||
samples/printing/printing.dsp
|
||||
samples/printing/printing.dsw
|
||||
|
||||
samples/proplist/proplist.dsp
|
||||
samples/proplist/proplist.dsw
|
||||
|
||||
samples/propsize/propsize.dsp
|
||||
samples/propsize/propsize.dsw
|
||||
|
||||
samples/regtest/regtest.dsp
|
||||
samples/regtest/regtest.dsw
|
||||
|
||||
samples/resource/resource.dsp
|
||||
samples/resource/resource.dsw
|
||||
|
||||
samples/rotate/rotate.dsp
|
||||
samples/rotate/rotate.dsw
|
||||
|
||||
@ -238,9 +232,6 @@ samples/toolbar/toolbar.dsw
|
||||
samples/treectrl/treetest.dsp
|
||||
samples/treectrl/treetest.dsw
|
||||
|
||||
samples/treelay/treelay.dsp
|
||||
samples/treelay/treelay.dsw
|
||||
|
||||
samples/typetest/typetest.dsp
|
||||
samples/typetest/typetest.dsw
|
||||
|
||||
@ -377,3 +368,15 @@ contrib/samples/fl/fl_sample3/fl_demo.dsw
|
||||
contrib/src/net/NetVC.dsp
|
||||
contrib/src/net/NetVC.dsw
|
||||
|
||||
contrib/src/deprecated/deprecated.dsp
|
||||
|
||||
contrib/samples/deprecated/proplist/proplist.dsp
|
||||
contrib/samples/deprecated/proplist/proplist.dsw
|
||||
|
||||
contrib/samples/deprecated/resource/resource.dsp
|
||||
contrib/samples/deprecated/resource/resource.dsw
|
||||
|
||||
contrib/samples/deprecated/treelay/treelay.dsp
|
||||
contrib/samples/deprecated/treelay/treelay.dsw
|
||||
|
||||
|
||||
|
@ -74,6 +74,7 @@ zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\dialoged.rsp
|
||||
zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\ogl.rsp
|
||||
zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\xml.rsp
|
||||
zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\contrib.rsp
|
||||
zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\deprecated.rsp
|
||||
zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\makefile.rsp
|
||||
|
||||
Rem Rearchive under wxWindows-%version%
|
||||
@ -117,6 +118,7 @@ zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\ogl.rsp
|
||||
zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\xml.rsp
|
||||
zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\stc.rsp
|
||||
zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\contrib.rsp
|
||||
zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\deprecated.rsp
|
||||
zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\makefile.rsp
|
||||
|
||||
zip32 -@ %dest%\wxWindows-%version%-CW-Mac.zip < %src%\distrib\msw\cw_mac.rsp
|
||||
@ -151,6 +153,7 @@ zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\jpeg.rsp
|
||||
zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\tiff.rsp
|
||||
zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\xml.rsp
|
||||
zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\contrib.rsp
|
||||
zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\deprecated.rsp
|
||||
zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\dialoged.rsp
|
||||
zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\utils.rsp
|
||||
zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\utilmake.rsp
|
||||
|
@ -343,7 +343,6 @@ dynamically.
|
||||
<li><a href="../../samples/exec">exec</a>: demonstrates wxExecute.
|
||||
<li><a href="../../samples/font">font</a>: tests fonts, font enumerator, font encodings.
|
||||
<li><a href="../../samples/grid">grid</a>: demonstrates the wxGrid class.
|
||||
Please see newgrid below for a full demo of the new implementation's capabilities.
|
||||
<li><a href="../../samples/help">help</a>: shows how to use wxHelpController.
|
||||
<li><a href="../../samples/html">html</a>: a number of demos for the wxHTML class library, used inside
|
||||
applications and also as a help facility.
|
||||
@ -384,10 +383,8 @@ Excel to be present).
|
||||
<li><a href="../../samples/ownerdrw">ownerdrw</a>: demonstrates owner-draw menus and controls (Windows only).
|
||||
<li><a href="../../samples/png">png</a>: demonstrates PNG loading.
|
||||
<li><a href="../../samples/printing">printing</a>: shows printing and previewing.
|
||||
<li><a href="../../samples/proplist">proplist</a>: demonstrates the property list classes (a VB-style property editor).
|
||||
<li><a href="../../samples/propsize">propsize</a>: demonstrates proportional sizer classes.
|
||||
<li><a href="../../samples/regtest">regtest</a>: tests the low-level Windows registry functions (Windows only).
|
||||
<li><a href="../../samples/resource">resource</a>: shows how to use wxWindows resources (.wxr files).
|
||||
<!-- <li><a href="../../samples/richedit">richedit</a>: a work-in-progress rich text editor with plain text and HTML export
|
||||
facilities.
|
||||
-->
|
||||
@ -416,6 +413,15 @@ wxTime, wxDate and wxVariant.
|
||||
<li><a href="../../samples/wizard">wizard</a>: demonstrates the wxWizard class.
|
||||
</ul>
|
||||
|
||||
The following are deprecated samples.
|
||||
|
||||
<ul>
|
||||
<li><a href="../../contrib/deprecated/samples/resource">resource</a>: shows how to use old-style wxWindows resources (.wxr files).
|
||||
<li><a href="../../contrib/deprecated/samples/proplist">proplist</a>: demonstrates the property list classes (a VB-style property editor).
|
||||
<li><a href="../../contrib/deprecated/samples/treelay">treelay</a>: an algorithm for displaying tree hierarchies.
|
||||
</ul>
|
||||
|
||||
|
||||
<P>
|
||||
|
||||
<table width=100% border=0 cellpadding=3 cellspacing=0>
|
||||
|
@ -1,68 +0,0 @@
|
||||
/* //////////////////////////////////////////////////////////////////////////
|
||||
// Name: expr.h
|
||||
// Purpose: C helper defines and functions for wxExpr class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
////////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
#ifndef _WX_EXPRH__
|
||||
#define _WX_EXPRH__
|
||||
|
||||
#include <math.h>
|
||||
#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
|
||||
# undef __BSEXCPT__
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef ____HPUX__
|
||||
#define alloca malloc
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
char *proio_cons(char *, char *);
|
||||
char * wxmake_integer(char *);
|
||||
char * wxmake_word(char *);
|
||||
char * wxmake_string(char *);
|
||||
char * wxmake_real(char *, char *);
|
||||
char * wxmake_exp(char *, char *);
|
||||
char * wxmake_exp2(char *, char *, char*);
|
||||
void add_expr(char *);
|
||||
void process_command(char *);
|
||||
void syntax_error(char *);
|
||||
}
|
||||
#else
|
||||
#if defined(__BORLANDC__) || defined(__VISAGECPP__)
|
||||
char *proio_cons(char *, char *);
|
||||
char * wxmake_integer(char *);
|
||||
char * wxmake_word(char *);
|
||||
char * wxmake_string(char *);
|
||||
char * wxmake_real(char *, char *);
|
||||
char * wxmake_exp(char *, char *);
|
||||
char * wxmake_exp2(char *, char *, char*);
|
||||
void add_expr(char *);
|
||||
void process_command(char *);
|
||||
void syntax_error(char *);
|
||||
int lex_input(void);
|
||||
#else
|
||||
char *proio_cons();
|
||||
char * wxmake_integer();
|
||||
char * wxmake_word();
|
||||
char * wxmake_string();
|
||||
char * wxmake_real();
|
||||
char * wxmake_exp();
|
||||
char * wxmake_exp2();
|
||||
|
||||
void add_expr();
|
||||
void process_command();
|
||||
void syntax_error();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* _WX_EXPRH__ */
|
@ -1,208 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: resource.h
|
||||
// Purpose: Resource processing
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_RESOURCEH__
|
||||
#define _WX_RESOURCEH__
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "resource.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include <stdio.h>
|
||||
|
||||
// A few further types not in wx_types.h
|
||||
#define wxRESOURCE_TYPE_SEPARATOR 1000
|
||||
#define wxRESOURCE_TYPE_XBM_DATA 1001
|
||||
#define wxRESOURCE_TYPE_XPM_DATA 1002
|
||||
|
||||
#define RESOURCE_PLATFORM_WINDOWS 1
|
||||
#define RESOURCE_PLATFORM_X 2
|
||||
#define RESOURCE_PLATFORM_MAC 3
|
||||
#define RESOURCE_PLATFORM_ANY 4
|
||||
|
||||
// Extended styles: for resource usage only
|
||||
|
||||
// Use dialog units instead of pixels
|
||||
#define wxRESOURCE_DIALOG_UNITS 0x0001
|
||||
// Use default system colour and font
|
||||
#define wxRESOURCE_USE_DEFAULTS 0x0002
|
||||
// Old-style vertical label
|
||||
#define wxRESOURCE_VERTICAL_LABEL 0x0004
|
||||
// Old-style horizontal label
|
||||
#define wxRESOURCE_HORIZONTAL_LABEL 0x0008
|
||||
|
||||
// Macros to help use dialog units
|
||||
#define wxDLG_POINT(x, y, parent, useDlgUnits) (useDlgUnits ? parent->ConvertDialogToPixel(wxPoint(x, y)) : wxPoint(x, y))
|
||||
#define wxDLG_SIZE(x, y, parent, useDlgUnits) (useDlgUnits ? parent->ConvertDialogToPixel(wxSize(x, y)) : wxSize(x, y))
|
||||
|
||||
#ifdef FindResource
|
||||
#undef FindResource
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxInputStream;
|
||||
|
||||
/*
|
||||
* Internal format for control/panel item
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxItemResource: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxItemResource)
|
||||
|
||||
public:
|
||||
|
||||
wxItemResource();
|
||||
~wxItemResource();
|
||||
|
||||
inline void SetType(const wxString& type) { m_itemType = type; }
|
||||
inline void SetStyle(long styl) { m_windowStyle = styl; }
|
||||
inline void SetId(int id) { m_windowId = id; }
|
||||
inline void SetBitmap(const wxBitmap& bm) { m_bitmap = bm; }
|
||||
inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_bitmap; }
|
||||
inline void SetFont(const wxFont& font) { m_windowFont = font; }
|
||||
inline wxFont& GetFont() const { return (wxFont&) m_windowFont; }
|
||||
inline void SetSize(int xx, int yy, int ww, int hh)
|
||||
{ m_x = xx; m_y = yy; m_width = ww; m_height = hh; }
|
||||
inline void SetTitle(const wxString& title) { m_title = title; }
|
||||
inline void SetName(const wxString& name) { m_name = name; }
|
||||
inline void SetValue1(long v) { m_value1 = v; }
|
||||
inline void SetValue2(long v) { m_value2 = v; }
|
||||
inline void SetValue3(long v) { m_value3 = v; }
|
||||
inline void SetValue5(long v) { m_value5 = v; }
|
||||
inline void SetValue4(const wxString& v) { m_value4 = v; }
|
||||
inline void SetStringValues(const wxStringList& svalues) { m_stringValues = svalues; }
|
||||
|
||||
inline const wxString& GetType() const { return m_itemType; }
|
||||
inline int GetX() const { return m_x; }
|
||||
inline int GetY() const { return m_y; }
|
||||
inline int GetWidth() const { return m_width; }
|
||||
inline int GetHeight() const { return m_height; }
|
||||
|
||||
inline const wxString& GetTitle() const { return m_title; }
|
||||
inline const wxString& GetName() const { return m_name; }
|
||||
inline long GetStyle() const { return m_windowStyle; }
|
||||
inline int GetId() const { return m_windowId; }
|
||||
|
||||
inline wxInt32 GetValue1() const { return m_value1; }
|
||||
inline wxInt32 GetValue2() const { return m_value2; }
|
||||
inline wxInt32 GetValue3() const { return m_value3; }
|
||||
inline wxInt32 GetValue5() const { return m_value5; }
|
||||
inline wxString GetValue4() const { return m_value4; }
|
||||
inline wxList& GetChildren() const { return (wxList&) m_children; }
|
||||
inline wxStringList& GetStringValues() const { return (wxStringList&) m_stringValues; }
|
||||
|
||||
inline void SetBackgroundColour(const wxColour& col) { m_backgroundColour = col; }
|
||||
inline void SetLabelColour(const wxColour& col) { m_labelColour = col; }
|
||||
inline void SetButtonColour(const wxColour& col) { m_buttonColour = col; }
|
||||
|
||||
inline wxColour& GetBackgroundColour() const { return (wxColour&) m_backgroundColour; }
|
||||
inline wxColour& GetLabelColour() const { return (wxColour&) m_labelColour; }
|
||||
inline wxColour& GetButtonColour() const { return (wxColour&) m_buttonColour; }
|
||||
|
||||
inline void SetResourceStyle(long style) { m_exStyle = style; }
|
||||
inline wxInt32 GetResourceStyle() const { return m_exStyle; }
|
||||
|
||||
protected:
|
||||
wxList m_children;
|
||||
wxString m_itemType;
|
||||
int m_x, m_y, m_width, m_height;
|
||||
wxString m_title;
|
||||
wxString m_name;
|
||||
long m_windowStyle;
|
||||
long m_value1, m_value2, m_value3, m_value5;
|
||||
wxString m_value4;
|
||||
int m_windowId;
|
||||
wxStringList m_stringValues; // Optional string values
|
||||
wxBitmap m_bitmap;
|
||||
wxColour m_backgroundColour;
|
||||
wxColour m_labelColour;
|
||||
wxColour m_buttonColour;
|
||||
wxFont m_windowFont;
|
||||
long m_exStyle; // Extended, resource-specific styles
|
||||
};
|
||||
|
||||
/*
|
||||
* Resource table (normally only one of these)
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxResourceTable: public wxHashTable
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxResourceTable)
|
||||
|
||||
protected:
|
||||
|
||||
public:
|
||||
wxHashTable identifiers;
|
||||
|
||||
wxResourceTable();
|
||||
~wxResourceTable();
|
||||
|
||||
virtual wxItemResource *FindResource(const wxString& name) const;
|
||||
virtual void AddResource(wxItemResource *item);
|
||||
virtual bool DeleteResource(const wxString& name);
|
||||
|
||||
virtual bool ParseResourceFile(const wxString& filename);
|
||||
virtual bool ParseResourceFile(wxInputStream *is);
|
||||
virtual bool ParseResourceData(const wxString& data);
|
||||
virtual bool SaveResource(const wxString& filename);
|
||||
|
||||
// Register XBM/XPM data
|
||||
virtual bool RegisterResourceBitmapData(const wxString& name, char bits[], int width, int height);
|
||||
virtual bool RegisterResourceBitmapData(const wxString& name, char **data);
|
||||
|
||||
virtual wxControl *CreateItem(wxWindow *panel, const wxItemResource* childResource, const wxItemResource* parentResource) const;
|
||||
|
||||
virtual void ClearTable();
|
||||
};
|
||||
|
||||
WXDLLEXPORT extern void wxInitializeResourceSystem();
|
||||
WXDLLEXPORT extern void wxCleanUpResourceSystem();
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxResourceTable*) wxDefaultResourceTable;
|
||||
WXDLLEXPORT extern long wxParseWindowStyle(const wxString& style);
|
||||
|
||||
class WXDLLEXPORT wxMenuBar;
|
||||
class WXDLLEXPORT wxMenu;
|
||||
class WXDLLEXPORT wxBitmap;
|
||||
class WXDLLEXPORT wxIcon;
|
||||
WXDLLEXPORT extern wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern wxMenuBar* wxResourceCreateMenuBar(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL, wxMenuBar *menuBar = (wxMenuBar *) NULL);
|
||||
WXDLLEXPORT extern wxMenu* wxResourceCreateMenu(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern bool wxResourceParseData(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern bool wxResourceParseData(const char* resource, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern bool wxResourceParseFile(const wxString& filename, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern bool wxResourceParseString(char* s, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern bool wxResourceParseString(const wxString& s, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern void wxResourceClear(wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
// Register XBM/XPM data
|
||||
WXDLLEXPORT extern bool wxResourceRegisterBitmapData(const wxString& name, char bits[], int width, int height, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern bool wxResourceRegisterBitmapData(const wxString& name, char **data, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
#define wxResourceRegisterIconData wxResourceRegisterBitmapData
|
||||
|
||||
/*
|
||||
* Resource identifer code: #define storage
|
||||
*/
|
||||
|
||||
WXDLLEXPORT extern bool wxResourceAddIdentifier(const wxString& name, int value, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
WXDLLEXPORT extern int wxResourceGetIdentifier(const wxString& name, wxResourceTable *table = (wxResourceTable *) NULL);
|
||||
|
||||
#if defined(__WXPM__)
|
||||
#include "wx/os2/wxrsc.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
// _WX_RESOURCEH__
|
@ -1,7 +0,0 @@
|
||||
#ifndef _WX_TREELAY_H_BASE_
|
||||
#define _WX_TREELAY_H_BASE_
|
||||
|
||||
#include "wx/generic/treelay.h"
|
||||
|
||||
#endif
|
||||
// _WX_TREELAY_H_BASE_
|
@ -1,283 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wxexpr.h
|
||||
// Purpose: Prolog-like file I/O, used by resource system.
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_WXEXPRH__
|
||||
#define _WX_WXEXPRH__
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "wxexpr.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_PROLOGIO
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
#include "wx/list.h"
|
||||
#include "wx/hash.h"
|
||||
|
||||
#include "wx/expr.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
// Compatibility
|
||||
#define PrologExpr wxExpr
|
||||
#define PrologDatabase wxExprDatabase
|
||||
#define proioErrorHandler wxExprErrorHandler
|
||||
#define PROIO_ERROR_GENERAL 1
|
||||
#define PROIO_ERROR_SYNTAX 2
|
||||
#define PrologNull wxExprNull
|
||||
#define PrologInteger wxExprInteger
|
||||
#define PrologReal wxExprReal
|
||||
#define PrologWord wxExprWord
|
||||
#define PrologString wxExprString
|
||||
#define PrologList wxExprList
|
||||
#define PrologType wxExprType
|
||||
|
||||
// Error types
|
||||
#define WXEXPR_ERROR_GENERAL 1
|
||||
#define WXEXPR_ERROR_SYNTAX 2
|
||||
|
||||
// Error handler function definition. If app returns TRUE,
|
||||
// carry on processing.
|
||||
typedef bool (*wxExprErrorHandler) (int errorType, char *msg);
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxExprErrorHandler) currentwxExprErrorHandler;
|
||||
|
||||
|
||||
typedef enum {
|
||||
wxExprNull,
|
||||
wxExprInteger,
|
||||
wxExprReal,
|
||||
wxExprWord,
|
||||
wxExprString,
|
||||
wxExprList
|
||||
} wxExprType;
|
||||
|
||||
class WXDLLEXPORT wxExprDatabase;
|
||||
|
||||
class WXDLLEXPORT wxExpr
|
||||
{
|
||||
public:
|
||||
wxObject *client_data;
|
||||
wxExprType type;
|
||||
union {
|
||||
long integer;
|
||||
wxChar *word;
|
||||
wxChar *string;
|
||||
double real;
|
||||
wxExpr *first; // If is a list expr, points to the first node
|
||||
} value;
|
||||
|
||||
wxExpr *next; // If this is a node in a list, points to the next node
|
||||
wxExpr *last; // If is a list expr, points to the last node
|
||||
|
||||
wxExpr(wxExprType the_type, wxChar *word_or_string, bool allocate);
|
||||
wxExpr(const wxString& functor); // Assume this is a new clause - pass functor
|
||||
wxExpr(wxExprType the_type, const wxString& word_or_string = wxT(""));
|
||||
wxExpr(long the_integer);
|
||||
wxExpr(double the_real);
|
||||
wxExpr(wxList *the_list);
|
||||
~wxExpr(void);
|
||||
|
||||
inline wxExprType Type(void) const { return type; }
|
||||
inline long IntegerValue(void) const
|
||||
{
|
||||
if (type == wxExprInteger)
|
||||
return value.integer;
|
||||
else if (type == wxExprReal)
|
||||
return (long)value.real;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
inline double RealValue(void) const {
|
||||
if (type == wxExprReal)
|
||||
return value.real;
|
||||
else if (type == wxExprInteger)
|
||||
return (double)value.integer;
|
||||
else return (double)0.0;
|
||||
}
|
||||
|
||||
inline wxString WordValue(void) const {
|
||||
if (type == wxExprWord)
|
||||
return value.word;
|
||||
else if (type == wxExprString)
|
||||
return wxString(value.string);
|
||||
else return wxString(wxT(""));
|
||||
}
|
||||
|
||||
inline wxString StringValue(void) const {
|
||||
if (type == wxExprString)
|
||||
return wxString(value.string);
|
||||
else if (type == wxExprWord)
|
||||
return wxString(value.word);
|
||||
else return wxString(wxT(""));
|
||||
}
|
||||
|
||||
// Get nth arg of clause (starting from 1)
|
||||
wxExpr *Arg(wxExprType type, int arg) const;
|
||||
|
||||
// Return nth argument of a list expression (starting from zero)
|
||||
wxExpr *Nth(int arg) const;
|
||||
|
||||
// Returns the number of elements in a list expression
|
||||
int Number(void) const;
|
||||
|
||||
// Make a clone
|
||||
wxExpr *Copy(void) const;
|
||||
|
||||
wxExpr *GetAttributeValueNode(const wxString& word) const; // Use only for a clause or list
|
||||
wxExpr *AttributeValue(const wxString& word) const; // Use only for a clause
|
||||
wxString Functor(void) const; // Only for a clause
|
||||
bool IsFunctor(const wxString& s) const; // Only for a clause
|
||||
void WriteClause(FILE* stream); // Write this expression as a top-level clause
|
||||
void WriteExpr(FILE* stream); // Write as any other subexpression
|
||||
|
||||
// Append an expression to a list
|
||||
void Append(wxExpr *expr);
|
||||
// Insert at beginning of list
|
||||
void Insert(wxExpr *expr);
|
||||
|
||||
// Get first expr in list
|
||||
inline wxExpr *GetFirst(void) const { return ((type == wxExprList) ? value.first : (wxExpr*)NULL); }
|
||||
|
||||
// Get next expr if this is a node in a list
|
||||
inline wxExpr *GetNext(void) const { return next; }
|
||||
|
||||
// Get last expr in list
|
||||
inline wxExpr *GetLast(void) const { return ((type == wxExprList) ? last : (wxExpr*)NULL); }
|
||||
|
||||
// This should really be called SetAttributeValue since any existing
|
||||
// attribute-value is deleted first.
|
||||
void AddAttributeValue(const wxString& attribute, long value);
|
||||
void AddAttributeValue(const wxString& attribute, double value);
|
||||
void AddAttributeValueWord(const wxString& attribute, const wxString& value);
|
||||
void AddAttributeValueString(const wxString& attribute, const wxString& value);
|
||||
void AddAttributeValue(const wxString& attribute, wxList *value);
|
||||
void AddAttributeValue(const wxString& attribute, wxExpr *value);
|
||||
void AddAttributeValueStringList(const wxString& attribute, wxList *string_list);
|
||||
|
||||
void DeleteAttributeValue(const wxString& attribute);
|
||||
|
||||
bool GetAttributeValue(const wxString& att, int& var) const;
|
||||
bool GetAttributeValue(const wxString& att, long& var) const;
|
||||
bool GetAttributeValue(const wxString& att, float& var) const;
|
||||
bool GetAttributeValue(const wxString& att, double& var) const;
|
||||
bool GetAttributeValue(const wxString& att, wxString& var) const; // Word OR string -> string
|
||||
bool GetAttributeValue(const wxString& att, wxExpr **var) const;
|
||||
|
||||
// Compatibility with old PrologIO
|
||||
inline void AssignAttributeValue(wxChar *att, int *var) const { GetAttributeValue(att, *var); }
|
||||
inline void AssignAttributeValue(wxChar *att, long *var) const { GetAttributeValue(att, *var); }
|
||||
inline void AssignAttributeValue(wxChar *att, float *var) const { GetAttributeValue(att, *var); }
|
||||
inline void AssignAttributeValue(wxChar *att, double *var) const { GetAttributeValue(att, *var); }
|
||||
inline void AssignAttributeValue(wxChar *att, wxExpr **var) const { GetAttributeValue(att, var); }
|
||||
void AssignAttributeValue(wxChar *att, wxChar **var) const ; // Word OR string -> string
|
||||
|
||||
// Add string items to list if the list attribute exists
|
||||
bool GetAttributeValueStringList(const wxString& att, wxList *var) const;
|
||||
|
||||
// Associate other data with this expression, e.g. when reading in a
|
||||
// number of linked items - store C++ object pointer with the expression
|
||||
// so we can index into the wxExpr database and fish out the pointer.
|
||||
inline void SetClientData(wxObject *data) { client_data = data; }
|
||||
inline wxObject *GetClientData(void) const { return client_data; }
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxExpr)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxExprDatabase: public wxList
|
||||
{
|
||||
private:
|
||||
wxNode *position; // Where we are in a search
|
||||
wxHashTable *hash_table;
|
||||
wxString attribute_to_hash;
|
||||
|
||||
public:
|
||||
int noErrors;
|
||||
|
||||
wxExprDatabase(wxExprErrorHandler handler = 0);
|
||||
|
||||
// Use hashing on both the functor, and the attribute of
|
||||
// specified type (wxExprString or wxExprInteger) and name.
|
||||
// So to find node 45
|
||||
// (i.e. match the clause node(id=45, ...))
|
||||
// it usually requires 1 look-up: the keys for functor and attribute
|
||||
// are added together.
|
||||
// Obviously if the attribute was missing in a clause, it would
|
||||
// fail to be found by this method, but could be retrieved by a
|
||||
// linear search using BeginFind and FindClauseByFunctor,
|
||||
// or just searching through the list as per usual.
|
||||
|
||||
wxExprDatabase(wxExprType type, const wxString& attribute, int size = 500,
|
||||
wxExprErrorHandler handler = 0);
|
||||
|
||||
~wxExprDatabase(void);
|
||||
|
||||
void BeginFind(void) ; // Initialise a search
|
||||
wxExpr *FindClause(long id) ; // Find a term based on an integer id attribute
|
||||
// e.g. node(id=23, type=rectangle, ....).
|
||||
|
||||
// Find on basis of attribute/value pairs, e.g. type=rectangle
|
||||
// This doesn't use hashing; it's a linear search.
|
||||
wxExpr *FindClause(const wxString& word, const wxString& value);
|
||||
wxExpr *FindClause(const wxString& word, long value);
|
||||
wxExpr *FindClause(const wxString& word, double value);
|
||||
wxExpr *FindClauseByFunctor(const wxString& functor);
|
||||
|
||||
wxExpr *HashFind(const wxString& functor, const wxString& value) const;
|
||||
wxExpr *HashFind(const wxString& functor, long value) const;
|
||||
|
||||
void Append(wxExpr *expr); // Does cleverer things if hashing is on
|
||||
void ClearDatabase(void);
|
||||
inline int GetErrorCount() const { return noErrors; }
|
||||
bool Read(const wxString& filename);
|
||||
bool ReadFromString(const wxString& buffer);
|
||||
bool Write(const wxString& fileName);
|
||||
bool Write(FILE* stream);
|
||||
|
||||
// Compatibility
|
||||
inline bool ReadProlog(wxChar *filename) { return Read(wxString(filename)); }
|
||||
inline bool ReadPrologFromString(char *buffer)
|
||||
{
|
||||
return ReadFromString(wxString(buffer, wxConvLibc));
|
||||
}
|
||||
inline void WriteProlog(FILE* stream) { Write(stream); }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxExprDatabase)
|
||||
DECLARE_NO_COPY_CLASS(wxExprDatabase)
|
||||
};
|
||||
|
||||
// Function call-style interface - some more convenience wrappers/unwrappers
|
||||
|
||||
// Make a call
|
||||
WXDLLEXPORT wxExpr* wxExprMakeCall(const wxString& functor ...);
|
||||
|
||||
#define wxExprMakeInteger(x) (new wxExpr((long)x))
|
||||
#define wxExprMakeReal(x) (new wxExpr((double)x))
|
||||
#define wxExprMakeString(x) (new wxExpr(wxExprString, x))
|
||||
#define wxExprMakeWord(x) (new wxExpr(wxExprWord, x))
|
||||
#define wxExprMake(x) (new wxExpr(x))
|
||||
|
||||
// Checks functor
|
||||
WXDLLEXPORT bool wxExprIsFunctor(wxExpr *expr, const wxString& functor);
|
||||
|
||||
// Temporary variable for communicating between wxexpr.cpp and YACC/LEX
|
||||
WXDLLEXPORT_DATA(extern wxExprDatabase*) thewxExprDatabase;
|
||||
|
||||
// YACC/LEX can leave memory lying around...
|
||||
extern "C" WXDLLEXPORT int wxExprCleanUp();
|
||||
|
||||
#endif // wxUSE_PROLOGIO
|
||||
|
||||
#endif // _WX_WXEXPRH__
|
||||
|
3
samples/configure
vendored
3
samples/configure
vendored
@ -700,10 +700,8 @@ trap 'rm -fr `echo "
|
||||
ownerdrw/Makefile
|
||||
png/Makefile
|
||||
printing/Makefile
|
||||
proplist/Makefile
|
||||
propsize/Makefile
|
||||
regtest/Makefile
|
||||
resource/Makefile
|
||||
rotate/Makefile
|
||||
sashtest/Makefile
|
||||
shaped/Makefile
|
||||
@ -717,7 +715,6 @@ trap 'rm -fr `echo "
|
||||
thread/Makefile
|
||||
toolbar/Makefile
|
||||
treectrl/Makefile
|
||||
treelay/Makefile
|
||||
typetest/Makefile
|
||||
validate/Makefile
|
||||
widgets/Makefile
|
||||
|
@ -70,10 +70,8 @@ AC_OUTPUT([
|
||||
ownerdrw/Makefile
|
||||
png/Makefile
|
||||
printing/Makefile
|
||||
proplist/Makefile
|
||||
propsize/Makefile
|
||||
regtest/Makefile
|
||||
resource/Makefile
|
||||
rotate/Makefile
|
||||
sashtest/Makefile
|
||||
shaped/Makefile
|
||||
@ -87,7 +85,6 @@ AC_OUTPUT([
|
||||
thread/Makefile
|
||||
toolbar/Makefile
|
||||
treectrl/Makefile
|
||||
treelay/Makefile
|
||||
typetest/Makefile
|
||||
validate/Makefile
|
||||
widgets/Makefile
|
||||
|
@ -29,12 +29,6 @@
|
||||
#define USE_METAFILES
|
||||
#endif // Windows
|
||||
|
||||
#define USE_RESOURCES 0
|
||||
#if !wxUSE_RESOURCES
|
||||
#undef USE_RESOURCES
|
||||
#define USE_RESOURCES 0
|
||||
#endif
|
||||
|
||||
#include "wx/intl.h"
|
||||
#include "wx/log.h"
|
||||
|
||||
@ -44,11 +38,7 @@
|
||||
#include "wx/image.h"
|
||||
#include "wx/clipbrd.h"
|
||||
#include "wx/colordlg.h"
|
||||
#if USE_RESOURCES
|
||||
#include "wx/resource.h"
|
||||
#else
|
||||
#include "wx/sizer.h"
|
||||
#endif
|
||||
#include "wx/sizer.h"
|
||||
|
||||
#ifdef USE_METAFILES
|
||||
#include "wx/metafile.h"
|
||||
@ -347,7 +337,7 @@ protected:
|
||||
//get a point 1 up and 1 left, otherwise the mid-point of a triangle is on the line
|
||||
wxPoint GetCentre() const
|
||||
{ return wxPoint(m_pos.x + m_size.x / 2 - 1, m_pos.y + m_size.y / 2 - 1); }
|
||||
|
||||
|
||||
struct ShapeDump
|
||||
{
|
||||
int x, y, // position
|
||||
@ -393,7 +383,7 @@ public:
|
||||
dc.DrawLine(p3, p1);
|
||||
|
||||
//works in multicolor modes; on GTK (at least) will fail in 16-bit color
|
||||
dc.SetBrush(wxBrush(m_col, wxSOLID));
|
||||
dc.SetBrush(wxBrush(m_col, wxSOLID));
|
||||
dc.FloodFill(GetCentre(), m_col, wxFLOOD_BORDER);
|
||||
}
|
||||
};
|
||||
@ -874,27 +864,6 @@ END_EVENT_TABLE()
|
||||
// `Main program' equivalent, creating windows and returning main app frame
|
||||
bool DnDApp::OnInit()
|
||||
{
|
||||
#if USE_RESOURCES
|
||||
// load our ressources
|
||||
wxPathList pathList;
|
||||
pathList.Add(_T("."));
|
||||
#ifdef __WXMSW__
|
||||
pathList.Add(_T("./Debug"));
|
||||
pathList.Add(_T("./Release"));
|
||||
#endif // wxMSW
|
||||
|
||||
wxString path = pathList.FindValidPath(_T("dnd.wxr"));
|
||||
if ( !path )
|
||||
{
|
||||
wxLogError(wxT("Can't find the resource file dnd.wxr in the current ")
|
||||
wxT("directory, aborting."));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxDefaultResourceTable->ParseResourceFile(path);
|
||||
#endif
|
||||
|
||||
// switch on trace messages
|
||||
#if defined(__WXGTK__)
|
||||
wxLog::AddTraceMask(_T("clipboard"));
|
||||
@ -1496,23 +1465,11 @@ bool DnDFile::OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
DnDShapeDialog::DnDShapeDialog(wxFrame *parent, DnDShape *shape)
|
||||
#if !USE_RESOURCES
|
||||
:wxDialog( parent, 6001, wxT("Choose Shape"), wxPoint( 10, 10 ),
|
||||
wxSize( 40, 40 ),
|
||||
wxRAISED_BORDER|wxCAPTION|wxTHICK_FRAME|wxSYSTEM_MENU )
|
||||
#endif
|
||||
{
|
||||
m_shape = shape;
|
||||
#if USE_RESOURCES
|
||||
LoadFromResource(parent, _T("dialogShape"));
|
||||
|
||||
m_textX = (wxTextCtrl *)wxFindWindowByName(_T("textX"), this);
|
||||
m_textY = (wxTextCtrl *)wxFindWindowByName(_T("textY"), this);
|
||||
m_textW = (wxTextCtrl *)wxFindWindowByName(_T("textW"), this);
|
||||
m_textH = (wxTextCtrl *)wxFindWindowByName(_T("textH"), this);
|
||||
|
||||
m_radio = (wxRadioBox *)wxFindWindowByName(_T("radio"), this);
|
||||
#else
|
||||
wxBoxSizer* topSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
// radio box
|
||||
@ -1574,7 +1531,6 @@ DnDShapeDialog::DnDShapeDialog(wxFrame *parent, DnDShape *shape)
|
||||
SetAutoLayout( TRUE );
|
||||
SetSizer( topSizer );
|
||||
topSizer->Fit( this );
|
||||
#endif
|
||||
}
|
||||
|
||||
DnDShape *DnDShapeDialog::GetShape() const
|
||||
|
@ -121,12 +121,8 @@ all:
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\printing
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\proplist
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\regtest
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\resource
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\rotate
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\sashtest
|
||||
@ -169,8 +165,6 @@ all:
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\tab
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\treelay
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\erase
|
||||
make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
|
||||
cd $(WXDIR)\samples\event
|
||||
@ -253,12 +247,8 @@ clean:
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\printing
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\proplist
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\regtest
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\resource
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\rotate
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\sashtest
|
||||
@ -301,8 +291,6 @@ clean:
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\sockets
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\treelay
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\treectrl
|
||||
make -f makefile.b32 clean
|
||||
cd $(WXDIR)\samples\tab
|
||||
|
@ -116,14 +116,10 @@ all:
|
||||
!endif
|
||||
cd $(WXDIR)\samples\printing
|
||||
nmake -f makefile.dos FINAL=$(FINAL)
|
||||
cd $(WXDIR)\samples\proplist
|
||||
nmake -f makefile.dos FINAL=$(FINAL)
|
||||
!if "$(NOMAKE)"==""
|
||||
cd $(WXDIR)\samples\regtest
|
||||
nmake -f makefile.dos FINAL=$(FINAL)
|
||||
!endif
|
||||
cd $(WXDIR)\samples\resource
|
||||
nmake -f makefile.dos FINAL=$(FINAL)
|
||||
!if "$(NOMAKE)"==""
|
||||
cd $(WXDIR)\samples\sashtest
|
||||
nmake -f makefile.dos FINAL=$(FINAL)
|
||||
@ -239,14 +235,10 @@ clean:
|
||||
!endif
|
||||
cd $(WXDIR)\samples\printing
|
||||
nmake -f makefile.dos clean
|
||||
cd $(WXDIR)\samples\proplist
|
||||
nmake -f makefile.dos clean
|
||||
!if "$(NOMAKE)"==""
|
||||
cd $(WXDIR)\samples\regtest
|
||||
nmake -f makefile.dos clean
|
||||
!endif
|
||||
cd $(WXDIR)\samples\resource
|
||||
nmake -f makefile.dos clean
|
||||
!if "$(NOMAKE)"==""
|
||||
cd $(WXDIR)\samples\sashtest
|
||||
nmake -f makefile.dos clean
|
||||
|
@ -63,10 +63,8 @@ all clean:
|
||||
-$(MAKE) -C ownerdrw $(CMDLINE) $@
|
||||
-$(MAKE) -C png $(CMDLINE) $@
|
||||
-$(MAKE) -C printing $(CMDLINE) $@
|
||||
-$(MAKE) -C proplist $(CMDLINE) $@
|
||||
-$(MAKE) -C propsize $(CMDLINE) $@
|
||||
-$(MAKE) -C regtest $(CMDLINE) $@
|
||||
-$(MAKE) -C resource $(CMDLINE) $@
|
||||
-$(MAKE) -C rotate $(CMDLINE) $@
|
||||
-$(MAKE) -C sashtest $(CMDLINE) $@
|
||||
-$(MAKE) -C scroll $(CMDLINE) $@
|
||||
@ -80,7 +78,6 @@ all clean:
|
||||
-$(MAKE) -C thread $(CMDLINE) $@
|
||||
-$(MAKE) -C toolbar $(CMDLINE) $@
|
||||
-$(MAKE) -C treectrl $(CMDLINE) $@
|
||||
-$(MAKE) -C treelay $(CMDLINE) $@
|
||||
-$(MAKE) -C typetest $(CMDLINE) $@
|
||||
-$(MAKE) -C validate $(CMDLINE) $@
|
||||
-$(MAKE) -C widgets $(CMDLINE) $@
|
||||
|
@ -118,12 +118,8 @@ all:
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
cd $(WXDIR)\samples\printing
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
cd $(WXDIR)\samples\proplist
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
cd $(WXDIR)\samples\regtest
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
cd $(WXDIR)\samples\resource
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
cd $(WXDIR)\samples\rotate
|
||||
nmake -f makefile.vc $(MAKEFLAGS)
|
||||
cd $(WXDIR)\samples\sashtest
|
||||
@ -228,12 +224,8 @@ clean:
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\printing
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\proplist
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\regtest
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\resource
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\rotate
|
||||
nmake -f makefile.vc clean
|
||||
cd $(WXDIR)\samples\sashtest
|
||||
|
@ -28,8 +28,6 @@
|
||||
#error Sorry, this sample is only appropriate under Windows.
|
||||
#endif
|
||||
|
||||
#include "wx/resource.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include "nativdlg.h"
|
||||
#include "resource.h"
|
||||
|
@ -627,18 +627,6 @@ Package=<4>
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "proplist"=.\proplist\proplist.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "propsize"=.\propsize\propsize.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
@ -663,18 +651,6 @@ Package=<4>
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "resource"=.\resource\resource.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "rotate"=.\rotate\rotate.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
@ -831,18 +807,6 @@ Package=<4>
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "treelay"=.\treelay\treelay.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "typetest"=.\typetest\typetest.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,547 +0,0 @@
|
||||
#ifndef lint
|
||||
static char yysccsid[] = "@(#)yaccpar 1.7 (Berkeley) 09/09/90";
|
||||
#endif
|
||||
#define YYBYACC 1
|
||||
#line 2 "parser.y"
|
||||
#include "string.h"
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include "wx/expr.h"
|
||||
|
||||
#ifndef __EXTERN_C__
|
||||
#define __EXTERN_C__ 1
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) || defined(__STDC__)
|
||||
#if defined(__cplusplus) && defined(__EXTERN_C__)
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
int yyparse(void);
|
||||
int PROIO_yyparse(void) {
|
||||
return yyparse() ;
|
||||
}
|
||||
int yylex(void);
|
||||
int yylook(void);
|
||||
int yywrap(void);
|
||||
int yyback(int *, int);
|
||||
#if __MSL__ < 0x6000
|
||||
int read( int , char * , int ) ;
|
||||
#else
|
||||
#ifndef __MACH__
|
||||
int _read( int , void * , size_t ) ;
|
||||
#define read _read
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
//int fileno( FILE* ) ; This is defined in watcom
|
||||
#else
|
||||
#if __MSL__ < 0x6000L
|
||||
int fileno( void* ) ;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* You may need to put /DLEX_SCANNER in your makefile
|
||||
* if you're using LEX!
|
||||
Last change: JS 13 Jul 97 6:12 pm
|
||||
*/
|
||||
#ifdef LEX_SCANNER
|
||||
/* int yyoutput(int); */
|
||||
void yyoutput(int);
|
||||
#else
|
||||
void yyoutput(int);
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) || defined(__STDC__)
|
||||
#if defined(__cplusplus) && defined(__EXTERN_C__)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#line 36 "parser.y"
|
||||
typedef union {
|
||||
char *s;
|
||||
/* struct pexpr *expr; */
|
||||
} YYSTYPE;
|
||||
#line 44 "y_tab.c"
|
||||
#define INTEGER 1
|
||||
#define WORD 2
|
||||
#define STRING 3
|
||||
#define PERIOD 13
|
||||
#define OPEN 4
|
||||
#define CLOSE 5
|
||||
#define COMMA 6
|
||||
#define NEWLINE 7
|
||||
#define ERROR 8
|
||||
#define OPEN_SQUARE 9
|
||||
#define CLOSE_SQUARE 10
|
||||
#define EQUALS 11
|
||||
#define EXP 14
|
||||
#define YYERRCODE 256
|
||||
short yylhs[] = { -1,
|
||||
0, 0, 1, 1, 1, 2, 2, 2, 3, 3,
|
||||
3, 4, 4, 5, 5, 5, 5, 5, 5, 5,
|
||||
};
|
||||
short yylen[] = { 2,
|
||||
0, 2, 2, 2, 2, 4, 2, 3, 0, 1,
|
||||
3, 3, 1, 1, 1, 1, 3, 3, 5, 1,
|
||||
};
|
||||
short yydefred[] = { 1,
|
||||
0, 0, 0, 0, 2, 0, 5, 3, 0, 0,
|
||||
0, 15, 7, 20, 0, 0, 13, 4, 0, 0,
|
||||
0, 0, 8, 0, 6, 0, 18, 0, 12, 11,
|
||||
0, 19,
|
||||
};
|
||||
short yydgoto[] = { 1,
|
||||
5, 14, 15, 16, 17,
|
||||
};
|
||||
short yysindex[] = { 0,
|
||||
-2, 9, 2, 1, 0, 10, 0, 0, 11, -5,
|
||||
17, 0, 0, 0, 14, -1, 0, 0, 33, 38,
|
||||
41, 16, 0, 11, 0, 29, 0, 40, 0, 0,
|
||||
44, 0,
|
||||
};
|
||||
short yyrindex[] = { 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 42, 21,
|
||||
24, 0, 0, 0, 0, 30, 0, 0, 0, 0,
|
||||
0, 0, 0, 31, 0, 27, 0, 24, 0, 0,
|
||||
0, 0,
|
||||
};
|
||||
short yygindex[] = { 0,
|
||||
0, 45, -8, 0, 26,
|
||||
};
|
||||
#define YYTABLESIZE 254
|
||||
short yytable[] = { 3,
|
||||
19, 10, 11, 12, 24, 9, 4, 20, 21, 4,
|
||||
13, 10, 11, 12, 8, 30, 10, 28, 12, 4,
|
||||
9, 7, 18, 23, 4, 16, 16, 22, 14, 14,
|
||||
16, 17, 17, 14, 10, 9, 17, 25, 26, 10,
|
||||
9, 27, 31, 9, 32, 6, 9, 29, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 2,
|
||||
};
|
||||
short yycheck[] = { 2,
|
||||
9, 1, 2, 3, 6, 4, 9, 13, 14, 9,
|
||||
10, 1, 2, 3, 13, 24, 1, 2, 3, 9,
|
||||
4, 13, 13, 10, 9, 5, 6, 11, 5, 6,
|
||||
10, 5, 6, 10, 5, 5, 10, 5, 1, 10,
|
||||
10, 1, 14, 4, 1, 1, 5, 22, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, 256,
|
||||
};
|
||||
#define YYFINAL 1
|
||||
#ifndef YYDEBUG
|
||||
#define YYDEBUG 0
|
||||
#endif
|
||||
#define YYMAXTOKEN 14
|
||||
#if YYDEBUG
|
||||
char *yyname[] = {
|
||||
"end-of-file","INTEGER","WORD","STRING","OPEN","CLOSE","COMMA","NEWLINE",
|
||||
"ERROR","OPEN_SQUARE","CLOSE_SQUARE","EQUALS",0,"PERIOD","EXP",
|
||||
};
|
||||
char *yyrule[] = {
|
||||
"$accept : commands",
|
||||
"commands :",
|
||||
"commands : commands command",
|
||||
"command : WORD PERIOD",
|
||||
"command : expr PERIOD",
|
||||
"command : error PERIOD",
|
||||
"expr : WORD OPEN arglist CLOSE",
|
||||
"expr : OPEN_SQUARE CLOSE_SQUARE",
|
||||
"expr : OPEN_SQUARE arglist CLOSE_SQUARE",
|
||||
"arglist :",
|
||||
"arglist : arg",
|
||||
"arglist : arg COMMA arglist",
|
||||
"arg : WORD EQUALS arg1",
|
||||
"arg : arg1",
|
||||
"arg1 : WORD",
|
||||
"arg1 : STRING",
|
||||
"arg1 : INTEGER",
|
||||
"arg1 : INTEGER PERIOD INTEGER",
|
||||
"arg1 : INTEGER EXP INTEGER",
|
||||
"arg1 : INTEGER PERIOD INTEGER EXP INTEGER",
|
||||
"arg1 : expr",
|
||||
};
|
||||
#endif
|
||||
#define yyclearin (yychar=(-1))
|
||||
#define yyerrok (yyerrflag=0)
|
||||
#ifdef YYSTACKSIZE
|
||||
#ifndef YYMAXDEPTH
|
||||
#define YYMAXDEPTH YYSTACKSIZE
|
||||
#endif
|
||||
#else
|
||||
#ifdef YYMAXDEPTH
|
||||
#define YYSTACKSIZE YYMAXDEPTH
|
||||
#else
|
||||
#define YYSTACKSIZE 600
|
||||
#define YYMAXDEPTH 600
|
||||
#endif
|
||||
#endif
|
||||
int yydebug;
|
||||
int yynerrs;
|
||||
int yyerrflag;
|
||||
int yychar;
|
||||
short *yyssp;
|
||||
YYSTYPE *yyvsp;
|
||||
YYSTYPE yyval;
|
||||
YYSTYPE yylval;
|
||||
short yyss[YYSTACKSIZE];
|
||||
YYSTYPE yyvs[YYSTACKSIZE];
|
||||
#define yystacksize YYSTACKSIZE
|
||||
#line 118 "parser.y"
|
||||
|
||||
#ifdef IDE_INVOKED
|
||||
#include "../common/doslex.c"
|
||||
#else
|
||||
#if (defined(__MWERKS__))
|
||||
#include "../common/cwlex_yy.c"
|
||||
#else
|
||||
#include "../common/lex_yy.c"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
void yyerror(s)
|
||||
char *s;
|
||||
{
|
||||
syntax_error(s);
|
||||
}
|
||||
*/
|
||||
|
||||
/* Ansi prototype. If this doesn't work for you... uncomment
|
||||
the above instead.
|
||||
*/
|
||||
|
||||
void yyerror(char *s)
|
||||
{
|
||||
syntax_error(s);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unfortunately, my DOS version of FLEX
|
||||
* requires yywrap to be #def'ed, whereas
|
||||
* the UNIX flex expects a proper function.
|
||||
*/
|
||||
|
||||
/* Not sure if __SC__ is the appropriate thing
|
||||
* to test
|
||||
*/
|
||||
|
||||
#ifndef __SC__
|
||||
#ifdef USE_DEFINE
|
||||
#ifndef yywrap
|
||||
#define yywrap() 1
|
||||
#endif
|
||||
#else
|
||||
int yywrap() { return 1; }
|
||||
#endif
|
||||
#endif
|
||||
#line 247 "y_tab.c"
|
||||
#define YYABORT goto yyabort
|
||||
#define YYACCEPT goto yyaccept
|
||||
#define YYERROR goto yyerrlab
|
||||
int
|
||||
yyparse()
|
||||
{
|
||||
register int yym, yyn, yystate;
|
||||
#if YYDEBUG
|
||||
register char *yys;
|
||||
extern char *getenv();
|
||||
|
||||
if (yys = getenv("YYDEBUG"))
|
||||
{
|
||||
yyn = *yys;
|
||||
if (yyn >= '0' && yyn <= '9')
|
||||
yydebug = yyn - '0';
|
||||
}
|
||||
#endif
|
||||
|
||||
yynerrs = 0;
|
||||
yyerrflag = 0;
|
||||
yychar = (-1);
|
||||
|
||||
yyssp = yyss;
|
||||
yyvsp = yyvs;
|
||||
*yyssp = yystate = 0;
|
||||
|
||||
yyloop:
|
||||
if (yyn = yydefred[yystate]) goto yyreduce;
|
||||
if (yychar < 0)
|
||||
{
|
||||
if ((yychar = yylex()) < 0) yychar = 0;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = 0;
|
||||
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
|
||||
if (!yys) yys = "illegal-symbol";
|
||||
printf("yydebug: state %d, reading %d (%s)\n", yystate,
|
||||
yychar, yys);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: state %d, shifting to state %d\n",
|
||||
yystate, yytable[yyn]);
|
||||
#endif
|
||||
if (yyssp >= yyss + yystacksize - 1)
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
*++yyssp = yystate = yytable[yyn];
|
||||
*++yyvsp = yylval;
|
||||
yychar = (-1);
|
||||
if (yyerrflag > 0) --yyerrflag;
|
||||
goto yyloop;
|
||||
}
|
||||
if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
||||
{
|
||||
yyn = yytable[yyn];
|
||||
goto yyreduce;
|
||||
}
|
||||
if (yyerrflag) goto yyinrecovery;
|
||||
#ifdef lint
|
||||
goto yynewerror;
|
||||
#endif
|
||||
yynewerror:
|
||||
yyerror("syntax error");
|
||||
#ifdef lint
|
||||
goto yyerrlab;
|
||||
#endif
|
||||
yyerrlab:
|
||||
++yynerrs;
|
||||
yyinrecovery:
|
||||
if (yyerrflag < 3)
|
||||
{
|
||||
yyerrflag = 3;
|
||||
for (;;)
|
||||
{
|
||||
if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: state %d, error recovery shifting\
|
||||
to state %d\n", *yyssp, yytable[yyn]);
|
||||
#endif
|
||||
if (yyssp >= yyss + yystacksize - 1)
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
*++yyssp = yystate = yytable[yyn];
|
||||
*++yyvsp = yylval;
|
||||
goto yyloop;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: error recovery discarding state %d\n",
|
||||
*yyssp);
|
||||
#endif
|
||||
if (yyssp <= yyss) goto yyabort;
|
||||
--yyssp;
|
||||
--yyvsp;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (yychar == 0) goto yyabort;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = 0;
|
||||
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
|
||||
if (!yys) yys = "illegal-symbol";
|
||||
printf("yydebug: state %d, error recovery discards token %d (%s)\n",
|
||||
yystate, yychar, yys);
|
||||
}
|
||||
#endif
|
||||
yychar = (-1);
|
||||
goto yyloop;
|
||||
}
|
||||
yyreduce:
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: state %d, reducing by rule %d (%s)\n",
|
||||
yystate, yyn, yyrule[yyn]);
|
||||
#endif
|
||||
yym = yylen[yyn];
|
||||
yyval = yyvsp[1-yym];
|
||||
switch (yyn)
|
||||
{
|
||||
case 3:
|
||||
#line 68 "parser.y"
|
||||
{process_command(proio_cons(wxmake_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);}
|
||||
break;
|
||||
case 4:
|
||||
#line 70 "parser.y"
|
||||
{process_command(yyvsp[-1].s);}
|
||||
break;
|
||||
case 5:
|
||||
#line 72 "parser.y"
|
||||
{syntax_error("Unrecognized command.");}
|
||||
break;
|
||||
case 6:
|
||||
#line 76 "parser.y"
|
||||
{yyval.s = proio_cons(wxmake_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);}
|
||||
break;
|
||||
case 7:
|
||||
#line 78 "parser.y"
|
||||
{yyval.s = proio_cons(NULL, NULL);}
|
||||
break;
|
||||
case 8:
|
||||
#line 80 "parser.y"
|
||||
{yyval.s = yyvsp[-1].s; }
|
||||
break;
|
||||
case 9:
|
||||
#line 84 "parser.y"
|
||||
{yyval.s = NULL;}
|
||||
break;
|
||||
case 10:
|
||||
#line 86 "parser.y"
|
||||
{yyval.s = proio_cons(yyvsp[0].s, NULL);}
|
||||
break;
|
||||
case 11:
|
||||
#line 89 "parser.y"
|
||||
{yyval.s = proio_cons(yyvsp[-2].s, yyvsp[0].s);}
|
||||
break;
|
||||
case 12:
|
||||
#line 93 "parser.y"
|
||||
{yyval.s = proio_cons(wxmake_word("="), proio_cons(wxmake_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL)));
|
||||
free(yyvsp[-2].s); }
|
||||
break;
|
||||
case 13:
|
||||
#line 96 "parser.y"
|
||||
{yyval.s = yyvsp[0].s; }
|
||||
break;
|
||||
case 14:
|
||||
#line 99 "parser.y"
|
||||
{yyval.s = wxmake_word(yyvsp[0].s); free(yyvsp[0].s);}
|
||||
break;
|
||||
case 15:
|
||||
#line 101 "parser.y"
|
||||
{yyval.s = wxmake_string(yyvsp[0].s); free(yyvsp[0].s);}
|
||||
break;
|
||||
case 16:
|
||||
#line 103 "parser.y"
|
||||
{yyval.s = wxmake_integer(yyvsp[0].s); free(yyvsp[0].s);}
|
||||
break;
|
||||
case 17:
|
||||
#line 105 "parser.y"
|
||||
{yyval.s = wxmake_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
|
||||
break;
|
||||
case 18:
|
||||
#line 107 "parser.y"
|
||||
{yyval.s = wxmake_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
|
||||
break;
|
||||
case 19:
|
||||
#line 110 "parser.y"
|
||||
{yyval.s = wxmake_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s);
|
||||
free(yyvsp[0].s); }
|
||||
break;
|
||||
case 20:
|
||||
#line 114 "parser.y"
|
||||
{yyval.s = yyvsp[0].s;}
|
||||
break;
|
||||
#line 461 "y_tab.c"
|
||||
}
|
||||
yyssp -= yym;
|
||||
yystate = *yyssp;
|
||||
yyvsp -= yym;
|
||||
yym = yylhs[yyn];
|
||||
if (yystate == 0 && yym == 0)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: after reduction, shifting from state 0 to\
|
||||
state %d\n", YYFINAL);
|
||||
#endif
|
||||
yystate = YYFINAL;
|
||||
*++yyssp = YYFINAL;
|
||||
*++yyvsp = yyval;
|
||||
if (yychar < 0)
|
||||
{
|
||||
if ((yychar = yylex()) < 0) yychar = 0;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = 0;
|
||||
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
|
||||
if (!yys) yys = "illegal-symbol";
|
||||
printf("yydebug: state %d, reading %d (%s)\n",
|
||||
YYFINAL, yychar, yys);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (yychar == 0) goto yyaccept;
|
||||
goto yyloop;
|
||||
}
|
||||
if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
|
||||
yystate = yytable[yyn];
|
||||
else
|
||||
yystate = yydgoto[yym];
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: after reduction, shifting from state %d \
|
||||
to state %d\n", *yyssp, yystate);
|
||||
#endif
|
||||
if (yyssp >= yyss + yystacksize - 1)
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
*++yyssp = yystate;
|
||||
*++yyvsp = yyval;
|
||||
goto yyloop;
|
||||
yyoverflow:
|
||||
yyerror("yacc stack overflow");
|
||||
yyabort:
|
||||
return (1);
|
||||
yyaccept:
|
||||
return (0);
|
||||
}
|
1276
src/common/doslex.c
1276
src/common/doslex.c
File diff suppressed because it is too large
Load Diff
@ -1,540 +0,0 @@
|
||||
/* include platform.h first to get __WIN32__ definition */
|
||||
#include "wx/platform.h"
|
||||
#if defined(__WIN32__) || defined(__GNUWIN32__)
|
||||
/* all Win32 compilers can handle C++ comments, and C++ comments
|
||||
is the only C++ in setup.h */
|
||||
#include "wx/setup.h"
|
||||
#endif
|
||||
|
||||
#if !defined(wxUSE_PROLOGIO) || wxUSE_PROLOGIO
|
||||
|
||||
#ifndef lint
|
||||
static char yysccsid[] = "@(#)yaccpar 1.7 (Berkeley) 09/09/90";
|
||||
#endif
|
||||
#define YYBYACC 1
|
||||
#line 2 "parser.y"
|
||||
#include "string.h"
|
||||
#if defined(_MSC_VER) || defined(__VISAGECPP__)
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include "wx/expr.h"
|
||||
|
||||
#ifndef __EXTERN_C__
|
||||
#define __EXTERN_C__ 1
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) || defined(__STDC__)
|
||||
#if defined(__cplusplus) && defined(__EXTERN_C__)
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
int yylex(void);
|
||||
int yylook(void);
|
||||
int yywrap(void);
|
||||
int yyback(int *, int);
|
||||
|
||||
/* You may need to put /DLEX_SCANNER in your makefile
|
||||
* if you're using LEX!
|
||||
*/
|
||||
#ifdef LEX_SCANNER
|
||||
/* int yyoutput(int); */
|
||||
void yyoutput(int);
|
||||
#else
|
||||
void yyoutput(int);
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) || defined(__STDC__)
|
||||
#if defined(__cplusplus) && defined(__EXTERN_C__)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#line 36 "parser.y"
|
||||
typedef union {
|
||||
char *s;
|
||||
/* struct pexpr *expr; */
|
||||
} YYSTYPE;
|
||||
#line 44 "y_tab.c"
|
||||
#define INTEGER 1
|
||||
#define WORD 2
|
||||
#define STRING 3
|
||||
#define PERIOD 13
|
||||
#define OPEN 4
|
||||
#define CLOSE 5
|
||||
#define COMMA 6
|
||||
#define NEWLINE 7
|
||||
#define ERROR 8
|
||||
#define OPEN_SQUARE 9
|
||||
#define CLOSE_SQUARE 10
|
||||
#define EQUALS 11
|
||||
#define EXP 14
|
||||
#define YYERRCODE 256
|
||||
short yylhs[] = { -1,
|
||||
0, 0, 1, 1, 1, 2, 2, 2, 3, 3,
|
||||
3, 4, 4, 5, 5, 5, 5, 5, 5, 5,
|
||||
};
|
||||
short yylen[] = { 2,
|
||||
0, 2, 2, 2, 2, 4, 2, 3, 0, 1,
|
||||
3, 3, 1, 1, 1, 1, 3, 3, 5, 1,
|
||||
};
|
||||
short yydefred[] = { 1,
|
||||
0, 0, 0, 0, 2, 0, 5, 3, 0, 0,
|
||||
0, 15, 7, 20, 0, 0, 13, 4, 0, 0,
|
||||
0, 0, 8, 0, 6, 0, 18, 0, 12, 11,
|
||||
0, 19,
|
||||
};
|
||||
short yydgoto[] = { 1,
|
||||
5, 14, 15, 16, 17,
|
||||
};
|
||||
short yysindex[] = { 0,
|
||||
-2, 9, 2, 1, 0, 10, 0, 0, 11, -5,
|
||||
17, 0, 0, 0, 14, -1, 0, 0, 33, 38,
|
||||
41, 16, 0, 11, 0, 29, 0, 40, 0, 0,
|
||||
44, 0,
|
||||
};
|
||||
short yyrindex[] = { 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 42, 21,
|
||||
24, 0, 0, 0, 0, 30, 0, 0, 0, 0,
|
||||
0, 0, 0, 31, 0, 27, 0, 24, 0, 0,
|
||||
0, 0,
|
||||
};
|
||||
short yygindex[] = { 0,
|
||||
0, 45, -8, 0, 26,
|
||||
};
|
||||
#define YYTABLESIZE 254
|
||||
short yytable[] = { 3,
|
||||
19, 10, 11, 12, 24, 9, 4, 20, 21, 4,
|
||||
13, 10, 11, 12, 8, 30, 10, 28, 12, 4,
|
||||
9, 7, 18, 23, 4, 16, 16, 22, 14, 14,
|
||||
16, 17, 17, 14, 10, 9, 17, 25, 26, 10,
|
||||
9, 27, 31, 9, 32, 6, 9, 29, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 2,
|
||||
};
|
||||
short yycheck[] = { 2,
|
||||
9, 1, 2, 3, 6, 4, 9, 13, 14, 9,
|
||||
10, 1, 2, 3, 13, 24, 1, 2, 3, 9,
|
||||
4, 13, 13, 10, 9, 5, 6, 11, 5, 6,
|
||||
10, 5, 6, 10, 5, 5, 10, 5, 1, 10,
|
||||
10, 1, 14, 4, 1, 1, 5, 22, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, 256,
|
||||
};
|
||||
#define YYFINAL 1
|
||||
#ifndef YYDEBUG
|
||||
#define YYDEBUG 0
|
||||
#endif
|
||||
#define YYMAXTOKEN 14
|
||||
#if YYDEBUG
|
||||
char *yyname[] = {
|
||||
"end-of-file","INTEGER","WORD","STRING","OPEN","CLOSE","COMMA","NEWLINE",
|
||||
"ERROR","OPEN_SQUARE","CLOSE_SQUARE","EQUALS",0,"PERIOD","EXP",
|
||||
};
|
||||
char *yyrule[] = {
|
||||
"$accept : commands",
|
||||
"commands :",
|
||||
"commands : commands command",
|
||||
"command : WORD PERIOD",
|
||||
"command : expr PERIOD",
|
||||
"command : error PERIOD",
|
||||
"expr : WORD OPEN arglist CLOSE",
|
||||
"expr : OPEN_SQUARE CLOSE_SQUARE",
|
||||
"expr : OPEN_SQUARE arglist CLOSE_SQUARE",
|
||||
"arglist :",
|
||||
"arglist : arg",
|
||||
"arglist : arg COMMA arglist",
|
||||
"arg : WORD EQUALS arg1",
|
||||
"arg : arg1",
|
||||
"arg1 : WORD",
|
||||
"arg1 : STRING",
|
||||
"arg1 : INTEGER",
|
||||
"arg1 : INTEGER PERIOD INTEGER",
|
||||
"arg1 : INTEGER EXP INTEGER",
|
||||
"arg1 : INTEGER PERIOD INTEGER EXP INTEGER",
|
||||
"arg1 : expr",
|
||||
};
|
||||
#endif
|
||||
#define yyclearin (yychar=(-1))
|
||||
#define yyerrok (yyerrflag=0)
|
||||
#ifdef YYSTACKSIZE
|
||||
#ifndef YYMAXDEPTH
|
||||
#define YYMAXDEPTH YYSTACKSIZE
|
||||
#endif
|
||||
#else
|
||||
#ifdef YYMAXDEPTH
|
||||
#define YYSTACKSIZE YYMAXDEPTH
|
||||
#else
|
||||
#define YYSTACKSIZE 600
|
||||
#define YYMAXDEPTH 600
|
||||
#endif
|
||||
#endif
|
||||
int yydebug;
|
||||
int yynerrs;
|
||||
int yyerrflag;
|
||||
int yychar;
|
||||
short *yyssp;
|
||||
YYSTYPE *yyvsp;
|
||||
YYSTYPE yyval;
|
||||
YYSTYPE yylval;
|
||||
short yyss[YYSTACKSIZE];
|
||||
YYSTYPE yyvs[YYSTACKSIZE];
|
||||
#define yystacksize YYSTACKSIZE
|
||||
#line 118 "parser.y"
|
||||
|
||||
#ifdef IDE_INVOKED
|
||||
#include "../common/doslex.c"
|
||||
#else
|
||||
#include "../common/lex_yy.c"
|
||||
#endif
|
||||
|
||||
/*
|
||||
void yyerror(s)
|
||||
char *s;
|
||||
{
|
||||
syntax_error(s);
|
||||
}
|
||||
*/
|
||||
|
||||
/* Ansi prototype. If this doesn't work for you... uncomment
|
||||
the above instead.
|
||||
*/
|
||||
|
||||
void yyerror(char *s)
|
||||
{
|
||||
syntax_error(s);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unfortunately, my DOS version of FLEX
|
||||
* requires yywrap to be #def'ed, whereas
|
||||
* the UNIX flex expects a proper function.
|
||||
*/
|
||||
|
||||
/* Not sure if __SC__ is the appropriate thing
|
||||
* to test
|
||||
*/
|
||||
|
||||
#ifndef __SC__
|
||||
#ifdef USE_DEFINE
|
||||
#ifndef yywrap
|
||||
#define yywrap() 1
|
||||
#endif
|
||||
#else
|
||||
# if !(defined(__VISAGECPP__) && __IBMC__ >= 400)
|
||||
/* VA 4.0 thinks this is multiply defined (in lex_yy.c) */
|
||||
int yywrap() { return 1; }
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
#line 247 "y_tab.c"
|
||||
#define YYABORT goto yyabort
|
||||
#define YYACCEPT goto yyaccept
|
||||
#define YYERROR goto yyerrlab
|
||||
int
|
||||
PROIO_yyparse()
|
||||
{
|
||||
register int yym, yyn, yystate;
|
||||
#if YYDEBUG
|
||||
register char *yys;
|
||||
extern char *getenv();
|
||||
|
||||
yys = getenv("YYDEBUG");
|
||||
if (yys)
|
||||
{
|
||||
yyn = *yys;
|
||||
if (yyn >= '0' && yyn <= '9')
|
||||
yydebug = yyn - '0';
|
||||
}
|
||||
#endif
|
||||
|
||||
yynerrs = 0;
|
||||
yyerrflag = 0;
|
||||
yychar = (-1);
|
||||
|
||||
yyssp = yyss;
|
||||
yyvsp = yyvs;
|
||||
*yyssp = yystate = 0;
|
||||
|
||||
yyloop:
|
||||
yyn = yydefred[yystate];
|
||||
if (yyn != 0) goto yyreduce;
|
||||
if (yychar < 0)
|
||||
{
|
||||
if ((yychar = yylex()) < 0) yychar = 0;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = 0;
|
||||
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
|
||||
if (!yys) yys = "illegal-symbol";
|
||||
printf("yydebug: state %d, reading %d (%s)\n", yystate,
|
||||
yychar, yys);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: state %d, shifting to state %d\n",
|
||||
yystate, yytable[yyn]);
|
||||
#endif
|
||||
if (yyssp >= yyss + yystacksize - 1)
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
*++yyssp = yystate = yytable[yyn];
|
||||
*++yyvsp = yylval;
|
||||
yychar = (-1);
|
||||
if (yyerrflag > 0) --yyerrflag;
|
||||
goto yyloop;
|
||||
}
|
||||
if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
||||
{
|
||||
yyn = yytable[yyn];
|
||||
goto yyreduce;
|
||||
}
|
||||
if (yyerrflag) goto yyinrecovery;
|
||||
#ifdef lint
|
||||
goto yynewerror;
|
||||
#endif
|
||||
yynewerror:
|
||||
yyerror("syntax error");
|
||||
#ifdef lint
|
||||
goto yyerrlab;
|
||||
#endif
|
||||
yyerrlab:
|
||||
++yynerrs;
|
||||
yyinrecovery:
|
||||
if (yyerrflag < 3)
|
||||
{
|
||||
yyerrflag = 3;
|
||||
for (;;)
|
||||
{
|
||||
if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: state %d, error recovery shifting\
|
||||
to state %d\n", *yyssp, yytable[yyn]);
|
||||
#endif
|
||||
if (yyssp >= yyss + yystacksize - 1)
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
*++yyssp = yystate = yytable[yyn];
|
||||
*++yyvsp = yylval;
|
||||
goto yyloop;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: error recovery discarding state %d\n",
|
||||
*yyssp);
|
||||
#endif
|
||||
if (yyssp <= yyss) goto yyabort;
|
||||
--yyssp;
|
||||
--yyvsp;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (yychar == 0) goto yyabort;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = 0;
|
||||
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
|
||||
if (!yys) yys = "illegal-symbol";
|
||||
printf("yydebug: state %d, error recovery discards token %d (%s)\n",
|
||||
yystate, yychar, yys);
|
||||
}
|
||||
#endif
|
||||
yychar = (-1);
|
||||
goto yyloop;
|
||||
}
|
||||
yyreduce:
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: state %d, reducing by rule %d (%s)\n",
|
||||
yystate, yyn, yyrule[yyn]);
|
||||
#endif
|
||||
yym = yylen[yyn];
|
||||
yyval = yyvsp[1-yym];
|
||||
switch (yyn)
|
||||
{
|
||||
case 3:
|
||||
#line 68 "parser.y"
|
||||
{process_command(proio_cons(wxmake_word(yyvsp[-1].s), NULL)); free(yyvsp[-1].s);}
|
||||
break;
|
||||
case 4:
|
||||
#line 70 "parser.y"
|
||||
{process_command(yyvsp[-1].s);}
|
||||
break;
|
||||
case 5:
|
||||
#line 72 "parser.y"
|
||||
{syntax_error("Unrecognized command.");}
|
||||
break;
|
||||
case 6:
|
||||
#line 76 "parser.y"
|
||||
{yyval.s = proio_cons(wxmake_word(yyvsp[-3].s), yyvsp[-1].s); free(yyvsp[-3].s);}
|
||||
break;
|
||||
case 7:
|
||||
#line 78 "parser.y"
|
||||
{yyval.s = proio_cons(NULL, NULL);}
|
||||
break;
|
||||
case 8:
|
||||
#line 80 "parser.y"
|
||||
{yyval.s = yyvsp[-1].s; }
|
||||
break;
|
||||
case 9:
|
||||
#line 84 "parser.y"
|
||||
{yyval.s = NULL;}
|
||||
break;
|
||||
case 10:
|
||||
#line 86 "parser.y"
|
||||
{yyval.s = proio_cons(yyvsp[0].s, NULL);}
|
||||
break;
|
||||
case 11:
|
||||
#line 89 "parser.y"
|
||||
{yyval.s = proio_cons(yyvsp[-2].s, yyvsp[0].s);}
|
||||
break;
|
||||
case 12:
|
||||
#line 93 "parser.y"
|
||||
{yyval.s = proio_cons(wxmake_word("="), proio_cons(wxmake_word(yyvsp[-2].s), proio_cons(yyvsp[0].s, NULL)));
|
||||
free(yyvsp[-2].s); }
|
||||
break;
|
||||
case 13:
|
||||
#line 96 "parser.y"
|
||||
{yyval.s = yyvsp[0].s; }
|
||||
break;
|
||||
case 14:
|
||||
#line 99 "parser.y"
|
||||
{yyval.s = wxmake_word(yyvsp[0].s); free(yyvsp[0].s);}
|
||||
break;
|
||||
case 15:
|
||||
#line 101 "parser.y"
|
||||
{yyval.s = wxmake_string(yyvsp[0].s); free(yyvsp[0].s);}
|
||||
break;
|
||||
case 16:
|
||||
#line 103 "parser.y"
|
||||
{yyval.s = wxmake_integer(yyvsp[0].s); free(yyvsp[0].s);}
|
||||
break;
|
||||
case 17:
|
||||
#line 105 "parser.y"
|
||||
{yyval.s = wxmake_real(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
|
||||
break;
|
||||
case 18:
|
||||
#line 107 "parser.y"
|
||||
{yyval.s = wxmake_exp(yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-2].s); free(yyvsp[0].s); }
|
||||
break;
|
||||
case 19:
|
||||
#line 110 "parser.y"
|
||||
{yyval.s = wxmake_exp2(yyvsp[-4].s, yyvsp[-2].s, yyvsp[0].s); free(yyvsp[-4].s); free(yyvsp[-2].s);
|
||||
free(yyvsp[0].s); }
|
||||
break;
|
||||
case 20:
|
||||
#line 114 "parser.y"
|
||||
{yyval.s = yyvsp[0].s;}
|
||||
break;
|
||||
#line 461 "y_tab.c"
|
||||
}
|
||||
yyssp -= yym;
|
||||
yystate = *yyssp;
|
||||
yyvsp -= yym;
|
||||
yym = yylhs[yyn];
|
||||
if (yystate == 0 && yym == 0)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: after reduction, shifting from state 0 to\
|
||||
state %d\n", YYFINAL);
|
||||
#endif
|
||||
yystate = YYFINAL;
|
||||
*++yyssp = YYFINAL;
|
||||
*++yyvsp = yyval;
|
||||
if (yychar < 0)
|
||||
{
|
||||
if ((yychar = yylex()) < 0) yychar = 0;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = 0;
|
||||
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
|
||||
if (!yys) yys = "illegal-symbol";
|
||||
printf("yydebug: state %d, reading %d (%s)\n",
|
||||
YYFINAL, yychar, yys);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (yychar == 0) goto yyaccept;
|
||||
goto yyloop;
|
||||
}
|
||||
if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
|
||||
yystate = yytable[yyn];
|
||||
else
|
||||
yystate = yydgoto[yym];
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("yydebug: after reduction, shifting from state %d \
|
||||
to state %d\n", *yyssp, yystate);
|
||||
#endif
|
||||
if (yyssp >= yyss + yystacksize - 1)
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
*++yyssp = yystate;
|
||||
*++yyvsp = yyval;
|
||||
goto yyloop;
|
||||
yyoverflow:
|
||||
yyerror("yacc stack overflow");
|
||||
yyabort:
|
||||
return (1);
|
||||
yyaccept:
|
||||
return (0);
|
||||
}
|
||||
|
||||
#endif /* wxUSE_PROLOGIO */
|
@ -1,192 +0,0 @@
|
||||
SIGN [+-]
|
||||
DIGIT [0-9]
|
||||
ALPHA [a-zA-Z_]
|
||||
ALPHADIGIT [a-zA-Z_0-9]
|
||||
STRINGCHAR [^"\\]
|
||||
WORDCHAR [^'\\]
|
||||
|
||||
%{
|
||||
/*
|
||||
* File: lexer.l
|
||||
* Description: Lexical analyser for PROLOGIO; can be used with
|
||||
* either lex and flex.
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* +++steve162e: added, otherwise, PROIO_input will be undefined (at least under LINUX)
|
||||
please check, if this is also TRUE under other UNIXes.
|
||||
*/
|
||||
|
||||
#if defined(FLEX_SCANNER) && defined(_LINUX)
|
||||
#define PROIO_input my_input
|
||||
#endif
|
||||
/* ---steve162e */
|
||||
|
||||
#include "wx/expr.h"
|
||||
|
||||
#define Return(x) return x;
|
||||
|
||||
#if defined(VMS) && !defined(strdup)
|
||||
#define strdup(s) (strcpy((char *)malloc(strlen(s)+1), s));
|
||||
#endif
|
||||
|
||||
static size_t lex_buffer_length = 0;
|
||||
static const char *lex_buffer = NULL;
|
||||
static size_t lex_string_ptr = 0;
|
||||
static int lex_read_from_string = 0;
|
||||
|
||||
static int my_input(void);
|
||||
|
||||
#ifdef FLEX_SCANNER
|
||||
# undef YY_INPUT
|
||||
# define YY_INPUT(buf,result,max_size) \
|
||||
if (lex_read_from_string) \
|
||||
{ int c = my_input(); result = (c == 0) ? YY_NULL : ((buf)[0]=(c), 1); } \
|
||||
else \
|
||||
if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
|
||||
YY_FATAL_ERROR( "read() in flex scanner failed" );
|
||||
#else
|
||||
# undef unput
|
||||
# define unput(_c) my_unput(_c)
|
||||
static int my_unput(char);
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
%%
|
||||
|
||||
{SIGN}?{DIGIT}+ {yylval.s = strdup(yytext); Return(INTEGER);}
|
||||
|
||||
"e" Return(EXP);
|
||||
|
||||
{ALPHA}{ALPHADIGIT}* {yylval.s = strdup(yytext); Return(WORD);}
|
||||
|
||||
"'"{WORDCHAR}*"'" {int len = strlen(yytext);
|
||||
yytext[len-1] = 0;
|
||||
yylval.s = strdup(yytext+1);
|
||||
Return(WORD);}
|
||||
|
||||
\"({STRINGCHAR}|\\\"|\|\\\\|\\)*\" {yylval.s = strdup(yytext); Return(STRING);}
|
||||
|
||||
"(" Return(OPEN);
|
||||
|
||||
")" Return(CLOSE);
|
||||
|
||||
"," Return(COMMA);
|
||||
|
||||
"[" Return(OPEN_SQUARE);
|
||||
|
||||
"]" Return(CLOSE_SQUARE);
|
||||
|
||||
"=" Return(EQUALS);
|
||||
|
||||
"." Return(PERIOD);
|
||||
|
||||
[ \t] ;
|
||||
|
||||
\n ;
|
||||
|
||||
"/*" { loop:
|
||||
#ifdef __cplusplus
|
||||
while (yyinput() != '*');
|
||||
switch (yyinput())
|
||||
#else
|
||||
while (input() != '*');
|
||||
switch (input())
|
||||
#endif
|
||||
{
|
||||
case '/': break;
|
||||
case '*': unput('*');
|
||||
default: goto loop;
|
||||
}
|
||||
}
|
||||
|
||||
. Return(ERROR);
|
||||
|
||||
%%
|
||||
|
||||
|
||||
#ifdef FLEX_SCANNER
|
||||
static int lex_input() {
|
||||
return input();
|
||||
}
|
||||
#else /* BSD/AT&T lex */
|
||||
#ifndef input
|
||||
# error "Sorry, but need either flex or AT&T lex"
|
||||
#endif
|
||||
static int lex_input() {
|
||||
return input();
|
||||
}
|
||||
|
||||
# undef input
|
||||
# define input() my_input()
|
||||
static int my_unput(char c)
|
||||
{
|
||||
if (lex_read_from_string != 0) {
|
||||
/* Make sure we have something */
|
||||
if (lex_string_ptr) {
|
||||
if (c == '\n') yylineno--;
|
||||
lex_string_ptr--;
|
||||
}
|
||||
} else {
|
||||
yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;
|
||||
/* unput(c); Causes infinite recursion! */
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Public */
|
||||
void LexFromFile(FILE *fd)
|
||||
{
|
||||
lex_read_from_string = 0;
|
||||
yyin = fd;
|
||||
/* Don't know why this is necessary, but otherwise
|
||||
* lex only works _once_!
|
||||
*/
|
||||
#ifdef FLEX_SCANNER
|
||||
yyrestart(fd);
|
||||
yy_init = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void LexFromString(char *buffer)
|
||||
{
|
||||
lex_read_from_string = 1;
|
||||
lex_buffer = buffer;
|
||||
lex_buffer_length = strlen(buffer);
|
||||
lex_string_ptr = 0;
|
||||
/* Don't know why this is necessary, but otherwise
|
||||
* lex only works _once_!
|
||||
*/
|
||||
#ifdef FLEX_SCANNER
|
||||
yy_init = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int my_input( void )
|
||||
{
|
||||
if (lex_read_from_string) {
|
||||
if (lex_string_ptr == lex_buffer_length)
|
||||
return 0;
|
||||
else {
|
||||
char c = lex_buffer[lex_string_ptr++];
|
||||
#ifndef FLEX_SCANNER
|
||||
if (c == '\n') yylineno++;
|
||||
#endif
|
||||
return c;
|
||||
}
|
||||
} else {
|
||||
return lex_input();
|
||||
}
|
||||
}
|
||||
|
||||
void wxExprCleanUp()
|
||||
{
|
||||
#ifdef FLEX_SCANNER
|
||||
if (yy_current_buffer)
|
||||
yy_delete_buffer(yy_current_buffer);
|
||||
#endif
|
||||
}
|
@ -1,184 +0,0 @@
|
||||
/* Version: $Id$ */
|
||||
%{
|
||||
#include "wx/setup.h"
|
||||
#include <string.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
#if defined(__GNUWIN32__) && !defined(__TWIN32__)
|
||||
#include <sys/unistd.h>
|
||||
#endif
|
||||
|
||||
#include "wx/expr.h"
|
||||
|
||||
#ifndef __EXTERN_C__
|
||||
#define __EXTERN_C__ 1
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) || defined(__STDC__)
|
||||
#if defined(__cplusplus) && defined(__EXTERN_C__)
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
int yylex(void);
|
||||
int yylook(void);
|
||||
int yywrap(void);
|
||||
int yyback(int *, int);
|
||||
void yyerror(char *);
|
||||
|
||||
/* You may need to put /DLEX_SCANNER in your makefile
|
||||
* if you're using LEX!
|
||||
*/
|
||||
void yyoutput(int);
|
||||
|
||||
#if defined(__cplusplus) || defined(__STDC__)
|
||||
#if defined(__cplusplus) && defined(__EXTERN_C__)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
%}
|
||||
|
||||
%union {
|
||||
char *s;
|
||||
/* struct pexpr *expr; */
|
||||
}
|
||||
|
||||
|
||||
%start commands
|
||||
|
||||
%token <s> INTEGER 1
|
||||
%token <s> WORD 2
|
||||
%token <s> STRING 3
|
||||
%token <s> PERIOD 13
|
||||
%token OPEN 4
|
||||
%token CLOSE 5
|
||||
%token COMMA 6
|
||||
%token NEWLINE 7
|
||||
%token ERROR 8
|
||||
%token OPEN_SQUARE 9
|
||||
%token CLOSE_SQUARE 10
|
||||
%token EQUALS 11
|
||||
%token EXP 14
|
||||
|
||||
/* %type <expr> command expr arglist arg arg1 */
|
||||
%type <s> command expr arglist arg arg1
|
||||
|
||||
%%
|
||||
|
||||
commands : /* empty */
|
||||
| commands command
|
||||
;
|
||||
|
||||
command : WORD PERIOD
|
||||
{process_command(proio_cons(wxmake_word($1), NULL)); free($1);}
|
||||
| expr PERIOD
|
||||
{process_command($1);}
|
||||
| error PERIOD
|
||||
{syntax_error("Unrecognized command.");}
|
||||
;
|
||||
|
||||
expr : WORD OPEN arglist CLOSE
|
||||
{$$ = proio_cons(wxmake_word($1), $3); free($1);}
|
||||
| OPEN_SQUARE arglist CLOSE_SQUARE
|
||||
{$$ = $2; }
|
||||
;
|
||||
|
||||
arglist :
|
||||
{$$ = proio_cons(NULL, NULL);}
|
||||
| arg
|
||||
{$$ = proio_cons($1, NULL);}
|
||||
|
|
||||
arg COMMA arglist
|
||||
{$$ = proio_cons($1, $3);}
|
||||
;
|
||||
|
||||
arg : WORD EQUALS arg1
|
||||
{$$ = proio_cons(wxmake_word("="), proio_cons(wxmake_word($1), proio_cons($3, NULL)));
|
||||
free($1); }
|
||||
| arg1
|
||||
{$$ = $1; }
|
||||
;
|
||||
|
||||
arg1 : WORD
|
||||
{$$ = wxmake_word($1); free($1);}
|
||||
| STRING
|
||||
{$$ = wxmake_string($1); free($1);}
|
||||
| INTEGER
|
||||
{$$ = wxmake_integer($1); free($1);}
|
||||
| INTEGER PERIOD INTEGER
|
||||
{$$ = wxmake_real($1, $3); free($1); free($3); }
|
||||
| INTEGER EXP INTEGER
|
||||
{$$ = wxmake_exp($1, $3); free($1); free($3); }
|
||||
|
|
||||
INTEGER PERIOD INTEGER EXP INTEGER
|
||||
{$$ = wxmake_exp2($1, $3, $5); free($1); free($3);
|
||||
free($5); }
|
||||
|
||||
| expr
|
||||
{$$ = $1;}
|
||||
;
|
||||
|
||||
%%
|
||||
|
||||
/* We include lexer.c if we are building for gtk, wine or motif
|
||||
* and also whenever we are using configure (marked by __WX_SETUP_H__) for,
|
||||
* for example, cross compilation. */
|
||||
#if (defined(__WXGTK__) || defined(__WXWINE__) || defined(__WXMOTIF__)) || defined(__WX_SETUP_H__) && !defined(NO_CONFIGURE)
|
||||
#include "lexer.c"
|
||||
#elif defined(__WXMAC__) && defined(__APPLE__)
|
||||
#include "lexer.c"
|
||||
#elif defined(__MWERKS__)
|
||||
#include "../common/cwlex_yy.c"
|
||||
#else
|
||||
#include "../common/lex_yy.c"
|
||||
#endif
|
||||
|
||||
/*
|
||||
void yyerror(s)
|
||||
char *s;
|
||||
{
|
||||
syntax_error(s);
|
||||
}
|
||||
*/
|
||||
|
||||
/* Ansi prototype. If this doesn't work for you... uncomment
|
||||
the above instead.
|
||||
*/
|
||||
|
||||
void yyerror(char *s)
|
||||
{
|
||||
syntax_error(s);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unfortunately, my DOS version of FLEX
|
||||
* requires yywrap to be #def'ed, whereas
|
||||
* the UNIX flex expects a proper function.
|
||||
*/
|
||||
|
||||
/* At least on alphaev6-dec-osf4.0e yywrap() must be #define'd.
|
||||
* RL: ... but on Debian/Alpha(linux) it must not, so hopefully
|
||||
* testing for __OSF__ here is what we really want.
|
||||
*/
|
||||
#ifdef __OSF__
|
||||
#ifndef yywrap
|
||||
#define yywrap() 1
|
||||
#endif
|
||||
#else
|
||||
/* HH: Added test for __WX_SETUP_H__ for gnuwin builds
|
||||
* using configure */
|
||||
#if !defined(__SC__) && !defined(__GNUWIN32__)
|
||||
#ifdef USE_DEFINE
|
||||
#ifndef yywrap
|
||||
#define yywrap() 1
|
||||
#endif
|
||||
#elif !defined(__ultrix)
|
||||
int yywrap() { return 1; }
|
||||
#elif defined(__VMS__)
|
||||
int yywrap() { return 1; }
|
||||
#endif
|
||||
#elif defined(__WX_SETUP_H__)
|
||||
int yywrap() { return 1; }
|
||||
#endif
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,471 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: treelay.h
|
||||
// Purpose: wxTreeLayout class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 7/4/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "wxtree.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/dc.h"
|
||||
#include "wx/event.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_TREELAYOUT
|
||||
|
||||
#include "wx/treelay.h"
|
||||
|
||||
/*
|
||||
* Abstract tree
|
||||
*
|
||||
*/
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxTreeLayout, wxObject)
|
||||
|
||||
wxTreeLayout::wxTreeLayout()
|
||||
{
|
||||
m_xSpacing = 16;
|
||||
m_ySpacing = 20;
|
||||
m_topMargin = 5;
|
||||
m_leftMargin = 5;
|
||||
m_orientation = FALSE;
|
||||
m_parentNode = 0;
|
||||
}
|
||||
|
||||
void wxTreeLayout::DoLayout(wxDC& dc, long topId)
|
||||
{
|
||||
if (topId != -1)
|
||||
SetTopNode(topId);
|
||||
|
||||
long actualTopId = GetTopNode();
|
||||
long id = actualTopId;
|
||||
while (id != -1)
|
||||
{
|
||||
SetNodeX(id, 0);
|
||||
SetNodeY(id, 0);
|
||||
ActivateNode(id, FALSE);
|
||||
id = GetNextNode(id);
|
||||
}
|
||||
m_lastY = m_topMargin;
|
||||
m_lastX = m_leftMargin;
|
||||
CalcLayout(actualTopId, 0, dc);
|
||||
}
|
||||
|
||||
void wxTreeLayout::Draw(wxDC& dc)
|
||||
{
|
||||
dc.Clear();
|
||||
DrawBranches(dc);
|
||||
DrawNodes(dc);
|
||||
}
|
||||
|
||||
void wxTreeLayout::DrawNodes(wxDC& dc)
|
||||
{
|
||||
long id = GetTopNode();
|
||||
while (id != -1)
|
||||
{
|
||||
if (NodeActive(id))
|
||||
DrawNode(id, dc);
|
||||
id = GetNextNode(id);
|
||||
}
|
||||
}
|
||||
|
||||
void wxTreeLayout::DrawBranches(wxDC& dc)
|
||||
{
|
||||
long id = GetTopNode();
|
||||
while (id != -1)
|
||||
{
|
||||
if (GetNodeParent(id) > -1)
|
||||
{
|
||||
long parent = GetNodeParent(id);
|
||||
if (NodeActive(parent))
|
||||
DrawBranch(parent, id, dc);
|
||||
}
|
||||
id = GetNextNode(id);
|
||||
}
|
||||
}
|
||||
|
||||
void wxTreeLayout::DrawNode(long id, wxDC& dc)
|
||||
{
|
||||
wxChar buf[80];
|
||||
wxString name(GetNodeName(id));
|
||||
if (name != wxT(""))
|
||||
wxSprintf(buf, wxT("%s"), (const wxChar*) name);
|
||||
else
|
||||
wxSprintf(buf, wxT("<unnamed>"));
|
||||
|
||||
long x = 80;
|
||||
long y = 20;
|
||||
dc.GetTextExtent(buf, &x, &y);
|
||||
dc.DrawText(buf, GetNodeX(id), (long)(GetNodeY(id) - (y/2.0)));
|
||||
}
|
||||
|
||||
void wxTreeLayout::DrawBranch(long from, long to, wxDC& dc)
|
||||
{
|
||||
long w, h;
|
||||
GetNodeSize(from, &w, &h, dc);
|
||||
dc.DrawLine(GetNodeX(from)+w, GetNodeY(from),
|
||||
GetNodeX(to), GetNodeY(to));
|
||||
}
|
||||
|
||||
void wxTreeLayout::Initialize(void)
|
||||
{
|
||||
}
|
||||
|
||||
void wxTreeLayout::GetNodeSize(long id, long *x, long *y, wxDC& dc)
|
||||
{
|
||||
wxString name(GetNodeName(id));
|
||||
if (name != wxT(""))
|
||||
dc.GetTextExtent(name, x, y);
|
||||
else
|
||||
{
|
||||
*x = 70; *y = 20;
|
||||
}
|
||||
}
|
||||
|
||||
void wxTreeLayout::CalcLayout(long nodeId, int level, wxDC& dc)
|
||||
{
|
||||
wxList children;
|
||||
GetChildren(nodeId, children);
|
||||
int n = children.GetCount();
|
||||
|
||||
if (m_orientation == FALSE)
|
||||
{
|
||||
// Left to right
|
||||
// X Calculations
|
||||
if (level == 0)
|
||||
SetNodeX(nodeId, m_leftMargin);
|
||||
else
|
||||
{
|
||||
long x = 0;
|
||||
long y = 0;
|
||||
long parentId = GetNodeParent(nodeId);
|
||||
if (parentId != -1)
|
||||
GetNodeSize(parentId, &x, &y, dc);
|
||||
SetNodeX(nodeId, (long)(GetNodeX(parentId) + m_xSpacing + x));
|
||||
}
|
||||
|
||||
wxNode *node = children.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
CalcLayout((long)node->GetData(), level+1, dc);
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
// Y Calculations
|
||||
long averageY;
|
||||
ActivateNode(nodeId, TRUE);
|
||||
|
||||
if (n > 0)
|
||||
{
|
||||
averageY = 0;
|
||||
node = children.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
averageY += GetNodeY((long)node->GetData());
|
||||
node = node->GetNext();
|
||||
}
|
||||
averageY = averageY / n;
|
||||
SetNodeY(nodeId, averageY);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetNodeY(nodeId, m_lastY);
|
||||
long x, y;
|
||||
GetNodeSize(nodeId, &x, &y, dc);
|
||||
|
||||
m_lastY = m_lastY + y + m_ySpacing;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Top to bottom
|
||||
|
||||
// Y Calculations
|
||||
if (level == 0)
|
||||
SetNodeY(nodeId, m_topMargin);
|
||||
else
|
||||
{
|
||||
long x = 0;
|
||||
long y = 0;
|
||||
long parentId = GetNodeParent(nodeId);
|
||||
if (parentId != -1)
|
||||
GetNodeSize(parentId, &x, &y, dc);
|
||||
SetNodeY(nodeId, (long)(GetNodeY(parentId) + m_ySpacing + y));
|
||||
}
|
||||
|
||||
wxNode *node = children.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
CalcLayout((long)node->GetData(), level+1, dc);
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
// X Calculations
|
||||
long averageX;
|
||||
ActivateNode(nodeId, TRUE);
|
||||
|
||||
if (n > 0)
|
||||
{
|
||||
averageX = 0;
|
||||
node = children.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
averageX += GetNodeX((long)node->GetData());
|
||||
node = node->GetNext();
|
||||
}
|
||||
averageX = averageX / n;
|
||||
SetNodeX(nodeId, averageX);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetNodeX(nodeId, m_lastX);
|
||||
long x, y;
|
||||
GetNodeSize(nodeId, &x, &y, dc);
|
||||
|
||||
m_lastX = m_lastX + x + m_xSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Tree with storage
|
||||
*
|
||||
*/
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxTreeLayoutStored, wxTreeLayout)
|
||||
|
||||
wxTreeLayoutStored::wxTreeLayoutStored(int n):wxTreeLayout()
|
||||
{
|
||||
m_nodes = NULL;
|
||||
m_maxNodes = 0;
|
||||
Initialize(n);
|
||||
}
|
||||
|
||||
wxTreeLayoutStored::~wxTreeLayoutStored(void)
|
||||
{
|
||||
if (m_nodes)
|
||||
delete[] m_nodes;
|
||||
}
|
||||
|
||||
void wxTreeLayoutStored::Initialize(int n)
|
||||
{
|
||||
m_maxNodes = n;
|
||||
wxTreeLayout::Initialize();
|
||||
if (m_nodes) delete[] m_nodes;
|
||||
m_nodes = new wxStoredNode[m_maxNodes];
|
||||
int i;
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
m_nodes[i].m_name = wxT("");
|
||||
m_nodes[i].m_active = FALSE;
|
||||
m_nodes[i].m_parentId = -1;
|
||||
m_nodes[i].m_x = 0;
|
||||
m_nodes[i].m_y = 0;
|
||||
}
|
||||
m_num = 0;
|
||||
}
|
||||
|
||||
long wxTreeLayoutStored::AddChild(const wxString& name, const wxString& parent)
|
||||
{
|
||||
if (m_num < (m_maxNodes -1 ))
|
||||
{
|
||||
long i = -1;
|
||||
if (parent != wxT(""))
|
||||
i = NameToId(parent);
|
||||
else m_parentNode = m_num;
|
||||
|
||||
m_nodes[m_num].m_parentId = i;
|
||||
m_nodes[m_num].m_name = name;
|
||||
m_nodes[m_num].m_x = m_nodes[m_num].m_y = 0;
|
||||
m_nodes[m_num].m_clientData = 0;
|
||||
m_num ++;
|
||||
|
||||
return (m_num - 1);
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
long wxTreeLayoutStored::AddChild(const wxString& name, long parent)
|
||||
{
|
||||
if (m_num < (m_maxNodes -1 ) && parent < m_num)
|
||||
{
|
||||
long i = -1;
|
||||
if (parent != -1)
|
||||
{
|
||||
i = parent;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_parentNode = m_num;
|
||||
}
|
||||
|
||||
m_nodes[m_num].m_parentId = i;
|
||||
m_nodes[m_num].m_name = name;
|
||||
m_nodes[m_num].m_x = m_nodes[m_num].m_y = 0;
|
||||
m_nodes[m_num].m_clientData = 0;
|
||||
m_num ++;
|
||||
|
||||
return (m_num - 1);
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
long wxTreeLayoutStored::NameToId(const wxString& name)
|
||||
{
|
||||
long i;
|
||||
for (i = 0; i < m_num; i++)
|
||||
if (name == m_nodes[i].m_name)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void wxTreeLayoutStored::GetChildren(long id, wxList& list)
|
||||
{
|
||||
long currentId = GetTopNode();
|
||||
while (currentId != -1)
|
||||
{
|
||||
if (id == GetNodeParent(currentId))
|
||||
list.Append((wxObject *)currentId);
|
||||
currentId = GetNextNode(currentId);
|
||||
}
|
||||
}
|
||||
|
||||
wxStoredNode* wxTreeLayoutStored::GetNode(long idx) const
|
||||
{
|
||||
wxASSERT(idx < m_num);
|
||||
|
||||
return &m_nodes[idx];
|
||||
};
|
||||
|
||||
long wxTreeLayoutStored::GetNodeX(long id)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
return (long)m_nodes[id].m_x;
|
||||
}
|
||||
|
||||
long wxTreeLayoutStored::GetNodeY(long id)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
return (long)m_nodes[id].m_y;
|
||||
}
|
||||
|
||||
void wxTreeLayoutStored::SetNodeX(long id, long x)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
m_nodes[id].m_x = (int)x;
|
||||
}
|
||||
|
||||
void wxTreeLayoutStored::SetNodeY(long id, long y)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
m_nodes[id].m_y = (int)y;
|
||||
}
|
||||
|
||||
void wxTreeLayoutStored::SetNodeName(long id, const wxString& name)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
m_nodes[id].m_name = name;
|
||||
}
|
||||
|
||||
wxString wxTreeLayoutStored::GetNodeName(long id)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
return m_nodes[id].m_name;
|
||||
}
|
||||
|
||||
long wxTreeLayoutStored::GetNodeParent(long id)
|
||||
{
|
||||
if (id != -1)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
return m_nodes[id].m_parentId;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
long wxTreeLayoutStored::GetNextNode(long id)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
if ((id != -1) && (id < (m_num - 1)))
|
||||
return id + 1;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
void wxTreeLayoutStored::SetClientData(long id, long clientData)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
m_nodes[id].m_clientData = clientData;
|
||||
}
|
||||
|
||||
long wxTreeLayoutStored::GetClientData(long id) const
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
return m_nodes[id].m_clientData;
|
||||
}
|
||||
|
||||
void wxTreeLayoutStored::ActivateNode(long id, bool active)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
m_nodes[id].m_active = active;
|
||||
}
|
||||
|
||||
bool wxTreeLayoutStored::NodeActive(long id)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
return m_nodes[id].m_active;
|
||||
}
|
||||
|
||||
wxString wxTreeLayoutStored::HitTest(wxMouseEvent& event, wxDC& dc)
|
||||
{
|
||||
wxPoint pt = event.GetPosition();
|
||||
wxCoord x = pt.x;
|
||||
wxCoord y = pt.y;
|
||||
|
||||
int i;
|
||||
for (i = 0; i < m_maxNodes; i++)
|
||||
{
|
||||
long width, height;
|
||||
dc.GetTextExtent(m_nodes[i].m_name, &width, &height);
|
||||
|
||||
if ( (x >= (m_nodes[i].m_x-10)) && (x < (m_nodes[i].m_x + width+10)) &&
|
||||
(y >= m_nodes[i].m_y-10) && (y < (m_nodes[i].m_y + height+10)) )
|
||||
{
|
||||
return m_nodes[i].m_name;
|
||||
}
|
||||
}
|
||||
|
||||
return wxString( wxT("") );
|
||||
}
|
||||
|
||||
#endif
|
||||
// wxUSE_TREELAYOUT
|
@ -28,11 +28,6 @@
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/file.h"
|
||||
#include "wx/filename.h"
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
#include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#include "wx/module.h"
|
||||
#include "wx/image.h"
|
||||
|
||||
@ -709,10 +704,6 @@ bool wxApp::Initialize()
|
||||
wxInitializeStockLists();
|
||||
wxInitializeStockObjects();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxInitializeResourceSystem();
|
||||
#endif
|
||||
|
||||
wxModule::RegisterModules();
|
||||
if (!wxModule::InitializeModules())
|
||||
return FALSE;
|
||||
@ -728,10 +719,6 @@ void wxApp::CleanUp()
|
||||
{
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxCleanUpResourceSystem();
|
||||
#endif
|
||||
|
||||
delete wxTheColourDatabase;
|
||||
wxTheColourDatabase = (wxColourDatabase*) NULL;
|
||||
|
||||
|
@ -28,11 +28,6 @@
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/file.h"
|
||||
#include "wx/filename.h"
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
#include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#include "wx/module.h"
|
||||
#include "wx/image.h"
|
||||
|
||||
@ -709,10 +704,6 @@ bool wxApp::Initialize()
|
||||
wxInitializeStockLists();
|
||||
wxInitializeStockObjects();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxInitializeResourceSystem();
|
||||
#endif
|
||||
|
||||
wxModule::RegisterModules();
|
||||
if (!wxModule::InitializeModules())
|
||||
return FALSE;
|
||||
@ -728,10 +719,6 @@ void wxApp::CleanUp()
|
||||
{
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxCleanUpResourceSystem();
|
||||
#endif
|
||||
|
||||
delete wxTheColourDatabase;
|
||||
wxTheColourDatabase = (wxColourDatabase*) NULL;
|
||||
|
||||
|
100
src/mac/app.cpp
100
src/mac/app.cpp
@ -38,10 +38,6 @@
|
||||
#include "wx/menu.h"
|
||||
#include "wx/docview.h"
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
# include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
// mac
|
||||
@ -162,16 +158,16 @@ short wxApp::MacHandleAEODoc(const WXEVENTREF event, WXEVENTREF WXUNUSED(reply))
|
||||
err = AEGetParamDesc((AppleEvent *)event, keyDirectObject, typeAEList,&docList);
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
|
||||
err = AECountItems(&docList, &itemsInList);
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
|
||||
ProcessSerialNumber PSN ;
|
||||
PSN.highLongOfPSN = 0 ;
|
||||
PSN.lowLongOfPSN = kCurrentProcess ;
|
||||
SetFrontProcess( &PSN ) ;
|
||||
|
||||
|
||||
for (i = 1; i <= itemsInList; i++) {
|
||||
AEGetNthPtr(&docList, i, typeFSS, &keywd, &returnedType,
|
||||
(Ptr) & theSpec, sizeof(theSpec), &actualSize);
|
||||
@ -196,16 +192,16 @@ short wxApp::MacHandleAEPDoc(const WXEVENTREF event , WXEVENTREF WXUNUSED(reply)
|
||||
err = AEGetParamDesc((AppleEvent *)event, keyDirectObject, typeAEList,&docList);
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
|
||||
err = AECountItems(&docList, &itemsInList);
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
|
||||
ProcessSerialNumber PSN ;
|
||||
PSN.highLongOfPSN = 0 ;
|
||||
PSN.lowLongOfPSN = kCurrentProcess ;
|
||||
SetFrontProcess( &PSN ) ;
|
||||
|
||||
|
||||
for (i = 1; i <= itemsInList; i++) {
|
||||
AEGetNthPtr(&docList, i, typeFSS, &keywd, &returnedType,
|
||||
(Ptr) & theSpec, sizeof(theSpec), &actualSize);
|
||||
@ -223,7 +219,7 @@ short wxApp::MacHandleAEOApp(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNU
|
||||
return noErr ;
|
||||
}
|
||||
|
||||
// AEQuit attempts to quite the application
|
||||
// AEQuit attempts to quite the application
|
||||
|
||||
short wxApp::MacHandleAEQuit(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNUSED(reply))
|
||||
{
|
||||
@ -289,18 +285,18 @@ void wxApp::MacNewFile()
|
||||
|
||||
#if TARGET_CARBON
|
||||
|
||||
static const EventTypeSpec eventList[] =
|
||||
static const EventTypeSpec eventList[] =
|
||||
{
|
||||
{ kEventClassCommand, kEventProcessCommand } ,
|
||||
{ kEventClassCommand, kEventCommandUpdateStatus } ,
|
||||
|
||||
|
||||
{ kEventClassApplication , kEventAppActivated } ,
|
||||
{ kEventClassApplication , kEventAppDeactivated } ,
|
||||
// handling the quit event is not recommended by apple
|
||||
// rather using the quit apple event - which we do
|
||||
|
||||
|
||||
{ kEventClassAppleEvent , kEventAppleEvent } ,
|
||||
|
||||
|
||||
{ kEventClassMouse , kEventMouseDown } ,
|
||||
{ 'WXMC' , 'WXMC' }
|
||||
} ;
|
||||
@ -309,25 +305,25 @@ static pascal OSStatus MenuEventHandler( EventHandlerCallRef handler , EventRef
|
||||
{
|
||||
OSStatus result = eventNotHandledErr ;
|
||||
UInt32 kind = GetEventKind( event ) ;
|
||||
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
// due to the rather low-level event API of wxWindows, we cannot use RunApplicationEventLoop
|
||||
// due to the rather low-level event API of wxWindows, we cannot use RunApplicationEventLoop
|
||||
// but have to use ReceiveNextEvent dealing with events manually, therefore we also have
|
||||
// deal with clicks in the menu bar explicitely
|
||||
|
||||
static pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
|
||||
{
|
||||
OSStatus result = eventNotHandledErr ;
|
||||
|
||||
|
||||
switch( GetEventKind(event) )
|
||||
{
|
||||
case kEventMouseDown :
|
||||
{
|
||||
Point point ;
|
||||
WindowRef window ;
|
||||
|
||||
|
||||
GetEventParameter( event, kEventParamMouseLocation, typeQDPoint, NULL,
|
||||
sizeof( Point ), NULL, &point );
|
||||
short windowPart = ::FindWindow(point, &window);
|
||||
@ -339,7 +335,7 @@ static pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef
|
||||
}
|
||||
}
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
return result ;
|
||||
}
|
||||
@ -349,14 +345,14 @@ static pascal OSStatus CommandEventHandler( EventHandlerCallRef handler , EventR
|
||||
OSStatus result = eventNotHandledErr ;
|
||||
|
||||
HICommand command ;
|
||||
|
||||
|
||||
GetEventParameter( event, kEventParamDirectObject, typeHICommand, NULL,
|
||||
sizeof( HICommand ), NULL, &command );
|
||||
|
||||
MenuCommand id = command.commandID ;
|
||||
if ( id == kHICommandPreferences )
|
||||
id = wxApp::s_macPreferencesMenuItemId ;
|
||||
|
||||
|
||||
wxMenuBar* mbar = wxMenuBar::MacGetInstalledMenuBar() ;
|
||||
wxMenu* menu = NULL ;
|
||||
wxMenuItem* item = NULL ;
|
||||
@ -366,7 +362,7 @@ static pascal OSStatus CommandEventHandler( EventHandlerCallRef handler , EventR
|
||||
|
||||
if ( item == NULL || menu == NULL || mbar == NULL )
|
||||
return result ;
|
||||
|
||||
|
||||
switch( GetEventKind( event ) )
|
||||
{
|
||||
case kEventProcessCommand :
|
||||
@ -375,7 +371,7 @@ static pascal OSStatus CommandEventHandler( EventHandlerCallRef handler , EventR
|
||||
{
|
||||
item->Check( !item->IsChecked() ) ;
|
||||
}
|
||||
|
||||
|
||||
menu->SendEvent( id , item->IsCheckable() ? item->IsChecked() : -1 ) ;
|
||||
result = noErr ;
|
||||
}
|
||||
@ -386,8 +382,8 @@ static pascal OSStatus CommandEventHandler( EventHandlerCallRef handler , EventR
|
||||
break ;
|
||||
default :
|
||||
break ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
@ -541,7 +537,7 @@ bool wxApp::Initialize()
|
||||
|
||||
#endif
|
||||
wxMacSetupConverters() ;
|
||||
|
||||
|
||||
s_macCursorRgn = ::NewRgn() ;
|
||||
|
||||
wxClassInfo::InitializeClasses();
|
||||
@ -576,10 +572,6 @@ bool wxApp::Initialize()
|
||||
wxInitializeStockLists();
|
||||
wxInitializeStockObjects();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxInitializeResourceSystem();
|
||||
#endif
|
||||
|
||||
wxBitmap::InitStandardHandlers();
|
||||
|
||||
wxModule::RegisterModules();
|
||||
@ -598,15 +590,15 @@ bool wxApp::OnInitGui()
|
||||
{
|
||||
if( !wxAppBase::OnInitGui() )
|
||||
return false ;
|
||||
|
||||
#if TARGET_CARBON
|
||||
|
||||
#if TARGET_CARBON
|
||||
InstallStandardEventHandler( GetApplicationEventTarget() ) ;
|
||||
|
||||
|
||||
InstallApplicationEventHandler(
|
||||
GetwxAppEventHandlerUPP(),
|
||||
GetEventTypeCount(eventList), eventList, wxTheApp, &((EventHandlerRef)wxTheApp->m_macEventHandler));
|
||||
GetwxAppEventHandlerUPP(),
|
||||
GetEventTypeCount(eventList), eventList, wxTheApp, &((EventHandlerRef)wxTheApp->m_macEventHandler));
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments ,
|
||||
NewAEEventHandlerUPP(AEHandleODoc) ,
|
||||
@ -657,10 +649,6 @@ void wxApp::CleanUp()
|
||||
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxCleanUpResourceSystem();
|
||||
#endif
|
||||
|
||||
wxDeleteStockObjects() ;
|
||||
|
||||
// Destroy all GDI lists, etc.
|
||||
@ -723,7 +711,7 @@ void wxApp::CleanUp()
|
||||
wxStAppResource::CloseSharedLibraryResource();
|
||||
#endif
|
||||
wxMacCleanupConverters() ;
|
||||
|
||||
|
||||
UMACleanupToolbox() ;
|
||||
if (s_macCursorRgn) {
|
||||
::DisposeRgn((RgnHandle)s_macCursorRgn);
|
||||
@ -1360,7 +1348,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
s_inReceiveEvent = true ;
|
||||
status = ReceiveNextEvent(0, NULL,kEventDurationNoWait,true,&theEvent) ;
|
||||
s_inReceiveEvent = false ;
|
||||
|
||||
|
||||
if ( status == eventLoopTimedOutErr )
|
||||
{
|
||||
// make sure next time the event loop will trigger idle events
|
||||
@ -1383,7 +1371,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
// having a larger value here leads to large performance slowdowns
|
||||
// so we cannot give background apps more processor time here
|
||||
// we do so however having a large sleep value in the main event loop
|
||||
sleepTime = 0 ;
|
||||
sleepTime = 0 ;
|
||||
|
||||
while ( !IsExiting() && WaitNextEvent(everyEvent, &event,sleepTime, (RgnHandle) wxApp::s_macCursorRgn))
|
||||
{
|
||||
@ -1722,8 +1710,8 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
|
||||
&constraintRect , &newContentRect ) ;
|
||||
if ( growResult )
|
||||
{
|
||||
win->SetSize( newContentRect.left , newContentRect.top ,
|
||||
newContentRect.right - newContentRect.left ,
|
||||
win->SetSize( newContentRect.left , newContentRect.top ,
|
||||
newContentRect.right - newContentRect.left ,
|
||||
newContentRect.bottom - newContentRect.top, wxSIZE_USE_EXISTING);
|
||||
}
|
||||
s_lastMouseDown = 0;
|
||||
@ -1825,7 +1813,7 @@ void wxApp::MacHandleMouseUpEvent( WXEVENTREF evr )
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
long wxMacTranslateKey(unsigned char key, unsigned char code) ;
|
||||
long wxMacTranslateKey(unsigned char key, unsigned char code)
|
||||
@ -1951,7 +1939,7 @@ void wxApp::MacHandleKeyDownEvent( WXEVENTREF evr )
|
||||
else
|
||||
{
|
||||
wxWindow* focus = wxWindow::FindFocus() ;
|
||||
|
||||
|
||||
if ( MacSendKeyDownEvent( focus , ev->message , ev->modifiers , ev->when , ev->where.h , ev->where.v ) == false )
|
||||
{
|
||||
// has not been handled -> perform default
|
||||
@ -1989,12 +1977,12 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
|
||||
{
|
||||
if ( !focus )
|
||||
return false ;
|
||||
|
||||
|
||||
short keycode ;
|
||||
short keychar ;
|
||||
keychar = short(keymessage & charCodeMask);
|
||||
keycode = short(keymessage & keyCodeMask) >> 8 ;
|
||||
|
||||
|
||||
if ( modifiers & ( controlKey|shiftKey|optionKey ) )
|
||||
{
|
||||
// control interferes with some built-in keys like pgdown, return etc. therefore we remove the controlKey modifier
|
||||
@ -2012,7 +2000,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
|
||||
realkeyval = short(keymessage & charCodeMask) ;
|
||||
keyval = wxToupper( keyval ) ;
|
||||
}
|
||||
|
||||
|
||||
wxKeyEvent event(wxEVT_KEY_DOWN);
|
||||
bool handled = false ;
|
||||
event.m_shiftDown = modifiers & shiftKey;
|
||||
@ -2137,7 +2125,7 @@ bool wxApp::MacSendKeyUpEvent( wxWindow* focus , long keymessage , long modifier
|
||||
|
||||
if ( keyval == keychar )
|
||||
{
|
||||
keyval = wxToupper( keyval ) ;
|
||||
keyval = wxToupper( keyval ) ;
|
||||
}
|
||||
bool handled = false ;
|
||||
|
||||
@ -2321,9 +2309,9 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr )
|
||||
}
|
||||
else
|
||||
{
|
||||
windowPart = ::FindWindow(ev->where, &window);
|
||||
windowPart = ::FindWindow(ev->where, &window);
|
||||
}
|
||||
|
||||
|
||||
switch (windowPart)
|
||||
{
|
||||
case inContent :
|
||||
@ -2368,12 +2356,12 @@ void wxApp::MacHandleMenuCommand( wxUint32 id )
|
||||
item = mbar->FindItem( id , &menu ) ;
|
||||
}
|
||||
wxCHECK_RET( item != NULL && menu != NULL && mbar != NULL, wxT("error in menu item callback") );
|
||||
|
||||
|
||||
if (item->IsCheckable())
|
||||
{
|
||||
item->Check( !item->IsChecked() ) ;
|
||||
}
|
||||
|
||||
|
||||
menu->SendEvent( id , item->IsCheckable() ? item->IsChecked() : -1 ) ;
|
||||
}
|
||||
|
||||
|
@ -38,10 +38,6 @@
|
||||
#include "wx/menu.h"
|
||||
#include "wx/docview.h"
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
# include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
// mac
|
||||
@ -162,16 +158,16 @@ short wxApp::MacHandleAEODoc(const WXEVENTREF event, WXEVENTREF WXUNUSED(reply))
|
||||
err = AEGetParamDesc((AppleEvent *)event, keyDirectObject, typeAEList,&docList);
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
|
||||
err = AECountItems(&docList, &itemsInList);
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
|
||||
ProcessSerialNumber PSN ;
|
||||
PSN.highLongOfPSN = 0 ;
|
||||
PSN.lowLongOfPSN = kCurrentProcess ;
|
||||
SetFrontProcess( &PSN ) ;
|
||||
|
||||
|
||||
for (i = 1; i <= itemsInList; i++) {
|
||||
AEGetNthPtr(&docList, i, typeFSS, &keywd, &returnedType,
|
||||
(Ptr) & theSpec, sizeof(theSpec), &actualSize);
|
||||
@ -196,16 +192,16 @@ short wxApp::MacHandleAEPDoc(const WXEVENTREF event , WXEVENTREF WXUNUSED(reply)
|
||||
err = AEGetParamDesc((AppleEvent *)event, keyDirectObject, typeAEList,&docList);
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
|
||||
err = AECountItems(&docList, &itemsInList);
|
||||
if (err != noErr)
|
||||
return err;
|
||||
|
||||
|
||||
ProcessSerialNumber PSN ;
|
||||
PSN.highLongOfPSN = 0 ;
|
||||
PSN.lowLongOfPSN = kCurrentProcess ;
|
||||
SetFrontProcess( &PSN ) ;
|
||||
|
||||
|
||||
for (i = 1; i <= itemsInList; i++) {
|
||||
AEGetNthPtr(&docList, i, typeFSS, &keywd, &returnedType,
|
||||
(Ptr) & theSpec, sizeof(theSpec), &actualSize);
|
||||
@ -223,7 +219,7 @@ short wxApp::MacHandleAEOApp(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNU
|
||||
return noErr ;
|
||||
}
|
||||
|
||||
// AEQuit attempts to quite the application
|
||||
// AEQuit attempts to quite the application
|
||||
|
||||
short wxApp::MacHandleAEQuit(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNUSED(reply))
|
||||
{
|
||||
@ -289,18 +285,18 @@ void wxApp::MacNewFile()
|
||||
|
||||
#if TARGET_CARBON
|
||||
|
||||
static const EventTypeSpec eventList[] =
|
||||
static const EventTypeSpec eventList[] =
|
||||
{
|
||||
{ kEventClassCommand, kEventProcessCommand } ,
|
||||
{ kEventClassCommand, kEventCommandUpdateStatus } ,
|
||||
|
||||
|
||||
{ kEventClassApplication , kEventAppActivated } ,
|
||||
{ kEventClassApplication , kEventAppDeactivated } ,
|
||||
// handling the quit event is not recommended by apple
|
||||
// rather using the quit apple event - which we do
|
||||
|
||||
|
||||
{ kEventClassAppleEvent , kEventAppleEvent } ,
|
||||
|
||||
|
||||
{ kEventClassMouse , kEventMouseDown } ,
|
||||
{ 'WXMC' , 'WXMC' }
|
||||
} ;
|
||||
@ -309,25 +305,25 @@ static pascal OSStatus MenuEventHandler( EventHandlerCallRef handler , EventRef
|
||||
{
|
||||
OSStatus result = eventNotHandledErr ;
|
||||
UInt32 kind = GetEventKind( event ) ;
|
||||
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
// due to the rather low-level event API of wxWindows, we cannot use RunApplicationEventLoop
|
||||
// due to the rather low-level event API of wxWindows, we cannot use RunApplicationEventLoop
|
||||
// but have to use ReceiveNextEvent dealing with events manually, therefore we also have
|
||||
// deal with clicks in the menu bar explicitely
|
||||
|
||||
static pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
|
||||
{
|
||||
OSStatus result = eventNotHandledErr ;
|
||||
|
||||
|
||||
switch( GetEventKind(event) )
|
||||
{
|
||||
case kEventMouseDown :
|
||||
{
|
||||
Point point ;
|
||||
WindowRef window ;
|
||||
|
||||
|
||||
GetEventParameter( event, kEventParamMouseLocation, typeQDPoint, NULL,
|
||||
sizeof( Point ), NULL, &point );
|
||||
short windowPart = ::FindWindow(point, &window);
|
||||
@ -339,7 +335,7 @@ static pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef
|
||||
}
|
||||
}
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
return result ;
|
||||
}
|
||||
@ -349,14 +345,14 @@ static pascal OSStatus CommandEventHandler( EventHandlerCallRef handler , EventR
|
||||
OSStatus result = eventNotHandledErr ;
|
||||
|
||||
HICommand command ;
|
||||
|
||||
|
||||
GetEventParameter( event, kEventParamDirectObject, typeHICommand, NULL,
|
||||
sizeof( HICommand ), NULL, &command );
|
||||
|
||||
MenuCommand id = command.commandID ;
|
||||
if ( id == kHICommandPreferences )
|
||||
id = wxApp::s_macPreferencesMenuItemId ;
|
||||
|
||||
|
||||
wxMenuBar* mbar = wxMenuBar::MacGetInstalledMenuBar() ;
|
||||
wxMenu* menu = NULL ;
|
||||
wxMenuItem* item = NULL ;
|
||||
@ -366,7 +362,7 @@ static pascal OSStatus CommandEventHandler( EventHandlerCallRef handler , EventR
|
||||
|
||||
if ( item == NULL || menu == NULL || mbar == NULL )
|
||||
return result ;
|
||||
|
||||
|
||||
switch( GetEventKind( event ) )
|
||||
{
|
||||
case kEventProcessCommand :
|
||||
@ -375,7 +371,7 @@ static pascal OSStatus CommandEventHandler( EventHandlerCallRef handler , EventR
|
||||
{
|
||||
item->Check( !item->IsChecked() ) ;
|
||||
}
|
||||
|
||||
|
||||
menu->SendEvent( id , item->IsCheckable() ? item->IsChecked() : -1 ) ;
|
||||
result = noErr ;
|
||||
}
|
||||
@ -386,8 +382,8 @@ static pascal OSStatus CommandEventHandler( EventHandlerCallRef handler , EventR
|
||||
break ;
|
||||
default :
|
||||
break ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
@ -541,7 +537,7 @@ bool wxApp::Initialize()
|
||||
|
||||
#endif
|
||||
wxMacSetupConverters() ;
|
||||
|
||||
|
||||
s_macCursorRgn = ::NewRgn() ;
|
||||
|
||||
wxClassInfo::InitializeClasses();
|
||||
@ -576,10 +572,6 @@ bool wxApp::Initialize()
|
||||
wxInitializeStockLists();
|
||||
wxInitializeStockObjects();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxInitializeResourceSystem();
|
||||
#endif
|
||||
|
||||
wxBitmap::InitStandardHandlers();
|
||||
|
||||
wxModule::RegisterModules();
|
||||
@ -598,15 +590,15 @@ bool wxApp::OnInitGui()
|
||||
{
|
||||
if( !wxAppBase::OnInitGui() )
|
||||
return false ;
|
||||
|
||||
#if TARGET_CARBON
|
||||
|
||||
#if TARGET_CARBON
|
||||
InstallStandardEventHandler( GetApplicationEventTarget() ) ;
|
||||
|
||||
|
||||
InstallApplicationEventHandler(
|
||||
GetwxAppEventHandlerUPP(),
|
||||
GetEventTypeCount(eventList), eventList, wxTheApp, &((EventHandlerRef)wxTheApp->m_macEventHandler));
|
||||
GetwxAppEventHandlerUPP(),
|
||||
GetEventTypeCount(eventList), eventList, wxTheApp, &((EventHandlerRef)wxTheApp->m_macEventHandler));
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
||||
AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments ,
|
||||
NewAEEventHandlerUPP(AEHandleODoc) ,
|
||||
@ -657,10 +649,6 @@ void wxApp::CleanUp()
|
||||
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxCleanUpResourceSystem();
|
||||
#endif
|
||||
|
||||
wxDeleteStockObjects() ;
|
||||
|
||||
// Destroy all GDI lists, etc.
|
||||
@ -723,7 +711,7 @@ void wxApp::CleanUp()
|
||||
wxStAppResource::CloseSharedLibraryResource();
|
||||
#endif
|
||||
wxMacCleanupConverters() ;
|
||||
|
||||
|
||||
UMACleanupToolbox() ;
|
||||
if (s_macCursorRgn) {
|
||||
::DisposeRgn((RgnHandle)s_macCursorRgn);
|
||||
@ -1360,7 +1348,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
s_inReceiveEvent = true ;
|
||||
status = ReceiveNextEvent(0, NULL,kEventDurationNoWait,true,&theEvent) ;
|
||||
s_inReceiveEvent = false ;
|
||||
|
||||
|
||||
if ( status == eventLoopTimedOutErr )
|
||||
{
|
||||
// make sure next time the event loop will trigger idle events
|
||||
@ -1383,7 +1371,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
// having a larger value here leads to large performance slowdowns
|
||||
// so we cannot give background apps more processor time here
|
||||
// we do so however having a large sleep value in the main event loop
|
||||
sleepTime = 0 ;
|
||||
sleepTime = 0 ;
|
||||
|
||||
while ( !IsExiting() && WaitNextEvent(everyEvent, &event,sleepTime, (RgnHandle) wxApp::s_macCursorRgn))
|
||||
{
|
||||
@ -1722,8 +1710,8 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
|
||||
&constraintRect , &newContentRect ) ;
|
||||
if ( growResult )
|
||||
{
|
||||
win->SetSize( newContentRect.left , newContentRect.top ,
|
||||
newContentRect.right - newContentRect.left ,
|
||||
win->SetSize( newContentRect.left , newContentRect.top ,
|
||||
newContentRect.right - newContentRect.left ,
|
||||
newContentRect.bottom - newContentRect.top, wxSIZE_USE_EXISTING);
|
||||
}
|
||||
s_lastMouseDown = 0;
|
||||
@ -1825,7 +1813,7 @@ void wxApp::MacHandleMouseUpEvent( WXEVENTREF evr )
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
long wxMacTranslateKey(unsigned char key, unsigned char code) ;
|
||||
long wxMacTranslateKey(unsigned char key, unsigned char code)
|
||||
@ -1951,7 +1939,7 @@ void wxApp::MacHandleKeyDownEvent( WXEVENTREF evr )
|
||||
else
|
||||
{
|
||||
wxWindow* focus = wxWindow::FindFocus() ;
|
||||
|
||||
|
||||
if ( MacSendKeyDownEvent( focus , ev->message , ev->modifiers , ev->when , ev->where.h , ev->where.v ) == false )
|
||||
{
|
||||
// has not been handled -> perform default
|
||||
@ -1989,12 +1977,12 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
|
||||
{
|
||||
if ( !focus )
|
||||
return false ;
|
||||
|
||||
|
||||
short keycode ;
|
||||
short keychar ;
|
||||
keychar = short(keymessage & charCodeMask);
|
||||
keycode = short(keymessage & keyCodeMask) >> 8 ;
|
||||
|
||||
|
||||
if ( modifiers & ( controlKey|shiftKey|optionKey ) )
|
||||
{
|
||||
// control interferes with some built-in keys like pgdown, return etc. therefore we remove the controlKey modifier
|
||||
@ -2012,7 +2000,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
|
||||
realkeyval = short(keymessage & charCodeMask) ;
|
||||
keyval = wxToupper( keyval ) ;
|
||||
}
|
||||
|
||||
|
||||
wxKeyEvent event(wxEVT_KEY_DOWN);
|
||||
bool handled = false ;
|
||||
event.m_shiftDown = modifiers & shiftKey;
|
||||
@ -2137,7 +2125,7 @@ bool wxApp::MacSendKeyUpEvent( wxWindow* focus , long keymessage , long modifier
|
||||
|
||||
if ( keyval == keychar )
|
||||
{
|
||||
keyval = wxToupper( keyval ) ;
|
||||
keyval = wxToupper( keyval ) ;
|
||||
}
|
||||
bool handled = false ;
|
||||
|
||||
@ -2321,9 +2309,9 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr )
|
||||
}
|
||||
else
|
||||
{
|
||||
windowPart = ::FindWindow(ev->where, &window);
|
||||
windowPart = ::FindWindow(ev->where, &window);
|
||||
}
|
||||
|
||||
|
||||
switch (windowPart)
|
||||
{
|
||||
case inContent :
|
||||
@ -2368,12 +2356,12 @@ void wxApp::MacHandleMenuCommand( wxUint32 id )
|
||||
item = mbar->FindItem( id , &menu ) ;
|
||||
}
|
||||
wxCHECK_RET( item != NULL && menu != NULL && mbar != NULL, wxT("error in menu item callback") );
|
||||
|
||||
|
||||
if (item->IsCheckable())
|
||||
{
|
||||
item->Check( !item->IsChecked() ) ;
|
||||
}
|
||||
|
||||
|
||||
menu->SendEvent( id , item->IsCheckable() ? item->IsChecked() : -1 ) ;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#include "wx/app.h"
|
||||
@ -91,7 +90,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
while (wxEventLoop::GetActive()->Pending())
|
||||
wxEventLoop::GetActive()->Dispatch();
|
||||
}
|
||||
|
||||
|
||||
/* it's necessary to call ProcessIdle() to update the frames sizes which
|
||||
might have been changed (it also will update other things set from
|
||||
OnUpdateUI() which is a nice (and desired) side effect) */
|
||||
@ -116,7 +115,7 @@ void wxWakeUpIdle()
|
||||
wxMutexGuiEnter();
|
||||
#endif
|
||||
|
||||
while (wxTheApp->ProcessIdle()) {}
|
||||
while (wxTheApp->ProcessIdle()) {}
|
||||
|
||||
#if wxUSE_THREADS
|
||||
if (!wxThread::IsMain())
|
||||
@ -139,11 +138,11 @@ class wxRootWindow : public wxWindow
|
||||
~wxRootWindow()
|
||||
{
|
||||
// we don't want to delete MGL_WM's rootWnd
|
||||
m_wnd = NULL;
|
||||
m_wnd = NULL;
|
||||
}
|
||||
|
||||
virtual bool AcceptsFocus() const { return FALSE; }
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxRootWindow)
|
||||
};
|
||||
|
||||
@ -159,18 +158,18 @@ static bool wxCreateMGL_WM(const wxDisplayModeInfo& displayMode)
|
||||
{
|
||||
int mode;
|
||||
int refresh = MGL_DEFAULT_REFRESH;
|
||||
|
||||
|
||||
#if wxUSE_SYSTEM_OPTIONS
|
||||
if ( wxSystemOptions::HasOption(wxT("mgl.screen-refresh")) )
|
||||
refresh = wxSystemOptions::GetOptionInt(wxT("mgl.screen-refresh"));
|
||||
#endif
|
||||
|
||||
mode = MGL_findMode(displayMode.GetWidth(),
|
||||
displayMode.GetHeight(),
|
||||
|
||||
mode = MGL_findMode(displayMode.GetWidth(),
|
||||
displayMode.GetHeight(),
|
||||
displayMode.GetDepth());
|
||||
if ( mode == -1 )
|
||||
{
|
||||
wxLogError(_("Mode %ix%i-%i not available."),
|
||||
wxLogError(_("Mode %ix%i-%i not available."),
|
||||
displayMode.GetWidth(),
|
||||
displayMode.GetHeight(),
|
||||
displayMode.GetDepth());
|
||||
@ -183,7 +182,7 @@ static bool wxCreateMGL_WM(const wxDisplayModeInfo& displayMode)
|
||||
g_displayDC = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
g_winMng = MGL_wmCreate(g_displayDC->getDC());
|
||||
if (!g_winMng)
|
||||
return FALSE;
|
||||
@ -229,7 +228,7 @@ wxDisplayModeInfo wxGetDefaultDisplayMode()
|
||||
wxString mode;
|
||||
unsigned w, h, bpp;
|
||||
|
||||
if ( !wxGetEnv(wxT("WXMODE"), &mode) ||
|
||||
if ( !wxGetEnv(wxT("WXMODE"), &mode) ||
|
||||
(wxSscanf(mode.c_str(), _T("%ux%u-%u"), &w, &h, &bpp) != 3) )
|
||||
{
|
||||
w = 640, h = 480, bpp = 16;
|
||||
@ -430,17 +429,13 @@ bool wxApp::Initialize()
|
||||
|
||||
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
||||
wxTheColourDatabase->Initialize();
|
||||
|
||||
|
||||
// Can't do this in wxModule, because fonts are needed by stock lists
|
||||
wxTheFontsManager = new wxFontsManager;
|
||||
|
||||
wxInitializeStockLists();
|
||||
wxInitializeStockObjects();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxInitializeResourceSystem();
|
||||
#endif
|
||||
|
||||
wxModule::RegisterModules();
|
||||
if (!wxModule::InitializeModules()) return FALSE;
|
||||
|
||||
@ -462,10 +457,6 @@ void wxApp::CleanUp()
|
||||
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxCleanUpResourceSystem();
|
||||
#endif
|
||||
|
||||
if (wxTheColourDatabase)
|
||||
delete wxTheColourDatabase;
|
||||
|
||||
|
@ -42,10 +42,6 @@
|
||||
#include "wx/thread.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
#include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#ifdef __VMS__
|
||||
#pragma message disable nosimpint
|
||||
#endif
|
||||
@ -105,10 +101,6 @@ bool wxApp::Initialize()
|
||||
wxInitializeStockLists();
|
||||
wxInitializeStockObjects();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxInitializeResourceSystem();
|
||||
#endif
|
||||
|
||||
// For PostScript printing
|
||||
#if wxUSE_POSTSCRIPT
|
||||
/* Done using wxModule now
|
||||
@ -135,10 +127,6 @@ void wxApp::CleanUp()
|
||||
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxCleanUpResourceSystem();
|
||||
#endif
|
||||
|
||||
wxDeleteStockObjects() ;
|
||||
|
||||
// Destroy all GDI lists, etc.
|
||||
|
@ -65,10 +65,6 @@
|
||||
WX_DEFINE_OBJARRAY(wxMsgArray);
|
||||
#endif // wxUSE_THREADS
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
#include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
#include "wx/tooltip.h"
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
@ -191,7 +187,7 @@ END_EVENT_TABLE()
|
||||
bool wxApp::Initialize()
|
||||
{
|
||||
// the first thing to do is to check if we're trying to run an Unicode
|
||||
// program under Win9x w/o MSLU emulation layer - if so, abort right now
|
||||
// program under Win9x w/o MSLU emulation layer - if so, abort right now
|
||||
// as it has no chance to work
|
||||
#if wxUSE_UNICODE && !wxUSE_UNICODE_MSLU
|
||||
if ( wxGetOsVersion() != wxWINDOWS_NT )
|
||||
@ -225,10 +221,6 @@ bool wxApp::Initialize()
|
||||
wxInitializeStockLists();
|
||||
wxInitializeStockObjects();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxInitializeResourceSystem();
|
||||
#endif
|
||||
|
||||
wxBitmap::InitStandardHandlers();
|
||||
|
||||
#if defined(__WIN95__) && !defined(__WXMICROWIN__)
|
||||
@ -511,12 +503,6 @@ void wxApp::CleanUp()
|
||||
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxCleanUpResourceSystem();
|
||||
|
||||
// wxDefaultResourceTable->ClearTable();
|
||||
#endif
|
||||
|
||||
wxDeleteStockObjects();
|
||||
|
||||
// Destroy all GDI lists, etc.
|
||||
|
@ -76,10 +76,6 @@ extern "C" int _System bsdselect(int,
|
||||
WX_DEFINE_OBJARRAY(wxMsgArray);
|
||||
#endif // wxUSE_THREADS
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
#include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
#include "wx/tooltip.h"
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
@ -271,10 +267,6 @@ bool wxApp::Initialize(
|
||||
wxInitializeStockLists();
|
||||
wxInitializeStockObjects();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxInitializeResourceSystem();
|
||||
#endif
|
||||
|
||||
wxBitmap::InitStandardHandlers();
|
||||
|
||||
//
|
||||
@ -473,10 +465,6 @@ void wxApp::CleanUp()
|
||||
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxCleanUpResourceSystem();
|
||||
#endif
|
||||
|
||||
wxDeleteStockObjects();
|
||||
|
||||
//
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "wx/app.h"
|
||||
#include "wx/cursor.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#include "wx/os2/private.h"
|
||||
|
@ -38,10 +38,6 @@
|
||||
#include "wx/thread.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
#include "wx/resource.h"
|
||||
#endif
|
||||
|
||||
#include "wx/x11/private.h"
|
||||
|
||||
#include <string.h>
|
||||
@ -121,10 +117,6 @@ bool wxApp::Initialize()
|
||||
wxInitializeStockLists();
|
||||
wxInitializeStockObjects();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxInitializeResourceSystem();
|
||||
#endif
|
||||
|
||||
wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
|
||||
wxClientWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
|
||||
|
||||
@ -143,10 +135,6 @@ void wxApp::CleanUp()
|
||||
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
wxCleanUpResourceSystem();
|
||||
#endif
|
||||
|
||||
delete wxTheColourDatabase;
|
||||
wxTheColourDatabase = NULL;
|
||||
|
||||
@ -239,7 +227,7 @@ int wxEntryStart( int& argc, char *argv[] )
|
||||
|
||||
}
|
||||
|
||||
// X11 display stuff
|
||||
// X11 display stuff
|
||||
Display* xdisplay = XOpenDisplay( displayName );
|
||||
if (!xdisplay)
|
||||
{
|
||||
@ -251,7 +239,7 @@ int wxEntryStart( int& argc, char *argv[] )
|
||||
XSynchronize(xdisplay, True);
|
||||
|
||||
wxApp::ms_display = (WXDisplay*) xdisplay;
|
||||
|
||||
|
||||
XSelectInput( xdisplay, XDefaultRootWindow(xdisplay), PropertyChangeMask);
|
||||
|
||||
// Misc.
|
||||
@ -260,7 +248,7 @@ int wxEntryStart( int& argc, char *argv[] )
|
||||
#if wxUSE_UNICODE
|
||||
// Glib's type system required by Pango
|
||||
g_type_init();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (!wxApp::Initialize())
|
||||
return -1;
|
||||
@ -1119,9 +1107,9 @@ PangoContext* wxApp::GetPangoContext()
|
||||
static PangoContext *ret = NULL;
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
Display *xdisplay = (Display*) wxApp::GetDisplay();
|
||||
|
||||
|
||||
#if 1
|
||||
int xscreen = DefaultScreen(xdisplay);
|
||||
static int use_xft = -1;
|
||||
@ -1130,16 +1118,16 @@ PangoContext* wxApp::GetPangoContext()
|
||||
wxString val = wxGetenv( L"GDK_USE_XFT" );
|
||||
use_xft = (val == L"1");
|
||||
}
|
||||
|
||||
|
||||
if (use_xft)
|
||||
ret = pango_xft_get_context( xdisplay, xscreen );
|
||||
else
|
||||
#endif
|
||||
ret = pango_x_get_context( xdisplay );
|
||||
|
||||
|
||||
if (!PANGO_IS_CONTEXT(ret))
|
||||
wxLogError( wxT("No pango context.") );
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -1240,7 +1228,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
// Call dispatch at least once so that sockets
|
||||
// can be tested
|
||||
wxTheApp->Dispatch();
|
||||
|
||||
|
||||
while (wxTheApp && wxTheApp->Pending())
|
||||
wxTheApp->Dispatch();
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user