wxPropertyGridHeader associated with wxPropertyGrid has to be notified about every horizontal scroll of the grid.
New position is sent with dedicated wxEVT_PG_HSCROLL event being handled by wxPropertyGridManager which in turn scrolls the header accordingly.
See #18313.
New method of calculating of the new position/size of the editor (introduced in 95461c566d) doesn't work well in all cases so we have to go back to the (modified) old method. To get the correct position of the editor cell from the absolute position of the splitter 0 we have to shift it by the origin of the scrolled view area.
See #18313.
When extra style bits are set with the call to
wxPropertyGridManager::SetExtraStyle(), only those which are relevant
to wxPropertyGrid should be passed to the underlying property grid object.
Because it can happen that not all extra style bits of the underlying
wxPropertyGrid have been effectively changed by call to SetExtraStyle()
(e.g. wxPG_EX_NATIVE_DOUBLE_BUFFERING), we have to get the actual style
bits prior to storing them.
When there is open an editor for some property and in the same time
wxPropertyGrid layout is changed (due to the adding or removing a property,
sorting), it is necessary to recalculate the actual position of the active
editor to display it in the cell dedicated for the edited property. Under
some platforms the position of the edit control is shifted within the cell
and we have to take this shift into account in repositioning process.
Because actual value of the shift depends on the platform and on
the particular control, it is convenient to determine actual shift when
the editor is created and use this value whenever repositioning is done.
Close#17912.
Currently, customizing some dialogs for small screen environment is done statically on the build stage by setting wxPG_SMALL_SCREEN to 1 (what is done for WXWINCE only).
Instead, we can do this for all platforms in a dynamic manner, based on the classification provided by wxSystemSettings::GetScreenType() function.
In order to do so there is introduced a static helper function wxPropertyGrid::IsSmallScreen() which is used to select right parameters (size, position) for several dialogs in order to display them correctly on the small screen.
By default, to prevent wxPG from stealing focus from other controls, focus is moved to the grid only if it was already in one of its child controls.
When newly introduced wxPG_EX_ALWAYS_ALLOW_FOCUS flag is set then wxPG can take focus on the entire grid area (on canvas) even if focus is moved from another control.
Default wxPG behavior remains unchanged because wxPG_EX_ALWAYS_ALLOW_FOCUS flag must be explicitly set with wxPropertyGrid::SetExtraStyle function.
Closes#16993.
wxMilliClock_t is always mapped to the proper base type and hence can be used even if wxLongLong type is not defined (when wxUSE_LONGLONG is disabled).
Use attribute constants instead of strings in wxPGProperty and wxPGDefaultRenderer classes and in NumericValidation() function.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This also fixes drawing the PG when buffer is not available and there is necessary do draw directly on window DC.
wxPropertyGrid::DrawItems method is simplified and wxPropertyGrid::DoDrawItems method is reimplemented since its 3-rd argument (isBuffered) is unneeded anymore.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Editor controls (and their event handlers) deleted from within wxPG event handler shouldn't by deleted in global idle event handler but only in local wxPG event handler because global idle events can be generated also by calling e.g. wxYield when wxPG is not in the real idle state.
Closes#16617
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently in wxPG there are used fixed "magic" ID values to identify sub-controls and this can lead to side effects if these values overlap with ID values assigned to another controls in the application (like e.g. menu items).
Closes#13634.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just avoid the unnecessary copying and also make the
signatures more consistent by adding the apparently forgotten "&" in a couple
of places.
See #15893.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
{Freeze,Thaw}() themselves are not virtual any more, so overriding them
doesn't really work and it is unnecessary to reimplement the reference
counting already done by the base class anyhow, so override the DoXXX()
versions instead.
Closes#15877.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Simply use wxNumberFormatter instead, this reduces code duplication and avoids
bugs due to formatting inconsistencies in DoubleToString().
Closes#15625.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).
The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.
Closes#10661.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Applied patch by snowleopard2 fixing a bunch of typos such as misspellings and double words in the documentation. Combined the patch with some local queued typos waiting to be committed as well as adding new typo fixes inspired by the patch.
Function names with American spelling were not changed nor was third-party code touched. The only code changes involve some changes in strings that are translated ("Can not" -> "Cannot").
Closes#13063 (again).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775