#include "wx/button.h"
#include "wx/bmpbuttn.h"
#include "wx/radiobox.h"
-#include "wx/radiobut.h"
#include "wx/listbox.h"
#include "wx/choice.h"
#include "wx/checkbox.h"
#include "wx/settings.h"
#include "wx/slider.h"
+#include "wx/icon.h"
#include "wx/statbox.h"
#include "wx/statbmp.h"
-#if wxUSE_GAUGE
#include "wx/gauge.h"
-#endif
#include "wx/textctrl.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
#endif
-#if wxUSE_RADIOBUTTON
+#if wxUSE_RADIOBTN
#include "wx/radiobut.h"
#endif
// parent's child list.
BeginFind();
wxNode *node = (wxNode *) NULL;
- while ((node = Next()))
+ node = Next();
+ while (node != NULL)
{
wxItemResource *parent = (wxItemResource *)node->Data();
if (parent->GetChildren().Member(item))
parent->GetChildren().DeleteObject(item);
break;
}
+ node = Next();
}
delete item;
((wxGauge *)control)->SetValue((int)childResource->GetValue1());
}
#endif
-#if wxUSE_RADIOBUTTON
+#if wxUSE_RADIOBTN
else if (itemType == wxString(_T("wxRadioButton")))
{
control = new wxRadioButton(parent, id, childResource->GetTitle(), // (int)childResource->GetValue1(),
}
dialogItem->SetStyle(windowStyle);
dialogItem->SetValue1(isModal);
+ if (windowStyle & wxDIALOG_MODAL) // Uses style in wxWin 2
+ dialogItem->SetValue1(TRUE);
+
dialogItem->SetName(name);
dialogItem->SetTitle(title);
dialogItem->SetSize(x, y, width, height);
controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
}
-#if wxUSE_RADIOBUTTON
+#if wxUSE_RADIOBTN
else if (controlType == _T("wxRadioButton"))
{
// Check for default value
default:
ungetc(ch, fd);
return TRUE;
-
+
}
}
return FALSE;
if (strcmp(wxResourceBuffer, "#define") == 0)
{
wxGetResourceToken(fd);
- wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+ wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
wxGetResourceToken(fd);
- wxChar *value = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
- if (wxIsalpha(value[0]))
+ wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
+ if (wxIsdigit(value[0]))
{
int val = (int)wxAtol(value);
wxResourceAddIdentifier(name, val, table);
else if (strcmp(wxResourceBuffer, "#include") == 0)
{
wxGetResourceToken(fd);
- wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+ wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
wxChar *actualName = name;
if (name[0] == _T('"'))
actualName = name + 1;
{
wxChar buf[300];
wxStrcpy(buf, _("Found "));
- wxStrncat(buf, wxConv_libc.cMB2WX(wxResourceBuffer), 30);
+ wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30);
wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
wxLogWarning(buf);
return FALSE;
{ _T("wxTE_READONLY"), wxTE_READONLY},
{ _T("wxTE_PROCESS_ENTER"), wxTE_PROCESS_ENTER},
{ _T("wxTE_MULTILINE"), wxTE_MULTILINE},
+ { _T("wxTE_NO_VSCROLL"), wxTE_NO_VSCROLL},
/* wxRadioBox/wxRadioButton */
{ _T("wxRB_GROUP"), wxRB_GROUP },
{ _T("wxTB_VERTICAL"), wxTB_VERTICAL},
{ _T("wxTB_FLAT"), wxTB_FLAT},
+ /* wxDialog */
+ { _T("wxDIALOG_MODAL"), wxDIALOG_MODAL },
+
/* Generic */
{ _T("wxVSCROLL"), wxVSCROLL },
{ _T("wxHSCROLL"), wxHSCROLL },
{ _T("wxTRANSPARENT_WINDOW"), wxTRANSPARENT_WINDOW},
{ _T("wxNO_BORDER"), wxNO_BORDER},
{ _T("wxCLIP_CHILDREN"), wxCLIP_CHILDREN},
+ { _T("wxTAB_TRAVERSAL"), 0}, // Compatibility only
{ _T("wxTINY_CAPTION_HORIZ"), wxTINY_CAPTION_HORIZ},
{ _T("wxTINY_CAPTION_VERT"), wxTINY_CAPTION_VERT},
int i = 0;
wxChar *word;
long bitList = 0;
- while ((word = wxResourceParseWord(WXSTRINGCAST bitListString, &i)))
+ word = wxResourceParseWord(WXSTRINGCAST bitListString, &i);
+ while (word != NULL)
{
bool found = FALSE;
int j;
wxLogWarning(_("Unrecognized style %s whilst parsing resource."), word);
return 0;
}
+ word = wxResourceParseWord(WXSTRINGCAST bitListString, &i);
}
return bitList;
}
if (!table)
table = wxDefaultResourceTable;
- table->identifiers.Put(name, (wxObject *)value);
+ table->identifiers.Put(name, (wxObject *)(long)value);
return TRUE;
}
if (!table)
table = wxDefaultResourceTable;
- return (int)table->identifiers.Get(name);
+ return (int)(long)table->identifiers.Get(name);
}
/*
if (strcmp(wxResourceBuffer, "#define") == 0)
{
wxGetResourceToken(fd);
- wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+ wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
wxGetResourceToken(fd);
- wxChar *value = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+ wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
if (wxIsdigit(value[0]))
{
int val = (int)wxAtol(value);
default:
ungetc_string();
return TRUE;
-
+
}
}
return FALSE;
if (strcmp(wxResourceBuffer, "#define") == 0)
{
wxGetResourceTokenString(s);
- wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+ wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
wxGetResourceTokenString(s);
- wxChar *value = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
- if (wxIsalpha(value[0]))
+ wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
+ if (wxIsdigit(value[0]))
{
int val = (int)wxAtol(value);
wxResourceAddIdentifier(name, val, table);
{
wxChar buf[300];
wxStrcpy(buf, _("Found "));
- wxStrncat(buf, wxConv_libc.cMB2WX(wxResourceBuffer), 30);
+ wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30);
wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
wxLogWarning(buf);
return FALSE;
* resource loading facility
*/
-bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table)
+bool wxWindowBase::LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table)
{
if (!table)
table = wxDefaultResourceTable;
}
else
{
- if (!this->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name))
+ if (!((wxWindow *)this)->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name))
return FALSE;
}
return TRUE;
}
-wxControl *wxWindow::CreateItem(const wxItemResource *resource, const wxItemResource* parentResource, const wxResourceTable *table)
+wxControl *wxWindowBase::CreateItem(const wxItemResource *resource, const wxItemResource* parentResource, const wxResourceTable *table)
{
if (!table)
table = wxDefaultResourceTable;