Replace wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes with wxPG_DIALOG_TITLE
Current wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes can be used to customize editor dialog titles only for wxFileProperty and wxDirProperty, respectively. New wxPG_DIALOG_TITLE property is applicable to all properties derived from wxEditorDialogProperty so not only editor dialog titles for wxFileProperty and wxDirProperty can be set but also for wxFontProperty, wxLongStringProperty, etc. wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes are marked obsolete.
This commit is contained in:
@@ -146,6 +146,7 @@ All (GUI):
|
|||||||
- Allow changing tooltip text for button allowing to enter a new string
|
- Allow changing tooltip text for button allowing to enter a new string
|
||||||
in wxPGArrayEditorDialog.
|
in wxPGArrayEditorDialog.
|
||||||
- Fix wxPropertyGrid issues with horizontal scrolling.
|
- Fix wxPropertyGrid issues with horizontal scrolling.
|
||||||
|
- Add wxPG_DIALOG_TITLE wxPGProperty attribute.
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -448,6 +448,15 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Helpers to mark macros as deprecated
|
||||||
|
#if defined(__clang__) || wxCHECK_GCC_VERSION(4, 5)
|
||||||
|
#define wxPG_STRINGIFY(X) #X
|
||||||
|
#define wxPG_DEPRECATED_MACRO_VALUE(value, msg) \
|
||||||
|
_Pragma(wxPG_STRINGIFY(GCC warning msg)) value
|
||||||
|
#else
|
||||||
|
#define wxPG_DEPRECATED_MACRO_VALUE(value, msg) value
|
||||||
|
#endif // clang || GCC
|
||||||
|
|
||||||
// wxPGProperty::SetAttribute() and
|
// wxPGProperty::SetAttribute() and
|
||||||
// wxPropertyGridInterface::SetPropertyAttribute() accept one of these as
|
// wxPropertyGridInterface::SetPropertyAttribute() accept one of these as
|
||||||
// attribute name argument.
|
// attribute name argument.
|
||||||
@@ -518,6 +527,10 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
// Only wxPG_PREFIX_NONE works with Decimal and Octal numbers.
|
// Only wxPG_PREFIX_NONE works with Decimal and Octal numbers.
|
||||||
#define wxPG_UINT_PREFIX wxS("Prefix")
|
#define wxPG_UINT_PREFIX wxS("Prefix")
|
||||||
|
|
||||||
|
// Specific to wxEditorDialogProperty and derivatives, wxString, default is empty.
|
||||||
|
// Sets a specific title for the editor dialog.
|
||||||
|
#define wxPG_DIALOG_TITLE wxS("DialogTitle")
|
||||||
|
|
||||||
// wxFileProperty/wxImageFileProperty specific, wxChar*, default is
|
// wxFileProperty/wxImageFileProperty specific, wxChar*, default is
|
||||||
// detected/varies.
|
// detected/varies.
|
||||||
// Sets the wildcard used in the triggered wxFileDialog. Format is the same.
|
// Sets the wildcard used in the triggered wxFileDialog. Format is the same.
|
||||||
@@ -536,17 +549,29 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
// Sets the initial path of where to look for files.
|
// Sets the initial path of where to look for files.
|
||||||
#define wxPG_FILE_INITIAL_PATH wxS("InitialPath")
|
#define wxPG_FILE_INITIAL_PATH wxS("InitialPath")
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_3_0
|
||||||
|
#if wxCHECK_VISUALC_VERSION(10)
|
||||||
|
#pragma deprecated(wxPG_FILE_DIALOG_TITLE)
|
||||||
|
#endif
|
||||||
// Specific to wxFileProperty and derivatives, wxString, default is empty.
|
// Specific to wxFileProperty and derivatives, wxString, default is empty.
|
||||||
// Sets a specific title for the dir dialog.
|
// Sets a specific title for the dir dialog.
|
||||||
#define wxPG_FILE_DIALOG_TITLE wxS("DialogTitle")
|
#define wxPG_FILE_DIALOG_TITLE wxPG_DEPRECATED_MACRO_VALUE(wxS("DialogTitle"),\
|
||||||
|
"wxPG_FILE_DIALOG_TITLE is deprecated. Use wxPG_DIALOG_TITLE instead.")
|
||||||
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
|
|
||||||
// Specific to wxFileProperty and derivatives, long, default is 0.
|
// Specific to wxFileProperty and derivatives, long, default is 0.
|
||||||
// Sets a specific wxFileDialog style for the file dialog, e.g. ::wxFD_SAVE.
|
// Sets a specific wxFileDialog style for the file dialog, e.g. ::wxFD_SAVE.
|
||||||
#define wxPG_FILE_DIALOG_STYLE wxS("DialogStyle")
|
#define wxPG_FILE_DIALOG_STYLE wxS("DialogStyle")
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_3_0
|
||||||
|
#if wxCHECK_VISUALC_VERSION(10)
|
||||||
|
#pragma deprecated(wxPG_DIR_DIALOG_MESSAGE)
|
||||||
|
#endif
|
||||||
// Specific to wxDirProperty, wxString, default is empty.
|
// Specific to wxDirProperty, wxString, default is empty.
|
||||||
// Sets a specific message for the dir dialog.
|
// Sets a specific message for the dir dialog.
|
||||||
#define wxPG_DIR_DIALOG_MESSAGE wxS("DialogMessage")
|
#define wxPG_DIR_DIALOG_MESSAGE wxPG_DEPRECATED_MACRO_VALUE(wxS("DialogMessage"),\
|
||||||
|
"wxPG_DIR_DIALOG_MESSAGE is deprecated. Use wxPG_DIALOG_TITLE instead.")
|
||||||
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
|
|
||||||
// wxArrayStringProperty's string delimiter character. If this is
|
// wxArrayStringProperty's string delimiter character. If this is
|
||||||
// a quotation mark or hyphen, then strings will be quoted instead
|
// a quotation mark or hyphen, then strings will be quoted instead
|
||||||
|
@@ -583,6 +583,7 @@ public:
|
|||||||
virtual ~wxEditorDialogProperty();
|
virtual ~wxEditorDialogProperty();
|
||||||
|
|
||||||
virtual wxPGEditorDialogAdapter* GetEditorDialog() const wxOVERRIDE;
|
virtual wxPGEditorDialogAdapter* GetEditorDialog() const wxOVERRIDE;
|
||||||
|
virtual bool DoSetAttribute(const wxString& name, wxVariant& value) wxOVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxEditorDialogProperty(const wxString& label, const wxString& name);
|
wxEditorDialogProperty(const wxString& label, const wxString& name);
|
||||||
@@ -674,7 +675,9 @@ public:
|
|||||||
virtual wxString ValueToString(wxVariant& value, int argFlags = 0) const wxOVERRIDE;
|
virtual wxString ValueToString(wxVariant& value, int argFlags = 0) const wxOVERRIDE;
|
||||||
virtual bool StringToValue(wxVariant& variant, const wxString& text,
|
virtual bool StringToValue(wxVariant& variant, const wxString& text,
|
||||||
int argFlags = 0) const wxOVERRIDE;
|
int argFlags = 0) const wxOVERRIDE;
|
||||||
|
#if WXWIN_COMPATIBILITY_3_0
|
||||||
virtual bool DoSetAttribute(const wxString& name, wxVariant& value) wxOVERRIDE;
|
virtual bool DoSetAttribute(const wxString& name, wxVariant& value) wxOVERRIDE;
|
||||||
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
virtual wxValidator* DoGetValidator() const wxOVERRIDE;
|
virtual wxValidator* DoGetValidator() const wxOVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -65,6 +65,9 @@ public:
|
|||||||
/** @class wxFontProperty
|
/** @class wxFontProperty
|
||||||
@ingroup classes
|
@ingroup classes
|
||||||
Property representing wxFont.
|
Property representing wxFont.
|
||||||
|
|
||||||
|
<b>Supported special attributes:</b>
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the font dialog (since 3.1.3).
|
||||||
*/
|
*/
|
||||||
class wxFontProperty : public wxEditorDialogProperty
|
class wxFontProperty : public wxEditorDialogProperty
|
||||||
{
|
{
|
||||||
@@ -219,6 +222,17 @@ const wxString& wxPGGetDefaultImageWildcard();
|
|||||||
/** @class wxImageFileProperty
|
/** @class wxImageFileProperty
|
||||||
@ingroup classes
|
@ingroup classes
|
||||||
Property representing image file(name).
|
Property representing image file(name).
|
||||||
|
|
||||||
|
<b>Supported special attributes:</b>
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the file dialog (since 3.1.3).
|
||||||
|
- ::wxPG_FILE_DIALOG_STYLE: Sets a specific wxFileDialog style for the file dialog.
|
||||||
|
- ::wxPG_FILE_WILDCARD: Sets wildcard (see wxFileDialog for format details), "All
|
||||||
|
files..." is default.
|
||||||
|
- ::wxPG_FILE_SHOW_FULL_PATH: Default @true. When @false, only the file name is shown
|
||||||
|
(i.e. drive and directory are hidden).
|
||||||
|
- ::wxPG_FILE_SHOW_RELATIVE_PATH: If set, then the filename is shown relative to the
|
||||||
|
given path string.
|
||||||
|
- ::wxPG_FILE_INITIAL_PATH: Sets the initial path of where to look for files.
|
||||||
*/
|
*/
|
||||||
class wxImageFileProperty : public wxFileProperty
|
class wxImageFileProperty : public wxFileProperty
|
||||||
{
|
{
|
||||||
@@ -253,6 +267,7 @@ protected:
|
|||||||
enter strings that are not in the list of choices. If this value is 1,
|
enter strings that are not in the list of choices. If this value is 1,
|
||||||
user strings are preferably placed in front of valid choices. If value is
|
user strings are preferably placed in front of valid choices. If value is
|
||||||
2, then those strings will placed behind valid choices.
|
2, then those strings will placed behind valid choices.
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the editor dialog (since 3.1.3).
|
||||||
*/
|
*/
|
||||||
class wxMultiChoiceProperty : public wxEditorDialogProperty
|
class wxMultiChoiceProperty : public wxEditorDialogProperty
|
||||||
{
|
{
|
||||||
|
@@ -129,6 +129,13 @@ struct wxPGPaintData
|
|||||||
*/
|
*/
|
||||||
#define wxPG_UINT_PREFIX wxS("Prefix")
|
#define wxPG_UINT_PREFIX wxS("Prefix")
|
||||||
|
|
||||||
|
/** Built-in attribute specific to wxEditorDialogProperty and derivatives,
|
||||||
|
wxString, default is empty. Sets a specific title for the editor dialog.
|
||||||
|
|
||||||
|
@since 3.1.3
|
||||||
|
*/
|
||||||
|
#define wxPG_DIALOG_TITLE wxS("DialogTitle")
|
||||||
|
|
||||||
/** wxFileProperty and wxImageFileProperty specific built-in attribute,
|
/** wxFileProperty and wxImageFileProperty specific built-in attribute,
|
||||||
@c wxChar*, default is detected/varies. Sets the wildcard used in
|
@c wxChar*, default is detected/varies. Sets the wildcard used in
|
||||||
the triggered wxFileDialog. Format is the same.
|
the triggered wxFileDialog. Format is the same.
|
||||||
@@ -152,11 +159,6 @@ struct wxPGPaintData
|
|||||||
*/
|
*/
|
||||||
#define wxPG_FILE_INITIAL_PATH wxS("InitialPath")
|
#define wxPG_FILE_INITIAL_PATH wxS("InitialPath")
|
||||||
|
|
||||||
/** Built-in attribute specific to wxFileProperty and derivatives, wxString,
|
|
||||||
default is empty. Sets a specific title for the dir dialog.
|
|
||||||
*/
|
|
||||||
#define wxPG_FILE_DIALOG_TITLE wxS("DialogTitle")
|
|
||||||
|
|
||||||
/** Built-in attribute specific to wxFileProperty and derivatives, @c long,
|
/** Built-in attribute specific to wxFileProperty and derivatives, @c long,
|
||||||
default is 0. Sets a specific wxFileDialog style for the file dialog,
|
default is 0. Sets a specific wxFileDialog style for the file dialog,
|
||||||
e.g. ::wxFD_SAVE.
|
e.g. ::wxFD_SAVE.
|
||||||
@@ -165,11 +167,6 @@ struct wxPGPaintData
|
|||||||
*/
|
*/
|
||||||
#define wxPG_FILE_DIALOG_STYLE wxS("DialogStyle")
|
#define wxPG_FILE_DIALOG_STYLE wxS("DialogStyle")
|
||||||
|
|
||||||
/** Built-in attribute specific to wxDirProperty, wxString, default is empty.
|
|
||||||
Sets a specific message for the dir dialog.
|
|
||||||
*/
|
|
||||||
#define wxPG_DIR_DIALOG_MESSAGE wxS("DialogMessage")
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Built-in attribute to set wxArrayStringProperty's string delimiter
|
Built-in attribute to set wxArrayStringProperty's string delimiter
|
||||||
character. If this is a quotation mark or hyphen, then strings
|
character. If this is a quotation mark or hyphen, then strings
|
||||||
@@ -615,12 +612,15 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
m_flags |= wxPG_PROP_NO_ESCAPE;
|
m_flags |= wxPG_PROP_NO_ESCAPE;
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
Supported special attributes:
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the text editor dialog.
|
||||||
|
|
||||||
@subsection wxDirProperty
|
@subsection wxDirProperty
|
||||||
|
|
||||||
Like wxLongStringProperty, but the button triggers dir selector instead.
|
Like wxLongStringProperty, but the button triggers dir selector instead.
|
||||||
|
|
||||||
Supported special attributes:
|
Supported special attributes:
|
||||||
- ::wxPG_DIR_DIALOG_MESSAGE: Sets specific message in the dir selector.
|
- ::wxPG_DIALOG_TITLE: Sets specific title for the dir selector.
|
||||||
@see @ref propgrid_property_attributes
|
@see @ref propgrid_property_attributes
|
||||||
|
|
||||||
@subsection wxFileProperty
|
@subsection wxFileProperty
|
||||||
@@ -630,6 +630,8 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
::wxPG_FILE_WILDCARD attribute.
|
::wxPG_FILE_WILDCARD attribute.
|
||||||
|
|
||||||
Supported special attributes:
|
Supported special attributes:
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the file dialog.
|
||||||
|
- ::wxPG_FILE_DIALOG_STYLE: Sets a specific wxFileDialog style for the file dialog.
|
||||||
- ::wxPG_FILE_WILDCARD: Sets wildcard (see wxFileDialog for format details), "All
|
- ::wxPG_FILE_WILDCARD: Sets wildcard (see wxFileDialog for format details), "All
|
||||||
files..." is default.
|
files..." is default.
|
||||||
- ::wxPG_FILE_SHOW_FULL_PATH: Default @true. When @false, only the file name is shown
|
- ::wxPG_FILE_SHOW_FULL_PATH: Default @true. When @false, only the file name is shown
|
||||||
@@ -637,8 +639,6 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
- ::wxPG_FILE_SHOW_RELATIVE_PATH: If set, then the filename is shown relative to the
|
- ::wxPG_FILE_SHOW_RELATIVE_PATH: If set, then the filename is shown relative to the
|
||||||
given path string.
|
given path string.
|
||||||
- ::wxPG_FILE_INITIAL_PATH: Sets the initial path of where to look for files.
|
- ::wxPG_FILE_INITIAL_PATH: Sets the initial path of where to look for files.
|
||||||
- ::wxPG_FILE_DIALOG_TITLE: Sets a specific title for the dir dialog.
|
|
||||||
- ::wxPG_FILE_DIALOG_STYLE: Sets a specific wxFileDialog style for the file dialog.
|
|
||||||
@see @ref propgrid_property_attributes
|
@see @ref propgrid_property_attributes
|
||||||
|
|
||||||
@subsection wxEnumProperty
|
@subsection wxEnumProperty
|
||||||
@@ -666,6 +666,7 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
|
|
||||||
Supported special attributes:
|
Supported special attributes:
|
||||||
- ::wxPG_ARRAY_DELIMITER: Sets string delimiter character.
|
- ::wxPG_ARRAY_DELIMITER: Sets string delimiter character.
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the editor dialog.
|
||||||
Default is comma (',').
|
Default is comma (',').
|
||||||
@see @ref propgrid_property_attributes
|
@see @ref propgrid_property_attributes
|
||||||
|
|
||||||
@@ -702,6 +703,7 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
enter strings that are not in the list of choices. If this value is 1,
|
enter strings that are not in the list of choices. If this value is 1,
|
||||||
user strings are preferably placed in front of valid choices. If value
|
user strings are preferably placed in front of valid choices. If value
|
||||||
is 2, then those strings will placed behind valid choices.
|
is 2, then those strings will placed behind valid choices.
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the editor dialog.
|
||||||
@see @ref propgrid_property_attributes
|
@see @ref propgrid_property_attributes
|
||||||
|
|
||||||
@subsection wxImageFileProperty
|
@subsection wxImageFileProperty
|
||||||
@@ -710,6 +712,18 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
but has thumbnail of the image in front of the filename
|
but has thumbnail of the image in front of the filename
|
||||||
and autogenerates wildcard from available image handlers.
|
and autogenerates wildcard from available image handlers.
|
||||||
|
|
||||||
|
Supported special attributes:
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the file dialog.
|
||||||
|
- ::wxPG_FILE_DIALOG_STYLE: Sets a specific wxFileDialog style for the file dialog.
|
||||||
|
- ::wxPG_FILE_WILDCARD: Sets wildcard (see wxFileDialog for format details), "All
|
||||||
|
files..." is default.
|
||||||
|
- ::wxPG_FILE_SHOW_FULL_PATH: Default @true. When @false, only the file name is shown
|
||||||
|
(i.e. drive and directory are hidden).
|
||||||
|
- ::wxPG_FILE_SHOW_RELATIVE_PATH: If set, then the filename is shown relative to the
|
||||||
|
given path string.
|
||||||
|
- ::wxPG_FILE_INITIAL_PATH: Sets the initial path of where to look for files.
|
||||||
|
@see @ref propgrid_property_attributes
|
||||||
|
|
||||||
@subsection wxColourProperty
|
@subsection wxColourProperty
|
||||||
|
|
||||||
<b>Useful alternate editor:</b> Choice.
|
<b>Useful alternate editor:</b> Choice.
|
||||||
@@ -728,6 +742,9 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
|||||||
Represents wxFont. Various sub-properties are used to edit individual
|
Represents wxFont. Various sub-properties are used to edit individual
|
||||||
subvalues.
|
subvalues.
|
||||||
|
|
||||||
|
Supported special attributes:
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the font dialog.
|
||||||
|
|
||||||
@subsection wxSystemColourProperty
|
@subsection wxSystemColourProperty
|
||||||
|
|
||||||
Represents wxColour and a system colour index. wxChoice is used to edit
|
Represents wxColour and a system colour index. wxChoice is used to edit
|
||||||
|
@@ -553,6 +553,9 @@ protected:
|
|||||||
having a button triggering an editor dialog, like e.g. wxLongStringProperty,
|
having a button triggering an editor dialog, like e.g. wxLongStringProperty,
|
||||||
wxDirProperty, wxFileProperty.
|
wxDirProperty, wxFileProperty.
|
||||||
|
|
||||||
|
<b>Supported special attributes:</b>
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the editor dialog.
|
||||||
|
|
||||||
@since 3.1.3
|
@since 3.1.3
|
||||||
*/
|
*/
|
||||||
class wxEditorDialogProperty : public wxPGProperty
|
class wxEditorDialogProperty : public wxPGProperty
|
||||||
@@ -561,6 +564,7 @@ public:
|
|||||||
virtual ~wxEditorDialogProperty();
|
virtual ~wxEditorDialogProperty();
|
||||||
|
|
||||||
virtual wxPGEditorDialogAdapter* GetEditorDialog() const;
|
virtual wxPGEditorDialogAdapter* GetEditorDialog() const;
|
||||||
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
@@ -599,6 +603,9 @@ protected:
|
|||||||
Like wxLongStringProperty, but the button triggers file selector instead.
|
Like wxLongStringProperty, but the button triggers file selector instead.
|
||||||
|
|
||||||
<b>Supported special attributes:</b>
|
<b>Supported special attributes:</b>
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the file dialog (since 3.1.3).
|
||||||
|
- ::wxPG_FILE_DIALOG_STYLE: Sets a specific wxFileDialog style for the file
|
||||||
|
dialog (since 2.9.4).
|
||||||
- ::wxPG_FILE_WILDCARD: Sets wildcard (see wxFileDialog for format details),
|
- ::wxPG_FILE_WILDCARD: Sets wildcard (see wxFileDialog for format details),
|
||||||
"All files..." is default.
|
"All files..." is default.
|
||||||
- ::wxPG_FILE_SHOW_FULL_PATH: Default @true. When @false, only the file name is
|
- ::wxPG_FILE_SHOW_FULL_PATH: Default @true. When @false, only the file name is
|
||||||
@@ -606,9 +613,6 @@ protected:
|
|||||||
- ::wxPG_FILE_SHOW_RELATIVE_PATH: If set, then the filename is shown relative
|
- ::wxPG_FILE_SHOW_RELATIVE_PATH: If set, then the filename is shown relative
|
||||||
to the given path string.
|
to the given path string.
|
||||||
- ::wxPG_FILE_INITIAL_PATH: Sets the initial path of where to look for files.
|
- ::wxPG_FILE_INITIAL_PATH: Sets the initial path of where to look for files.
|
||||||
- ::wxPG_FILE_DIALOG_TITLE: Sets a specific title for the dir dialog.
|
|
||||||
- ::wxPG_FILE_DIALOG_STYLE: Sets a specific wxFileDialog style for the file
|
|
||||||
dialog (since 2.9.4).
|
|
||||||
*/
|
*/
|
||||||
class wxFileProperty : public wxEditorDialogProperty
|
class wxFileProperty : public wxEditorDialogProperty
|
||||||
{
|
{
|
||||||
@@ -650,6 +654,9 @@ protected:
|
|||||||
@ingroup classes
|
@ingroup classes
|
||||||
Like wxStringProperty, but has a button that triggers a small text
|
Like wxStringProperty, but has a button that triggers a small text
|
||||||
editor dialog.
|
editor dialog.
|
||||||
|
|
||||||
|
<b>Supported special attributes:</b>
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the text editor dialog (since 3.1.3).
|
||||||
*/
|
*/
|
||||||
class wxLongStringProperty : public wxEditorDialogProperty
|
class wxLongStringProperty : public wxEditorDialogProperty
|
||||||
{
|
{
|
||||||
@@ -676,7 +683,7 @@ protected:
|
|||||||
instead.
|
instead.
|
||||||
|
|
||||||
<b>Supported special attributes:</b>
|
<b>Supported special attributes:</b>
|
||||||
- ::wxPG_DIR_DIALOG_MESSAGE: Sets specific message in the dir selector.
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the file dialog (since 3.1.3).
|
||||||
*/
|
*/
|
||||||
class wxDirProperty : public wxEditorDialogProperty
|
class wxDirProperty : public wxEditorDialogProperty
|
||||||
{
|
{
|
||||||
@@ -689,7 +696,6 @@ public:
|
|||||||
virtual wxString ValueToString(wxVariant& value, int argFlags = 0) const;
|
virtual wxString ValueToString(wxVariant& value, int argFlags = 0) const;
|
||||||
virtual bool StringToValue(wxVariant& variant, const wxString& text,
|
virtual bool StringToValue(wxVariant& variant, const wxString& text,
|
||||||
int argFlags = 0) const;
|
int argFlags = 0) const;
|
||||||
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
|
||||||
virtual wxValidator* DoGetValidator() const;
|
virtual wxValidator* DoGetValidator() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -707,6 +713,10 @@ protected:
|
|||||||
/** @class wxArrayStringProperty
|
/** @class wxArrayStringProperty
|
||||||
@ingroup classes
|
@ingroup classes
|
||||||
Property that manages a list of strings.
|
Property that manages a list of strings.
|
||||||
|
|
||||||
|
<b>Supported special attributes:</b>
|
||||||
|
- ::wxPG_ARRAY_DELIMITER: Sets string delimiter character.
|
||||||
|
- ::wxPG_DIALOG_TITLE: Sets a specific title for the editor dialog (since 3.1.3).
|
||||||
*/
|
*/
|
||||||
class wxArrayStringProperty : public wxEditorDialogProperty
|
class wxArrayStringProperty : public wxEditorDialogProperty
|
||||||
{
|
{
|
||||||
|
@@ -1243,7 +1243,7 @@ void FormMain::PopulateWithExamples ()
|
|||||||
pg->Append( prop );
|
pg->Append( prop );
|
||||||
|
|
||||||
prop->SetAttribute(wxPG_FILE_WILDCARD,"Text Files (*.txt)|*.txt");
|
prop->SetAttribute(wxPG_FILE_WILDCARD,"Text Files (*.txt)|*.txt");
|
||||||
prop->SetAttribute(wxPG_FILE_DIALOG_TITLE,"Custom File Dialog Title");
|
prop->SetAttribute(wxPG_DIALOG_TITLE,"Custom File Dialog Title");
|
||||||
prop->SetAttribute(wxPG_FILE_SHOW_FULL_PATH,false);
|
prop->SetAttribute(wxPG_FILE_SHOW_FULL_PATH,false);
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
@@ -1359,8 +1359,8 @@ void FormMain::PopulateWithExamples ()
|
|||||||
// is allowed (naturally, in this case property cannot be accessed by name).
|
// is allowed (naturally, in this case property cannot be accessed by name).
|
||||||
pg->Append( new wxDirProperty( "DirProperty", wxPG_LABEL, ::wxGetUserHome()) );
|
pg->Append( new wxDirProperty( "DirProperty", wxPG_LABEL, ::wxGetUserHome()) );
|
||||||
pg->SetPropertyAttribute( "DirProperty",
|
pg->SetPropertyAttribute( "DirProperty",
|
||||||
wxPG_DIR_DIALOG_MESSAGE,
|
wxPG_DIALOG_TITLE,
|
||||||
"This is a custom dir dialog message" );
|
"This is a custom dir dialog title" );
|
||||||
|
|
||||||
// Add string property - first arg is label, second name, and third initial value
|
// Add string property - first arg is label, second name, and third initial value
|
||||||
pg->Append( new wxStringProperty ( "StringProperty", wxPG_LABEL ) );
|
pg->Append( new wxStringProperty ( "StringProperty", wxPG_LABEL ) );
|
||||||
|
@@ -1938,6 +1938,7 @@ bool wxDirProperty::DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& value)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_3_0
|
||||||
bool wxDirProperty::DoSetAttribute(const wxString& name, wxVariant& value)
|
bool wxDirProperty::DoSetAttribute(const wxString& name, wxVariant& value)
|
||||||
{
|
{
|
||||||
if ( name == wxPG_DIR_DIALOG_MESSAGE )
|
if ( name == wxPG_DIR_DIALOG_MESSAGE )
|
||||||
@@ -1947,6 +1948,7 @@ bool wxDirProperty::DoSetAttribute(const wxString& name, wxVariant& value)
|
|||||||
}
|
}
|
||||||
return wxEditorDialogProperty::DoSetAttribute(name, value);
|
return wxEditorDialogProperty::DoSetAttribute(name, value);
|
||||||
}
|
}
|
||||||
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
// wxPGDialogAdapter
|
// wxPGDialogAdapter
|
||||||
@@ -2000,6 +2002,16 @@ wxPGEditorDialogAdapter* wxEditorDialogProperty::GetEditorDialog() const
|
|||||||
return new wxPGDialogAdapter();
|
return new wxPGDialogAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxEditorDialogProperty::DoSetAttribute(const wxString& name, wxVariant& value)
|
||||||
|
{
|
||||||
|
if ( name == wxPG_DIALOG_TITLE )
|
||||||
|
{
|
||||||
|
m_dlgTitle = value.GetString();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return wxPGProperty::DoSetAttribute(name, value);
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
// wxFileProperty
|
// wxFileProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
@@ -2184,11 +2196,13 @@ bool wxFileProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
|||||||
m_initialPath = value.GetString();
|
m_initialPath = value.GetString();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#if WXWIN_COMPATIBILITY_3_0
|
||||||
else if ( name == wxPG_FILE_DIALOG_TITLE )
|
else if ( name == wxPG_FILE_DIALOG_TITLE )
|
||||||
{
|
{
|
||||||
m_dlgTitle = value.GetString();
|
m_dlgTitle = value.GetString();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
else if ( name == wxPG_FILE_DIALOG_STYLE )
|
else if ( name == wxPG_FILE_DIALOG_STYLE )
|
||||||
{
|
{
|
||||||
m_dlgStyle = value.GetLong();
|
m_dlgStyle = value.GetLong();
|
||||||
|
Reference in New Issue
Block a user