📄 changes-propgrid.txt
字号:
more consistently.
Bugs Fixed:
- Description box not correctly refreshed on page change.
- wxGTK: Skewed virtual size at startup.
- Graphics glitches with Delete (it now does full refresh).
- wxArrayStringProperty event handler destroyed dialog prior to calling
its GetStrings method.
- SetPropertyLabel did not refresh properly when auto sorting enabled.
Version 0.9.6 ( Dec-17-2004 )
New Features:
- wxPropertyGridManager: Embeds wxPropertyGrid, and optionally toolbar,
adjustable description box, and a compactor button. Automatically
manages multiple pages of properties, and mirrors many (eventually
most) of the wxPropertyGrid's methods. See documentation ( section
Using wxPropertyGridManager on main page) for details.
- Added following custom property examples to the sample application:
wxFontDataProperty: Extends wxFontProperty with a colour subproperty.
Value type is wxFontData (which is used with wxFontDialog).
wxPointProperty: A simple property for wxPoint class.
Has two children, "X" and "Y".
wxSizeProperty: A simple property for wxSize class.
Has two children, "Width" and "Height".
- wxPG_LIMITED_EDITING window style flag: disables textctrl based editors
for properties which can be edited in another way. Equals calling
wxPropertyGrid::LimitPropertyEditing for all added properties.
- EVT_PG_RIGHT_CLICK event: handles wxEVT_PG_RIGHT_CLICK, which
occurs when a property is right clicked. For consistency, also occurs
when clicking outside property area, but with invalid property id.
Name Changes:
- Value type implementor macro names made more consistent:
wxPG_IMPLEMENT_WXOBJECT_TYPE -> wxPG_IMPLEMENT_VALUE_TYPE_WXOBJ
wxPG_IMPLEMENT_TYPE -> wxPG_IMPLEMENT_VALUE_TYPE
- wxPG_NOCATINIT -> wxPG_INIT_NOCAT. Other window style name changes
also pending.
- IsEnabled() -> IsPropertyEnabled(). IsEnabled conflicted with
wxWindow::IsEnabled.
New Methods:
- ExpandAll: Expands all items that can be expanded.
- GetRowHeight: Returns height of a grid row in pixels.
- SetPropertyValue(id/name,void*): Sets property's value, incase value type is void*
- GetPropertyValueAsVoidPtr(id/name): Gets value from property, incase value
type is void*
- SetBoolChoices(truestr,falsestr): Static method that allows changing choice
strings for wxBoolProperty.
- GetPropertyValueAsSize(id/name): Returns value as wxSize. Does type checking.
Fully inline since wxSizeProperty is not in the library.
- SetPropertyValue(id/name,wxSize): Sets value from wxSize. Does type checking.
Fully inline since wxSizeProperty is not in the library.
- GetPropertyValueAsPoint(id/name): Returns value as wxPoint. Does type checking.
Fully inline since wxPointProperty is not in the library.
- SetPropertyValue(id/name,wxPoint): Sets value from wxPoint. Does type checking.
Fully inline since wxPointProperty is not in the library.
- GetPropertyIndex: returns property's position under its parent.
- wxPropertyGridEvent::EnableProperty: Enables property.
- wxPropertyGridEvent::DisableProperty: Disables property.
- wxPropertyGridEvent::IsPropertyEnabled: Returns TRUE if property is enabled.
Other Changes:
- Categories can now be added in non-categoric mode as well. However, if adding
to root, the index, in case of Insert, is ignored and the category is appended
instead.
- wxColourProperty etc: Custom colour is now indicated with "(R,G,B)" instead
of "Custom (R,G,B)" for saving screen real-estate.
- wxColourProperty: Colour list should now have same colours as Windows
font dialog colour selector. Order is similarly from dark to light.
- GetPropertyValues: added two arguments, baseparent and flags. baseparent is the
item under which the properties are got (default is root). Flags can be
wxKEEP_STRUCTURE if each sub-category is read into a separate wxVariant list.
- SetPropertyValues: now handles list variants, creating a new sub-category for each.
- void* type is back. Its typename is "void*", as in wxVariant.
- Added style wxPG_ALPHABETIC_MODE as a combination of wxPG_NOCATEGORIES and wxPG_AUTOSORT.
- GetPropertyValueAsXXX(id) methods are now static.
- Currently, Append is commented out and Insert is used instead. Less code to worry about.
- Sample's standard items page is now split into two. The new page has example
sections.
Property System Changes (important if you have made custom property classes):
- wxPGPropertyWithChildren now has virtual RefreshChildren.
- wxPG_SetVariantWxObjectValue macro no longer gets a value argument. Now it
uses GetValue automatically (increases tolerance for inheriting).
- wxPG_SetVariantVoidPtrValue() macro for void* value types.
- wxPG_IMPLEMENT_VALUE_TYPE_VOIDP(CLASSNAME,TYPE,DEFVAL) for non-wxObject
classes.
Bugs Fixed:
- Placing wxPropertyGrid at a high enough y position could cause its
visibility cache recalculation to fail.
- Default values of derived value types did not work at all (this included
default values of custom flags and enum properties that could be generated
via macro pairs).
- Using wxPG_NOCATINIT style should have resulted into crash or strange behaviour.
- wxCustomChoice drop-down placement calculation used logical coordinates
instead of physical.
- Window style flags were at 0x0001 -> 0x0800 range instead of correct
(according to wxToolbar's headers) 0x0010 -> 0x8000 range.
- LimitPropertyEditing caused graphics glitches with some properties (atleast
wxFontProperty).
- wxPGPropertyWithChildren default GetValueAsString added an extra "; "
at the end of the list of child values.
- wxFontProperty's text in editor was not correctly refreshed after font
dialog was closed.
Version 0.9.5 ( Dec-08-2004 )
New Features:
- The old wxColourProperty is now wxSystemColourProperty. The new wxColourProperty
is simpler, equipped with wxColour as value type, and only has some some basic
colours in its drop-down selection. Note that wxColourPropertyValue's name is left
intact. wxSystemColourProperty's original constructor (with initial value
given as two distinct arguments) is removed; instead, now it has (label,name,
wxcolourpropertyvalue) and (labe,name,wxcolour) constructors.
- Four types of user properties can now be quickly created using
DECLARE/IMPLEMENT macro pairs. Here's brief descriptions:
A) StringProperty with button which function is specified.
B) wxFlagsProperty with custom default value and built-in labels and values.
C) wxEnumProperty with custom default value and built-in labels and values.
D) wxColourProperty with custom colour drop-down.
Documentation main page has now much better "Creating New Properties"
section, including instructions how use macros to implement those
types of properties mentioned above.
- Help strings can now be associated with properties using SetPropertyHelpString().
Right now they will be shown in status bar (if any) when property is selected.
Name Changes:
- wxColourProperty -> wxSystemColourProperty.
- GetAllValues -> GetPropertyValues.
New Methods:
- SetPropertyValues: sets property values from wxVariant list. List items that
do not have corresping properties will be created using new NewProperty method.
- SetPropertyHelpString: associates a help string with a property.
- GetPropertyHelpString: returns associated help string.
- CollapseAll: as the name says, this collapses all collapsible items.
- GetPropertyClassName: returns class name of a property. If wxPGProperty is derived
from wxObject (or wxVariant) then it uses GetClassInfo()->GetClassName(), otherwise
a builtin (more lightweight) alternative.
- InitAllTypeHandlers: initializes all built-in types. As a side effect, creates
references to most built-in property classes, thus possibly increasing executable size
when using static library. Mainly useful with SetPropertyValues.
- NewProperty(label,name,variant): creates new property instance, determining class
and initial value from third argument (which is a reference to wxVariant).
Other Changes:
- Moved wxArrayStringProperty to core properties.
- All base property classes are now abstract.
- wxCustomComboBox and wxCustomChoice dropdown now have keyboard control.
- More consistent visibility cache updating to reduce problems in a
few complicated situations.
- If option to inherit from wxVariant or wxObject is not used (as is the default),
virtual function to return property class name is generated by the IMPLEMENT_XXX
macro.
- wxLongStringProperty and all classes created with IMPLEMENT_STRING_PROPERTY
now convert newlines and tabs into escape sequences when shown/edited in textctrl.
- Add removed since there are already too many Append overloads.
- wxSystemColourProperty now has two new constructors: One that accepts
wxColourPropertyValue reference and other that accepts wxColour.
- wxMSW: wxCustomComboBox focus indicator rectangle should now have black colour
(but I think the wxDOT style still doesn't show right).
Property System Changes (important if you have made custom property classes):
- wxPG_IMPLEMENT_TYPE etc. macro usage changed. They now have new argument, at the third
slot, which is the default property class for that type.
- New wxPGValueType for bool (before, long type was used for bool as well, but now
we need a bit more type accuracy).
- DECLARE_PROPERTY_CLASS etc. macros now contain GetValueType() method declaration
when necessary.
- GenerateChildren method removed. Instead, children are now generated
in the constructor.
Bugs Fixed:
- WXK_BACKSPACE processing in wxCustomTextCtrl did not take selection into account.
Version 0.9.4 ( Nov-29-2004 )
New Features:
- Categories can now be inserted under other categories. In non-categoric mode, items
of all categories are shown at top level, regardless of their depth in categoric mode.
- wxParentProperty - only property which can have a custom selection of sub-properties
(of which any can be wxParentProperty themselves). Has textctrl which edits the values
similar as with wxFontProperty. When iterating through properties (GetNextProperty etc.),
wxParentProperty is ignored, but its children are not.
- wxPG_HIDE_MARGIN style hides margin and prevents user from expanding/collapsing anything.
Default state of all collapsible items becomes expanded.
- wxPG_STATIC_SPLITTER style prevents user from moving the splitter.
- wxPG_STATIC_LAYOUT combines wxPG_HIDE_MARGIN and wxPG_STATIC_SPLITTER. Sample can demonstrate
use of this combination.
- Sample application can now be used to browse some of the used wxWidgets library configuration.
New Methods:
- Append(prop) and Insert(parent,index,prop) have overloaded versions that allow adding
simple type variables easier. For example Append(name,label,string) automatically adds
a wxStringProperty.
- AppendIn does exactly the same as append, but first argument is id or name to a parent
under which the newly created property is added.
- ClearPropertyValue method allows resetting value of a property to the type default.
- GetPropertyValueAsXXX methods for value acquisition. GetPropertyValueAsString() returns
full text representation of the property value, regardless of the actual value type of
that property.
- IsPropertyValueType methods allow direct checking whether property's value type matches
a given string (as a value type name) or pointer to value type directly.
- SetCurrentCategory method allows setting category under which Append adds properties.
Changes:
- wxColourProperty now displays correct text all the time (i.e. with custom colour, always
Custom(R,G,B) instead of just Custom).
- Initial changes to improve conformance to wx coding standards.
- GetPropertyValue() returns now wxVariant instead of wxPGVariant.
- By the default, expand/collapse buttons are now vertically centered. Use wxPG_CLASSIC_SPACING
style to enforce original spacing.
- wxPropertyGridEvent methods now have "Property" in their names (for example, GetPropertyValue
instead GetValue).
- wxPGId now has comparison operators for wxPGId, wxString(as property name) and const wxChar*
(also as property name).
- Part of the propertygrid.h moves to propgext.h, which should be included by user sources
when they define new property classes.
- Default name for a property is now it's label instead of wxEmptyString.
- wxFloatProperty now uses double and value is pointer to it.
- SetPropertyValueAsFloat() method no longer required. Just use SetPropertyValue() instead
and cast when you encounter an ambiguity (should now be issue with longs only, not ints).
- Main property draw function somewhat optimized.
- Small improvement for OnResize Refresh handling.
- Sub-properties can now themselves be parents for sub-properties (altough don't expect
you can add anything to likes of wxFontProperty or wxFlagsProperty).
- Documentation: Stripped a lot of the "Creating New Properties" section. Mostly obsolete
stuff that I don't want to keep up-to-date right now.
- Documentation: Examples should now reflect the significant API changes.
Property System Changes (important if you have made custom property classes):
- Value type system.
- OnEvent's event arg is now wxEvent& instead of wxEvent*.
- SetValue is now DoSetValue.
- DoSetValue methods should now include wxPG_SetVariantValue(value) style line.
- DoSetValue methods' value argument is now of type wxPGVariant instead of void*.
- GenerateEditorWidgetXXX methods are now GenerateEditorXXX methods.
- New GenerateEditorTextCtrlAndButton method.
- GenerateEditorChoice now embeds string array re-allocation (SLAlloc etc.) code.
- GenerateEditorChoice now uses wx(Custom)ComboBox with wxCB_READONLY to allow
displaying custom text instad of value label.
- Choice editor generation simplified - see wxEnumProperty etc. for details.
- GetValue method is now const.
- GenerateChild replaced with GenerateChildren.
- GetValueAsString got second bool argument which, when set to TRUE generates
complete value (pseudo-storable kind) instead of displayed value.
- SetValueFromString bool argument is now long flags style argument that can have
wxPG_REPORT_ERROR (function of old bool) and wxPG_FULL_VALUE flags.
Bugs Fixed:
- wxPGPropertyWithChildren::SetValueFromString() could not detect zero-length tokens.
- Category could not be properly selected by clicking on its text if splitter was at
farther left position.
- Internal flags distorting bug in SetDefaultPriority method.
- A small graphics glitch related to custom controls and properties with an image.
Version 0.9.3 ( Nov-21-2004 )
New Features:
- wxArrayStringProperty - for editing a list of strings.
- wxImageFileProperty - like wxFileProperty, but has thumbnail of the image in front of
the filename and autogenerates wildcard from available image handlers (buggy under
wxGTK - most image handler extensions only have the first character).
- wxCursorProperty - allows selecting one of the common (non-platform specific) cursors.
Under Windows shows cursor images in the drop-down list (under GTK this isn't easy
since there doesn't seem to be a function to do it nor is there a way to directly access
the cursor pixmap).
- Compact mode where low-priority properties are hidden. Preferred way is to call
SetDefaultPriority(wxPG_LOW) before starting to add low-priority ones and
ResetDefaultPriority() when done, altough individual properties can be set with
SetPropertyPriority(id,priority). Then Compact( TRUE/FALSE ) calls will trigger whether
low-priority properties are hidden or not. Sample now has checkable Compact item in
"Try These" menu that will demonstrate this feature.
- wxCustomButton now has wxGTK native rendering (other platforms still use wxMSW rendering).
Changes:
- wxFlagsProperty items must now be separated by commas (semicolons are *not* ok anymore).
- For consistency, GetNext() and GetPrev() are now GetNextProperty() and GetPrevProperty()
(original versions are removed and reserved for later reintroduction for iterating over
any items).
- SetPropertyValueAsFloat() method for setting values to wxFloatProperties.
- SetPropertyValue method that accepts a wxString value now uses property's SetValueFromString
method (so it can be used with all kinds of properties, not just those
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -