Permalink
Browse files

use wxString instead of dstr

  • Loading branch information...
1 parent a85ed6c commit 44b338b75429c052cd97706abffc38c2801840f0 @afb afb committed Jan 28, 2007
Showing with 931 additions and 866 deletions.
  1. +4 −4 wx/App.d
  2. +2 −2 wx/ArrayString.d
  3. +3 −3 wx/BitmapButton.d
  4. +4 −4 wx/Choice.d
  5. +4 −4 wx/ChoiceDialog.d
  6. +2 −2 wx/ClientData.d
  7. +6 −6 wx/ComboBox.d
  8. +2 −2 wx/CommandEvent.d
  9. +10 −10 wx/Config.d
  10. +2 −2 wx/Control.d
  11. +2 −2 wx/DataFormat.d
  12. +2 −2 wx/DataObject.d
  13. +2 −2 wx/Dialog.d
  14. +4 −4 wx/DirDialog.d
  15. +2 −2 wx/Display.d
  16. +3 −3 wx/Document.d
  17. +22 −22 wx/FileDialog.d
  18. +8 −8 wx/FindReplaceDialog.d
  19. +12 −12 wx/Font.d
  20. +15 −15 wx/FontMisc.d
  21. +2 −2 wx/GdiCommon.d
  22. +48 −48 wx/Grid.d
  23. +38 −38 wx/HTML.d
  24. +4 −4 wx/HelpEvent.d
  25. +2 −2 wx/HtmlListBox.d
  26. +10 −10 wx/Image.d
  27. +4 −4 wx/ListBox.d
  28. +8 −8 wx/ListCtrl.d
  29. +2 −2 wx/Listbook.d
  30. +20 −20 wx/Locale.d
  31. +6 −6 wx/Menu.d
  32. +6 −6 wx/MenuBar.d
  33. +10 −10 wx/MenuItem.d
  34. +2 −2 wx/Notebook.d
  35. +12 −12 wx/PrintData.d
  36. +2 −2 wx/Printer.d
  37. +6 −6 wx/RadioBox.d
  38. +2 −2 wx/StatusBar.d
  39. +14 −14 wx/StyledTextCtrl.d
  40. +6 −6 wx/TextCtrl.d
  41. +6 −6 wx/TextDialog.d
  42. +10 −10 wx/ToolBar.d
  43. +2 −2 wx/ToolTip.d
  44. +4 −4 wx/TreeCtrl.d
  45. +2 −2 wx/UpdateUIEvent.d
  46. +4 −4 wx/Utils.d
  47. +7 −7 wx/Window.d
  48. +2 −2 wx/aui/DockArt.d
  49. +5 −5 wx/common.d
  50. +9 −9 wx/wxDateTime.d
  51. +6 −6 wx/wxObject.d
  52. +2 −5 wx/wxPlatform.d
  53. +45 −9 wx/wxString.d
  54. +2 −2 wx/wxVersion.d
  55. +4 −4 wxc/app.cpp
  56. +2 −2 wxc/bitmapbutton.cpp
  57. +4 −4 wxc/choice.cpp
  58. +4 −4 wxc/choicedialog.cpp
  59. +2 −2 wxc/clientdata.cpp
  60. +6 −6 wxc/combobox.cpp
  61. +2 −2 wxc/commandevent.cpp
  62. +16 −77 wxc/common.h
  63. +10 −10 wxc/config.cpp
  64. +2 −2 wxc/control.cpp
  65. +2 −2 wxc/dataformat.cpp
  66. +2 −2 wxc/dataobject.cpp
  67. +2 −2 wxc/dialog.cpp
  68. +6 −6 wxc/dirdialog.cpp
  69. +2 −2 wxc/display.cpp
  70. +6 −6 wxc/document.cpp
  71. +18 −18 wxc/filedialog.cpp
  72. +8 −8 wxc/findreplacedialog.cpp
  73. +12 −12 wxc/font.cpp
  74. +12 −12 wxc/fontmisc.cpp
  75. +2 −2 wxc/gdicmn.cpp
  76. +8 −8 wxc/global.cpp
  77. +45 −45 wxc/grid.cpp
  78. +4 −4 wxc/helpevent.cpp
  79. +41 −42 wxc/html.cpp
  80. +2 −2 wxc/htmllbox.cpp
  81. +10 −10 wxc/image.cpp
  82. +2 −2 wxc/listbook.cpp
  83. +4 −4 wxc/listbox.cpp
  84. +8 −8 wxc/listctrl.cpp
  85. +20 −20 wxc/locale.cpp
  86. +2 −2 wxc/log.cpp
  87. +6 −6 wxc/menu.cpp
  88. +6 −6 wxc/menubar.cpp
  89. +10 −10 wxc/menuitem.cpp
  90. +2 −2 wxc/notebook.cpp
  91. +4 −4 wxc/object.cpp
  92. +16 −16 wxc/printdata.cpp
  93. +2 −2 wxc/printer.cpp
  94. +6 −6 wxc/radiobox.cpp
  95. +5 −2 wxc/splitterwindow.cpp
  96. +2 −2 wxc/statusbar.cpp
  97. +14 −14 wxc/styledtextctrl.cpp
  98. +2 −2 wxc/tabctrl.cpp
  99. +8 −8 wxc/textctrl.cpp
  100. +6 −6 wxc/textdialog.cpp
  101. +10 −10 wxc/toolbar.cpp
  102. +2 −2 wxc/tooltip.cpp
  103. +4 −4 wxc/treectrl.cpp
  104. +2 −2 wxc/updateuievent.cpp
  105. +15 −12 wxc/window.cpp
  106. +14 −14 wxc/wxaui.cpp
  107. +2 −2 wxc/wxplatform.cpp
  108. +98 −9 wxc/wxstring.cpp
  109. +2 −3 wxc/wxversion.cpp
  110. +2 −2 wxc/xmlresource.cpp
