2000-09-26 17:59:37 -04:00
|
|
|
// rc2wxr.cpp: implementation of the rc2wxr class.
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
//Author: Brian Gavin 9/24/00
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
//License: wxWindows License
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
/*
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
WARNING- I know this code has some bugs to work out but
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
I don't plan to fix them since I feel that wxr files will
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
not be used much longer.
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
This code was used as a starting point for my rc2xml converter
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
*/
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
#ifdef __GNUG__
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
#pragma implementation "rc2wxr.cpp"
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
#pragma interface "rc2wxr.cpp"
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
#endif
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
// For compilers that support precompilation, includes "wx/wx.h".
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
#include "wx/wxprec.h"
|
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
|
|
|
|
#ifdef __BORLANDC__
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
#pragma hdrstop
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
#endif
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
// for all others, include the necessary headers (this file is usually all you
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
// need because it includes almost all "standard" wxWindows headers
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
#ifndef WX_PRECOMP
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
#include <wx/wx.h>
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
#endif
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
#include "rc2wxr.h"
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
#include "wx/image.h"
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
#include "wx/resource.h"
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
// Construction/Destruction
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
rc2wxr::rc2wxr()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_done=FALSE;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_controlid=6000;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
rc2wxr::~rc2wxr()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::Convert(wxString wxrfile, wxString rcfile)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
m_rc.Open(rcfile);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
m_filesize=m_rc.Length();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if( (m_wxr = fopen( wxrfile, "wt" )) == NULL )
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
return;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok,prevtok;
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while (!m_done)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="DIALOG")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
ParseDialog(prevtok);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="MENU")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
ParseMenu(prevtok);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
prevtok=tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2000-09-26 17:59:37 -04:00
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fclose(m_wxr);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//fclose(m_rc);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_rc.Close();
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
/*
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
Example .rc
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
Microsoft style as of v5.0
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 217, 55
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
CAPTION "About Funimator"
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
FONT 8, "MS Sans Serif"
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
Borland 4.5 style rc
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
IDD_DIBATTR DIALOG 7, 16, 172, 119
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
CAPTION "DIB Attributes"
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
FONT 8, "MS Sans Serif"
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
DEFPUSHBUTTON "Ok", IDOK, 114, 8, 50, 14
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
PUSHBUTTON "Cancel", IDCANCEL, 114, 28, 50, 14
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
*/
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseDialog(wxString dlgname)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
static int dlgid=999;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
dlgid++;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
/* Make sure that this really is a dialog
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
microsoft reuses the keyword DIALOG for other things
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
*/
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
tok=PeekToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
//Microsoft notation?
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
if (tok=="DISCARDABLE")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
tok=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
tok=PeekToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
//This isn't a Dialog resource eject eject
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
if (!tok.IsNumber())
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
return;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//Generate Dialog text
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr,"static char *dialog%i = \"dialog(name = '%s',\\\n",dlgid,dlgname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//be lazy about style for now. add it later
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\\\n");
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"id = %i,\\\n",dlgid);
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//Record x,y,width,height
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int x,y,width,height;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadRect(x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"x = %i, y = %i, width = %i, height = %i,\\\n",x,y,width,height);
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//CAPTION "About Funimator"
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//Get Title
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString title;
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while ((tok!="BEGIN")&(tok!="{"))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="CAPTION")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
title=GetQuoteField();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr,"title = '%s',\\\n",title);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"use_dialog_units = 1,\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"use_system_defaults = 0,\\\n");
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"font = [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif'],\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParseControls();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,").\";\n\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
/*
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
BEGIN
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
EDITTEXT IDC_BANDS,36,83,22,14,ES_AUTOHSCROLL | ES_NUMBER | NOT
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
WS_TABSTOP
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
LTEXT "Bands",IDC_STATIC,11,86,21,8
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
EDITTEXT IDC_NAME,10,3,75,14,ES_AUTOHSCROLL
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
END
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
*/
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseControls()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while ((tok!="END")&(tok!="}"))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="LTEXT")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParseStaticText();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="EDITTEXT")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParseTextCtrl();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="PUSHBUTTON")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParsePushButton();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="DEFPUSHBUTTON")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParsePushButton();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="GROUPBOX")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParseGroupBox();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="COMBOBOX")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParseComboBox();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="CONTROL")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParseControlMS();
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//LTEXT "Radius",IDC_STATIC,9,67,23,8
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseStaticText()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString phrase,varname;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
phrase=GetQuoteField();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
varname=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_controlid++;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int x,y,width,height;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadRect(x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," control = [%i,wxStaticText,'%s','0','%s',",m_controlid,phrase,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"%i,%i,%i,%i,'',\\\n",x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//EDITTEXT IDC_RADIUS,36,65,40,14,ES_AUTOHSCROLL
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseTextCtrl()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString varname;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
varname=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_controlid++;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int x,y,width,height;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadRect(x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," control = [%i,wxTextCtrl,'','0','%s',",m_controlid,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"%i,%i,%i,%i,'',\\\n",x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n");
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//PUSHBUTTON "Create/Update",IDC_CREATE,15,25,53,13,NOT WS_TABSTOP
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParsePushButton()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString phrase,varname;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
phrase=GetQuoteField();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
varname=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int c;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_controlid++;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
c=m_controlid;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (varname=="IDOK")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
c=wxID_OK;
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (varname=="IDCANCEL")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
c=wxID_CANCEL;
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (varname=="IDAPPLY")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
c=wxID_APPLY;
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int x,y,width,height;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadRect(x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," control = [%i,wxButton,'%s','0','%s',",c,phrase,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"%i,%i,%i,%i,'',\\\n",x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n");
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
bool rc2wxr::Seperator(int ch)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if ((ch==' ')|(ch==',')|(ch==13)|(ch==10)|(ch=='|'))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
return TRUE;
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (ch==EOF)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
m_done=TRUE;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
return TRUE;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
return FALSE;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseGroupBox()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
// GROUPBOX "Rotate",IDC_STATIC,1,1,71,79
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString phrase,varname;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
phrase=GetQuoteField();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
varname=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_controlid++;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int x,y,width,height;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadRect(x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," control = [%i,wxStaticBox,'%s','0','%s',",m_controlid,phrase,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"%i,%i,%i,%i,'',\\\n",x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n");
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ReadRect(int & x, int & y, int & width, int & height)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
x=atoi(GetToken());
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
y=atoi(GetToken());
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
width=atoi(GetToken());
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
height=atoi(GetToken());
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
wxString rc2wxr::GetToken()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok="";
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (m_rc.Eof())
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_done=TRUE;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
return tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int ch=0;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadChar(ch);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (ch==EOF)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_done=TRUE;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
return tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while (Seperator(ch))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadChar(ch);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (m_done)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
return tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (ch==EOF)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
m_done=TRUE;
|
2000-09-17 15:17:13 -04:00
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while (!Seperator(ch))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
tok+=(char)ch;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
ReadChar(ch);
|
2000-09-17 15:17:13 -04:00
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (ch==EOF)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_done=TRUE;
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
return tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
wxString rc2wxr::GetQuoteField()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString phrase;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//ASCII code 34 "
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int ch=0;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadChar(ch);
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while (ch!=34)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadChar(ch);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadChar(ch);
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while (ch!=34)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
phrase+=(char)ch;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadChar(ch);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
return phrase;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ReadChar(int &ch)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int result;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
result=m_rc.Tell();
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if((result>=m_filesize))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_done=TRUE;
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
result=m_rc.Read(&ch,1);
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if((result==-1))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_done=TRUE;
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if(ch==EOF)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_done=TRUE;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseComboBox()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
/* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT |
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
WS_VSCROLL | WS_TABSTOP */
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString varname;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
varname=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_controlid++;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int x,y,width,height;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadRect(x,y,width,height);
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," control = [%i,wxChoice,'','0','%s',",m_controlid,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"%i,%i,%i,%i,[],\\\n",x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n");
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseMenu(wxString name)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok="";
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
static int menuid=0;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
menuid++;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr,"static char *MenuBar%i = \"menu(name = '%s',\\\n",menuid,name);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"menu = \\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[\\\n");
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while ((tok!="BEGIN")&(tok!="{"))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while ((tok!="END")&(tok!="}"))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="POPUP")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParsePopupMenu();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr," ],\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"]).\";\n\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParsePopupMenu()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
static int menuitem=99;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
menuitem++;
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetQuoteField();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int spot;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//Remove /t because it causes problems
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
spot=tok.First("\\t");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=tok.Left(spot);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," ['%s',%i,'',\\\n",tok,menuitem);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while ((tok!="BEGIN")&(tok!="{"))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while ((tok!="END")&(tok!="}"))
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="MENUITEM")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
if (PeekToken()=="SEPARATOR")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
fprintf(m_wxr," [],\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
else
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
tok=GetQuoteField();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
//Remove /t because it causes problems
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
spot=tok.First("\\t");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
tok=tok.Left(spot);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
menuitem++;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," ['%s',%i,''],\\\n",tok,menuitem);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
}
|
2000-09-17 15:17:13 -04:00
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
wxString rc2wxr::PeekToken()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int p;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
p=m_rc.Tell();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=GetToken();
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_rc.Seek(p);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
return tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//Windows pain in the butt CONTROL
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseControlMS()
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString label,varname,kindctrl,tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
label=GetQuoteField();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
varname=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
kindctrl=GetQuoteField();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
kindctrl.MakeUpper();
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (kindctrl=="MSCTLS_TRACKBAR32")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParseSlider(label,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (kindctrl=="MSCTLS_PROGRESS32")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParseProgressBar(label,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (kindctrl=="BUTTON")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ParseCtrlButton(label,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
/* CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
TBS_NOTICKS | WS_TABSTOP,52,73,100,15
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
*/
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseSlider(wxString label, wxString varname)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
while (ReadOrs(tok));
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," control = [%i,wxSlider,'','wxSL_HORIZONTAL','%s',",m_controlid,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int x,y,width,height;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadRect(x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"%i,%i,%i,%i,",x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr," 1, 1, 10,\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
/*
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
CONTROL "Progress1",CG_IDC_PROGDLG_PROGRESS,"msctls_progress32",
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
WS_BORDER,15,52,154,13
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
*/
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseProgressBar(wxString label, wxString varname)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while (ReadOrs(tok));
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," control = [%i,wxGauge,'','wxGA_HORIZONTAL','%s',",m_controlid,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
int x,y,width,height;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
ReadRect(x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"%i,%i,%i,%i,",x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr," 0, 10,\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
bool rc2wxr::ReadOrs(wxString & w)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
tok=PeekToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok.IsNumber())
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
return false;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
w=GetToken();
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
return TRUE;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//Is it a check button or a radio button
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void rc2wxr::ParseCtrlButton(wxString label, wxString varname)
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
wxString tok;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
tok=GetToken();
|
2000-09-17 15:17:13 -04:00
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
m_controlid++;
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
int x,y,width,height;
|
2000-09-17 15:17:13 -04:00
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="BS_AUTOCHECKBOX")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," control = [%i,wxCheckBox,'%s','0','%s',",m_controlid,label,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while (ReadOrs(tok));
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
ReadRect(x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"%i,%i,%i,%i,0,\\\n",x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
if (tok=="BS_AUTORADIOBUTTON")
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-10-18 17:51:04 -04:00
|
|
|
fprintf(m_wxr," control = [%i,wxRadioButton,'%s','0','%s',",m_controlid,label,varname);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
while(ReadOrs(tok));
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
ReadRect(x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"%i,%i,%i,%i,0,\\\n",x,y,width,height);
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n");
|
2001-10-30 08:33:34 -05:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
}
|
|
|
|
|
2001-10-30 08:33:34 -05:00
|
|
|
|
|
|
|
|