]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/resource.cpp
More _T() in asserts...
[wxWidgets.git] / src / common / resource.cpp
index f5168e679671befa4d6088905da7d09549552446..95c3840d98b4403218af3f035024e07bd71cab4d 100644 (file)
 #include "wx/button.h"
 #include "wx/bmpbuttn.h"
 #include "wx/radiobox.h"
 #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/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"
 #include "wx/statbox.h"
 #include "wx/statbmp.h"
-#if wxUSE_GAUGE
 #include "wx/gauge.h"
 #include "wx/gauge.h"
-#endif
 #include "wx/textctrl.h"
 #include "wx/msgdlg.h"
 #include "wx/intl.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
 
 #include "wx/radiobut.h"
 #endif
 
@@ -372,7 +370,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
         ((wxGauge *)control)->SetValue((int)childResource->GetValue1());
       }
 #endif
         ((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(),
    else if (itemType == wxString(_T("wxRadioButton")))
       {
         control = new wxRadioButton(parent, id, childResource->GetTitle(), // (int)childResource->GetValue1(),
@@ -651,6 +649,9 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
   }
   dialogItem->SetStyle(windowStyle);
   dialogItem->SetValue1(isModal);
   }
   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);
   dialogItem->SetName(name);
   dialogItem->SetTitle(title);
   dialogItem->SetSize(x, y, width, height);
@@ -858,7 +859,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
         controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
     }
   }
         controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
     }
   }
-#if wxUSE_RADIOBUTTON
+#if wxUSE_RADIOBTN
   else if (controlType == _T("wxRadioButton"))
   {
     // Check for default value
   else if (controlType == _T("wxRadioButton"))
   {
     // Check for default value
@@ -1617,9 +1618,9 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour
   if (strcmp(wxResourceBuffer, "#define") == 0)
   {
     wxGetResourceToken(fd);
   if (strcmp(wxResourceBuffer, "#define") == 0)
   {
     wxGetResourceToken(fd);
-    wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+    wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
     wxGetResourceToken(fd);
     wxGetResourceToken(fd);
-    wxChar *value = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+    wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
     if (wxIsalpha(value[0]))
     {
       int val = (int)wxAtol(value);
     if (wxIsalpha(value[0]))
     {
       int val = (int)wxAtol(value);
@@ -1640,7 +1641,7 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour
   else if (strcmp(wxResourceBuffer, "#include") == 0)
   {
     wxGetResourceToken(fd);
   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 *actualName = name;
     if (name[0] == _T('"'))
       actualName = name + 1;
@@ -1658,7 +1659,7 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour
   {
     wxChar buf[300];
     wxStrcpy(buf, _("Found "));
   {
     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;
     wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
     wxLogWarning(buf);
     return FALSE;
@@ -1893,6 +1894,9 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   { _T("wxTB_VERTICAL"), wxTB_VERTICAL},
   { _T("wxTB_FLAT"), wxTB_FLAT},
 
   { _T("wxTB_VERTICAL"), wxTB_VERTICAL},
   { _T("wxTB_FLAT"), wxTB_FLAT},
 
+  /* wxDialog */
+  { _T("wxDIALOG_MODAL"), wxDIALOG_MODAL },
+
   /* Generic */
   { _T("wxVSCROLL"), wxVSCROLL },
   { _T("wxHSCROLL"), wxHSCROLL },
   /* Generic */
   { _T("wxVSCROLL"), wxVSCROLL },
   { _T("wxHSCROLL"), wxHSCROLL },
@@ -2518,9 +2522,9 @@ bool wxResourceParseIncludeFile(const wxString& f, wxResourceTable *table)
     if (strcmp(wxResourceBuffer, "#define") == 0)
     {
       wxGetResourceToken(fd);
     if (strcmp(wxResourceBuffer, "#define") == 0)
     {
       wxGetResourceToken(fd);
-      wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+      wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
       wxGetResourceToken(fd);
       wxGetResourceToken(fd);
-      wxChar *value = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+      wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
       if (wxIsdigit(value[0]))
       {
         int val = (int)wxAtol(value);
       if (wxIsdigit(value[0]))
       {
         int val = (int)wxAtol(value);
@@ -2691,9 +2695,9 @@ bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxR
   if (strcmp(wxResourceBuffer, "#define") == 0)
   {
     wxGetResourceTokenString(s);
   if (strcmp(wxResourceBuffer, "#define") == 0)
   {
     wxGetResourceTokenString(s);
-    wxChar *name = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+    wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
     wxGetResourceTokenString(s);
     wxGetResourceTokenString(s);
-    wxChar *value = copystring(wxConv_libc.cMB2WX(wxResourceBuffer));
+    wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer));
     if (wxIsalpha(value[0]))
     {
       int val = (int)wxAtol(value);
     if (wxIsalpha(value[0]))
     {
       int val = (int)wxAtol(value);
@@ -2736,7 +2740,7 @@ bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxR
   {
     wxChar buf[300];
     wxStrcpy(buf, _("Found "));
   {
     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;
     wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
     wxLogWarning(buf);
     return FALSE;