View
@@ -45,10 +45,10 @@ private import std.utf;
static extern (C) void wxApp_Run(int argc, char** argv);
static extern (C) void wxApp_SetVendorName(IntPtr self, string name);
- static extern (C) string wxApp_GetVendorName(IntPtr self);
+ static extern (C) IntPtr wxApp_GetVendorName(IntPtr self);
static extern (C) void wxApp_SetAppName(IntPtr self, string name);
- static extern (C) string wxApp_GetAppName(IntPtr self);
+ static extern (C) IntPtr wxApp_GetAppName(IntPtr self);
static extern (C) void wxApp_SetTopWindow(IntPtr self, IntPtr window);
static extern (C) IntPtr wxApp_GetTopWindow(IntPtr self);
@@ -171,8 +171,8 @@ private import std.utf;
//---------------------------------------------------------------------
- public string VendorName() { return wxApp_GetVendorName(wxobj).dup; }
- public string AppName() { return wxApp_GetAppName(wxobj).dup; }
+ public string VendorName() { return cast(string) new wxString(wxApp_GetVendorName(wxobj), true); }
+ public string AppName() { return cast(string) new wxString(wxApp_GetAppName(wxobj), true); }
//---------------------------------------------------------------------
View
@@ -7,7 +7,7 @@ public import wx.common;
static extern (C) void wxArrayString_dtor(IntPtr self);
static extern (C) void wxArrayString_RegisterDisposable(IntPtr self, Virtual_Dispose onDispose);
static extern (C) void wxArrayString_Add(IntPtr self, string toadd);
- static extern (C) string wxArrayString_Item(IntPtr self, int num);
+ static extern (C) IntPtr wxArrayString_Item(IntPtr self, int num);
static extern (C) int wxArrayString_GetCount(IntPtr self);
//! \endcond
@@ -46,7 +46,7 @@ public import wx.common;
public string Item(int num)
{
- return wxArrayString_Item(wxobj, num).dup;
+ return cast(string) new wxString(wxArrayString_Item(wxobj, num), true);
}
public void Add(string toadd)
View
@@ -31,7 +31,7 @@ public import wx.Control;
static extern (C) void wxBitmapButton_SetDefault(IntPtr self);
static extern (C) void wxBitmapButton_SetLabel(IntPtr self, string label);
- static extern (C) string wxBitmapButton_GetLabel(IntPtr self);
+ static extern (C) IntPtr wxBitmapButton_GetLabel(IntPtr self);
static extern (C) bool wxBitmapButton_Enable(IntPtr self, bool enable);
@@ -132,7 +132,7 @@ public import wx.Control;
//---------------------------------------------------------------------
- public string StringLabel() { return wxBitmapButton_GetLabel(wxobj).dup; }
+ public string StringLabel() { return cast(string) new wxString(wxBitmapButton_GetLabel(wxobj), true); }
public void StringLabel(string value) { wxBitmapButton_SetLabel(wxobj, value); }
public void SetLabel(string label)
@@ -142,7 +142,7 @@ public import wx.Control;
public string GetLabel()
{
- return wxBitmapButton_GetLabel(wxobj).dup;
+ return cast(string) new wxString(wxBitmapButton_GetLabel(wxobj), true);
}
//---------------------------------------------------------------------
View
@@ -27,14 +27,14 @@ public import wx.ArrayString;
static extern (C) void wxChoice_SetSelection(IntPtr self, int n);
static extern (C) bool wxChoice_SetStringSelection(IntPtr self, string s);
- static extern (C) string wxChoice_GetStringSelection(IntPtr self);
+ static extern (C) IntPtr wxChoice_GetStringSelection(IntPtr self);
static extern (C) void wxChoice_SetColumns(IntPtr self, int n);
static extern (C) int wxChoice_GetColumns(IntPtr self);
static extern (C) void wxChoice_Command(IntPtr self, IntPtr evt);
static extern (C) int wxChoice_GetCount(IntPtr self);
- static extern (C) string wxChoice_GetString(IntPtr self, int n);
+ static extern (C) IntPtr wxChoice_GetString(IntPtr self, int n);
static extern (C) int wxChoice_GetSelection(IntPtr self);
static extern (C) IntPtr wxChoice_GetClientData(IntPtr self, int n);
@@ -195,7 +195,7 @@ public import wx.ArrayString;
//---------------------------------------------------------------------
- public string StringSelection() { return wxChoice_GetStringSelection(wxobj).dup; }
+ public string StringSelection() { return cast(string) new wxString(wxChoice_GetStringSelection(wxobj), true); }
public void StringSelection(string value) { wxChoice_SetStringSelection(wxobj, value); }
//---------------------------------------------------------------------
@@ -218,7 +218,7 @@ public import wx.ArrayString;
public string GetString(int n)
{
- return wxChoice_GetString(wxobj, n).dup;
+ return cast(string) new wxString(wxChoice_GetString(wxobj, n), true);
}
//---------------------------------------------------------------------
View
@@ -23,7 +23,7 @@ public import wx.ArrayInt;
static extern (C) IntPtr wxSingleChoiceDialog_ctor(IntPtr parent, string message, string caption, int n, string* choices, IntPtr clientData, uint style, inout Point pos);
static extern (C) void wxSingleChoiceDialog_SetSelection(IntPtr self, int sel);
static extern (C) int wxSingleChoiceDialog_GetSelection(IntPtr self);
- static extern (C) string wxSingleChoiceDialog_GetStringSelection(IntPtr self);
+ static extern (C) IntPtr wxSingleChoiceDialog_GetStringSelection(IntPtr self);
static extern (C) IntPtr wxSingleChoiceDialog_GetSelectionClientData(IntPtr self);
//! \endcond
@@ -65,7 +65,7 @@ public import wx.ArrayInt;
public string StringSelection()
{
- return wxSingleChoiceDialog_GetStringSelection(wxobj).dup;
+ return cast(string) new wxString(wxSingleChoiceDialog_GetStringSelection(wxobj), true);
}
//-----------------------------------------------------------------------------
@@ -114,15 +114,15 @@ public import wx.ArrayInt;
//-----------------------------------------------------------------------------
//! \cond EXTERN
- static extern (C) string wxGetSingleChoice_func(string message, string caption, int n, string* choices, IntPtr parent, int x, int y, bool centre, int width, int height);
+ static extern (C) IntPtr wxGetSingleChoice_func(string message, string caption, int n, string* choices, IntPtr parent, int x, int y, bool centre, int width, int height);
static extern (C) int wxGetSingleChoiceIndex_func(string message, string caption, int n, string* choices, IntPtr parent, int x, int y, bool centre, int width, int height);
static extern (C) void* wxGetSingleChoiceData_func(string message, string caption, int n, string* choices, void **client_data, IntPtr parent, int x, int y, bool centre, int width, int height);
static extern (C) uint wxGetMultipleChoices_func(IntPtr selections,string message, string caption, int n, string* choices, IntPtr parent, int x, int y, bool centre, int width, int height);
//! \endcond
public string GetSingleChoice(string message, string caption, string[] choices, Window parent = null, int x = -1, int y= -1, bool centre = true, int width = SingleChoiceDialog.wxCHOICE_WIDTH, int height = SingleChoiceDialog.wxCHOICE_HEIGHT)
{
- return wxGetSingleChoice_func(message, caption, choices.length, choices.ptr, wxObject.SafePtr(parent), x, y, centre, width, height).dup;
+ return cast(string) new wxString(wxGetSingleChoice_func(message, caption, choices.length, choices.ptr, wxObject.SafePtr(parent), x, y, centre, width, height), true);
}
public int GetSingleChoiceIndex(string message, string caption, string[] choices, Window parent = null, int x = -1, int y= -1, bool centre = true, int width = SingleChoiceDialog.wxCHOICE_WIDTH, int height = SingleChoiceDialog.wxCHOICE_HEIGHT)
View
@@ -57,7 +57,7 @@ public import wx.common;
static extern (C) IntPtr wxStringClientData_ctor(string data);
static extern (C) void wxStringClientData_dtor(IntPtr self);
static extern (C) void wxStringClientData_SetData(IntPtr self, string data);
- static extern (C) string wxStringClientData_GetData(IntPtr self);
+ static extern (C) IntPtr wxStringClientData_GetData(IntPtr self);
//! \endcond
//---------------------------------------------------------------------
@@ -87,7 +87,7 @@ public import wx.common;
override protected void dtor() { wxStringClientData_dtor(wxobj); }
//---------------------------------------------------------------------
- public string Data() { return wxStringClientData_GetData(wxobj).dup; }
+ public string Data() { return cast(string) new wxString(wxStringClientData_GetData(wxobj), true); }
public void Data(string value) { wxStringClientData_SetData(wxobj, value); }
}
View
@@ -33,13 +33,13 @@ public import wx.ClientData;
static extern (C) int wxComboBox_GetCount(IntPtr self);
static extern (C) int wxComboBox_GetSelection(IntPtr self);
- static extern (C) string wxComboBox_GetString(IntPtr self, int n);
+ static extern (C) IntPtr wxComboBox_GetString(IntPtr self, int n);
//static extern (C) void wxComboBox_SetString(IntPtr self, int n, string text);
- static extern (C) string wxComboBox_GetValue(IntPtr self);
+ static extern (C) IntPtr wxComboBox_GetValue(IntPtr self);
static extern (C) void wxComboBox_SetValue(IntPtr self, string text);
- static extern (C) string wxComboBox_GetStringSelection(IntPtr self);
+ static extern (C) IntPtr wxComboBox_GetStringSelection(IntPtr self);
static extern (C) void wxComboBox_SetStringSelection(IntPtr self, string value);
static extern (C) IntPtr wxComboBox_GetClientData(IntPtr self, int n);
@@ -125,7 +125,7 @@ public import wx.ClientData;
//---------------------------------------------------------------------
- public string StringSelection() { return wxComboBox_GetStringSelection(wxobj).dup; }
+ public string StringSelection() { return cast(string) new wxString(wxComboBox_GetStringSelection(wxobj), true); }
public void StringSelection(string value) { wxComboBox_SetStringSelection(wxobj, value); }
//---------------------------------------------------------------------
@@ -136,7 +136,7 @@ public import wx.ClientData;
public string GetString(int n)
{
- return wxComboBox_GetString(wxobj, n).dup;
+ return cast(string) new wxString(wxComboBox_GetString(wxobj, n), true);
}
//---------------------------------------------------------------------
@@ -254,7 +254,7 @@ public import wx.ClientData;
//---------------------------------------------------------------------
- public string Value() { return wxComboBox_GetValue(wxobj).dup; }
+ public string Value() { return cast(string) new wxString(wxComboBox_GetValue(wxobj), true); }
public void Value(string value) { wxComboBox_SetValue(wxobj, value); }
public void Select(int n)
View
@@ -22,7 +22,7 @@ public import wx.ClientData;
//! \cond EXTERN
static extern (C) IntPtr wxCommandEvent_ctor(int type,int winid);
static extern (C) int wxCommandEvent_GetSelection(IntPtr self);
- static extern (C) string wxCommandEvent_GetString(IntPtr self);
+ static extern (C) IntPtr wxCommandEvent_GetString(IntPtr self);
static extern (C) void wxCommandEvent_SetString(IntPtr self, string s);
static extern (C) bool wxCommandEvent_IsChecked(IntPtr self);
static extern (C) bool wxCommandEvent_IsSelection(IntPtr self);
@@ -54,7 +54,7 @@ public import wx.ClientData;
//-----------------------------------------------------------------------------
- public string String() { return wxCommandEvent_GetString(wxobj).dup; }
+ public string String() { return cast(string) new wxString(wxCommandEvent_GetString(wxobj), true); }
public void String(string value) { wxCommandEvent_SetString(wxobj, value); }
//-----------------------------------------------------------------------------
View
@@ -44,7 +44,7 @@ public import wx.wxString;
static extern (C) IntPtr wxConfigBase_Create();
static extern (C) void wxConfigBase_DontCreateOnDemand();
static extern (C) void wxConfigBase_SetPath(IntPtr self, string strPath);
- static extern (C) string wxConfigBase_GetPath(IntPtr self);
+ static extern (C) IntPtr wxConfigBase_GetPath(IntPtr self);
static extern (C) bool wxConfigBase_GetFirstGroup(IntPtr self, IntPtr str, inout int lIndex);
static extern (C) bool wxConfigBase_GetNextGroup(IntPtr self, IntPtr str, inout int lIndex);
static extern (C) bool wxConfigBase_GetFirstEntry(IntPtr self, IntPtr str, inout int lIndex);
@@ -63,7 +63,7 @@ public import wx.wxString;
static extern (C) bool wxConfigBase_ReadDblDef(IntPtr self, string key, inout double val, double defVal);
static extern (C) bool wxConfigBase_ReadBool(IntPtr self, string key, inout bool val);
static extern (C) bool wxConfigBase_ReadBoolDef(IntPtr self, string key, inout bool val, bool defVal);
- static extern (C) string wxConfigBase_ReadStrRet(IntPtr self, string key, string defVal);
+ static extern (C) IntPtr wxConfigBase_ReadStrRet(IntPtr self, string key, string defVal);
static extern (C) int wxConfigBase_ReadIntRet(IntPtr self, string key, int defVal);
static extern (C) bool wxConfigBase_WriteStr(IntPtr self, string key, string val);
static extern (C) bool wxConfigBase_WriteInt(IntPtr self, string key, int val);
@@ -77,12 +77,12 @@ public import wx.wxString;
static extern (C) bool wxConfigBase_DeleteAll(IntPtr self);
static extern (C) bool wxConfigBase_IsExpandingEnvVars(IntPtr self);
static extern (C) void wxConfigBase_SetExpandEnvVars(IntPtr self, bool bDoIt);
- static extern (C) string wxConfigBase_ExpandEnvVars(IntPtr self, string str);
+ static extern (C) IntPtr wxConfigBase_ExpandEnvVars(IntPtr self, string str);
static extern (C) void wxConfigBase_SetRecordDefaults(IntPtr self, bool bDoIt);
static extern (C) bool wxConfigBase_IsRecordingDefaults(IntPtr self);
- static extern (C) string wxConfigBase_GetAppName(IntPtr self);
+ static extern (C) IntPtr wxConfigBase_GetAppName(IntPtr self);
static extern (C) void wxConfigBase_SetAppName(IntPtr self, string appName);
- static extern (C) string wxConfigBase_GetVendorName(IntPtr self);
+ static extern (C) IntPtr wxConfigBase_GetVendorName(IntPtr self);
static extern (C) void wxConfigBase_SetVendorName(IntPtr self, string vendorName);
static extern (C) void wxConfigBase_SetStyle(IntPtr self, int style);
static extern (C) int wxConfigBase_GetStyle(IntPtr self);
@@ -130,7 +130,7 @@ public import wx.wxString;
//---------------------------------------------------------------------
public void Path(string value) { wxConfigBase_SetPath(wxobj, value); }
- public string Path() { return wxConfigBase_GetPath(wxobj).dup; }
+ public string Path() { return cast(string) new wxString(wxConfigBase_GetPath(wxobj), true); }
//---------------------------------------------------------------------
@@ -365,7 +365,7 @@ public import wx.wxString;
/+
public string Read(string key, string defVal)
{
- return wxConfigBase_ReadStrRet(wxobj, key, defVal).dup;
+ return cast(string) new wxString(wxConfigBase_ReadStrRet(wxobj, key, defVal), true);
}
+/
public int Read(string key, int defVal)
@@ -497,7 +497,7 @@ public import wx.wxString;
/*public string ExpandEnvVars(string str)
{
- return new wxString(wxConfigBase_ExpandEnvVars(wxobj, str));
+ return cast(string) new wxString(wxConfigBase_ExpandEnvVars(wxobj, str));
}*/
//---------------------------------------------------------------------
@@ -507,12 +507,12 @@ public import wx.wxString;
//---------------------------------------------------------------------
- public string AppName() { return wxConfigBase_GetAppName(wxobj).dup; }
+ public string AppName() { return cast(string) new wxString(wxConfigBase_GetAppName(wxobj), true); }
public void AppName(string value) { wxConfigBase_SetAppName(wxobj, value); }
//---------------------------------------------------------------------
- public string VendorName() { return wxConfigBase_GetVendorName(wxobj).dup; }
+ public string VendorName() { return cast(string) new wxString(wxConfigBase_GetVendorName(wxobj), true); }
public void VendorName(string value) { wxConfigBase_SetVendorName(wxobj, value); }
//---------------------------------------------------------------------
View
@@ -19,7 +19,7 @@ public import wx.Window;
//! \cond EXTERN
static extern (C) void wxControl_Command(IntPtr self, IntPtr evt);
- static extern (C) string wxControl_GetLabel(IntPtr self);
+ static extern (C) IntPtr wxControl_GetLabel(IntPtr self);
static extern (C) void wxControl_SetLabel(IntPtr self, string label);
static extern (C) int wxControl_GetAlignment(IntPtr self);
@@ -51,7 +51,7 @@ public import wx.Window;
//---------------------------------------------------------------------
- public string Label() { return wxControl_GetLabel(wxobj).dup; }
+ public string Label() { return cast(string) new wxString(wxControl_GetLabel(wxobj), true); }
public void Label(string value) { wxControl_SetLabel(wxobj, value); }
//---------------------------------------------------------------------
View
@@ -44,7 +44,7 @@ public import wx.common;
static extern (C) IntPtr wxDataFormat_ctorByType(int type);
static extern (C) IntPtr wxDataFormat_ctorById(string id);
- static extern (C) string wxDataFormat_GetId(IntPtr self);
+ static extern (C) IntPtr wxDataFormat_GetId(IntPtr self);
static extern (C) void wxDataFormat_SetId(IntPtr self, string id);
static extern (C) int wxDataFormat_GetType(IntPtr self);
@@ -82,7 +82,7 @@ public import wx.common;
//-----------------------------------------------------------------------------
- public string Id() { return wxDataFormat_GetId(wxobj); }
+ public string Id() { return cast(string) new wxString(wxDataFormat_GetId(wxobj), true); }
public void Id(string value) { wxDataFormat_SetId(wxobj, value); }
//-----------------------------------------------------------------------------
View
@@ -83,7 +83,7 @@ public import wx.ArrayString;
static extern (C) void wxTextDataObject_dtor(IntPtr self);
static extern (C) void wxTextDataObject_RegisterDisposable(IntPtr self, Virtual_Dispose onDispose);
static extern (C) int wxTextDataObject_GetTextLength(IntPtr self);
- static extern (C) string wxTextDataObject_GetText(IntPtr self);
+ static extern (C) IntPtr wxTextDataObject_GetText(IntPtr self);
static extern (C) void wxTextDataObject_SetText(IntPtr self, string text);
//! \endcond
@@ -122,7 +122,7 @@ public import wx.ArrayString;
//---------------------------------------------------------------------
- public string Text() { return wxTextDataObject_GetText(wxobj).dup; }
+ public string Text() { return cast(string) new wxString(wxTextDataObject_GetText(wxobj), true); }
public void Text(string value) { wxTextDataObject_SetText(wxobj, value); }
}
Oops, something went wrong.

0 comments on commit 44b338b

Please sign in to comment.