📄 changes-propgrid.txt
字号:
use of default printf precision. Also, excess zeroes are now
removed from displayed strings. Note that wxArrayDoubleEditorDialog
was also modified.
- Some new methods:
wxPGProperty* wxPropertyGrid::CreatePropertyByClass
(classname,name,label)
Creates new property according to given classname (for
example, "wxStringProperty" or "String"). Name and label are
same as usual.
wxPGProperty* wxPropertyGrid::CreatePropertyByType
(valuetype,name,label)
Like CreatePropertyByClass but creates from a name of
valuetype (i.e. "string", "long", or any returned by
wxVariant::GetType, wxPGProperty::GetType or
wxPGValueType::GetType).
size_t wxPGProperty::SetChoices(size_t id,labels,values)
If id is non-zero and found, then set property's choices to
refer to that. If not, then creates new set of choices with
given id (or generated if that is zero). Returns final id.
Changes to Custom Property Creation:
- Added m_constants member to wxPGChoiceInfo (which is then
filled by GetChoiceInfo if dynamic modification of property's
choices is desired).
- New wxBaseEnumPropertyClass for creating enum props which have
totally custom label and value storage (see propdev.h for
details).
- wxPGProperty::PrepareValueForDialogEditing. See documentation
on when to use (and what existing code it should replace...).
- As a rule, properties must now be able to cope with NULL
initial value (if its given as pointer or reference).
Bugs Fixed:
- Some properties with wxTextCtrl based editor could not sustain
unspecified value.
- Did not compile without wxWidgets 2.4 compatibility flag
(thanks Luigi Bianchi).
- If dialog-editable property was set with unspecified value,
the dialog usually showed the value prior it was set to
unspecified. Now dialog should show default value instead.
- wxPropertyGrid::SetFont crashed if called before control was
fully created (thanks Tyler Edwards).
- wxOwnerDrawnComboBox's popup was not always closed when mouse
was clicked over the grid.
Version 1.0.0 BETA 4 ( Mar-19-2005 )
This is an intermediate bug fix release.
Bugs Fixed:
- wxMSW: Excess flicker on Refresh resolved.
- wxGTK: wxOwnerDrawnComboBox popup window border problems solved.
- wxPropertyGridManager's header didn't compile
properly.
- ClearSelection did not clear page's selection.
- Potential freezing due to mouse capture not releasing.
- In wxArrayDoublePropertyClass, m_precision member was
used before it was initialized (Matthew Christie).
Version 1.0.0 BETA 3 ( Mar-10-2005 )
NOTE: If you are upgrading from 0.9.9.x or earlier, then please
read the 1.0.0 BETA 1 section below.
New Features:
- NSIS-based installer executable (for Windows). Will try to
auto-detect wxWidgets dir and version, and copies makefiles
accordingly (thanks to Dave Moor for help in testing it).
- Added per-property client data. Use
void wxPropertyGrid::SetPropertyClientData(id/name,void*)
to set it and
void* wxPropertyGrid::GetPropertyClientData(id/name)
to get it. There is also wxPropertyGridEvent::GetPropertyClientData.
- Added specific background colour for category captions. Use
wxPropertyGrid::SetCaptionBackgroundColour and
wxPropertyGrid::GetCaptionBackgroundColour to use it. In the
sample application, this feature can be demonstrated by setting
the White Colour Scheme.
- Added to sample a wxArrayDoubleProperty - an example of
array property of non-string values.
- Preliminary wxUSE_STL=1 compatibility (not yet in custom
controls mode - if you really need this, then make a feature
request).
Changes and minor features:
- Loads of restructuring and additions to the documentation main page.
- Added wxPropertyGrid::ShowPropertyError(id/name,msg). It shows
an error message that is related to a single property. Useful
if you want to do custom checking in OnPropertyChanged handler
and tell the user if he fumbled (currently message is not
shown that well - probably improved in future).
- There is now abstract wxArrayEditorDialog class declared in
propdev.h. It can be derived to create editor dialog for
any type of array. See wxArrayDoubleEditorDialog in the
sample app for an example of how to do it.
- wxBoolProperty has now wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING
attribute. Set it to 1 to enable value cycling on double-click.
- wxGetVariantCast(var,classname) is now redefined in propgrid.h
to also take in account wxPropertyGrid-generated variants
(normally the macro in question only works with regular
wxObject-variants). Effectively makes WX_PG_VARIANT_TO_WXOBJECT
obsolete.
- wxPropertyGrid::Enable(property,bool) is now deprecated. Use
wxPropertyGrid::EnableProperty instead.
- Added wxBoolProperty related section to documentation main page
(due to all special stuff now going on with it).
- wxPropertyGrid::SetPropertyAttribute(id/name,wxPGVariant) is now
SetPropertyAttribute(id/name,wxVariant) due to STL compatibility
issues. There is no int-based constructor for wxVariant (as of
2.5.4), so you need to cast constant ints to longs!
- Similarly, wxPGProperty::SetAttribute(id,wxPGVariant) is now
wxPGProperty::SetAttribute(id,wxVariant).
- Added bool wxPGProperty::StdValidationProcedure(value) which
can be used instead of common "DoSetValue(value); return TRUE;"
sequence in propertyclass::SetValueFromString in order to
automatically use any future validator code (ok for simple
properties such as wxStringProperty and wxIntProperty,
but not for wxArrayXXXProperty).
Bugs Fixed:
- Crash may occur some time after Clear (selection was not nulled properly).
- Numerous compiler warnings and errors resolved for Borland C++
(thanks to Dave Moor for reporting them).
- wxOwnerDrawnComboBox's popup now closes on menu events and propertygrid
scrolling as well.
- There was no proper unspecified value support in wxOwnerDrawnComboBox.
- Changes in splitter centering code may have solved various issues.
- There was wxWidgets dir detection bug in POSIX installation script.
Version 1.0.0 BETA 2 ( Feb-20-2005 )
NOTE: If you are upgrading from 0.9.9.x or earlier, then please
read the 1.0.0 BETA 1 section below.
New Features:
- wxOwnerDrawnComboBox: A customizable generic combobox to be
used with native controls. It allows custom painting popup
items and even a completely custom popup. If you want to
see how it behaves as a standalone control, use Custom Combo
Sample item in Try These! menu.
Sorry, no "double-click cycles" behaviour (yet).
Sorry, no docs. See odcombo.h and propgridsample.cpp (end of
the file) for some details.
- 2.5.4 compatibility.
Changes:
- Native controls are now default. Added compiling section to
the documentation to clarify how to revert to custom controls
if so desired.
- wxArrayString editor dialog now has different set of buttons
enabled/disabled depending on whether the textctrl or the listbox
is focused. This should improve its usability (but it could
still be better - suggestions are welcome).
- Added wxPropertyGridManager::SetDescription(label,content) to
set custom content for description text box.
- Added wxPropertyGrid::GetImageSize(). It returns size of the
image custom paint in front of (some) properties.
- UNIX install script is now able to auto-detect wxWidgets version.
It also now has extra safety checks.
Internal Property API Changes:
- Added wxPGEditor::CanContainCustomImage. Returns TRUE if the actual
control can contain the property's custom image. Base implementation
returns FALSE.
Bugs Fixed:
- GetPropertyValues would crash with combination of NULL base parent
and wxKEEP_STRUCTURE flag (now NULL will indicate usage of root
property, as used in the sample app).
- Type 2 tokenizer (used by the normal wxArrayStringProperty, for example)
caused memory leak on unfinished token.
- Massive amounts (100+) of category adding and removal was problematic.
- wxMSW: Previously what was supposed to be dotted line was
short dash instead.
- wxGTK: Native controls were not always properly refreshed after
their value was changed.
- Few graphics glitches with check box editor (rect filled with
background colour was lacking one pixel in width, focused item
was not properly repainted on resize).
Version 1.0.0 BETA 1 ( Jan-24-2005 )
SIGNIFICANT CHANGES! PLEASE READ CAREFULLY!
To improve compile times, there has been a significant change to how
new instances of property classes are created. Since now
classes themselves are no longer global, a constructor function must
be called instead of a standard constructor.
Previously one would call:
pg->Append( new wxIntProperty(wxT("Label"), wxT("name"), 0) );
Now this would be used instead:
pg->Append( wxIntProperty(wxT("Label"), wxT("name"), 0) );
The only visible difference is the lack of keyword "new".
As a consequence, actual classes had to be renamed. They
now have "Class" appended to their names. However, only those
who have created custom properties should really have to worry about
this.
See below for complete summary of changes in creating custom
user properties.
API and File Organization Changes (vs 0.9.9.x):
- Project is now "propgrid" instead of "propertygrid". This changes
include path as well ( "wx/propertygrid/xxx.h" -> "wx/propgrid/xxx.h" )
- Header file name changes:
"propertygrid.h" -> "propgrid.h"
"propgext.h" -> "propdev.h"
- wxPropertyGridManager got its own header file "manager.h".
- Window style changes:
wxPG_AUTOSORT -> wxPG_AUTO_SORT
wxPG_NOCATEGORIES -> wxPG_HIDE_CATEGORIES
wxPG_BOLDMODIFIED -> wxPG_BOLD_MODIFIED
wxPG_SPLITTERAUTOCENTER -> wxPG_SPLITTER_AUTO_CENTER
- wxVariant storage system changed a bit. Now for each value type which
data type is not directly supported in wxVariant there is wxVariantData
class. This allows pretty much flawless GetPropertyValues and
SetPropertyValues. However, this comes at some price in executable
size ( < 10k ) and that wxVariant::GetWxObjectPtr doesn't work any
longer on those properties. Instead, you need to use this macro
(similar to wxDynamicCast):
WX_PG_VARIANT_TO_WXOBJECT(variant,targetclass)
This should be considered a temporary solution (wxWidgets variant system
needs fixing).
- SetSelection -> SelectProperty, SelectPage (as appropriate).
SelectProperty added to wxPropertyGridManager.
ClearSelection added to wxPropertyGridManager.
GetPropertyName added to wxPropertyGridManager.
- wxALSO_CHILDREN flag (used by SetPropertyAttribute) was renamed to
wxRECURSE.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -