Modified:
trunk/wx.mod/wxdirdialog.mod/common.bmx
trunk/wx.mod/wxdirdialog.mod/glue.cpp
trunk/wx.mod/wxdirdialog.mod/glue.h
trunk/wx.mod/wxdirdialog.mod/wxdirdialog.bmx
trunk/wx.mod/wxfiledialog.mod/common.bmx
trunk/wx.mod/wxfiledialog.mod/glue.cpp
trunk/wx.mod/wxfiledialog.mod/glue.h
trunk/wx.mod/wxfiledialog.mod/wxfiledialog.bmx
trunk/wx.mod/wxfindreplacedialog.mod/common.bmx
trunk/wx.mod/wxfindreplacedialog.mod/doc/ (props changed)
trunk/wx.mod/wxfindreplacedialog.mod/glue.cpp
trunk/wx.mod/wxfindreplacedialog.mod/glue.h
trunk/wx.mod/wxfindreplacedialog.mod/wxfindreplacedialog.bmx
Log:
Implemented wxDirDialog, wxFileDialog.
Tidied up wxFindReplaceDialog docs.
Modified: trunk/wx.mod/wxdirdialog.mod/common.bmx
==============================================================================
--- trunk/wx.mod/wxdirdialog.mod/common.bmx (original)
+++ trunk/wx.mod/wxdirdialog.mod/common.bmx Wed Dec 12 10:02:57 2007
@@ -44,4 +44,19 @@
Extern
+ Function bmx_wxdirdialog_create:Byte Ptr(handle:Object, parent:Byte
Ptr, message:String, defaultPath:String, style:Int, x:Int, y:Int,
w:Int, h:Int)
+ Function bmx_wxdirdialog_getpath:String(handle:Byte Ptr)
+ Function bmx_wxdirdialog_getmessage:String(handle:Byte Ptr)
+ Function bmx_wxdirdialog_setmessage(handle:Byte Ptr, message:String)
+ Function bmx_wxdirdialog_setpath(handle:Byte Ptr, path:String)
+ Function bmx_wxdirdialog_showmodal:Int(handle:Byte Ptr)
+
+ Function bmx_wxdirselector:String(message:String, defaultPath:String,
style:Int, x:Int, y:Int, parent:Byte Ptr)
+
End Extern
+
+Const wxDD_CHANGE_DIR:Int = $0100
+Const wxDD_DIR_MUST_EXIST:Int = $0200
+Const wxDD_DEFAULT_STYLE:Int = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+
+
Modified: trunk/wx.mod/wxdirdialog.mod/glue.cpp
==============================================================================
--- trunk/wx.mod/wxdirdialog.mod/glue.cpp (original)
+++ trunk/wx.mod/wxdirdialog.mod/glue.cpp Wed Dec 12 10:02:57 2007
@@ -24,8 +24,54 @@
// ---------------------------------------------------------------------------------------
+MaxDirDialog::MaxDirDialog(BBObject * handle, wxWindow * parent, const
wxString& message, const wxString& defaultPath,
+ long style, int x, int y, int w, int h)
+ : wxDirDialog(parent, message, defaultPath, style, wxPoint(x, y),
wxSize(w, h))
+{
+ wxbind(this, handle);
+}
+
+MaxDirDialog::~MaxDirDialog() {
+ wxunbind(this);
+}
// *********************************************
+
+MaxDirDialog * bmx_wxdirdialog_create(BBObject * handle, wxWindow *
parent, BBString * message,
+ BBString * defaultPath, long style, int x, int y, int w, int h) {
+ return new MaxDirDialog(handle, parent,
wxStringFromBBString(message), wxStringFromBBString(defaultPath),
+ style, x, y, w, h);
+}
+
+BBString * bmx_wxdirdialog_getpath(MaxDirDialog * dir) {
+ return bbStringFromWxString(dir->GetPath());
+}
+
+BBString * bmx_wxdirdialog_getmessage(MaxDirDialog * dir) {
+ return bbStringFromWxString(dir->GetMessage());
+}
+
+void bmx_wxdirdialog_setmessage(MaxDirDialog * dir, BBString *
message) {
+ dir->SetMessage(wxStringFromBBString(message));
+}
+
+void bmx_wxdirdialog_setpath(MaxDirDialog * dir, BBString * path) {
+ dir->SetPath(wxStringFromBBString(path));
+}
+
+int bmx_wxdirdialog_showmodal(MaxDirDialog * dir) {
+ return dir->ShowModal();
+}
+
+BBString * bmx_wxdirselector(BBString * message, BBString *
defaultPath, long style, int x, int y, wxWindow *parent) {
+ if (parent) {
+ return
bbStringFromWxString(wxDirSelector(wxStringFromBBString(message), wxStringFromBBString(defaultPath),
+ style, wxPoint(x, y), parent));
+ } else {
+ return
bbStringFromWxString(wxDirSelector(wxStringFromBBString(message), wxStringFromBBString(defaultPath),
+ style, wxPoint(x, y), NULL));
+ }
+}
Modified: trunk/wx.mod/wxdirdialog.mod/glue.h
==============================================================================
--- trunk/wx.mod/wxdirdialog.mod/glue.h (original)
+++ trunk/wx.mod/wxdirdialog.mod/glue.h Wed Dec 12 10:02:57 2007
@@ -21,15 +21,32 @@
*/
#include "wxglue.h"
+#include "wx/dirdlg.h"
-//class MaxNotebook;
+class MaxDirDialog;
extern "C" {
#include <blitz.h>
+ MaxDirDialog * bmx_wxdirdialog_create(BBObject * handle, wxWindow *
parent, BBString * message,
+ BBString * defaultPath, long style, int x, int y, int w, int h);
+ BBString * bmx_wxdirdialog_getpath(MaxDirDialog * dir);
+ BBString * bmx_wxdirdialog_getmessage(MaxDirDialog * dir);
+ void bmx_wxdirdialog_setmessage(MaxDirDialog * dir, BBString * message);
+ void bmx_wxdirdialog_setpath(MaxDirDialog * dir, BBString * path);
+ int bmx_wxdirdialog_showmodal(MaxDirDialog * dir);
+
+ BBString * bmx_wxdirselector(BBString * message, BBString *
defaultPath, long style, int x, int y, wxWindow *parent);
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+class MaxDirDialog : public wxDirDialog
+{
+public:
+ MaxDirDialog(BBObject * handle, wxWindow * parent, const wxString&
message, const wxString& defaultPath,
+ long style, int x, int y, int w, int h);
+ ~ MaxDirDialog();
+};
Modified: trunk/wx.mod/wxdirdialog.mod/wxdirdialog.bmx
==============================================================================
--- trunk/wx.mod/wxdirdialog.mod/wxdirdialog.bmx (original)
+++ trunk/wx.mod/wxdirdialog.mod/wxdirdialog.bmx Wed Dec 12 10:02:57 2007
@@ -54,6 +54,63 @@
bbdoc: This type represents the directory chooser dialog.
End Rem
Type wxDirDialog Extends wxDialog
+
+ Rem
+ bbdoc: Constructor.
+ about: Use wxDirDialog::ShowModal to show the dialog.
+ controls.
+ End Rem
+ Function CreateDirDialog:wxDirDialog(parent:wxWindow, message:String
= "Choose a directory", defaultPath:String = "", ..
+ style:Int = wxDD_DEFAULT_STYLE, x:Int = -1, y:Int = -1, w:Int = -1,
h:Int = -1)
+ Return New wxDirDialog.Create(parent, message, defaultPath, style,
x, y, w, h)
+ End Function
+
+ Rem
+ bbdoc: Constructor.
+ about: Use wxDirDialog::ShowModal to show the dialog.
+ controls.
+ End Rem
+ Method Create:wxDirDialog(parent:wxWindow, message:String = "Choose a
directory", defaultPath:String = "", ..
+ style:Int = wxDD_DEFAULT_STYLE, x:Int = -1, y:Int = -1, w:Int = -1,
h:Int = -1)
+ wxObjectPtr = bmx_wxdirdialog_create(Self, parent.wxObjectPtr,
message, defaultPath, style, x, y, w, h)
+ Return Self
+ End Method
+
+ Rem
+ bbdoc: Returns the default or user-selected path.
+ End Rem
+ Method GetPath:String()
+ Return bmx_wxdirdialog_getpath(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Returns the message that will be displayed on the dialog.
+ End Rem
+ Method GetMessage:String()
+ Return bmx_wxdirdialog_getmessage(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Sets the message that will be displayed on the dialog.
+ End Rem
+ Method SetMessage(message:String)
+ bmx_wxdirdialog_setmessage(wxObjectPtr, message)
+ End Method
+
+ Rem
+ bbdoc: Sets the default path.
+ End Rem
+ Method SetPath(path:String)
+ bmx_wxdirdialog_setpath(wxObjectPtr, path)
+ End Method
+
+ Rem
+ bbdoc: Shows the dialog, returning wxID_OK if the user pressed OK,
and wxID_CANCEL otherwise.
+ End Rem
+ Method ShowModal:Int()
+ Return bmx_wxdirdialog_showmodal(wxObjectPtr)
+ End Method
+
End Type
@@ -69,9 +126,9 @@
x:Int = -1, y:Int = -1, parent:wxWindow = Null)
If parent Then
-' Return bmx_wxdirselector(message, defaultPath, style, x, y, parent.wxObjectPtr)
+ Return bmx_wxdirselector(message, defaultPath, style, x, y, parent.wxObjectPtr)
Else
-' Return bmx_wxdirselector(message, defaultPath, style, x, y, Null)
+ Return bmx_wxdirselector(message, defaultPath, style, x, y, Null)
End If
End Function
Modified: trunk/wx.mod/wxfiledialog.mod/common.bmx
==============================================================================
--- trunk/wx.mod/wxfiledialog.mod/common.bmx (original)
+++ trunk/wx.mod/wxfiledialog.mod/common.bmx Wed Dec 12 10:02:57 2007
@@ -47,6 +47,24 @@
Function bmx_wxfileselector:String(message:String,
defaultPath:String, defaultFilename:String, ..
defaultExtension:String, wildcard:String, flags:Int, parent:Byte
Ptr, x:Int, y:Int)
+ Function bmx_wxfiledialog_create:Byte Ptr(handle:Object, parent:Byte
Ptr, message:String, defaultDir:String, defaultFile:String, ..
+ wildcard:String, style:Int, x:Int, y:Int, w:Int, h:Int)
+ Function bmx_wxfiledialog_getdirectory:String(handle:Byte Ptr)
+ Function bmx_wxfiledialog_getfilename:String(handle:Byte Ptr)
+ Function bmx_wxfiledialog_getfilenames:String[](handle:Byte Ptr)
+ Function bmx_wxfiledialog_getfilterindex:Int(handle:Byte Ptr)
+ Function bmx_wxfiledialog_getmessage:String(handle:Byte Ptr)
+ Function bmx_wxfiledialog_getpath:String(handle:Byte Ptr)
+ Function bmx_wxfiledialog_getpaths:String[](handle:Byte Ptr)
+ Function bmx_wxfiledialog_getwildcard:String(handle:Byte Ptr)
+ Function bmx_wxfiledialog_setdirectory(handle:Byte Ptr, directory:String)
+ Function bmx_wxfiledialog_setfilename(handle:Byte Ptr, filename:String)
+ Function bmx_wxfiledialog_setfilterindex(handle:Byte Ptr, index:Int)
+ Function bmx_wxfiledialog_setmessage(handle:Byte Ptr, message:String)
+ Function bmx_wxfiledialog_setpath(handle:Byte Ptr, path:String)
+ Function bmx_wxfiledialog_setwildcard(handle:Byte Ptr, wildcard:String)
+ Function bmx_wxfiledialog_showmodal:Int(handle:Byte Ptr)
+
End Extern
Const wxFD_OPEN:Int = $0001
@@ -56,3 +74,6 @@
Const wxFD_MULTIPLE:Int = $0020
Const wxFD_CHANGE_DIR:Int = $0080
Const wxFD_PREVIEW:Int = $0100
+
+Const wxFD_DEFAULT_STYLE:Int = wxFD_OPEN
+
Modified: trunk/wx.mod/wxfiledialog.mod/glue.cpp
==============================================================================
--- trunk/wx.mod/wxfiledialog.mod/glue.cpp (original)
+++ trunk/wx.mod/wxfiledialog.mod/glue.cpp Wed Dec 12 10:02:57 2007
@@ -24,6 +24,16 @@
// ---------------------------------------------------------------------------------------
+MaxFileDialog::MaxFileDialog(BBObject * handle, wxWindow * parent,
const wxString& message, const wxString& defaultDir,
+ const wxString& defaultFile, const wxString& wildcard, long style,
int x, int y, int w, int h)
+ : wxFileDialog(parent, message, defaultDir, defaultFile, wildcard,
style, wxPoint(x, y), wxSize(w, h))
+{
+ wxbind(this, handle);
+}
+
+MaxFileDialog::~MaxFileDialog() {
+ wxunbind(this);
+}
// *********************************************
@@ -42,3 +52,73 @@
}
}
+
+MaxFileDialog * bmx_wxfiledialog_create(BBObject * handle, wxWindow *
parent, BBString * message, BBString * defaultDir, BBString * defaultFile,
+ BBString * wildcard, long style, int x, int y, int w, int h) {
+ return new MaxFileDialog(handle, parent,
wxStringFromBBString(message), wxStringFromBBString(defaultDir),
+ wxStringFromBBString(defaultFile),
wxStringFromBBString(wildcard), style, x, y, w, h);
+}
+
+BBString * bmx_wxfiledialog_getdirectory(wxFileDialog * file) {
+ return bbStringFromWxString(file->GetDirectory());
+}
+
+BBString * bmx_wxfiledialog_getfilename(wxFileDialog * file) {
+ return bbStringFromWxString(file->GetFilename());
+}
+
+BBArray * bmx_wxfiledialog_getfilenames(wxFileDialog * file) {
+ wxArrayString filenames;
+ file->GetFilenames(filenames);
+ return wxArrayStringToBBStringArray(filenames);
+}
+
+int bmx_wxfiledialog_getfilterindex(wxFileDialog * file) {
+ return file->GetFilterIndex();
+}
+
+BBString * bmx_wxfiledialog_getmessage(wxFileDialog * file) {
+ return bbStringFromWxString(file->GetMessage());
+}
+
+BBString * bmx_wxfiledialog_getpath(wxFileDialog * file) {
+ return bbStringFromWxString(file->GetPath());
+}
+
+BBArray * bmx_wxfiledialog_getpaths(wxFileDialog * file) {
+ wxArrayString paths;
+ file->GetPaths(paths);
+ return wxArrayStringToBBStringArray(paths);
+}
+
+BBString * bmx_wxfiledialog_getwildcard(wxFileDialog * file) {
+ return bbStringFromWxString(file->GetWildcard());
+}
+
+void bmx_wxfiledialog_setdirectory(wxFileDialog * file, BBString *
directory) {
+ file->SetDirectory(wxStringFromBBString(directory));
+}
+
+void bmx_wxfiledialog_setfilename(wxFileDialog * file, BBString *
filename) {
+ file->SetFilename(wxStringFromBBString(filename));
+}
+
+void bmx_wxfiledialog_setfilterindex(wxFileDialog * file, int index) {
+ file->SetFilterIndex(index);
+}
+
+void bmx_wxfiledialog_setmessage(wxFileDialog * file, BBString *
message) {
+ file->SetMessage(wxStringFromBBString(message));
+}
+
+void bmx_wxfiledialog_setpath(wxFileDialog * file, BBString * path) {
+ file->SetPath(wxStringFromBBString(path));
+}
+
+void bmx_wxfiledialog_setwildcard(wxFileDialog * file, BBString *
wildcard) {
+ file->SetWildcard(wxStringFromBBString(wildcard));
+}
+
+int bmx_wxfiledialog_showmodal(wxFileDialog * file) {
+ return file->ShowModal();
+}
Modified: trunk/wx.mod/wxfiledialog.mod/glue.h
==============================================================================
--- trunk/wx.mod/wxfiledialog.mod/glue.h (original)
+++ trunk/wx.mod/wxfiledialog.mod/glue.h Wed Dec 12 10:02:57 2007
@@ -22,7 +22,7 @@
#include "wxglue.h"
-//class MaxNotebook;
+class MaxFileDialog;
extern "C" {
@@ -31,7 +31,33 @@
BBString * bmx_wxfileselector(BBString * message, BBString *
defaultPath, BBString * defaultFilename,
BBString * defaultExtension, BBString * wildcard, int flags,
wxWindow * parent, int x, int y);
+ MaxFileDialog * bmx_wxfiledialog_create(BBObject * handle, wxWindow *
parent, BBString * message, BBString * defaultDir, BBString * defaultFile,
+ BBString * wildcard, long style, int x, int y, int w, int h);
+ BBString * bmx_wxfiledialog_getdirectory(wxFileDialog * file);
+ BBString * bmx_wxfiledialog_getfilename(wxFileDialog * file);
+ BBArray * bmx_wxfiledialog_getfilenames(wxFileDialog * file);
+ int bmx_wxfiledialog_getfilterindex(wxFileDialog * file);
+ BBString * bmx_wxfiledialog_getmessage(wxFileDialog * file);
+ BBString * bmx_wxfiledialog_getpath(wxFileDialog * file);
+ BBArray * bmx_wxfiledialog_getpaths(wxFileDialog * file);
+ BBString * bmx_wxfiledialog_getwildcard(wxFileDialog * file);
+ void bmx_wxfiledialog_setdirectory(wxFileDialog * file, BBString * directory);
+ void bmx_wxfiledialog_setfilename(wxFileDialog * file, BBString * filename);
+ void bmx_wxfiledialog_setfilterindex(wxFileDialog * file, int index);
+ void bmx_wxfiledialog_setmessage(wxFileDialog * file, BBString * message);
+ void bmx_wxfiledialog_setpath(wxFileDialog * file, BBString * path);
+ void bmx_wxfiledialog_setwildcard(wxFileDialog * file, BBString * wildcard);
+ int bmx_wxfiledialog_showmodal(wxFileDialog * file);
+
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class MaxFileDialog : public wxFileDialog
+{
+public:
+ MaxFileDialog(BBObject * handle, wxWindow * parent, const wxString&
message, const wxString& defaultDir,
+ const wxString& defaultFile, const wxString& wildcard, long style,
int x, int y, int w, int h);
+ ~ MaxFileDialog();
+};
Modified: trunk/wx.mod/wxfiledialog.mod/wxfiledialog.bmx
==============================================================================
--- trunk/wx.mod/wxfiledialog.mod/wxfiledialog.bmx (original)
+++ trunk/wx.mod/wxfiledialog.mod/wxfiledialog.bmx Wed Dec 12 10:02:57 2007
@@ -52,8 +52,167 @@
Rem
bbdoc: This type represents the file chooser dialog.
+about: In Windows, this is the common file selector dialog. In X, this
is a file selector box with the same
+functionality. The path and filename are distinct elements of a full
file pathname. If path is empty, the current
+directory will be used. If filename is empty, no default filename will
be supplied. The wildcard determines what
+files are displayed in the file selector, and file extension supplies
a type extension for the required filename.
+Flags may be a combination of wxFD_OPEN, wxFD_SAVE,
wxFD_OVERWRITE_PROMPT or wxFD_FILE_MUST_EXIST. Note that wxFD_MULTIPLE
can only
+be used with wxFileDialog and not here as this function only returns a
single file name.
+<p>
+Both the Unix and Windows versions implement a wildcard filter. Typing
a filename containing wildcards
+(*, ?) in the filename text item, and clicking on Ok, will result in
only those files matching the pattern being
+displayed.
+</p>
+<p>
+The wildcard may be a specification for multiple types of file with a
description for each, such as:
+<pre>"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"</pre>
+</p>
End Rem
Type wxFileDialog Extends wxDialog
+
+ Rem
+ bbdoc: Constructor.
+ about: Use wxFileDialog::ShowModal to show the dialog.
+ controls.
+ End Rem
+ Function CreateFileDialog:wxFileDialog(parent:wxWindow,
message:String = "Choose a file", defaultDir:String = "", ..
+ defaultFile:String = "", wildcard:String = "*.*", style:Int = wxFD_DEFAULT_STYLE, ..
+ x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)
+ Return New wxFileDialog.Create(parent, message, defaultDir,
defaultFile, wildcard, style, x, y, w, h)
+ End Function
+
+ Rem
+ bbdoc: Constructor.
+ about: Use wxFileDialog::ShowModal to show the dialog.
+ controls.
+ End Rem
+ Method Create:wxFileDialog(parent:wxWindow, message:String = "Choose
a file", defaultDir:String = "", ..
+ defaultFile:String = "", wildcard:String = "*.*", style:Int = wxFD_DEFAULT_STYLE, ..
+ x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)
+ wxObjectPtr = bmx_wxfiledialog_create(Self, parent, message,
defaultDir, defaultFile, wildcard, style, x, y, w, h)
+ Return Self
+ End Method
+
+ Rem
+ bbdoc: Returns the default directory.
+ End Rem
+ Method GetDirectory:String()
+ Return bmx_wxfiledialog_getdirectory(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Returns the default filename.
+ End Rem
+ Method GetFilename:String()
+ Return bmx_wxfiledialog_getfilename(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Returns an array with the names of the files chosen.
+ about: This method should only be used with the dialogs which have
wxFD_MULTIPLE style, use
+ GetFilename for the others.
+ <p>
+ Note that under Windows, if the user selects shortcuts, the filenames
include paths, since
+ the application cannot determine the full path of each referenced
file by appending the
+ directory containing the shortcuts to the filename.
+ </p>
+ End Rem
+ Method GetFilenames:String[]()
+ Return bmx_wxfiledialog_getfilenames(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Returns the index into the list of filters supplied,
optionally, in the wildcard parameter.
+ about: Before the dialog is shown, this is the index which will be
used when the dialog is
+ first displayed. After the dialog is shown, this is the index
selected by the user.
+ End Rem
+ Method GetFilterIndex:Int()
+ Return bmx_wxfiledialog_getfilterindex(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Returns the message that will be displayed on the dialog.
+ End Rem
+ Method GetMessage:String()
+ Return bmx_wxfiledialog_getmessage(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Returns the full path (directory and filename) of the selected file.
+ End Rem
+ Method GetPath:String()
+ Return bmx_wxfiledialog_getpath(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Returns an array with the full paths of the files chosen.
+ about: This method should only be used with the dialogs which have
wxFD_MULTIPLE style, use
+ GetPath for the others.
+ End Rem
+ Method GetPaths:String[]()
+ Return bmx_wxfiledialog_getpaths(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Returns the file dialog wildcard.
+ End Rem
+ Method GetWildcard:String()
+ Return bmx_wxfiledialog_getwildcard(wxObjectPtr)
+ End Method
+
+ Rem
+ bbdoc: Sets the default directory.
+ End Rem
+ Method SetDirectory(directory:String)
+ bmx_wxfiledialog_setdirectory(wxObjectPtr, directory)
+ End Method
+
+ Rem
+ bbdoc: Sets the default filename.
+ End Rem
+ Method SetFilename(filename:String)
+ bmx_wxfiledialog_setfilename(wxObjectPtr, filename)
+ End Method
+
+ Rem
+ bbdoc: Sets the default filter index, starting from zero.
+ End Rem
+ Method SetFilterIndex(index:Int)
+ bmx_wxfiledialog_setfilterindex(wxObjectPtr, index)
+ End Method
+
+ Rem
+ bbdoc: Sets the message that will be displayed on the dialog.
+ End Rem
+ Method SetMessage(message:String)
+ bmx_wxfiledialog_setmessage(wxObjectPtr, message)
+ End Method
+
+ Rem
+ bbdoc: Sets the path (the combined directory and filename that will
be returned when the dialog is dismissed).
+ End Rem
+ Method SetPath(path:String)
+ bmx_wxfiledialog_setpath(wxObjectPtr, path)
+ End Method
+
+ Rem
+ bbdoc: Sets the wildcard, which can contain multiple file types
+ about: For example:
+ <pre>
+ "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
+ </pre>
+ End Rem
+ Method SetWildcard(wildcard:String)
+ bmx_wxfiledialog_setwildcard(wxObjectPtr, wildcard)
+ End Method
+
+ Rem
+ bbdoc: Shows the dialog, returning wxID_OK if the user pressed OK,
and wxID_CANCEL otherwise.
+ End Rem
+ Method ShowModal:Int()
+ Return bmx_wxfiledialog_showmodal(wxObjectPtr)
+ End Method
+
End Type
Rem
Modified: trunk/wx.mod/wxfindreplacedialog.mod/common.bmx
==============================================================================
--- trunk/wx.mod/wxfindreplacedialog.mod/common.bmx (original)
+++ trunk/wx.mod/wxfindreplacedialog.mod/common.bmx Wed Dec 12 10:02:57 2007
@@ -46,7 +46,7 @@
Function bmx_wxfindreplacedialog_create:Byte Ptr(handle:Object,
parent:Byte Ptr, data:Byte Ptr, title:String, style:Int)
- Function bmx_wxfindreplacedata_create:Byte Ptr(handle:Object)
+ Function bmx_wxfindreplacedata_create:Byte Ptr(handle:Object, flags:Int)
Function bmx_wxfindreplacedata_getfindstring:String(handle:Byte Ptr)
Function bmx_wxfindreplacedata_getreplacestring:String(handle:Byte Ptr)
Function bmx_wxfindreplacedata_getflags:Int(handle:Byte Ptr)
Modified: trunk/wx.mod/wxfindreplacedialog.mod/glue.cpp
==============================================================================
--- trunk/wx.mod/wxfindreplacedialog.mod/glue.cpp (original)
+++ trunk/wx.mod/wxfindreplacedialog.mod/glue.cpp Wed Dec 12 10:02:57 2007
@@ -42,8 +42,8 @@
return new MaxFindReplaceDialog(handle, parent, data,
wxStringFromBBString(title), style);
}
-wxFindReplaceData * bmx_wxfindreplacedata_create(BBObject * handle) {
- wxFindReplaceData * data = new wxFindReplaceData ();
+wxFindReplaceData * bmx_wxfindreplacedata_create(BBObject * handle,
wxUint32 flags) {
+ wxFindReplaceData * data = new wxFindReplaceData(flags);
wxbind(data, handle);
return data;
}
Modified: trunk/wx.mod/wxfindreplacedialog.mod/glue.h
==============================================================================
--- trunk/wx.mod/wxfindreplacedialog.mod/glue.h (original)
+++ trunk/wx.mod/wxfindreplacedialog.mod/glue.h Wed Dec 12 10:02:57 2007
@@ -32,7 +32,7 @@
MaxFindReplaceDialog * bmx_wxfindreplacedialog_create(BBObject *
handle, wxWindow * parent, wxFindReplaceData * data, BBString * title,
int style);
- wxFindReplaceData * bmx_wxfindreplacedata_create(BBObject * handle);
+ wxFindReplaceData * bmx_wxfindreplacedata_create(BBObject * handle,
wxUint32 flags);
BBString * bmx_wxfindreplacedata_getfindstring(wxFindReplaceData * data);
BBString * bmx_wxfindreplacedata_getreplacestring(wxFindReplaceData * data);
int bmx_wxfindreplacedata_getflags(wxFindReplaceData * data);
Modified: trunk/wx.mod/wxfindreplacedialog.mod/wxfindreplacedialog.bmx
==============================================================================
--- trunk/wx.mod/wxfindreplacedialog.mod/wxfindreplacedialog.bmx (original)
+++ trunk/wx.mod/wxfindreplacedialog.mod/wxfindreplacedialog.bmx Wed
Dec 12 10:02:57 2007
@@ -58,6 +58,8 @@
End Rem
Type wxFindReplaceDialog Extends wxDialog
+ Field _data:wxFindReplaceData
+
Function CreateFindReplaceDialog:wxFindReplaceDialog(parent:wxWindow,
data:wxFindReplaceData, title:String = "", style:Int = 0)
Return New wxFindReplaceDialog.Create(parent, data, title, style)
End Function
@@ -67,7 +69,11 @@
Return Self
End Method
+ Rem
+ bbdoc: Get the wxFindReplaceData object used by this dialog
+ End Rem
Method GetData:wxFindReplaceData()
+ Return _data
End Method
' soft linking
@@ -99,21 +105,40 @@
<p>
Note that all SetXXX() methods may only be called before showing the
dialog and calling them has no effect later.
</p>
+<p>
+Flags used by wxFindReplaceData::GetFlags() and wxFindDialogEvent::GetFlags()
+<ul>
+<li>wxFR_DOWN - downward search/replace selected (otherwise - upwards)</li>
+<li>wxFR_WHOLEWORD - whole word search/replace selected</li>
+<li>wxFR_MATCHCASE - case sensitive search/replace selected (otherwise
- case insensitive)</li>
+</ul>
+</p>
+<p>
+These flags can be specified in wxFindReplaceDialog constructor or Create():
+<ul>
+<li>wxFR_REPLACEDIALOG - replace dialog (otherwise find dialog)</li>
+<li>wxFR_NOUPDOWN - don't allow changing the search direction</li>
+<li>wxFR_NOMATCHCASE - don't allow case sensitive searching</li>
+<li>wxFR_NOWHOLEWORD - don't allow whole word searching</li>
+</ul>
+</p>
End Rem
Type wxFindReplaceData Extends wxObject
Rem
- bbdoc:
+ bbdoc: Constructor.
+ about: Initializes the flags to default value (0).
End Rem
- Function CreateFindReplaceData:wxFindReplaceData()
- Return New wxFindReplaceData.Create()
+ Function CreateFindReplaceData:wxFindReplaceData(flags:Int = 0)
+ Return New wxFindReplaceData.Create(flags)
End Function
Rem
- bbdoc:
+ bbdoc: Constructor.
+ about: Initializes the flags to default value (0).
End Rem
- Method Create:wxFindReplaceData()
- wxObjectPtr = bmx_wxfindreplacedata_create(Self)
+ Method Create:wxFindReplaceData(flags:Int = 0)
+ wxObjectPtr = bmx_wxfindreplacedata_create(Self, flags)
Return Self
End Method
@@ -207,7 +232,7 @@
End Method
Rem
- bbdoc: Return the dialog which generated this event.
+ bbdoc: Return the dialog which generated this event.
End Rem
Method GetDialog:wxFindReplaceDialog()
Return wxFindReplaceDialog._find(bmx_wxfinddialogevent_getdialog(wxEventPtr))